{"version":3,"sources":["Images/checkbox/checked.png","BASE/Controls/images/Loading.svg","BASE/Controls/DataTable/img/pagination/page_arrow_left_disabled.png","BASE/Controls/DataTable/img/pagination/page_arrow_left_last_disabled.png","BASE/Controls/DataTable/img/pagination/page_arrow_left_last_normal.png","BASE/Controls/DataTable/img/pagination/page_arrow_left_normal.png","BASE/Controls/DataTable/img/pagination/page_arrow_right_disabled.png","BASE/Controls/DataTable/img/pagination/page_arrow_right_last_disabled.png","BASE/Controls/DataTable/img/pagination/page_arrow_right_last_normal.png","BASE/Controls/DataTable/img/pagination/page_arrow_right_normal.png","BASE/Controls/DataTable/img/sort/sort_both.png","BASE/Controls/DataTable/img/sort/sort_asc.png","BASE/Controls/DataTable/img/sort/sort_desc.png","BASE/Constants/Constants.js","BASE/Config/AppRoute/RouteConfig.js","BASE/Reducers/Web/Maps/MapReducer.js","BASE/Reducers/Web/MenuReducer.js","BASE/Reducers/Web/Maps/TocReducer.js","BASE/Constants/ActionTypes.js","BASE/Reducers/Web/Panel/PanelContentReducer.js","BASE/Reducers/Authentications/AuthenReducer.js","BASE/Reducers/Web/Panel/SubmitPmrReducer.js","BASE/Reducers/Web/Panel/AskTheCityPlanReducer.js","BASE/Reducers/Web/Panel/SatisfactionAndStatisticReducer.js","BASE/Reducers/Web/Maps/NewTOCReducer.js","BASE/Reducers/Web/Panel/ConstructReducer.js","BASE/Reducers/Web/Panel/HouseNumberReducer.js","BASE/Reducers/Usermanagements/LayoutReducer.js","BASE/Reducers/Web/Panel/SearchOSSReducer.js","BASE/Reducers/Web/Panel/MarkPointSTRReducer.js","BASE/Reducers/RootReducer.js","BASE/Controls/Presentationals/ButtonView.js","BASE/Controls/Containers/Button.js","BASE/Presentationals/HomeView.js","BASE/Containers/Home.js","BASE/Utilities/Validate.js","BASE/Utilities/LocalStorageUtill.js","BASE/Utilities/ServiceUtils.js","BASE/Config/AppRoute/ApiPrivateRoute.js","BASE/Actions/Authentications/AuthenAction.js","BASE/Presentationals/Authentications/LoginView.js","BASE/Controls/Containers/Loading.js","BASE/Controls/Presentationals/AlertMessageView.js","BASE/Controls/Containers/AlertMessage.js","BASE/HOC/WithLoading.js","BASE/HOC/WithAlertMessage.js","BASE/Controls/Containers/AlertMessageSuper.js","BASE/Controls/Presentationals/TextFieldReduxView.js","BASE/Controls/Containers/TextFieldRedux.js","BASE/Presentationals/Authentications/ForgotPasswordView.js","BASE/Containers/Authentications/ForgotPassword.js","BASE/Containers/Authentications/Login.js","BASE/Presentationals/Authentications/FormResetPasswordView.js","BASE/Containers/Authentications/FormResetPassword.js","BASE/Presentationals/Authentications/RegisterView.js","BASE/Containers/Authentications/Register.js","BASE/Presentationals/Authentications/ActivateUserView.js","BASE/Containers/Authentications/ActivateUser.js","BASE/Presentationals/UserManagements/MenuView.js","BASE/Containers/UserManagements/Menu.js","BASE/Presentationals/Web/MenuUserView.js","BASE/Actions/Web/Maps/MapAction.js","BASE/Utilities/UTMConverter.js","BASE/Utilities/Utils.js","BASE/Utilities/MapUtils.js","BASE/Utilities/DateTimeUtil.js","BASE/Map/MapFunctions.js","BASE/Containers/Web/MenuUser.js","BASE/Controls/Presentationals/BreadCrumbUmView.js","BASE/Controls/Containers/BreadCrumbUm.js","BASE/Presentationals/UserManagements/LayoutView.js","BASE/Containers/UserManagements/Layout.js","BASE/Actions/Web/MenuAction.js","BASE/Actions/Web/Maps/TocAction.js","BASE/Constants/MenuConstants.js","BASE/Controls/Presentationals/TooltipView.js","BASE/Controls/Containers/Tooltip.js","BASE/Presentationals/Web/Maps/MapTools/BtnZoomView.js","BASE/Presentationals/Web/Maps/MapTools/BtnCurrentLocationView.js","BASE/Presentationals/Web/Maps/MapTools/BtnMeasurementView.js","BASE/Presentationals/Web/Maps/MapTools/BtnGoToLocationView.js","BASE/Presentationals/Web/Maps/MapTools/BtnBasemapGalleryView.js","BASE/Presentationals/Web/Maps/MapTools/BtnTocView.js","BASE/Presentationals/Web/Maps/MapTools/BtnPrintmapView.js","BASE/Presentationals/Web/Maps/MapTools/BtnDrawGraphicsView.js","BASE/Presentationals/Web/Maps/MapTools/BtnClearGraphicView.js","BASE/Presentationals/Web/Maps/MapTools/BtnZoomToScaleView.js","BASE/Controls/Presentationals/SelectFieldReduxView.js","BASE/Controls/Containers/SelectFieldRedux.js","BASE/Presentationals/Web/Maps/GoToLocation/GoToLocationFormView.js","BASE/Containers/Web/Maps/GoToLocation/GoToLocation.js","BASE/Presentationals/Web/Maps/MapTools/MapToolsView.js","BASE/Presentationals/Web/Maps/Measurement/MeasurementView.js","BASE/Controls/Presentationals/SelectFieldView.js","BASE/Controls/Containers/SelectField.js","BASE/Presentationals/Web/Maps/Measurement/MeasurementResultView.js","BASE/Containers/Web/Maps/Measurement/Measurement.js","BASE/Actions/Web/Maps/NewTOCAction.js","BASE/Presentationals/Web/Maps/NewTOC/TOCPanelView.js","BASE/Presentationals/Web/Maps/NewTOC/TOCListView.js","BASE/Containers/Web/Maps/NewTOC/TOCList.js","BASE/Controls/Presentationals/CheckboxGroupReduxView.js","BASE/Controls/Containers/CheckboxGroupRedux.js","BASE/Presentationals/Web/Maps/NewTOC/AddToc/AddWMSView.js","BASE/Containers/Web/Maps/NewTOC/AddToc/AddWMSLayer.js","BASE/Presentationals/Web/Maps/NewTOC/AddToc/AddWFSView.js","BASE/Containers/Web/Maps/NewTOC/AddToc/AddWFSLayer.js","BASE/Presentationals/Web/Maps/NewTOC/AddToc/AddRestServiceLayerView.js","BASE/Containers/Web/Maps/NewTOC/AddToc/AddRestServiceLayer.js","BASE/Controls/Presentationals/RadioButtonGroupReduxView.js","BASE/Controls/Containers/RadioButtonGroupRedux.js","BASE/Presentationals/Web/Maps/NewTOC/AddToc/AddKMLView.js","BASE/Presentationals/Web/Maps/NewTOC/AddToc/AddLayerView.js","BASE/Containers/Web/Maps/NewTOC/AddToc/AddLayer.js","BASE/Containers/Web/Maps/NewTOC/TOCPanel.js","BASE/Controls/Presentationals/ImageGalleryView.js","BASE/Controls/Containers/ImageGallery.js","BASE/Presentationals/Web/Maps/Printmap/PrintmapView.js","BASE/Containers/Web/Maps/Printmap/Printmap.js","BASE/Presentationals/Web/Maps/MapTools/BtnIdentifyView.js","BASE/Containers/Web/Maps/MapTools/Identify.js","BASE/Presentationals/Web/Maps/DrawGraphic/DrawGraphicView.js","BASE/Controls/Containers/ColorPicker.js","BASE/Presentationals/Web/Maps/DrawGraphic/DrawGraphicPointView.js","BASE/Presentationals/Web/Maps/DrawGraphic/DrawGraphicLineView.js","BASE/Presentationals/Web/Maps/DrawGraphic/DrawGraphicPolygonView.js","BASE/Presentationals/Web/Maps/DrawGraphic/DrawGraphicCircleView.js","BASE/Presentationals/Web/Maps/DrawGraphic/DrawGraphicTextView.js","BASE/Presentationals/Web/Maps/DrawGraphic/DrawGraphicNotSelectModeView.js","BASE/Containers/Web/Maps/DrawGraphic/DrawGraphic.js","BASE/Presentationals/Web/Maps/ZoomToScale/ZoomToScaleView.js","BASE/Containers/Web/Maps/ZoomToScale/ZoomToScale.js","BASE/Containers/Web/Maps/MapTools/MapTools.js","BASE/Actions/Web/Panel/SatisfactionAndStatisticAction.js","BASE/Utilities/LocatorUtil.js","BASE/Presentationals/Web/Coordinate/CoordinateView.js","BASE/Containers/Web/Coordinate/Coordinate.js","BASE/Utilities/AuthenUtil.js","BASE/Actions/Web/Panel/PanelContentAction.js","BASE/HOC/ConnectReducer/WithPanelContentReducer.js","BASE/Actions/Web/Panel/AskTheCityPlanAction.js","BASE/HOC/ConnectReducer/WithAskTheCityPlanReducer.js","BASE/Presentationals/Web/Panel/PanelLayoutView.js","BASE/Presentationals/Web/Panel/AppBarHeaderView.js","BASE/Presentationals/Web/Panel/Menu/MenuView.js","BASE/Containers/Web/Panel/Menu/Menu.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/PMR1/SubmitPmr/SubmitPmrView.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/SpecifyCoordinate/FormDmsView.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/SpecifyCoordinate/FormLatLongView.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/SpecifyCoordinate/FormUtmView.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/SpecifyCoordinate/SpecifyCoordinateView.js","BASE/Containers/Web/Panel/Menu/MenuContent/SpecifyCoordinate/SpecifyCoordinate.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/PMR1/SubmitPmr/MenuSubmitPmrView.js","BASE/Controls/Presentationals/BreadCrumbView.js","BASE/Controls/Containers/BreadCrumb.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/PMR1/SubmitPmr/FormSubmitPmrView.js","BASE/Controls/Presentationals/RadioReduxView.js","BASE/Controls/Containers/RadioRedux.js","BASE/Controls/Presentationals/ErrorSubmitView.js","BASE/Controls/Containers/ErrorSubmit.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/PMR1/SubmitPmr/FormStep/FormOneView.js","BASE/Actions/Web/Panel/SubmitPmrAction.js","BASE/Containers/Web/Panel/Menu/MenuContent/PMR1/SubmitPmr/FormStep/FormOne.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/PMR1/SubmitPmr/FormStep/FormTwoView.js","BASE/Containers/Web/Panel/Menu/MenuContent/PMR1/SubmitPmr/FormStep/FormTwo.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/PMR1/SubmitPmr/FormStep/FormThreeView.js","BASE/Containers/Web/Panel/Menu/MenuContent/PMR1/SubmitPmr/FormStep/FormThree.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/PMR1/SubmitPmr/FormStep/FormFourView.js","BASE/Containers/Web/Panel/Menu/MenuContent/PMR1/ExportSubmitPMR/ExportSubmitPMR.js","BASE/Containers/Web/Panel/Menu/MenuContent/PMR1/SubmitPmr/FormStep/FormFour.js","BASE/Containers/Web/Panel/Menu/MenuContent/PMR1/SubmitPmr/FormSubmitPmr.js","BASE/Containers/Web/Panel/Menu/MenuContent/PMR1/SubmitPmr/SubmitPmr.js","BASE/Controls/QueryBuilderControl/AddOn/Select.js","BASE/Controls/QueryBuilderControl/AddOn/TextArea.js","BASE/Controls/QueryBuilderControl/ListUniqueValue.js","BASE/Controls/QueryBuilderControl/QueryBuilderView.js","BASE/Controls/QueryBuilderControl/QueryBuilder.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/QueryBuilder/QueryBuilderToolView.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/QueryBuilder/QueryBuilderResultView.js","BASE/Containers/Web/Panel/Menu/MenuContent/QueryBuilder/QueryBuilderResult.js","BASE/Containers/Web/Panel/Menu/MenuContent/QueryBuilder/QueryBuilderTool.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/PMR1/EditPmrView.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/PMR1/ViewPmr/ViewPmrView.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/PMR1/ViewPmr/ViewPmrOneView.js","BASE/Containers/Web/Panel/Menu/MenuContent/PMR1/ViewPmr/ViewPmrOne.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/PMR1/ViewPmr/ViewPmrTwoView.js","BASE/Containers/Web/Panel/Menu/MenuContent/PMR1/ViewPmr/ViewPmrTwo.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/PMR1/ViewPmr/ViewPmrThreeView.js","BASE/Containers/Web/Panel/Menu/MenuContent/PMR1/ViewPmr/ViewPmrThree.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/PMR1/ViewPmr/ViewPmrFourView.js","BASE/Containers/Web/Panel/Menu/MenuContent/PMR1/ViewPmr/ViewPmrFour.js","BASE/Containers/Web/Panel/Menu/MenuContent/PMR1/ViewPmr/ViewPmr.js","BASE/Controls/Presentationals/TextFieldView.js","BASE/Controls/Containers/TextField.js","BASE/Controls/Containers/Picker/DatePickerThai.js","BASE/Controls/Containers/Picker/ReduxFormDatePickerThai.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/PMR1/EditPmrStaffView.js","BASE/Containers/Web/Panel/Menu/MenuContent/PMR1/EditPmrStaff.js","BASE/Containers/Web/Panel/Menu/MenuContent/PMR1/EditPmr.js","BASE/Containers/Web/Panel/Menu/MenuContent/Report/Evaluation/EvaluationPieChart.js","BASE/Containers/Web/Panel/Menu/MenuContent/Report/Evaluation/PieChartLegend.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/Report/Evaluation/EvaluationView.js","BASE/Containers/Web/Panel/Menu/MenuContent/Report/Evaluation/EvaluationExportPDF.js","BASE/Containers/Web/Panel/Menu/MenuContent/Report/Evaluation/Evaluation.js","BASE/Containers/Web/Panel/Menu/MenuContent/Report/StatisticUser/StatisticUserBarChart.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/Report/StatisticUser/StatisticUserView.js","BASE/Containers/Web/Panel/Menu/MenuContent/Report/StatisticUser/StatisticUserExportPDF.js","BASE/Containers/Web/Panel/Menu/MenuContent/Report/StatisticUser/StatisticUser.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/Report/DistrictReport/DistrictReportView.js","BASE/Containers/Web/Panel/Menu/MenuContent/Report/DistrictReport/DistrictReportExcel.js","BASE/Containers/Web/Panel/Menu/MenuContent/Report/DistrictReport/DistrictReportPDF.js","BASE/Containers/Web/Panel/Menu/MenuContent/Report/DistrictReport/DistrictReport.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/Report/AreaReport/AreaReportView.js","BASE/Containers/Web/Panel/Menu/MenuContent/Report/AreaReport/AreaReportExcel.js","BASE/Containers/Web/Panel/Menu/MenuContent/Report/AreaReport/AreaReportPDF.js","BASE/Containers/Web/Panel/Menu/MenuContent/Report/AreaReport/AreaReport.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/SatisfactionForm/SatisfactionFormView.js","BASE/Containers/Web/Panel/Menu/MenuContent/SatisfactionForm/SatisfactionForm.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/AskTheCityPlan/AskTheCityPlanView.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/AskTheCityPlan/SpecifyCoordinate/FormDmsView.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/AskTheCityPlan/SpecifyCoordinate/FormLatLongView.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/AskTheCityPlan/SpecifyCoordinate/FormUtmView.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/AskTheCityPlan/SpecifyCoordinateView.js","BASE/Containers/Web/Panel/Menu/MenuContent/AskTheCityPlan/SpecifyCoordinate.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/SearchLandInfo/FormSearchLandView.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/SearchLandInfo/ResultSearchLandInfoView.js","BASE/Containers/Web/Panel/Menu/MenuContent/SearchLandInfo/ResultSearchLandInfo.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/AskTheCityPlan/LandPlotView.js","BASE/Containers/Web/Panel/Menu/MenuContent/AskTheCityPlan/LandPlot.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/AskTheCityPlan/FunctionMenuView.js","BASE/Containers/Web/Panel/Menu/MenuContent/AskTheCityPlan/FunctionMenu.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/AskTheCityPlan/AskForBusinessView.js","BASE/Containers/Web/Panel/Menu/MenuContent/AskTheCityPlan/AskForBusiness.js","BASE/Presentationals/Web/Panel/SubPanelLayoutView.js","BASE/Containers/Web/Panel/SubPanelLayout.js","BASE/Controls/Presentationals/SnackBarView.js","BASE/Controls/Containers/SnackBar.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/AskTheCityPlan/Detail/TermsOfUseView.js","BASE/Containers/Web/Panel/Menu/MenuContent/AskTheCityPlan/Deatail/TermsOfUse.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/AskTheCityPlan/Detail/LandusePlanView.js","BASE/Containers/Web/Panel/Menu/MenuContent/AskTheCityPlan/Deatail/LandusePlan.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/AskTheCityPlan/Detail/OtherPlanView.js","BASE/Containers/Web/Panel/Menu/MenuContent/AskTheCityPlan/Deatail/OtherPlan.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/AskTheCityPlan/Detail/BangkokCanonView.js","BASE/Containers/Web/Panel/Menu/MenuContent/AskTheCityPlan/Deatail/BangkokCanon.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/AskTheCityPlan/PrintMapAskView.js","BASE/Containers/Web/Panel/Menu/MenuContent/AskTheCityPlan/PrintMapAsk.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/AskTheCityPlan/ResultView.js","BASE/Containers/Web/Panel/Menu/MenuContent/AskTheCityPlan/Result.js","BASE/Containers/Web/Panel/Menu/MenuContent/AskTheCityPlan/AskTheCityPlan.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/SearchLandInfo/SearchLandInfoView.js","BASE/Containers/Web/Panel/Menu/MenuContent/SearchLandInfo/SearchLandInfo.js","BASE/Containers/Web/Panel/Menu/MenuContent/Report/StatisticCheckComprehensive/StatisticPieChart.js","BASE/Containers/Web/Panel/Menu/MenuContent/Report/StatisticCheckComprehensive/StatisticComprehensiveLegend.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/Report/StatisticCheckComprehensive/StatisticCheckComprehensiveView.js","BASE/Containers/Web/Panel/Menu/MenuContent/Report/StatisticCheckComprehensive/StatisticComprehensiveExportPDF.js","BASE/Containers/Web/Panel/Menu/MenuContent/Report/StatisticCheckComprehensive/StatisticCheckComprehensive.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/ConstructionLicense/Form/FormConstructionLicenseView.js","BASE/Actions/Web/Panel/ConstructAction.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/ConstructionLicense/Form/FormStepOneView.js","BASE/Containers/Web/Panel/Menu/MenuContent/ConstructionLicense/Form/FormStepOne.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/ConstructionLicense/Form/FormStepTwoView.js","BASE/Containers/Web/Panel/Menu/MenuContent/ConstructionLicense/Form/FormStepTwo.js","BASE/Containers/Web/Panel/Menu/MenuContent/ConstructionLicense/Form/FormConstructionLicense.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/ConstructionLicense/MenuConstructionView.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/ConstructionLicense/Add/AddConstructionLicenseView.js","BASE/Containers/Web/Panel/Menu/MenuContent/ConstructionLicense/Add/AddConstructionLicense.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/ConstructionLicense/Search/SearchConstructView.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/ConstructionLicense/Search/FormSearchConstructView.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/ConstructionLicense/Search/ResultSearchConstructView.js","BASE/Containers/Web/Panel/Menu/MenuContent/ConstructionLicense/Search/FormSearchConstruct.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/ConstructionLicense/Detail/Construct/DetailConstructView.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/ConstructionLicense/Detail/Construct/DetailConstructStepOneView.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/ConstructionLicense/Detail/Construct/DetailConstructStepTwoView.js","BASE/Containers/Web/Panel/Menu/MenuContent/ConstructionLicense/Detail/DetailConstruct.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/ConstructionLicense/Edit/EditConstructionLicenseView.js","BASE/Containers/Web/Panel/Menu/MenuContent/ConstructionLicense/Edit/EditConstructionLicense.js","BASE/Containers/Web/Panel/Menu/MenuContent/ConstructionLicense/Search/SearchConstruct.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/HouseNumber/HouseNumberView.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/HouseNumber/MenuListModeView.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/HouseNumber/HouseNumberFormStep/StepOneView.js","BASE/Actions/Web/Panel/HouseNumberAction.js","BASE/Containers/Web/Panel/Menu/MenuContent/HouseNumber/HouseNumberFormStep/StepOne.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/HouseNumber/HouseNumberFormStep/StepTwo/StepTwoView.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/HouseNumber/HouseNumberFormStep/StepTwo/StepTwoHouseUnder10View.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/HouseNumber/HouseNumberFormStep/StepTwo/StepTwoHouseOver10View.js","BASE/Containers/Web/Panel/Menu/MenuContent/HouseNumber/HouseNumberFormStep/StepTwo/StepTwo.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/HouseNumber/HouseNumberFormStepView.js","BASE/Containers/Web/Panel/Menu/MenuContent/HouseNumber/HouseNumberFormMarkPoint/HouseNumberFormMarkPointView.js","BASE/Containers/Web/Panel/Menu/MenuContent/HouseNumber/HouseNumberFormStep.js","BASE/Containers/Web/Panel/Menu/MenuContent/HouseNumber/HouseNumberFormMarkPoint/HouseNumberFormMarkPoint.js","BASE/Containers/Web/Panel/Menu/MenuContent/HouseNumber/HouseNumber.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/SearchHouseNumber/SearchHouseNumberView.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/SearchHouseNumber/SearchHouseNumberFormView.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/SearchHouseNumber/SearchHouseNumberResultView.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/SearchHouseNumber/Detail/DetailHouseNoView.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/SearchHouseNumber/Detail/DetailHouseNoStepOneView.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/SearchHouseNumber/Detail/DetailHouseNoStepTwoView.js","BASE/Containers/Web/Panel/Menu/MenuContent/SearchHouseNumber/Detail/DetailHouseNo.js","BASE/Containers/Web/Panel/Menu/MenuContent/SearchHouseNumber/ManageHouseEditWithMap.js","BASE/Containers/Web/Panel/Menu/MenuContent/SearchHouseNumber/SearchHouseNumber.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/Report/ConstructionLicense/ConstructionLicenseReportView.js","BASE/Containers/Web/Panel/Menu/MenuContent/Report/ConstructionLicense/ConstructionLicenseReportExcel.js","BASE/Containers/Web/Panel/Menu/MenuContent/Report/ConstructionLicense/ConstructionLicenseReportPDF.js","BASE/Containers/Web/Panel/Menu/MenuContent/Report/ConstructionLicense/ConstructionLicenseReport.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/Report/HouseNumber/HouseNumberReportView.js","BASE/Containers/Web/Panel/Menu/MenuContent/Report/HouseNumber/HouseNumberExporPDF.js","BASE/Containers/Web/Panel/Menu/MenuContent/Report/HouseNumber/HouseNumberExcel.js","BASE/Containers/Web/Panel/Menu/MenuContent/Report/HouseNumber/HouseNumberReport.js","BASE/Containers/Web/Panel/Menu/MenuContent/Report/MinisterialRegulation/MinisterialRegulationBarChart.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/Report/MinisterialRegulation/MinisterialRegulationReportView.js","BASE/Containers/Web/Panel/Menu/MenuContent/Report/MinisterialRegulation/MinisterialRegulationReportPDF.js","BASE/Containers/Web/Panel/Menu/MenuContent/Report/MinisterialRegulation/MinisterialRegulationExcel.js","BASE/Containers/Web/Panel/Menu/MenuContent/Report/MinisterialRegulation/MinisterialRegulationReport.js","BASE/Containers/Web/Panel/Menu/MenuContent/ImportShapeFile/ImportShapeHistoryTable.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/ImportShapeFile/ImportShapeFileHistoryView.js","BASE/Containers/Web/Panel/Menu/MenuContent/ImportShapeFile/ImportShapeFileHistory.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/ImportShapeFile/ImportShapeFileView.js","BASE/Containers/Web/Panel/Menu/MenuContent/ImportShapeFile/ImportShapeFile.js","BASE/Containers/Web/Panel/Menu/MenuContent/ExportShapeFile/ExportShapeFileHistoryTable.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/ExportShapeFile/ExportShapeFileHistoryView.js","BASE/Containers/Web/Panel/Menu/MenuContent/ExportShapeFile/ExportShapeFileHistory.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/ExportShapeFile/FieldSpecifyArea.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/ExportShapeFile/ExportShapeFileView.js","BASE/Containers/Web/Panel/Menu/MenuContent/ExportShapeFile/ExportShapeFile.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/DraftPoint/Form/FormDraftView.js","BASE/Containers/Web/Panel/Menu/MenuContent/DraftPoint/Form/FormDraft.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/DraftPoint/Add/AddDraftPointView.js","BASE/Containers/Web/Panel/Menu/MenuContent/DraftPoint/Add/AddDraftPoint.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/DraftPoint/Search/SearchDraftPointView.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/DraftPoint/Search/FormSearchDraftView.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/DraftPoint/Search/ResultSearchDraftView.js","BASE/Containers/Web/Panel/Menu/MenuContent/DraftPoint/Search/FormSearchDraft.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/DraftPoint/Detail/DetailDraftView.js","BASE/Containers/Web/Panel/Menu/MenuContent/DraftPoint/Detail/DetailDraft.js","BASE/Containers/Web/Panel/Menu/MenuContent/DraftPoint/Edit/EditDraftPoint.js","BASE/Containers/Web/Panel/Menu/MenuContent/DraftPoint/Search/SearchDraftPoint.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/DraftBuilding/Add/AddDraftBuildingView.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/DraftBuilding/Form/FormDraftView.js","BASE/Containers/Web/Panel/Menu/MenuContent/DraftBuilding/Form/FormDraft.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/DraftBuilding/Form/FormDraftTwoView.js","BASE/Containers/Web/Panel/Menu/MenuContent/DraftBuilding/Form/FormDraftTwo.js","BASE/Containers/Web/Panel/Menu/MenuContent/DraftBuilding/Add/AddDraftBuilding.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/DraftBuilding/Search/SearchDraftBuildingView.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/DraftBuilding/Search/FormSearchDraftBuildingView.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/DraftBuilding/Search/ResultSearchDraftView.js","BASE/Containers/Web/Panel/Menu/MenuContent/DraftBuilding/Search/FormSearchDraftBuilding.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/DraftBuilding/Detail/DetailDraftBuildingView.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/DraftBuilding/Detail/DetailBuildingStepOneView.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/DraftBuilding/Detail/DetailBuildingStepTwoView.js","BASE/Containers/Web/Panel/Menu/MenuContent/DraftBuilding/Detail/DetailDraftBuilding.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/DraftBuilding/Edit/EditDraftBuildingView.js","BASE/Containers/Web/Panel/Menu/MenuContent/DraftBuilding/Edit/EditDraftBuilding.js","BASE/Containers/Web/Panel/Menu/MenuContent/DraftBuilding/Search/SearchDraftBuilding.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/Report/SurveyReport/SurveyReportView.js","BASE/Containers/Web/Panel/Menu/MenuContent/Report/Survey/SurveyReportExcel.js","BASE/Containers/Web/Panel/Menu/MenuContent/Report/Survey/SueveyReport.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/LandMark/StepLandMark/StepInputLandMark.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/LandMark/Add/LandMarkView.js","BASE/Containers/Web/Panel/Menu/MenuContent/LandMark/Add/LandMark.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/LandMark/Search/LandMarkFormSearch.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/LandMark/Search/LandMarkResultSearch.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/LandMark/Search/LandMarkSearchView.js","BASE/Containers/Web/Panel/Menu/MenuContent/LandMark/ViewMode/LandMarkViewMode.js","BASE/Containers/Web/Panel/Menu/MenuContent/LandMark/Search/ManageResultSearch.js","BASE/Containers/Web/Panel/Menu/MenuContent/LandMark/Search/LandMarkSearch.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/DraftLine/Form/FormDraftView.js","BASE/Containers/Web/Panel/Menu/MenuContent/DraftLine/Form/FormDraft.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/DraftLine/Add/AddDraftLineView.js","BASE/Containers/Web/Panel/Menu/MenuContent/DraftLine/Add/AddDraftLine.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/DraftLine/Search/SearchDraftLineView.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/DraftLine/Search/FormSearchDraftView.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/DraftLine/Search/ResultSearchDraftView.js","BASE/Containers/Web/Panel/Menu/MenuContent/DraftLine/Search/FormSearchDraft.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/DraftLine/Detail/DetailDraftView.js","BASE/Containers/Web/Panel/Menu/MenuContent/DraftLine/Detail/DetailDraft.js","BASE/Containers/Web/Panel/Menu/MenuContent/DraftLine/Edit/EditDraftLine.js","BASE/Containers/Web/Panel/Menu/MenuContent/DraftLine/Search/SearchDraftLine.js","BASE/Containers/Web/Panel/Menu/MenuContent/SearchHouseNo/ApiSearchHouseNo.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/SearchHouseNo/FormSearchHouseNoView.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/SearchHouseNo/SearchHouseNoView.js","BASE/Presentationals/Web/Panel/Menu/MenuContent/SearchHouseNo/ResultSearchHouseNoView.js","BASE/Containers/Web/Panel/Menu/MenuContent/SearchHouseNo/ResultSearchHouseNo.js","BASE/Containers/Web/Panel/Menu/MenuContent/SearchHouseNo/SearchHouseNo.js","BASE/Containers/Web/Panel/Menu/MenuContent/AskTheCityPlan/Deatail/DetailShortcut.js","BASE/Containers/Web/Panel/Menu/MenuContent/AskTheCityPlan/ResultShortcut.js","BASE/Containers/Web/Panel/Menu/MenuContent/AskTheCityPlan/AskWithShortcut.js","BASE/Containers/Web/Panel/Menu/MenuContent/ImportOSS/ImportOSSView.js","BASE/Controls/DataTable/Pagination.js","BASE/Controls/DataTable/Columns/TextColumn.js","BASE/Controls/DataTable/Columns/NumberColumn.js","BASE/Controls/DataTable/Columns/ImageColumn.js","BASE/Controls/DataTable/Columns/ButtonColumn.js","BASE/Controls/DataTable/Columns/ButtonPopupColumn.js","BASE/Controls/DataTable/Columns/ButtonViewColumn.js","BASE/Controls/DataTable/DataTable.js","BASE/Controls/DataTable/ColumnConstants.js","BASE/Containers/Web/Panel/Menu/MenuContent/ImportOSS/importOSSHistoryView.js","BASE/Containers/Web/Panel/Menu/MenuContent/ImportOSS/ImportOSS.js","BASE/Containers/Web/Panel/Menu/MenuContent/ImportSTR/importSTRHistoryView.js","BASE/Containers/Web/Panel/Menu/MenuContent/ImportSTR/ImportSTRView.js","BASE/Containers/Web/Panel/Menu/MenuContent/ImportSTR/ImportSTR.js","BASE/Containers/Web/Panel/Menu/MenuContent/SearchOSS/SearchOSSView.js","BASE/Containers/Web/Panel/Menu/MenuContent/SearchOSS/SearchOSSFormView.js","BASE/Containers/Web/Panel/Menu/MenuContent/SearchOSS/SearchOSSForm.js","BASE/Actions/Web/Panel/SearchOSSAction.js","BASE/Containers/Web/Panel/Menu/MenuContent/SearchOSS/SearchOSS.js","BASE/Containers/Web/Panel/Menu/MenuContent/MarkPointSTR/MarkPointSTRView.js","BASE/Containers/Web/Panel/Menu/MenuContent/MarkPointSTR/MarkPointSTRForm/MarkPointSTRFormView.js","BASE/Containers/Web/Panel/Menu/MenuContent/MarkPointSTR/MarkPointSTRForm/MarkPointSTRForm.js","BASE/Containers/Web/Panel/Menu/MenuContent/MarkPointSTR/MarkPointSTRResult/MarkPointSTRResultView.js","BASE/Containers/Web/Panel/Menu/MenuContent/MarkPointSTR/MarkPointSTRResult/MarkPointSTRResult.js","BASE/Actions/Web/Panel/MarkPointSTRAction.js","BASE/Containers/Web/Panel/Menu/MenuContent/MarkPointSTR/MarkPointSTR.js","BASE/Containers/Web/Panel/Menu/MenuContent/MarkPointSTRSingle/MarkPointSTRSingleView.js","BASE/Containers/Web/Panel/Menu/MenuContent/MarkPointSTRSingle/MarkPointSTRSingleForm/MarkPointSTRSingleFormView.js","BASE/Containers/Web/Panel/Menu/MenuContent/MarkPointSTRSingle/MarkPointSTRSingleForm/MarkPointSTRSingleForm.js","BASE/Containers/Web/Panel/Menu/MenuContent/MarkPointSTRSingle/MarkPointSTRSingle.js","BASE/Containers/Web/Panel/Menu/MenuContent/ExportSTR/ExportSTRView.js","BASE/Containers/Web/Panel/Menu/MenuContent/Report/ExportSTRReport/ExportSTRReportExcel.js","BASE/Containers/Web/Panel/Menu/MenuContent/Report/ExportSTRReport/ExportSTRReportPDF.js","BASE/Containers/Web/Panel/Menu/MenuContent/ExportSTR/ExportSTR.js","BASE/Containers/Web/Panel/Menu/MenuContent/ImportSTRByOfficer/ImportSTRByOfficerView.js","BASE/Containers/Web/Panel/Menu/MenuContent/ImportSTRByOfficer/ImportSTRByOfficer.js","BASE/Containers/Web/Panel/PanelLayout.js","BASE/Controls/Containers/TextFieldLocator.js","BASE/Presentationals/Web/LayoutMapView.js","BASE/Containers/Web/Panel/Menu/MenuContent/SearchOSS/SearchOSSTable/SearchOSSTableView.js","BASE/Containers/Web/Panel/Menu/MenuContent/Report/SearchOSSReport/SearchOSSReportPDF.js","BASE/Containers/Web/Panel/Menu/MenuContent/Report/SearchOSSReport/SearchOSSReportExcel.js","BASE/Containers/Web/Panel/Menu/MenuContent/SearchOSS/SearchOSSTable/SearchOSSTable.js","BASE/Containers/Web/LayoutMap.js","BASE/Map/MapManager.js","BASE/Map/Styles.js","BASE/HOC/ConnectReducer/WithAuthenReducer.js","BASE/Config/AppRoute/PrivateRouteCMS.js","BASE/Actions/UserManagements/LayoutAction.js","BASE/Presentationals/UserManagements/User/UserView.js","BASE/Containers/UserManagements/User/ApiUser.js","BASE/Controls/Presentationals/TextFieldSearchView.js","BASE/Controls/Containers/TextFieldSearch.js","BASE/Presentationals/UserManagements/User/ListUserView.js","BASE/Presentationals/UserManagements/User/ListSystemOfUserView.js","BASE/Containers/UserManagements/User/ListSystemOfUser.js","BASE/Containers/UserManagements/User/ListUser.js","BASE/Presentationals/UserManagements/User/AddUserView.js","BASE/Presentationals/UserManagements/User/FormUserView.js","BASE/Containers/UserManagements/User/FormUser.js","BASE/Containers/UserManagements/User/AddUser.js","BASE/Presentationals/UserManagements/User/EditUserView.js","BASE/Containers/UserManagements/User/EditUser.js","BASE/Containers/UserManagements/User/User.js","BASE/Presentationals/UserManagements/UserGroup/UserGroupTableView.js","BASE/Presentationals/UserManagements/UserGroup/UserGroupView.js","BASE/Presentationals/UserManagements/UserGroup/SystemView.js","BASE/Containers/UserManagements/UserGroup/SystemControl.js","BASE/Presentationals/UserManagements/UserGroup/TableDisplayView.js","BASE/Containers/UserManagements/UserGroup/FunctionControl.js","BASE/Presentationals/UserManagements/UserGroup/UserGroupControlView.js","BASE/Containers/UserManagements/UserGroup/UserGroupControl.js","BASE/Containers/UserManagements/UserGroup/UserGroup.js","BASE/Containers/UserManagements/ReportLogin/ApiReport.js","BASE/Presentationals/UserManagements/ReportLogin/ReportLoginView.js","BASE/Containers/UserManagements/ReportLogin/LoginReportExcel.js","BASE/Containers/UserManagements/ReportLogin/ReportLogin.js","BASE/Config/AppRoute/PrivateRoute.js","BASE/Presentationals/MobileHomeView.js","BASE/Containers/MobileHome.js","BASE/Config/AppRoute/RouteManagement.js","BASE/Store/ConfigureStore.js","App.js","serviceWorker.js","index.js","Images/checkbox/unchecked.png"],"names":["module","exports","__webpack_require__","p","BKK_CODE_ID","KEY_ENCRYPT_PASSWORD","IMG_HIGHLIGHT_POINT","LISTFEATURELAYER","FEATURELAYER_DISTRICT","FEATURELAYER_DISTRICT_BUFFER","LISTGRAPHICLAYER","GRAPHICLAYER_LOCATOR","GRAPHICLAYER_CURRENT_LOCATION","GRAPHICLAYER_GOTO_LOCATION","GRAPHICLAYER_MEASUREMENT","GRAPHICLAYER_PMR1_FORM","GRAPHICLAYER_SUBMIT_PMR_HIGHLIGHT","GRAPHICLAYER_SUBMIT_PMR","GRAPHICLAYER_ASK_THE_CITY_PLAN","GRAPHICLAYER_ASK_THE_CITY_PLAN_EXTENT","GRAPHICLAYER_CITY_PLAN","GRAPHICLAYER_CITY_PLAN_TEXT","GRAPHICLAYER_LAND_PLOT","GRAPHICLAYER_LAND_PLOT_TEXT","GRAPHICLAYER_DRAW_SPATIAL_SEARCH","GRAPHICLAYER_CONSTRUCTION_HIGHLIGHT","GRAPHICLAYER_CONSTRUCTION_DETAIL","GRAPHICLAYER_CONSTRUCTION_LICENSE","GRAPHICLAYER_HOUSE_NUMBER_DETAIL","GRAPHICLAYER_QUERYBUILDER","GRAPHICLAYER_SPATIAL_SEARCH_DRAFT","GRAPHICLAYER_DRAFT_HIGHLIGHT","GRAPHICLAYER_DRAFT","GRAPHICLAYER_IMPORT_SHAPE","GRAPHICLAYER_DRAW_EXPORT_SHAPE","GRAPHICLAYER_DRAW_GRAPHIC_TOOL","GRAPHICLAYER_DRAW_POINT","GRAPHICLAYER_DRAW_LINE","GRAPHICLAYER_DRAW_POLYGON","GRAPHICLAYER_DRAW_CIRCLE","GRAPHICLAYER_DRAW_TEXT","GRAPHICLAYER_DRAW_HOUSENO_SEARCH","STATUS_IMPORT_EXPORT","D","display","key","F","W","SYSTEM","PMR1","CMP","CAH","Survey","CMS","UM","SYSTEM_ID","_SYSTEM_ID","Object","defineProperty","HEADER","TITLE","SUB_TITLE","MENU_TITLE","SURVEY","HEADER_EXPORT_REPORT","KEY_LOCALSTORAGE","BTN","TH","BACK","NEXT","OK","CONFIRM","CANCEL","FINISH","CONFIRM_LOCATION","SEND_EMAIL","CLOSE_BUTTON_LABEL","SEARCH","EXPORT_EXCEL","EXPORT_PDF","SAVE","EN","MONTH","id","name","EVALUATION_REPORT_LEGEND_COLOR","color","SPECIFY_COORDINATE_MODE","LAT_LONG","DMS","UTM","MEASUREMENT_UNIT","area","squareKilometers","value","squareMeters","raiNagnSquarWa","distance","kilometers","meters","location","longLat","mercator","utmZ47","LIST_MENU_LAYOUT_MAP","MAP","MENU","MEASUREMENT_DRAW_MODE","MEASUREMENT_TYPE_DRAW","point","polyline","polygon","LAT_LONG_BKK","RESOURCEWORDS","IMPORT_SHAPE_TEXT","MAXIMUM_UPLOAD_FILE","FILE_TYPE_ACCEPT","DATA_MORE_ONE_RING","DATA_MORE_ONE_FEATURE","DATA_MORE_ONE_LAYER","DATA_IS_NOT_POLYGON","CAN_NOT_READ_FILE","INVALID_DATA","NO_FEATURES_IN_LAYER","MISSIONG_DBF","MISSIONG_PRJ","MISSIONG_SHP","MISSIONG_SHX","MISSIONG_SHX_SHP_DBF","ERROR_FILE","CONNECT_FAIL","DRAW_GRAPHIC_HEADER","GENERAL_TEXT","GOTOLOCATION_HEADER","GOTOLOCATION_PROJECTION","GOTOLOCATION_LATITUDE","GOTOLOCATION_LONGITUDE","GOTOLOCATION_LAT_LONG","GOTOLOCATION_X","GOTOLOCATION_Y","GOTOLOCATION_GO","BASEMAP_GALLERY","MEASUREMENT_HEADER","ERROR_TEXT","MORE_THAN_VALUE","NO_EMPTY","NO_EMPTY_2","EMAIL_FAILED","CONFIRM_PASSWORD_FAILED","PASSWORD_LIMIT_DIGIT","NAME_LIMIT_DIGIT","CITIZENID_FAILED","CHANODE_LIMIT_DIGIT","ACTIVITY_LIMIT_DIGIT","HOUSE_NO_LIMIT_DIGIT","ALLEY_NO_LIMIT_DIGIT","ROAD_NO_LIMIT_DIGIT","USE_AREA_FAILED","NGAN_LIMIT_DIGIT","SQ_WA_LIMIT_DIGIT","NOT_NUMBER","LAT_DEGREES_LIMIT_DIGIT","LONG_DEGREES_LIMIT_DIGIT","MINUTES_LIMIT_DIGIT","MINUTES_LIMIT_DIGIT_SURVEY","MINUTES_LIMIT_DIGIT_SURVEY_BL_NAME","MINUTES_LIMIT_DIGIT_SURVEY_BL_VILLAGE","MINUTES_LIMIT_DIGIT_SURVEY_BL_POSTCODE","SECONDS_LIMIT_DIGIT","VALIDATION_MAP_NAME_FAIL","VALIDATION_MAP_DESC_FAIL","MORE_THAN_ONE","NOT_MATCH_TYPE","LIMIT_DIGIT_10","LIMIT_DIGIT_20","LIMIT_STR_3","HOUSEID_LIMIT_DIGIT","HAVE_DUPLICATE_HOUSE_NO","MOO_ERROR","DUPLICATE_NAME","WRONG_FORMAT__HOUSE","REGISTER","REGISTER_FAIL","REGISTER_EXITS","LOGIN","LOGIN_NOT_ACTIVATED","LOGIN_WRONG_PASSWORD","LOGIN_USERNAME_NOT_FOUND","LOGIN_FIAL","TYPEOFPROJECTION","TITLE_TAB_BROWSER","TOC_SUFFIX_ID","TOPIC_LAYER","BMA_LAYER","DEFAULT_LAYER","ADD_LAYER_TOC_MODE","KML","WMS","WFS","RESTService","OPTION_IMPORT_KML","URL","UPLOAD","TABLE_MAPSHEET1K","PMR1_PNT","CONSTRUCT_PNT","HOUSE_PNT","DRAFT_BLDG","DRAFT_LINE","DRAFT_PNT","LANDMARK","FUNCTION_CONTROL","OTHER","NOT_DISPLAY_FIELD_LIST","ACTIVE_FUNCTION","ADD_GP_FORM","EDIT_GP_FORM","ASK_PNT","ASK_POLYGON","PROFILE_GROUP_TYPE","OFFICER","PEOPLE","PEOPLE_WITH_PROFILE","MODE_SET_POSITION","clickMap","currentLocation","specifyCoordinate","PMR_EDIT_STAFF","ID","LAYER_ID","TYPE_SEARCH_LAND_INFORMATION","DISTRICT","SURVEY_NO","SHEET_NO","MENU_CONSTRUCTION_LICENSE","MENU_HOUSENUMBER","landPlot","RUN_HOUSE_NO_METHOD","ALERT_MESSAGE","POPUP","OUT_OF_BKK","POINT_OUT_OF_PERMISSION","SAVE_SUCCESS","SAVE_FAIL","SYSTEM_ERROR","REQUEST_PIN_MAP","DELETE_SUCCESS","DELETE_FAIL","OUT_OF_LAND","QUESTION","SAVE_IN_EDIT_MODE","CANCEL_FORM","DELETE","WARNING_POINT","BREADCRUMB_MENU_UM","USER","USER_EDIT","USER_ADD","USER_GROUP","USER_GROUP_ADD","USER_GROUP_EDIT","REPORT_LOGIN","STATUS_USER","DRAW_GRAPHIC_MODE","line","circle","text","TYPE_OF_FONT","TYPE_OF_STYLE_POINT","TYPE_OF_STYLE_LINE","esri","TYPE_OF_STYLE_POLYGON_CIRCLE","MAP_TOOLS","NAME","SUB_MENU","POINT","LINE","POLYGON","CIRCLE","SUBMIT_ERROR_MEASSAGE","CPUDD_EDITING_LAYER","FOOTER_REPORT","RouteConfig","root","rootCMP","rootPMR","rootCAH","CMSHome","CMSLogin","CMSLoginStaff","CMSPortal","CMSFormResetPassword","CMPWeb","CMPWebStaff","CMPMobile","CMPMobileCurrent","CAHWeb","PMRLogin","PMRWeb","PMRRegister","PMRActivateUser","SurveyWeb","UMUser","UMUserGroup","UMReportLogin","initialState","mapFunction","onExtentChangeFunction","onIdentifyClickMap","onClickMapFunction","onDrawGraphic","onClearSelectGraphic","onZoomInFunction","onZoomOutFunction","onMouseMoveMapFunction","mapFunctionParams","onMouseMoveCoordinateFunction","onShowDataTableOSS","panelMapTool","GoToLocationFormVisible","BasemapGalleryVisible","TocVisible","MeasurementVisible","Printmap","Identify","DrawGraphicVisible","CearGraphicVisible","ZoomToScaleVisible","MapToolVisible","initailize","BtnPrintmapVisible","Panel","Map","Search","ActiveFunction","tocLayer","selectedNoParentToc","selectedHaveParentToc","selectedSublayerToc","tocReducer","state","arguments","length","undefined","action","type","objectSpread","data","currentPage","pmrID","isLogin","profile","system","authenReducer","pmr1Form","stepOne","stepTwo","chanode","stepThree","stepFour","geometry","status","canon","landUse","other","sessionId","satisfactionStatus","statisticStatus","listDefaultLayer","listCreateMinorTopicLayer","currentParentExpandPanel","currentInterestedTopic","majorID","minorID","listCheckedLayer","listLayer","listDisableTOC","listCheckedBgLayer","listBgLayer","NewTOCReducer","concat","toConsumableArray","listCheckedBMALayer","filter","itm","indexOf","listBMALayer","idTOC","indexOfTargetLayer","splice","push","indexOfTargetBgLayer","listChecked","forEach","listCheckLayerFilter","listUnCheck","listIdTOC","filterListCheckedBMALayer","filterListBMALayer","removeCheckedListTarget","newListCheckedLayer","newListLayer","item","removeCheckedBgListTarget","newListCheckedBgLayer","newListBgLayer","buildings","isFirstStepTwo","valueFormPmr","luApplicationType","luConstructType","luBldgMaterial","luActivity","currentDistrictAndSubDistrict","districtID","subDistrictID","listMenuBreadcrumb","layoutReducer","listMenu","summary","all","countCoordinate","countNoCoordinate","dataTable","filterResult","startDate","endDate","districtId","permitNo","districtIdName","permitNoDisplay","houseList","rootReducer","combineReducers","map","menu","MobileView","Shortcut","toc","form","formReducer","PanelContentData","functionID","authen","Authen","submitPmr","lupZone","lupColor","lupUse","lupSubZone","lupFar","lupOsr","lupUserNo","province","district","subDistrict","AskTheCityPlanData","SatisfactionAndStatisticReducer","newTOCData","construct","applicationType","constructType","bldgMarerial","activity","houseNumberRdc","layout","LayoutReducer","searchOSSReducer","markPointSTRReducer","withStyles","theme","height","buttonradius","borderRadius","green","backgroundColor","&:hover","black","white","_ref","classes","className","label","onClick","disabled","react_default","a","createElement","Button_default","variant","Button","_this$props","this","props","Presentationals_ButtonView","Component","defaultProps","padding","paper","width","maxWidth","btn","marginTop","groupRow","title","fontSize","fontWeight","onClickMenu","Grid_default","container","justify","alignItems","Paper_default","xs","Button_Button","normalizeLatLong","replace","normalizeUsername","normalizePositiveInteger","normalizePositiveFloat","normalizeInteger","normalizeNumber","normalizeHouseNo","checkCitizenId","i","sum","parseFloat","charAt","citizenId13Cha","onlyNums","validateFormUtm","values","errors","x","Constants","y","validateFormLatLong","latLong","test","validateFormDms","longDegrees","latMinutes","longMinutes","latSeconds","longSeconds","formOneValidate","errorSubmitMessageRequire","errorSubmitMessageWrongFormat","parameterMoo","checkMoo","slice","Number","parameterAt","parameterName","parameterRadioTwo","parameterIDCard","parameterZipCode","RegExp","checkTextOrNumber","errorForm","formTwoValidate","chanodeArrayErrors","ind","chanodeErrors","allArea","useArea","chanodeno","surveyno","landno","chanoderai","chanodengan","chanodewa","userai","usengan","usewa","errChanode","keys","formThreeValidate","forBusiness","houseNo","alley","road","validateSearchLandInfo","parcelNo","surveyNo","landNo","sheetNo","stepOneValidate","isButtonSubmit","TRnumber","license","soi","moo","TRrequest","stepTwoValidate","pattern","houseNum","runHouseNo","noStart","split","noEnd","idStart","toString","idEnd","houseNoValueArr","houseIdValueArr","houseId","isHouseNoDuplicate","some","idx","isHouseIdDuplicate","_error","houseListArrayErrors","houseListErrors","houseNoStr","houseIdStart","houseNoStart","parseInt","console","log","formConstructStepOneValidate","pmr1ID","permissionID","formConstructStepTwoValidate","buildingArrayErrors","building","index","buildingErrors","objective","numberbuilding","buildingarea","validateFormDraftPnt","dataType","date","validateFormDraftBLDG","BL_TYPE","BL_ACT_NAME","BL_HID","BL_USE","BL_MAIN_USE","validateFormDraftBLDGStep2","BL_NAME","BL_SUBNAME","BL_HOUSENUM","BL_VILLNUM","BL_VILLAGE","TROK","BL_SOI","BL_ROAD","BL_POSTCODE","SURVEY_DATE","validateFormSearchDraftPnt","landMarkValidate","checkString","numberOfLandMark","typeOfLandMark","nameOfLandMark","surveyYear","getTokenLocalStore","localStorage","getItem","getTypeLocalStore","setTokenLocalStore","token","setItem","removeItem","getLoginHistoryLocalStore","setLoginHistoryLocalStore","loginHistoryID","clearTokenLocalStore","CreateRequest_","reqType","method","headers","Content-Type","Authorization","CreateRequest","fetchGet","url","Promise","resolve","reject","fetch","then","res","clear","catch","fetchPost","param","request","body","JSON","stringify","ok","Error","fetchGet_","window","process","fetchPost_","href","fetchPostFile_","formData","fetchMapService","saveLoginHistory","userID","systemID","json","ex","saveLogoutHistory","updateSystem","getUpdatePmr1Form","dispatch","getMenuCMP","result","jwtToken","groupID","getProfileUser","manageGetProfileFail","getProfileBMA","setTimeout","clearReducer","clearAllReducer","TextFieldRedux","_textField","textField","WebkitBoxShadow","breakpoints","down","input","_ref$meta","meta","touched","invalid","error","srcImg","custom","objectWithoutProperties","FormControl_default","TextField_default","assign","InputLabelProps","shrink","InputProps","endAdornment","InputAdornment_default","position","style","marginLeft","src","FormHelperText_default","formHelper","_titleBackground","_subTitleBackground","paddingLeft","paddingRight","mobileLoginForm","containerForm","containerBackground","backgroundRepeat","backgroundSize","backgroundPosition","cmsBackground","backgroundImage","pmrBackground","containerLogin","containerLogo","flexDirection","containerBottomLogo","bottom","subContainerLogo","imgLogo","titleBackground","textShadow","subTitleBackground","titleLogin","subTitleLogin","mainTheme","color1","divLoginHeader","textAlign","mobileAuthenView","containerBackgroundMobile","divLogoFooter","imgLogoFooter","verticalAlign","paperLoginForm","justifyContent","minHeight","btnLogin","btnRegister","forgotPassword","cursor","containnerBtnPMR","containnerBtnCMS","_ref2","mode","handleSubmit","onSubmit","onClickRegister","onClickForgotPassword","renderFormLogin","spacing","Field","component","placeholder","required","react","Hidden_default","smDown","sm","md","EMAIL_ADMIN","TEL_ADMIN","mdUp","implementation","elevation","TagLoading","xmlns","viewBox","fill","d","attributeName","from","to","dur","repeatCount","Loading","_this$props$isShowLoa","isShowLoading","loading","Loading_TagLoading","image","zIndex","drawer","top","left","right","transform","AlertMessageView","_Component","classCallCheck","possibleConstructorReturn","getPrototypeOf","apply","inherits","createClass","handleClose","button","isOpen","Dialog_default","open","onClose","aria-labelledby","aria-describedby","dialogRadius","DialogTitle_default","DialogContent_default","content","DialogContentText_default","DialogActions_default","AlertMessageViewWithStyles","control","unit","marginBottom","withMobileDialog","AlertMessage","_getPrototypeOf2","_this","_len","args","Array","_key","call","handleCancel","onCancel","handleConfirm","checkType","language","cancelButtonLabel","btnCancelName","btnConfirmName","btnCloseName","_this$props2","showAlert","hideAlert","_this$props2$isHideBu","isHideButton","Presentationals_AlertMessageView","btnOkName","WithLoading","WrapComponent","showLoading","setState","hideLoading","WithAlertMessage","_ref$altMsg","altMsg","_ref$altTitle","altTitle","_ref$altType","altType","_ref$callbackClose","callbackClose","_ref$callbackConfirm","callbackConfirm","_ref$callbackCancel","callbackCancel","_ref$param","isShowAlt","_this$state","_this$state2","AlertMessageSuper","Containers_AlertMessage","createMuiTheme","palette","primary","main","dark","contrastText","typography","useNextVariants","txtErr","fontFamily","labelStyle","classNameTextField","icon","iconColor","_ref$multiline","multiline","_ref$rows","rows","maxLength","labelSecond","asterisk","startAdornment","disableTypography","disablePointerEvents","onChange","target","checkMaxLength","Presentationals_TextFieldReduxView","rootDialog","rootContent","isOpenForgotPassword","Containers_Loading","TextField","ForgotPassword","callServiceForgotPassword","email","callServiceForGotPasswordBMA","username","_callee","regenerator_default","wrap","_context","prev","next","t0","sent","statusCode","stop","onCloseForgotPassword","_this$props3","Authentications_ForgotPasswordView","AlertMessageSuper_AlertMessageSuper","reduxFormParameter","validate","enhance","compose","reduxForm","LoginStaff","handleLogin","callServiceLoginStaff","password","callServiceLoginUser","authenAction","Username","Password","sha256","hmac","finally","asyncToGenerator","mark","ApiPrivateRoute","_x","_x2","_ref3","_ref4","_callee2","_context2","abrupt","_x3","handleRegister","history","handleForgotPassword","prevState","searchParams","get","change","Authentications_LoginView","Authentications_ForgotPassword","connect","bindActionCreators","AuthenAction","rootPaper","boxShadow","txtTitle","alt","FormResetPassword","encPassword","handleConfirmRetPassword","evt","callServiceResetPassword","UserID","path","Authentications_FormResetPasswordView","confirmPassword","containerBottom","margin","titleText","onClickCancel","normalize","Register","callServiceRegister","handleClickCancel","firstName","lastName","identificationID","handleCloseAlertMsg","Authentications_RegisterView","containnerContent","onClickClose","ActivateUser","componentDidMount","callServiceActiveUser","handleClickClose","Authentications_ActivateUserView","ListMenu","onClickUsermanual","Link","link","MenuItem_default","selected","menuItemClass","ListItemIcon_default","listItemIconClass","img","ListItemText_default","rootListItemText","_drawerPaper","toolbar","flexShrink","drawerPaper","border","up","menuItem","myJobMenu","textDecoration","whiteSpace","lineHeight","menuFlex","paddingTop","listItemIcon","marginRight","common","withTheme","openMyJobDetail","mobileOpen","handleDrawerToggle","Drawer_default","anchor","direction","classNames","docked","ModalProps","keepMounted","MenuView_ListMenu","LIST_MENU","Menu","onClickLink","handleDownloadUsermanual","URL_USERMANUAL","UserManagements_MenuView","menuUser","textOverflow","overflow","openMenu","listMenus","anchorElMenu","IconButton_default","aria-label","aria-owns","aria-haspopup","MoreVert_default","Popover_default","anchorEl","anchorOrigin","vertical","horizontal","transformOrigin","MenuList_default","bindMapCommand","params","bindClearMapCommand","bindEvtExtentChange","callbackFunction","bindEvtClickMap","bindEvtClickMapIdentify","bindEvtEnableDrawGraphic","bindEvtDisableDrawGraphic","bindEvtEnableClearSelectGraphic","bindEvtDisableClearSelectGraphic","bindEvtZoomIn","bindEvtZoomOut","bindEvtMouseMove","bindEvtMouseMoveCoordinate","bindEvtOnShowDataTableOss","_getDatumConstants","sr","SEMI_MAJOR_AXIS","INVERSE_FLATTENING","ns","zone","toUTM","toZone","spatialReference","datumConstans","outSR","_getUTMSpatialreference","convertorFunctionOfToUTM","lat","lon","f","e2","e4","e6","a0","a2","a4","a6","rad_lat","Math","PI","sin_lat","sin","sin_2_lat","sin_4_lat","sin_6_lat","cos_lat_1","cos","cos_lat_2","cos_lat_3","cos_lat_5","cos_lat_7","rho","pow","nu","diff_lon_1","long_of_west","diff_lon_2","diff_lon_3","diff_lon_4","diff_lon_5","diff_lon_6","diff_lon_7","diff_lon_8","psi_1","psi_2","psi_3","psi_4","tan_lat_1","tan","tan_lat_2","tan_lat_4","tan_lat_6","jsonGeometry","wkid","points","paths","fromUTM","_getGCSSpatialreference","convertorFunctionOfFromUTM","EastPrime","mu","fp","_C1","T1","N1","R1","Fact1","Fact2","Fact3","Fact4","DeltaLong","ZoneCM","RawLatitude","e","sqrt","eisq","ei","C1","C2","C3","C4","isFindString","str","searching","checking","toUpperCase","sortObjASC","arrObjData","attrName","sort","b","localeCompare","sensitivity","compareObjSortASC","sortObjDESC","compareObjSortDESC","objectToArray","objData","numberWithCommas","n","fixedNumber","parts","toFixed","numberFormat","number","_ref$minimumFractionD","minimumFractionDigits","_ref$maximumFractionD","maximumFractionDigits","toLocaleString","svg2pngBase64","domNodeSVG","canvasWidth","canvasHeight","resolv","svgURL","XMLSerializer","serializeToString","svgBlob","Blob","createObjectURL","Image","canvas","document","ctx","getContext","onload","drawImage","png","toDataURL","revokeObjectURL","err","xml2json","srcDOM","children","innerHTML","jsonResult","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_step","_loop","child","eachChild","nodeName","_iterator","Symbol","iterator","done","return","displayImportExportStatus","shortStatus","isEmptyObj","obj","hasOwnProperty","options","convertLatLong","EsriLoader","loadModules","webMercatorUtils","slicedToArray","xyToLngLat","getCoordinateConvertByLatLong","long","Point","UTMConverters","calculateDistance","isGeodesic","_ref6","geometryEngine","multiplier","geodesicLength","simplify","planarLength","moment","locale","dateThaiFormat","dateTime","getDate","getMonth","getFullYear","convertDateTimeToDisplayDate","strFormat","strLocal","newDate","Date","localDetect","thLocale","tmpDateTime","addYears","enLocale","format","convertDatetimeToCallService","getTime","convertDateToFormatTHFromMoment","add","current","CPUDD_Query_Plan","editSubmitPmr","editConstruct","editDraftPnt","editDraftLine","gpMoveSubmitPmr","gpMoveConstruct","gpMoveDraftPnt","gpMoveDraftLine","gpMoveDraftPolygonLine","evtSelectionCompleteSp","evtDrawMap","geometrySpDraft","zoomIn","zoom","getZoom","setZoom","zoomOut","drawPinCurrentAndPan","mapParam","drawPinCurrentLocation","pan","panToPoint","centerAt","Graphic","PictureMarkerSymbol","clearGraphic","picPin","gp","setAttributes","CUSTOM_KEY","graphics","gotoLocation","_ref5","projection","newPoint","longitude","latitude","symbol","offset","setOffset","graphic","zoomToScale","_ref7","scale","setScale","getPointPMR","_ref8","_ref8$mapserviceUrl","mapserviceUrl","_ref8$pmr1ID","callback","_ref10","_ref9","_ref11","Query","QueryTask","qParame","qTask","where","outSpatialReference","returnGeometry","outFields","execute","response","drawGraphicToolbar","_ref12","_ref13","Draw","activateType","drawMode","POLYLINE","clearEvtDrawMap","createEvtDrawMap","callbackDrawComplete","clearAllGraphic","listGraphicClear","attributes","gpWorking","clearAllGraphicMapTools","clearOnlyGraphicGoToLocation","_delay","delayTime","_ref15","_callee4","arrGraphicLayer","layer","_args4","_context4","getLayer","_ref16","_callee3","element","_context3","remove","_x5","_x4","clickClearGraphic","objMap","mapClickObject","addKmlLayer","_ref17","urlKml","kmlName","lastTocLayerID","_ref18","kml","KMLLayer","visible","on","_ref20","message","_ref21","_fLayers","listSubLayer","indexLayerDisable","indexLastLayer","graphicsLayerIds","itmLayer","addLayer","addWMSLayer","_ref22","urlWms","wmsName","layerID","_ref23","wms","WMSLayer","visibleLayers","_ref25","addWFSLayer","_ref26","urlWfs","wfsName","layerName","_ref27","WFSLayer","layerNameSplit","wfsname","opts","wfs","fromJson","setVisibility","addDefaultLayer","_ref29","defaultLayer","_ref30","_ref31","FeatureLayer","DynamicLayer","ArcGISImageServiceLayer","listDefaultLayersRevers","reverse","option","LAYER_ID_SNAPSHOT","MODE_SNAPSHOT","mapserviceURL","mapserviceID","setDefinitionExpression","addRestLayer","_ref32","layerRest","restName","listLegend","_ref33","_ref34","esriConfig","esriId","defaults","io","corsEnabledServers","arrRESTURL","registerURL","substr","registerToken","server","restLayer","setVisibleLayers","_ref35","_ref36","removeTOCLayerItem","removeLayer","reorderTOC","_ref37","sourceLayer","destinationLayer","indexDestinationLayerMap","reorderLayer","reorderBgTOC","_ref38","getLayersVisibleAtScale","setTOCVisibleLayer","_ref39","_ref39$isVisible","isVisible","setMultiVisibleLayers","_ref40","layerIDs","_ref40$isVisible","getLayerByID","IdentifyComprehensivePlan","_ref43","callbackFn","_ref45","_callee5","_ref44","_ref46","IdentifyTask","IdentifyParameters","districtPMR1ID","query","queryTask","identifyTask","identifyParams","_context5","CONFIG_URL_GIS","SUBDISTRICT_BASEMAP","features","SUBDISTRICT_ID","COMPREHENSIVE_PLAN","tolerance","layerOption","LAYER_OPTION_ALL","mapExtent","extent","returnFieldName","idResults","_x6","createDrawMeasurement","_ref47","_ref48","_ref49","has","enableSnapping","snapKey","META","CTRL","addGraphicDrawMeasurement","_ref50","_ref52","_callee6","_ref51","_ref53","SimpleMarkerSymbol","SimpleFillSymbol","SimpleLineSymbol","Color","_context6","calLocation","resultLocation","outline","calArea","resultArea","STYLE_SOLID","calDistance","_x7","_ref55","_callee7","_ref54","_ref56","utm","latLon","latLonForUmt","_utm","_context7","MapUtils","_x8","_ref57","GeometryEngine","Utils","geodesicArea","squareMeter","tmpSquareMeter","rai","ngan","squareWa","abs","_ref59","_callee8","_context8","_x9","clearDrawMesurement","zoomQueryBuilder","_ref60","_ref60$mapserviceUrl","_ref60$objectID","objectID","_ref61","_ref62","geometryType","lvZoom","centerAndZoom","setExtent","getExtent","expand","STYLE_DASHDOT","drawPointSubmitPmr","_ref63","addGraphicDrawGraphicSubmitPmr","_ref64","_ref65","_ref66","clearDrawPointSubmitPmr","drawPointEditPMRForm","_ref67","_ref68","SpatialReference","lngLatToXY","latestWkid","symbolColor","currentLocationSubmitPmr","_ref69","_ref70","alert","SaveGeometryPMR1","_ref71","_ref72","_ref73","authenRdc","featureLayer","SAVE_GEOMETY_PMR1","OBJECTID","ObjectId","PMR1_ID","pmr1id","STATUS","DISTRICT_ID","pmr1DistrictID","UPDATER","UPDATED_DATE","DateTimeUtils","dataFeatures","FormData","append","fetchUpdateFeature","updateResults","success","objectId","applyEdits","getDistrictAndSubDistrictFormPoint","_ref74","_ref75","_ref76","errMsg","editGraphicSubmitPmr","_ref77","_ref78","_ref79","Edit","selectionSymbol","graphicBorder","activate","MOVE","pointSymbol","graphicPoint","clearEditPmr","deactivate","clearEvtDrawPmr","setMapCursor","clearSubmitPmr","_ref82","_ref82$unit","_ref82$isZoomToResult","isZoomToResult","_ref84","_callee9","_ref83","_ref85","geoMerkator","_context9","_x10","drawGraphicPointPMR1","_ref86","_ref86$mapserviceUrl","_ref86$creator","creator","_ref88","_callee10","_ref87","_ref89","ProjectParameters","_context10","val","PrjParams","geometries","symbolPoint","_x11","PrintMapPMR1","_ref93","_callee11","_ref92","pmr1codeForPrintMap","_context11","_ref94","_ref95","PrintTemplate","PrintTask","PrintParameters","printMap","PRINT_MAP_URL","template","showAttribution","layoutOptions","customTextElements","CUSTOM_PMR1_ID","CUSTOM_DATE","_x12","_x13","clearGraphicLocator","drawLocator","_ref96","_ref96$type","_ref96$listPoint","listPoint","_ref97","_ref98","Polyline","Polygon","GeometryService","geometryService","project","outputpoint","symbolPolygon","rings","symbolMultiPolygon","multipolygon","symbolMultiLine","STYLE_DASH","symbolLine","zoomLocator","_ref100","_callee12","_ref99","_ref101","polygonZoom","_context12","drawRings","callbackCompleteLocator","addRing","_x14","getResultCurrent","_ref102","_ref103","resetDrawAskTheCityPlan","createDrawAskTheCityPlan","_ref104","_ref105","specifyCoordinateCMP","_ref107","_ref107$unit","_ref109","_callee13","_ref108","_ref110","_context13","_x15","addGraphicDrawAskTheCityPlan","_ref111","_ref112","_ref113","setDefultMap","IdentifyComprehensivePlanCMP","_ref114","_ref115","_ref116","landuseExtent","_ref120","_callee14","_ref119","_ref121","_context14","_x16","drawText","_ref122","_ref122$displayText","displayText","_ref122$customKey","customKey","_ref123","_ref124","TextSymbol","Font","labelPoints","_ref125","labelPoint","font","STYLE_NORMAL","VARIANT_NORMAL","WEIGHT_BOLDER","textSymbol","labelPointGraphic","drawGraphicCityPlan","_ref127","loadingFunction","_ref129","_callee15","_ref128","_ref130","_context15","feature","_x17","printMapForMapTool","_ref131","_ref132","_ref133","exportOptions","dpi","paperSize","mapDescription","CUSTOM_TITLE","mapName","CUSTOM_DESC","async","printMapForComPlanQuery","_ref134","lup","station","transp","opsName","_ref135","_ref136","lupParam","far","osr","CUSTOM_STATION_BUFFER","buffer","CUSTOM_STATION_NAME","CUSTOM_TRANSP_PRJ","prj","CUSTOM_TRANSP_WIDTH","CUSTOM_BDCTL_ZONE","CUSTOM_BDCTL_CODE","code","CUSTOM_BDCTL_NAME","CUSTOM_OPS_NAME","printMapForReport","_ref137","attribute","extenPoint","extenPoly","_ref139","_callee16","_ref138","_ref140","qTask2","listExtend","union","_context16","CPUDD_QUERY_PLAN_LAYER_PNT","executeForExtent","CPUDD_QUERY_PLAN_LAYER_POLYGON","xmax","isNaN","_x18","mapRemoveLayer","_ref141","addLayerCPUDDQueryPlan","_ref142","_ref143","queryPlanLayer","CPUDD_QUERY_PLAN_LAYER","visble","strStartDateUTC","strEndDateUTC","condition","layerDefinitions","LAYER_ID_REPORT_COMPREHENSIVE","setLayerDefinitions","filterCPUDDQueryPlan","_ref144","_ref145","startDateUTC","endDateUTC","addShapeAskForBusiness","_ref146","_ref147","setGeometry","ACTIVITY","QUERY_DATE","parse","USER_ID","userId","callbackResult","zoomLandplot","_ref149","_callee17","_ref148","_ref150","_context17","drawLandplot","isKeepGraphic","_x19","_ref151","_ref151$type","_ref151$listPoint","_ref151$isKeepGraphic","_ref152","_ref153","clearGraphicSearchLandInfo","checkPermissionPointOnMap","_ref156","_ref157","districtLayer","districtGraphic","check","intersects","drawMap","drawPointConstructionLicense","_ref159","addGraphicConstructionLicense","creatGraphicPointConstruct","_ref160","_ref161","_ref162","clearGraphicConstructionLicense","geoMercator","_ref163","_ref164","_ref165","currentLocationConstructionLicense","_ref166","_ref167","editGraphicConstructionLicense","_ref168","_ref169","_ref170","_ref171","clearGraphicHouseNumber","clearEditConstruct","deActivateConstruct","addConstructionLicense","_ref173","_callee18","_ref172","_ref174","geoUTM","geoLatLong","_context18","CONSTRUCT_ID","constructID","APPLICATION_TYPE","APPLICANT_NAME","APPLICATION_DATE","applicationDate","PERMISSION_ID","HOUSE_NO","MOO","SOI","ROAD","PROVINCE_ID","NUM_BLDG","numBLDG","CONTRUCT_TYPE","CHANODE_NO","chanodeNO","LAND_NO","PERMISSION_DATE","permissionDate","OWNER_NAME","ownerName","trok","APPLICANT_TELNO","applicantTelNo","USE_AREA","landuseArea","CREATOR","CREATED_DATE","createDate","REMARK","remark","H_XCOOR","H_YCOOR","_x20","updateConstructionLicense","_ref176","_callee19","_ref175","_ref177","geoMercatorPrev","_context19","geometryPrev","updateDate","_x21","addShapeTr900","_ref179","_callee20","_ref178","_ref180","_param$stepTwo","districtid","housetrid","numberofhouse","permissionid","provinceid","subdistrictid","tr31id","regDate","applicantName","houseType","houseTypeDetail","houseMaterial","numFloor","bldgArea","chanodeNo","_context20","CONSTRUCT_RNO","TR31_ID","HOUSE_RNO","HOUSE_TR_ID","NUM_HOUSE","REG_DATE","HOUSE_TYPE","HOUSE_TYPE_DETAIL","HOUSE_MATL","NUM_FLOOR","BLDG_AREA","_x22","editShapeTr900","_ref182","_callee21","_ref181","_ref183","_param$stepTwo2","objectid","_context21","_x23","drawGraphicSearchConstruct","_ref184","_ref185","clearGraphicSearchConstruct","drawDraftLine","_ref189","_ref189$isActivateDra","isActivateDraw","_ref190","_ref191","addGraphicDraft","drawDraftPolygon","_ref192","_ref192$status","alertFn","_ref193","_ref194","drawDraftPnt","_ref195","_ref196","deActivateDraftPnt","editGraphicDraftLine","_ref198","_ref198$isActivateEdi","isActivateEdit","_ref199","_ref200","ROTATE","EDIT_VERTICES","SCALE","_ref201","_ref202","_ref203","editGraphicDraftPolygonLine","_ref204","_ref204$status","_ref204$callback","_ref205","_ref206","_ref207","CalculateArea","_ref208","_ref209","editGraphicDraftPnt","_ref211","_ref213","_callee22","_ref212","_ref214","_context22","_ref215","_x24","clearEditDraftPnt","_ref216","_ref217","_ref218","clearGraphicDrawDraft","setColor","setWidth","addGraphicDraftLineForDetail","_ref219","_ref220","_ref221","applyEditShapeDraftPnt","_ref222","_ref223","DRAFT_POINT","featureLayerToc","selectionLayerID","DESCRIPTION","description","CREATION_DATE","TYPE","refresh","refreshMap","applyEditLandMark","_ref224","_ref225","LMRK_ID","LMRK_CODE","LMRK_NAME","UPDATE_YEAR","year","user","applyEditShapeDraftLine","_ref226","_ref227","reFreshSnapShotLayer","applyEditShapeDraftPolygon","_ref228","_ref229","DRAFT_BDLG","BL_DATE","dateOne","dateTwo","BL_OWNER","_ref230","drawSpatialSearchPMRDeactive","_ref231","drawSpatialSearchPMR","_ref232","_ref233","selectQuery","RECTANGLE","show","hide","featureCheckInterSects","isInterSectsDistrict","IS_INSIDE_DISTRICT","drawSpatialSearchDraft","_ref234","_ref235","selectionDraft","layerSnapShort","setZoomTo20","_ref236","buildingGPOSS","_ref237","_ref238","CPUDD_CAH_IMPORT_OSS_LAYER","itemResponse","_ref239","_ref240","selectFeatures","SELECTION_NEW","clearSelection","reSearchDraft","cleardrawSpatialSearchDraft","clearImportShapeGraphic","_ref241","importShape","_ref243","_ref244","filePath","refFormUpload","messageConfig","_ref245","_ref246","Extent","layerExtentGEO","targetSR","maxRecordCount","enforceInputFileSizeLimit","enforceOutputJsonSizeLimit","maxAllowableOffset","generalize","reducePrecision","numberOfDigitsAfterDecimal","myContent","filetype","publishParameters","PORTAL_GENERATE_URL","handleAs","load","returnData","isSupport","featureCollection","layers","featureSet","featureITM","layerDefinition","size","extend","extentGeometry","_ref242","extentGEO","xmin","ymin","ymax","extentGraphicImportShape","messageError","includes","extentToListImportShape","_ref247","_ref248","_ref249","drawGraphicSpatialSearch","_ref250","_ref251","queryTaskUrl","cleardrawSpatialSearchOR1","isClearSearchContructLayer","searchContructLayer","cleardrawSpatialSearchTR900","isClearSearchHouseLayer","SearchHouseLayer","clearDrawEventExportShape","_ref252","clearExportShapeGraphic","_ref253","createDrawAreaExportShape","_ref254","_ref255","_ref256","exportShapeLayer","drawExportShapeComplete","_ref257","_ref259","_callee23","_ref258","_ref260","displayGraphic","_context23","areaSQ_KM","isSupportArea","_x25","DrawGraphicByAttr","_ref263","drawType","attr","_ref264","_ref265","styleNormal","stylePoint","toLowerCase","outlineColor","typeLine","stylePolygon","notStylePolygonDiagonal","styleCircle","notStyleCircleDiagonal","weight","family","drawMarkPointSTR","_ref266","addGraphicMarkPointSTR","_ref267","_ref268","_ref269","addOldGraphicMarkPointSTR","_ref270","_ref271","_ref272","applyEditMarkPointSTRSingle","_ref273","_ref274","CPUDD_CAH_TR_POINT_FEATURE","BL_PAGE_NO","houseCode","BL_REMARK","DISTRICT_CODE","PROVINCE_CODE","provinceID","SUB_DISTRICT_CODE","LATITUDE","LONGITUDE","BL_ID","res1","res2","res3","getPolygonMarkPointSTR","_ref275","_ref276","_ref277","STR_POLYGON","getPolygonMarkPointSTROld","_ref278","_ref279","_ref280","applyEditMarkPointSTRPolygon","_ref281","_gp$setAttributes","_ref282","BLDG_ID","BL_FRONTAGE","BL_HEIGHT","BL_DEPTH","BL_NSTOREY","BL_NUNIT","BL_UNIT_F","BL_NRESIDENT","BL_EMPLOY","BL_AREA","BL_AREA_FLAG","BL_TAX_ID","BL_MATL","BL_SUBDISTRICT","BL_DISTRICT","BL_CHANGWAT","BL_ADDRESS","PRJ_ID","BL_NAME_T","BL_NAME_E","BL_ACT_MAJOR","BL_ACT_MINOR","BL_ACT_OTHER","UPDATE_DATA","MATCHING","X","Y","LAT","LON","SOURCE","S_DATE","CREATED_USER","LAST_EDITED_USER","LAST_EDITED_DATE","applyEditMarkPointSTRPolygonDelete","_ref283","_gp$setAttributes2","_ref284","clearEvtDrawMapSTR","panToPointMarkPointSTR","_ref285","clearGraphicMarkPointSTR","clearEditGraphic","MenuUser","createListMenu","autheRdc","functions","handleClick","event","currentTarget","handleClickMenu","mapAction","pathLogin","MapFunctions","Boolean","Web_MenuUserView","MapAction","breadCrumbStart","clipPath","minWidth","breadCrumbNext","renderBreadCrumbStart","renderBreadCrumbNext","BreadCrumbUm","Presentationals_BreadCrumbUmView","_appBar","flexGrow","appBar","prositionhead","profileheard","header","typo","scrollbars","paperHeader","imgHeader","divTitle","color2","textSize","normal","subTitle","subtitleHeader","mini","txtGroupName","contentMenu","textProfile","containerLeft","containerRight","menuFunctions","AppBar_default","Menu_default","xsDown","groupName","Web_MenuUser","UserManagements_Menu","menuClass","linkClass","BreadCrumbUm_BreadCrumbUm","Layout","menustatus","layoutRdc","UserManagements_LayoutView","withWidth","openFormGotoLocation","closeFormGotoLocation","openFormBasemapGallery","closeFormBasemapGallery","openFormToc","closeFormToc","openFormMeasurement","closeFormMeasurement","openFormDrawGraphic","closeFormDrawGraphic","openMenuPanel","closeMenuPanel","openMenuMap","closeMenuMap","openMenuSearch","closeMenuSearch","openMenuPrintmap","closeMenuPrintmap","openBtnPrintmap","closeBtnPrintmap","openIdentify","closeIdentify","openClearGraphic","closeClearGraphic","openZoomToScale","closeZoomToScale","activeFunction","closeMapTool","openMapTool","activeMobileView","activeShortcut","callTocLayer","saveTocLayer","saveNoParentToclayer","saveParentToclayer","saveSublayerToc","CONFIG_MENU","MAP01","MAP02","MAP03","MAP04","MAP05","MAP06","MAP07","FCN01","FCN02","FCN03","FCN04","FCN05","FCN06","FCN07","FCN08","FCN09","FCN10","FCN11","FCN12","FCN13","FCN14","FCN15","FCN16","FCN17","FCN18","FCN20","FCN21","FCN22","FCN23","FCN24","FCN25","FCN26","FCN27","FCN28","FCN29","FCN30","FCN40","FCN41","FCN42","FCN43","FCN44","FCN45","FCN46","FCN47","FCN48","FCN49","FCN50","FCN51","FCN52","FCN53","FCN54","FCN62","FCN63","FCN64","FCN65","FCN66","FCN67","FCN68","FCN69","ASK_THE_CITY_PLAN","clickOnMapPoint","clickOnMapPolygon","specifyLandArea","MODE_DRAW","placement","Tooltip_default","tooltip","Tooltip","_this$props$placement","Presentationals_TooltipView","color4","colorAH","colorHover","btnZoom","&:active","opacity","btnZoomImage","Tooltip_Tooltip","btnCurrentLocation","btnCurrentLocationImage","clickCurrentLocation","_measurement","measurement","btnMeasurement","btnMeasurementImage","btnActive","colorActive","classnames","_goto","goto","btnGoto","btnGotoImage","openFormGoToLocation","basemapGalleryGraphics","btnBasemapGalleryGraphics","btnGraphicsImage","btnToc","btnTocImage","openToc","_printmap","printmap","btnPrintmap","btnPrintmapImg","openPrintmap","Print_default","_drawGraphics","drawGraphics","subDrawGraphics","btnDrawGraphics","btnDrawGraphicsActivate","btnDrawGraphicsImage","paddingBottom","menuActive","openDrawGraphic","btnClearGraphic","btnClearGraphicImg","rootSubMenu","hideDisplay","subMenuActive","onClickClearAll","onClickClearSelect","HowToVote_default","_root","btnImage","openGotoScale","ZoomIn_default","formControl","inputLabel","inputLabelMargin","displayNone","red","select","selectMenu","selectMenuRoot","_classnames2","onChangeValue","_ref$keyData","keyData","_ref$isDataArray","isDataArray","dataProps","InputLabel_default","htmlFor","disableAnimation","Select_default","displayEmpty","OutlinedInput_default","labelWidth","SelectFieldRedux","handleChange","_this$props2$disabled","Presentationals_SelectFieldReduxView","borderColor","borderStyle","borderWidth","selectEmpty","formInput","projectionType","showHide","onProjectionChange","isMobileSize","useMediaQuery","Icon_default","SelectField","defaultValue","renderTextField","GoToLocation","MenuAction","gotoLatitude","gotoLongitude","gotoProjection","gotoLatLong","trim","handleProjectionChange","Constanst","componentWillReceiveProps","nextProps","_this$props4","GoToLocation_GoToLocationFormView","chk","VALIDATION_LONGITUDE_FAIL","VALIDATION_REQUIRED_FIELD","VALIDATION_LATITUDE_FAIL","initialValues","overflowY","overflowX","divMode","btnMeasureMentMode","btnAreaNormal","&:Hover","btnAreaSelected","btnDistanceNormal","btnDistanceSelected","btnLocationNormal","btnLocationSelected","divTextHDR","iconCloseHDR","activeMode","onDistanceModeClick","onAreaModeClick","onLocationModeClick","onCloseClick","Divider_default","isError","dataItems","labelName","inputProps","Presentationals_SelectFieldView","MeasurementResultView","datasource","mouseMoveResult","drawModeActive","unitActive","Containers_SelectField","divResultLocation","divRowResultLocation","divCol","divResult","flexWrap","INIT_SELECT_UNIT","Measurement","MapFunction","handleMeasurementDrawComplete","handleClickMap","handleMouseMove","MAP_OPTION","mapPoint","geoPolygon","geoPolyline","geoPoint","mapMouseMoveObject","handleDistanceModeClick","handleAreaModeClick","handleLocationModeClick","handleChangeUnit","selectValue","handleCloseClick","stopPropagation","closeMeasureMesurement","componentWillUnmount","Measurement_MeasurementView","Measurement_MeasurementResultView","getListDefaultLayer","subLayerID","generateFormatTOCData","tableName","_ref$listLegend","_ref$listSubLayer","addTOCLayer","addTOCBgLayer","setListCreateMinorTopicLayer","initializeLayerMinorTopic","getLegendTopicLayer","urlMapservice","listLayerLegend","saveToListCreateMinorTopicListLayerByTopic","majorTopicID","minorTopicID","listLayerTOC","mapServiceDisplayURL","listLegendOfLayerITM","every","mapServiceID","layerId","legend","setCurrentParentExpandedPanel","checkParentLayer","checkParentBgLayer","removeAllTOCTopicLayer","disableLayer","setListChecked","setListUnChecked","removeTOCBgLayerItem","setListLayer","setListBgLayer","clearTOCReducer","root_hide","header_text","title_text","_ref$isHide","isHide","onOpenAddLayer","Fab_default","Add_default","lib_default","autoHide","screenWidth","screen","ExpansionPanel","&:not(:last-child)","borderBottom","&:before","expanded","MuiExpansionPanel","ExpansionPanelSummary","&$expanded","ExpansionPanelSummary_default","muiName","ExpansionPanelDetails","MuiExpansionPanelDetails","ListItemCustom","grid_root","grid_root_free","grid_root_freeGrab","avatar","btnRemoveTOCList","rootExpandPanel","rootExpandPanel_expanded","expandIconStyle","layerNameDiv","_ref$listCheckedLayer","_ref$listDisable","listDisable","onParentExpandChange","parentExpanded","onParentCheckChange","onRemoveTOCListClick","handleParentCheckChange","checked","handleRemoveTOCListClick","onCheckClick","TOCListView_ExpansionPanel","square","handleParentExpandChange","TOCListView_ExpansionPanelSummary","expandIcon","ExpandMore_default","DragHandleItem","Checkbox_default","isDefaultLayer","DeleteForever_default","TOCListView_ExpansionPanelDetails","ListItem_default","ListItemAvatar_default","Avatar_default","contentType","imageData","generateLegend","SortableHandle","index_es","SortableItem","SortableElement","_ref2$listCheckedLaye","_ref2$layer","_ref2$listDisable","_ref2$parentExpanded","SortableList","SortableContainer","_ref3$listCheckedLaye","_ref3$listLayer","_ref3$listDisable","_ref3$parentExpanded","_ref4$listCheckedLaye","_ref4$listLayer","_ref4$listDisable","_ref4$parentExpanded","onSortEnd","filterDisplayList","filterHideList","list","displayTopLayer","oldIndex","newIndex","dispalyList","newDisplayList","arrayMove","useDragHandle","newTOCAction","NewTOCAction","NewTOC_TOCListView","expandedPanel","labelRequire","errorText","subLabel","_ref$isModeSelectAll","isModeSelectAll","FormLabel_default","FormGroup_default","newValue","CheckboxGroupRedux","CheckboxGroupReduxView","btnShowLayer","lookWMSLayer","onClickShowLayer","onChangeSelectLayer","CheckboxGroup","AddWMSLayer","fetchLayer","proxyPage","GlobalConfig","PROXY_URL","LayerXML","DOMParser","parseFromString","querySelector","Layer","Name","Title","handleShowLayer","formRdc","AddToc_AddWMSView","rowLayer","lookWFSFeatureType","AddWFSLayer","featureTypeListXML","featureType","FeatureType","AddToc_AddWFSView","chkSecure","hidden","isOpenFormSecure","lookRestLayer","renderFormSecure","AddRestServiceLayer","fetchInfoMapService","urlSplitRest","urlMapService","fetchToken","details","expiration","client","referer","hostname","formBody","property","encodedKey","encodeURIComponent","encodedValue","join","getLayerMapService","urlRest","singleFusedMapCache","subLayerIds","getLayerSecureMapService","info","authInfo","tokenServicesUrl","usernameRest","passwordRest","objLayer","touch","search","secureRest","AddToc_AddRestServiceLayerView","group","row","formControlLabel","_ref$direction","RadioGroup_default","FormControlLabel_default","Radio_default","RadioButtonGroupRedux","RadioButtonGroupReduxView","listOptionImport","textFieldUpload","inputUploadKMLRef","importType","onImportFileKML","onOpenUpload","ref","RadioButtonGroup","CloudUpload_default","readOnly","ListAddTocMode","paperWidthSm","rootDialogContent","rowMode","_ref$isOpen","AddLayer","getLegendLayerRestService","mapServiceIDs","handleImportFileKML","file","files","uploadFile","handleRefInputUploadKML","node","handleOpenUpload","click","renderForm","AddToc_AddKMLView","AddWMSLayer_AddWMSLayer","AddWFSLayer_AddWFSLayer","AddRestServiceLayer_AddRestServiceLayer","layerKmlID","layerWmsID","layerWfsID","urlKmlFile","mapFunctions","callBackAddKmlLayer","callBackAddWmsLayer","wfsLayer","callBackAddWfsLayer","tokenRest","results","flat","layerRestID","callBackAddResLayer","tocLayers","handleAddTocLayer","_this$props5","handleAddTocBgLayer","_this$props6","_this$props7","listTOC","_this$props8","_this$props9","_this$props10","AddToc_AddLayerView","fileKML","BMALayers","selector","formValueSelector","menuAction","callBackAddTocComplete","_useState","useState","_useState2","isOpenFormAddLayer","setOpenFormAddLayer","_useState3","_useState4","isSetDefaultComplete","setDefaultComplete","useEffect","resetTOC","setDefaultLayer","listLayerToc","createDataForToc","callBackAddDefaultLayer","listLayers","listLayersToc","urlMapServices","urlFilterDuplicate","legends","_args3","mapServiceURL","Set","getLegendLayer","legendLayer","listToc","handleClosePanel","handleOpenAddLayer","NewTOC_TOCPanelView","NewTOC_TOCList","AddToc_AddLayer","Transition","Zoom_default","navigateIcon","urlImage","fullWidth","TransitionComponent","ImageGallery","Presentationals_ImageGalleryView","PrintmapView","templateChoiceList","formatChoiceList","onClickSubmit","onChangePaperSize","iconPreview","iconPreviewOff","TEMPLATE_PRINTMAP","handleClickSubmit","handleCallbackPrintMap","handleCloseDialog","isPrintmapClick","handlePreviewClick","PrintmapForm","previewURL","TEMPLATE_PREVIEW_URL","isOpenTemplatePreview","templateURL","handlePreviewClose","handleChangePaperSize","isOpenForm","initialize","onClosePrintmap","Printmap_PrintmapView","isOpenDialog","onClickLayerCheckbox","handleClickLayerCheckbox","onPreviewClick","Containers_ImageGallery","PrintmapLoadding","askTheCityPlanRdc","_identify","identify","identifyActive","btnIdentify","btnIdentifyImage","clickMapIdentify","_ref154","_ref155","InfoTemplate","scaleMap","getScale","queryParam","units","listPromise","isGRAPHICLAYER","isFEATURELAYER","instanceLayer","_","isNil","minScale","layerData","setTitle","_name","setInfoTemplate","fieldName","fields","field","isNull","isEqual","alias","currentAttrValue","listResults","listFeaturesDisplay","infoWindow","set","setFeatures","clearFeatures","handleOpen","MapTools_BtnIdentifyView","btnDrawGraphicMode","btnPointNormal","boxSizing","btnPointSelected","btnLineNormal","btnLineSelected","btnPolygonNormal","btnPolygonSelected","btnCircleNormal","btnCircleSelected","btnTextNormal","btnTextSelected","onPointModeClick","onLineModeClick","onPolygonModeClick","onCircleModeClick","onTextModeClick","ColorPicker","onChangeColor","react_color_lib","onChangeComplete","DrawGraphicPointView","onChangeOutlineColor","outlineColorDisplay","onChangeFillColor","fillColor","fillColorDisplay","rootResult","autoHeight","autoHeightMin","autoHeightMax","innerHeight","divSpace","ExpansionPanel_default","rootExpansionPanel","divTitleText","ExpansionPanelDetails_default","ColorPicker_ColorPicker","expansionPanel","expansionPanelSummary","rootExpansionPanelDetails","DrawGraphicLineView","DrawGraphicPolygonView","DrawGraphicCircleView","DrawGraphicTextView","selectMode","initialColor","rgb","r","g","hex","makeDatasource","listData","makeDataFont","DrawGraphic","handleDrawGraphic","handlePointModeClick","handleLineModeClick","handlePolygonModeClick","handleCircleModeClick","handleTextModeClick","featureLayerID","handleCallbackDrawMap","formDrawGraphicData","renderDrawMode","DrawGraphic_DrawGraphicPointView","onOpenColorPanel","handleOpenColorPanel","DrawGraphic_DrawGraphicLineView","DrawGraphic_DrawGraphicPolygonView","DrawGraphic_DrawGraphicCircleView","DrawGraphic_DrawGraphicTextView","DrawGraphic_DrawGraphicView","DrawGraphic_DrawGraphicNotSelectModeView","sidebarRdc","sidebar","rootBody","ZoomToScale","ZoomToScale_ZoomToScaleView","MapTools","handleZoomIn","handleZoomOut","handleOpenFormGoToLocation","handleOpenZoomToScale","menuRdc","handleOpenFormBasemapGallery","handleOpenFormToc","handleCloseToc","handleOpenFormMeasurement","handleOpenFormDrawGraphicPanel","handleCloseDrawGraphic","handleCloseMeasurement","handleOpenIdentify","handleOpenPrintmap","handleClosePrintmap","handleOpenClearGraphic","handleClearAllGraphics","handleClearSelectGraphic","handleClearAllGraphicMapTools","handleClearGraphicGotoLacation","renderBtnMapTools","listMapTools","ELEMENT","MapTools_Identify","MapTools_BtnGoToLocationView","MapTools_BtnZoomToScaleView","MapTools_BtnTocView","MapTools_BtnDrawGraphicsView","renderBtnMapToolsDefault","getCurrentLoc","MapTools_BtnClearGraphicView","BtnPrintmapView","MapTools_BtnBasemapGalleryView","MapTools_BtnMeasurementView","MapTools_BtnZoomView","MapTools_BtnCurrentLocationView","_props$authenRdc","MenuType","_this$props$menuRdc","MapTools_MapToolsView","Maps_GoToLocation_GoToLocation","NewTOC_TOCPanel","Maps_DrawGraphic_DrawGraphic","Maps_Measurement_Measurement","Maps_Printmap_Printmap","Maps_ZoomToScale_ZoomToScale","mapRdc","updateSatisfactionStatus","updateStatisticStatus","saveSessionId","makeLocatorRings","tmpString","stringType","listXYString","listXY","listPointreturn","CoordinateView","active","formControl_expan","formControl_close","renderValue","inputSelect","disableUnderline","typeOfCoordinate","typeOfCoWithDatasource","1","2","3","Coordinate","Coordinate_CoordinateView","checkPermission","allFunction","isPermission","SubMenu","itemFilter","checkGotoDefaultSystem","defaultSystemID","paramType","setCurrentPage","setPmrID","WithPanelContentReducer","Wrapcomponent","PanelContentReducer","_PureComponent","panelContentData","panelContentAction","panelContentReducer","menuReducer","newTOCReducer","PureComponent","PanelContentAction","saveDatatAskTheCityPlan","clearDataAskTheCityPlan","WithAskTheCityPlanReducer","AskTheCityPlanReducer","askTheCityPlanAction","AskTheCityPlanAction","transition","root_children","root_children_showStatis","div_statis","borderTop","btn_close","background","colorTextHover","arrowIcon","statis","isShowStatis","shortcut","KeyboardArrowLeft_default","KeyboardArrowRight_default","header_appbar","header_toobar","arrowIcon_button","_ref$title","onClickBack","Toolbar_default","subMenu","onItemClick","expandedEx","rootExSummary","MenuName","rootExDetails","divider","dividerSubMenu","&:focus","list_item","_ref2$lstMenu","lstMenu","onDownloadUsermanual","_ref2$mobileView","mobileView","findIndexSubmenu","findSubMenuID","listSubMenu","findIndex","checkSubmenu","menuID","Panel_AppBarHeaderView","lib","universal","MenuView_SubMenu","checkMakeList","onMenuItemClick","Menu_MenuView","CMP_PEOPLE","PMR_PEOPLE","PMR","ROOT_SYSTEM_URL","latDegrees","rootExSummaryActive","isActive","modes","modeActive","onChangeMode","heading","SpecifyCoordinate_FormLatLongView","SpecifyCoordinate_FormDmsView","SpecifyCoordinate_FormUtmView","renderSwitch","MODES","SpecifyCoordinate","convertDMSToLatLong","degrees","minutes","seconds","hideResult","handleCallBackAddGrapic","callBackDrawGraphic","handleChangeMode","SpecifyCoordinate_SpecifyCoordinateView","menu_item","manu_item_active","colorTextActive","listMode","MenuContent_SpecifyCoordinate_SpecifyCoordinate","itemActive","lineShort","lineLong","stepActive","listStep","indexActive","BreadCrumb","Presentationals_BreadCrumbView","vh","documentElement","setProperty","_rootBodyViewMode","rootBodyViewMode","rootBreadCrumb","breadCrumbBody","breadCrumbActive","breadCrumbStepStart","breadCrumbStepEnd","breadCrumbStep","positionBcStep2","positionBcStep3","positionBcStep4","btnRightTitle","btnManageGraphic","btnAddNormal","btnAddSelected","btnEditNormal","btnEditSelected","formStep","viewForm","onClickAddStepTwo","onEditGraphic","isActiveDraw","isActiveEdit","BreadCrumb_BreadCrumb","renderTitle","_ref$prositionLabel","prositionLabel","styleUnit","valueInRadio","isFormOne","labelPlacement","RadioRedux","Presentationals_RadioReduxView","tag","genTag","ErrorSubmit","Presentationals_ErrorSubmitView","renderCheckbox","labelTextCenter","labelText","divFooter","containnerRow","containnerRowText","rootForm","containnerObjective","REQNO","nameTypes","onSubmitCallBack","nameTypeSelect","onChangeChkOther","selectRadio","checkboxOther","luProvince","luDistrict","luSubDistrict","onChangeAdminPoly","isSubmitError","nametype","renderCheckboxNameType","saveLandDetail","saveDistrictPMR1ID","saveAdminpolyStepThree","saveFormStepOne","saveFormStepTwo","saveFormStepThree","saveFormStepFour","clearFormStep","changeStatusForm","nameType","submitPmrRdc","_values","getFormValues","dirty","isDirty","pristine","isPristine","submitPmrAction","SubmitPmrAction","onChangeStep","resultPMR1","setNameType","radioGroupTwo","setRadioGroupTwo","_useState5","_useState6","setCheckboxOther","_useState7","_useState8","setLuDistrict","_useState9","_useState10","setluSubDistrict","_useState11","_useState12","setluProvince","_useState13","_useState14","setProvince","_useState15","_useState16","setIsSubmitError","nameType9","callServiceDistrict","callServiceSubDistrict","currentDate","setDefaultNameType","provinceId","FormOneView","genTagTwo","renderError","txtError","renderFormChanode","_ref2$meta","submitFailed","divLabel","grid-xs-3","customGrid3","Delete_default","containnerMultiRow","divLabelFullWidth","customGrid1","onClickNextStep","onClickPrevStep","FieldArray","FormTwo","refFuncAddForm","handleAddForm","handleClickNextStep","handleClickPrevStep","onClickBackPanel","handleSubmitValidate","FormStep_FormTwoView","FormThree","onCallbackLocation","callServiceGetLutActivity","handleCallbackLocation","isBKK","handleChangeAdminPoly","_this$props$submitPmr","FormStep_FormThreeView","villageNo","provinceDisplay","rootLanduseRadio","tab1","tab2","errorTxt","valuesFAR","valuesOSR","farStandard","osrStandard","landuseData","otherStatus","onChangeLanduseRadio","onClickSaveForm","onFieldAllAreaChange","createLanduseRadio","pdfMake","vfs","pdfFonts","fonts","THSarabun","bold","italics","bolditalics","Roboto","fontStyle","fontHeading","fontTitle","fontSubheading","fontBody","layoutStyle","documentHeaderLeft","alignment","documentHeaderCenter","documentHeaderRight","submitText","submitValue","submitHeader","submitTitle","submitTitleValue","submitInfo","submitInfoValue","checkboxPrivilege","checkboxText","checkboxValue","areaBenefitTitle","benefitText","benefitValue","signature","chanodeHeader","chanodeTableHeader","chanodeItemText","chanodeItemNumber","lightHorizontalLines","table","widths","hLineWidth","vLineWidth","configPage","pageSize","pageOrientation","subject","keywords","submitFormPMR","pmrData","noWrap","columns","writePlace","typeID","typeDetail","Checked","Unchecked","generateCheckboxTypePMR","chanodeRai","chanodeNgan","chanodeWa","useRai","useNgan","useWa","zoneNo","subZone","subDistrictName","districtName","detail","generateCheckboxLandUse","luChange","luDetail","landArea","activityArea","buildArea","waterPass","highestStorey","otherChanode","listChanode","isGenerate","chanodeItm","pageBreak","headerRows","rowSpan","colSpan","generateMapPage","base64Map","ExportSubmitPMR","bdclOS","docDefinition","pageCount","columnText","styles","bold_font","decorationUnderline","decoration","decorationStyle","decorationColor","defaultStyle","columnGap","createPdf","download","FormFour","sumLanduse","calSumLanduseArea","calOsr","activateArea","calFar","calWaterPass","callServiceLanduseChange","sumLanduseArea","callLanduseArea","buildAllArea","handleChangeLanduseRadio","handleClickSaveForm","jsonForSave","getJsonForSave","callServiceSave","checkDifferentValue","forCheck","isDiff","differenceWith","callServiceMapsheet1K","callServicePMR","paramter","PMR1ID","pmrSaveSuccessID","isSaveSucess","pmr1IDView","valueForSave","callServiceEdit","callServiceAdd","isOfficer","isDif","forSave","gotoView","GET_POINT_PMR","formatChanode","formFourValue","_this$props$submitPmr2","subDistrictId","month","padMonth","padDate","pmr1code","chanodeForSave","parameter","convertTypeNameToString","landuseRadio","bdclos","heightFloor","heightMeter","contactIdentificationNo","contactHouseNo","parameterHouseNo","contactMoo","contactSoi","parameterSoi","contactRoad","parameterRoad","contactProvinceID","contactDistrictID","contactSubDistrictID","contactZipCode","numberBuilding","bldg","pmr1SubDistrictID","userid","nameTypeSelected","handleFieldAllAreaChange","_this$props$stepFour","activateAreaValue","allAreaValue","waterPassCal","generateReport","blob","reader","FileReader","onloadend","onerror","readAsDataURL","exportPDF","mapPNGBase64","callBackCheckPermissionPointOnMap","isOnDistrict","_this$props11","validateFormFour","_this$props12","FormStep_FormFourView","sumLandUseAreaForValidate","FormFourLoadding","FormSubmitPmr","handleChangeStep","step","handleClickAddStepTwo","handleRefAddForm","renderFormStep","FormOne","FormStep_FormTwo","FormStep_FormThree","FormStep_FormFour","SubmitPmr_FormSubmitPmrView","SubmitPmr","componentDidUpdate","prevProps","newList","manageModeDisplay","tmpListMode","handleMenuItemClick","manageClickMap","manageCurrentLocation","managePanelForMobile","isDraw","func","callbackIdentifyResult","callbackGetDistrictAndSubDistrict","callbackEdit","landDetail","makeDataResult","callbackLocationStep3Fn","fn","getAdminPoly","substring","adminpolyCode","_landUse$0$feature$at","LUP_ZONE","LUP_COLOR","LUP_USE","LUP_SUBZONE","LUP_FAR","LUP_OSR","makeCodeValue","LANDUSE_VALUES","handleClickBack","onBackClick","handleCloseForm","handleCloseConfirm","callAlertFn","handleEditGraphic","SubmitPmr_SubmitPmrView","FormSubmitPmr_FormSubmitPmr","isNotBKK","SubmitPmr_MenuSubmitPmrView","SelectCustom","errorFieldLayer","refInputLabel","useRef","selectCustomData","setSelectCustomData","ReactDOM","findDOMNode","offsetWidth","onOpen","renderField","_ref$disabled","_ref$inputRef","inputRef","listStyle","rowStyle","ListUniqueValue","createRef","handleScroll","_e$target","scrollTop","scrollLeft","Grid","handleScrollEvent","renderRow","listUniqueValue","onUniqueValueDblClick","listUniqStyle","onDoubleClick","_this2","dist_es","onScroll","rowHeight","rowRenderer","rowCount","SYMBOL","radiusStyle_15px","radiusStyle_50px","radiusSQLField","radiusSelectField","header_2","buttonSym","symbol_container","symbol_item","uniqueValue","uniqueValue_result","listItem_fieldConditionRoot","listItem_fieldCondition","statement","btnGetUnique","_ref$inputStatementRe","inputStatementRef","_ref$listLayer","_ref$listFieldConditi","listFieldCondition","_ref$listUniqueValue","_ref$statementValue","statementValue","_ref$tableName","_ref$currentFieldCond","currentFieldCondition","_ref$isRadiusStyle","isRadiusStyle","_ref$elementResultSQL","elementResultSQL","_ref$validateFields","validateFields","errorFieldCondition","errorFieldSQL","_ref$onChangeLayer","onChangeLayer","_ref$onStatementInput","onStatementInputFocus","_ref$onClickSymbol","onClickSymbol","_ref$onConfirm","onConfirm","_ref$onCancel","_ref$onFieldCondition","onFieldConditionDblClick","_ref$onFieldCondition2","onFieldConditionClick","_ref$onUniqueValueDbl","_ref$onGetUniqueValue","onGetUniqueValue","_ref$onSqlFieldChange","onSqlFieldChange","isFirefox","InstallTrigger","Select","classNameSelectField","data-map_service_url","mapServiceUrl","data-unaccess_field","unaccessField","data-table","makeLookupLayer","List_default","name_alias","generateFieldCondition","sym","QueryBuilderControl_ListUniqueValue","TextArea","onFocus","QueryBuilder","reset","refResetQueryBuilderStateFunction","onReset","onFieldItemClick","refInputStatement","tmpTimeoutFocusInputStatement","isSelectLayer","listFieldNoFilterAccessibility","currentTable","currentFieldConditionType","fieldData","setFieldData","resetQueryBuilderState","setValueStatementToFieldBox","_inserStringDetectByC","refElement","inputValue","insertValue","startPos","selectionStart","endPos","selectionEnd","startText","endText","newText","newCursorPosotion","inserStringDetectByCursorPosition","cursorPosotion","focus","setSelectionRange","moveCursorPosition","getListFields","resultObj","arr","listField","displayField","filterUnaccessField","listUnaccessField","listFilter","fieldITM","ufITM","handleChangeLayer","currentMapServiceUrl","currentLayerId","currentLayerName","dataset","map_service_url","unaccess_field","selected_layer_id","handleGetUniqueValue","isErrorFieldCondition","QueryBuilderControl_QueryBuilderView","clearTimeout","currentWhereCause","match","objSQL","whereCause","isTrueSql","SQLParser","fieldType","Text","conditionValue","_hide","content_in","_ref$isResult","isResult","queryBuilder","resultQuery","_listContent","hide_root","listContent","guttersItem","_ref$datasource","_ref$displayField","onClickListItm","gutters","generateResult","_ref$mapserviceUrl","QueryBuilder_QueryBuilderResultView","newTOCDataRdc","st_displayField","setDisplayField","st_mapserviceUrl","setMapserviceUrl","isHideResultPage","st_managePage","setSt_ManagePage","currentFieldName","listResultSQL","st_queryBuilder","setSt_queryBuilder","loadLayerData","makeListLayer","makeListLayerResult","dataLayer","getUniqueValueApi","ServiceUtils","getQueryBuilderApi","sqlObject","queryBuilderParams","resultSQL","fieldname","tablename","QueryBuilder_QueryBuilderToolView","QueryBuilderControl_QueryBuilder","QueryBuilder_QueryBuilderResult","guttersListItem","containerTxtResult","txtResult","iconButton","onShowDetail","onEdit","onDelete","dataSplit","dateDisplay","Edit_default","ViewPmrView","dataDetail","onClickNext","ViewPmrOneView","genListType","dataView","resultType","listType","checkedType","find","colValue","checkbox","checkboxChecked","genTagRadio","listRadio","radio","radioChecked","colLabel","&$disabled","ViewPmrOne","dataViewResult","subdistrictDisplay","districtDisplay","ViewPmr_ViewPmrOneView","ViewPmrTwoView","grid-xs-1","ViewPmrTwo","ViewPmr_ViewPmrTwoView","ViewPmrThreeView","ViewPmrThree","genActivity","ViewPmr_ViewPmrThreeView","ViewPmrFourView","containnerRowTxt","containnerRowWithInput","ViewPmrFour","ViewPmr_ViewPmrFourView","ViewPmr","ViewPmrOne_ViewPmrOne","formOne","ViewPmrTwo_ViewPmrTwo","formTwo","ViewPmr_ViewPmrThree","formThree","ViewPmr_ViewPmrFour","formFour","handleNextForm","handleBackForm","ViewPmrView_ViewPmrView","errorMsg","Presentationals_TextFieldView","materialTheme","overrides","MuiPickersDay","day","& > .MuiIconButton-label","& > .MuiTypography-body2","LocalizedUtils","_convertADToThaiYear","getYear","DateFnsUtils","DatePickerThai","minDate","maxDate","selectedDate","setSelectedDate","pickerRef","handleOpenDatePicker","useCallback","core_styles","TextField_TextField","thaiDate","formatDate","toStringValue","material_ui_pickers_esm","clearable","clearLabel","okLabel","cancelLabel","Picker_DatePickerThai","EditPmrStaffView","valueChange","ddSubdistrict","ddDistrict","onChangeLookup","onStartDateChange","onEndDateChange","EditPmrStaffView_RequestNO","EditPmrStaffView_RequestName","EditPmrStaffView_RequestDistrict","EditPmrStaffView_RequestDate","_this$props2$isActive","displayResultPMR","isShowResult","onClickSpatialSearch","isOnlySearch","footer","containerResult2","containerResult","EditPmrStaffView_ResultPMR","maxHeight","activeSelectOnMap","ResultPMR","rootResultPMR","titleResult","_Component2","isShowEdit","updater","isInsideDistrict","pmr1Name","RequestNO","RequestName","RequestDistrict","SlectFieldRedux","RequestDate","ReduxFormDatePickerThai","CONSTANT_VIEW","VIEW","EDIT","RequestSubdistrict","RequestStartDate","RequestEndDate","FormEditStaff","EditPmrStaff","handleChangeForm","tempSearch","backCurrentPage","statusView","_param","spatialSearchDetail","isSearch","rux","t1","fnc","resultPMR","tmpGeometry","callService","start","end","toDateString","handleChangeStartDate","handleChangeEndDate","manageData","filterData","Parameter","handleChangeLookup","handleShowDetail","getView","resultView","inPmr1ID","setDataForView","listView","tempData","dataFormOne","dataFormThree","dataFormFour","detailPMR","getLatLongPMR","handleEdit","initialValuesfForm","handleDelete","deletePMRID","alertMode","deletePMR","PMRNO","callBackGetPointPMR","hideAlertFn","valDistrict","valSubDistrict","handleSpatialSearchCallback","dataShowResult","handleSpatialSearchClick","_this$state3","_args12","handleGotoView","_ref14","_this$state4","_this$state5","dataEdit","_this$props13","renderEditForm","_this$state6","_this$props14","PMR1_EditPmrStaffView","ViewPmr_ViewPmr","tmpView","_this$props15","FormEdit","EditPmr","isShowView","isShowListPMR","localType","genListPMR","_args5","genPointView","listPMR","PMR1_EditPmrStaff","PMR1_EditPmrView","RADIAN","renderCustomizedLabel","cx","cy","midAngle","innerRadius","outerRadius","percent","radius","textAnchor","valuePercent","dominantBaseline","EvaluationPieChart","pieRef","_props$data","es6","wrapperStyle","dataKey","nameKey","labelLine","entry","stroke","align","PieChartLegend","legendRef","_ref$data","Stop_default","data-name","_ref$pieChartMonthDat","pieChartMonthData","_ref$pieChartYearData","pieChartYearData","_ref$pieLegendData","pieLegendData","_ref$yearList","yearList","_ref$monthList","monthList","onYearChange","onMonthChange","pieMonthRef","pieYearRef","Evaluation_EvaluationPieChart","Evaluation_PieChartLegend","tableStyle","rowNumber","rowHeaderColor","rowFooterColor","rowOtherColor1","rowOtherColor2","SubmaryRow","totalYear","SumYear","reduce","accumulator","currentValue","totalMonth","SumMonth","generateRow","SummaryTable","selectMonth","selectYear","Chart","chartMonthPNGBase64","chartYearPNGBase64","ChartLegend","pngLegendList","EvaluationExportPDF","systemName","alignmentCenter","alignmentRight","evaluationYear","evaluationMonth","setYearList","evaluationMonthDetail","evaluationYearDetail","legendDetail","exportData","setExportData","isLoading","setLoading","loadDDLyear","loadDDLmonth","currentMonth","currentYear","keepListYear","getPNGPieChart","domNodePieChartMonth","domNodePieChartYear","pngChart","Util","getPNGLegend","listNodeLegend","listPromiseLegend","listPNGLegend","childNodes","checkUrkGetEvaluation","getEvaluationData","responseJson","serviceResult","chartYearData","chartMonthData","ServiceUtil","matchLegendColor","itmLegend","pngPieChart","indexMonth","handleSubmitForm","reportData","Evaluation_EvaluationView","StatisticUserBarChart","refer","angle","interval","tickFormatter","barSize","_ref$displayChartData","displayChartData","barChartRef","StatisticUser_StatisticUserBarChart","monthRow","indexMatchData","dataITM","chartData","chartPNGBase64","StatisticUserExportPDF","selectYearBC","statisticUserYear","setDisplayChartData","makeFormatChart","monthITM","exportParam","nodeBarChart","StatisticUser_StatisticUserView","_ref$listYear","listYear","_ref$listMonth","listMonth","_ref$listDistrict","listDistrict","previewFn","exportExcelFn","DEFAULT_MONTH","DistrictReportExcel","workbook","Excel","Workbook","worksheet","addWorksheet","pageSetup","orientation","lastModifiedBy","loadHeader","arrHeader","getRow","colKey","getCell","setCellBorder","wrapText","fgColor","argb","getColumn","numFmt","makeRowITM","rowITM","isSummaryRow","addRow","no","LUPSubZone","sumSubZoneArea","sumLandArea","sumChanodeArea","sumActivityArea","sumUser","setContentBorder","isOddRow","setContentColor","isBold","setCellFontColor","lastRow","setLastContentBorder","mergeCells","REPORT_YEAR_COMPREHENSIVE_RULE","displayMonth","loadTopic","rowSubHeaderNumber","countItemLastGroup","rowGroupITM","indexRow","makeRowContent","xlsx","writeBuffer","xls64data","appendChild","documentMode","StyleMedia","pageMargins","rowSubHeaderColor","generateTableHeader","makeTableContent","rowIndexIsOdd","listRow","itemSubZone","indexSubZone","stack","DistrictReportPDF","alignmentLeft","DEFAULT_DISTRICT","districtReportYear","districtReportMonth","districtReportDistrict","setListYear","setListMonth","setListDistrict","loadDDLDistrict","objResult","executeGenerateReport","reportFunction","monthParam","districtParam","displayYearBC","itmMonth","exportExcelFunction","DistrictReport_DistrictReportView","AreaReportExcel","LUPZone","sumZoneArea","sumBuildingArea","rowNO","mergeRang","LUPDescription","summaryRow","styleSummary","rowNo","groupITM","AreaReportPDF","areaReportYear","areaReportMonth","previewFunction","AreaReportView","projectionFormDiv","projectionFormContainer","onSubmitClick","onHandleSubmit","lookupSatisfactionRate","SatisfactionForm","fetchSatisfactionLookup","handleSubmitClick","saveSatisfactionCMP","satisfactionScore","saveSatisfactionCAH","saveSatisfactionPMR","checkStatusCode","satisfactionAndStatisticRdc","SatisfactionAndStatisticAction","peoplecode","sessionid","getLookupSatisfactionFormat","SatisfactionForm_SatisfactionFormView","AskTheCityPlan_SpecifyCoordinate_FormLatLongView","AskTheCityPlan_SpecifyCoordinate_FormDmsView","AskTheCityPlan_SpecifyCoordinate_FormUtmView","callbackIdentifyComprehensivePlanResult","callbackIdentify","AskTheCityPlan_SpecifyCoordinateView","rootFormSearch","btnCancel","renderListResult","resultActive","typeSearch","onClickResult","resultDisplay","resultDisplayLine2","color3","subtitle","noData","_ref2$isScrollbars","isScrollbars","ResultSearchLandInfo","handleClickResult","makeLocatorRingsExtent","envelope","LocatorUtil","shape","handleCallbackGetGeometry","claerResultActive","refResultSearcLandInfo","SearchLandInfo_ResultSearchLandInfoView","LandPlot","Url","Result","AskTheCityPlan_LandPlotView","SearchLandInfo_FormSearchLandView","SearchLandInfo_ResultSearchLandInfo","FunctionMenuView","elementMenu","AskTheCityPlan_SpecifyCoordinate","AskTheCityPlan_LandPlot","generateListItem","menu_header","FunctionMenu","isShowConfirm","setMenu","MenuConstants","manageMenuDisplay","tmpMenu","callBackConfirmChangeMenu","AskTheCityPlan_FunctionMenuView","AskForBusinessView","result_header","AskForBusiness","Mapfunction","CPUDD_QUERY_PLAN_FEATURE_LAYER_PNT","handleAddshapeSucess","CPUDD_QUERY_PLAN_FEATURE_LAYER_POLYGON","AlertMessageForBusiness","callbackParam","setSaveAskForBusiness","onClickClearResult","AskTheCityPlan_AskForBusinessView","_headerAppbar","rootHide","rootWeb","rootMobile","headerAppbar","headerToobar","btnClose","headerTextWeb","headerText","arrowIconToolbar","arrowIconButtonToolbar","onHideClick","onHideClickModile","subPanelTitle","onHideClickPanel","SubPanelLayout","handleHideClick","isSelected","Panel_SubPanelLayoutView","SnackBarView","isShow","Snackbar_default","autoHideDuration","ContentProps","itemSnackBar","MsgClass","close","Close_default","SnackBar","onHandleSnackbarClose","Presentationals_SnackBarView","TermsOfUseView","getCommandMentItem","onValueClick","noDataMessage","detailContainer","detailContent","detailContentValue","commandMentData","termsOfUseId","isShowSnackbar","snackbarMessage","commandMentItem","content_header","content_header_alignment","content_title","content_left_title","content_right_title","Containers_SnackBar","TermsOfUse","getCommandMent","commandMent","handleValueClick","handleSnackbarClose","Detail_TermsOfUseView","LandusePlanView","getLandusePlanItem","landUseDataLength","onClickPDF","onClickTermsOfUse","onClickToExtent","onClickDownloadReqPDF","onClickDrawGraphic","firstDetail","Collapse_default","in","timeout","unmountOnExit","ExpandLess_default","buttonDiv","buttonStyle","getTrainItem","STA_TYPE","STA_NAME","getCommunicationAndtransportationItem","communicationAndtransportation","TRANSP_PRJ_TYPE","TRANSP_PRJ","TRANSP_WIDTH","onListClick","landUseData","communicationAndtransportationData","trainData","landusePlanItem","communicationAndtransportationItem","trainItem","contentContainer","TRAIN_RANGE","& > div > div","LandusePlan","handleClickPDF","CONFIG_URL_LANDUSEPLAN_PDF","handleClickTermsOfUse","isOpenTermsOfUse","handleClickTermsOfUseBack","handleClickExtent","handleClickDownloadReqPDF","handleClickDrawGraphic","handleBackDetail","headerName","landUsePlanViewElement","Panel_SubPanelLayout","Detail_LandusePlanView","termsOfUseElement","TermsOfUse_TermsOfUse","OtherPlanView","getPublicUtilityPlan","publicUtilityPlanData","PUP_PRJ_TYPE","PUP_PRJ","PUP_NAME","getWasteWaterTreatment","wasteWaterTreatmentData","PUP_PRJ_NAME","getOpenSpace","openSpaceData","OPS_ZONE","OPS_SUBZONE","OPS_NAME","publicUtilityPlanItem","wasteWaterTreatmentItem","openSpaceItem","OtherPlan","Detail_OtherPlanView","BangkokCanonView","getCanonItem","canonData","onPdfClick","BDCTL_NAME","AREA_ZONE","BDCTL_URL","pdfLink","canonItem","BangkokCanon","handlePdfClick","CONFIG_URL_BANGKOK_CANON_PDF","BDCTL_CODE","BDCTL_TYPE","Detail_BangkokCanonView","_props$luPrintMap","luPrintMap","onClickPrintMap","TEMPLATE","askTheCityPlan","MapActions","handleClickPrintMapAsk","makeDataLupAskTheCityPlan","makeStationAskTheCityPlan","makeTranspAskTheCityPlan","makeCanonAskTheCityPlan","makeDataOpsNameAskTheCityPlan","callBackPrintMap","stationName","STATION_BUFFER","dataTransp","landUseFilter","dataCanon","otherFilter","AskTheCityPlan_PrintMapAskView","block","div_noData","divBtnClear","btnClear","isFindData","listResult","onClickListResult","isPeople","AskTheCityPlan_PrintMapAsk","isMenuActive","setResultActive","indetail","setInDetail","layerSequence","CONFIG_COMPREHENSIVE_PLAN","LAYER_SEQUENCE","saveStatisticAndSatisfaction","handleClickClosePanel","AskTheCityPlan_ResultView","checkShowResult","Deatail_LandusePlan","OtherPlan_OtherPlan","BangkokCanon_BangkokCanon","checkRenderSubPanelLayout","isShowAskForBusiness","isSaveAskForBusinessGlobal","setFindData","isSaveAskForBusiness","setSaveAskForBusinessLocal","isResultNull","genCurrentOnClick","resetDrawer","bool","createDrawer","handleDrawMapComplete","callbackDrawAskTheCityplan","callBackConfirmDrawAskTheCityplan","evtDraw","handleClickClearResult","confirmClickBack","handleBackClick","AskTheCityPlan_AskTheCityPlanView","AskTheCityPlan_FunctionMenu","AskTheCityPlan_Result","AskTheCityPlan_AskForBusiness","SearchLandInfo","promiseGetResult","callServiceGetParcelDistrict","callServiceGetLandMap","callServiceGetParcelSurvey","map1k","handleRefResultSearcLandInfo","SearchLandInfo_SearchLandInfoView","StatisticPieChart","StatisticComprehensiveLegend","_ref$pieChartData","pieChartData","StatisticCheckComprehensive_StatisticPieChart","StatisticCheckComprehensive_StatisticComprehensiveLegend","LegendChart","legendData","StatisticComprehensiveExportPDF","setPieChartData","setStartDate","setEndDate","defaultDateField","checkDate","isValid","isAfter","getExportData","pieChartDetail","printMapCallback","displayStartDate","displayEndDate","serviceStartDate","serviceEndDate","strStartDate","strEndDate","StatisticCheckComprehensive_StatisticCheckComprehensiveView","rootBtnDraft","onClickAddBuildings","onDraw","saveValueFromPmr","saveGeometry","saveAdminPoly","setDefaultForm","getLuApplicationType","statues","getLuConstructType","getLuBldgMaterial","getLuActivity","btnSearch","haveHouse","onBlurPmr1ID","onBlur","FormStepOne","callServiceGetDetailPmr1","callServiceCheckPMR1ID","fetchDataPmr","constructionRdc","handleBlurPmr1ID","resultCheckPMR1ID","pmr1IDInitial","constructAction","confirmChangeDistrict","districtCode","isAdminpolyInconsistent","currentAdminpoly","confirmChangeSubdistrict","subdistrictCode","cancleChangeAdminpoly","codeAdminpoly","isInconsistentDistrict","isInconsistentSubdistrict","onCloseForm","prevCurrentAdminpolyDistrictCode","prevCurrentAdminpolySubdistrictCode","isMatchGeometryWithAdminPoly","Form_FormStepOneView","onClickSearch","handleClickSearch","ConstructAction","renderFormBuildings","onClickPrev","FormStepTwo","handleAddBuildings","alertIsNotBKKFn","callBackSaveForm","constructRdc","handlePrevStep","handleClearForm","refFormStepTwo","_this$props$construct","numberfloor","Form_FormStepTwoView","FormConstructionLicense","handleRefFormStepTwo","constructionAction","renderChildren","Form_FormStepOne","Form_FormStepTwo","Form_FormConstructionLicenseView","ConstructionAction","AddConstructionLicense","subDistrictCode","alertIsOutBKK","callbackEditGrphic","handleClickEditGraphic","callbackEditFail","editOutOfBKK","createDateTimeStamp","DatetimeUtil","callServiceCheckPermissionID","callBackSaveFormMapService","callServiceCheckConstructID","callServiceSaveBuildings","callServiceUpdateSubZone","resultUpdateSubZone","resultSaveBuilding","TOC_LAYER_NAME","CONSTRUCT","handleClickBackPanel","Form_FormConstructionLicense","ConstructionLicense_MenuConstructionView","Add_AddConstructionLicenseView","Form","isActiveSpatialSearch","onChangeDistrict","isDisplay","FormSearchConstructView_Form","ListResult","onClickEdit","onClickDelete","permissionDateForDisplay","marginIcon","ResultSearchConstructView_ListResult","FormSearchConstruct","handleChangeDistrict","callServiceSeachConstruct","_ref$permissionID","_ref$districtID","_ref$subDistrictID","_ref$maxLat","maxLat","_ref$maxLon","maxLon","_ref$minLat","minLat","_ref$minLon","minLon","applicationDateSplit","dateSplit","permissionDateSplit","permissionDateForDefault","refreshResult","spatialSearchData","spatialSearchGeometry","handleClickListResult","handleClickSpatialSearch","max","lstLat","lstLon","maxLatitude","minLatitude","minLongitude","maxLongitude","refFuncRefreshResult","Search_FormSearchConstructView","Search_ResultSearchConstructView","RowDeail","detailConstruct","DetailConstructStepOneView_RowDeail","applicationTypeDesc","constructTypeDesc","owerName","provinceName","isFirstRow","Building","constMaterial","numBldg","carparkArea","rootBuilding","DetailConstructStepTwoView_RowDeail","DetailConstructStepTwoView_Building","objectiveDesc","materialDesc","numberFloor","buildingArea","carParkArea","DetailConstruct","Construct_DetailConstructStepOneView","Construct_DetailConstructStepTwoView","Construct_DetailConstructView","EditConstructionLicense","refClearFormEditConstruct","callBackDrawGraphicFirst","clearForm","carparkarea","material","isShowForm","handleSaveConstruct","updateDateTimeStamp","resultUpdateBuilding","callServiceUpdateBuildings","constructRNo","paramFetch","ConstructRNo","BuildingArea","CarParkArea","Material","NumberBuilding","NumberFloor","Objective","Edit_EditConstructionLicenseView","PAGE_VIEW_CONSTRUCT","SEARCH_CONSTRUCT","DETAIL_CONSTRUCT","EDIT_CONSTRUCT","SearchConstruct","handleRefFuncRefreshResult","page","detailView","detailEdit","handleClickEdit","handleClickDelete","deleteConstruct","callServiceDeleteConstruct","cosntructRNo","handleCancelDetail","handleRefEditConstruct","hadleCancelEdit","handleBackToMenu","elementDetail","Detail_DetailConstruct","Edit_EditConstructionLicense","Search_FormSearchConstruct","Search_SearchConstructView","noLabelField","onBlurOr1ID","houseTypeList","houseMaterialList","onChangehouseType","isHouseTypeOther","saveDistrictAndSubDistrict","saveDataForInitailEditForm","usePrevious","stepOneRdc","houseNumberAction","HouseNumberAction","isUpdate","setLuSubDistrict","setHouseTypeList","setHouseMaterialList","setIsHouseTypeOther","prevhouseNumberRdcDistrictID","prevhouseNumberRdcSubDistrictID","preCurrentAdminpolyDistrictCode","preCurrentAdminpolySubDistrictCode","callServiceGetLutHouseMaterial","OTHER_LOOKUP_TR900","TrID","stepOneTogether","HouseNumberFormStep_StepOneView","or1ID","formContainer","onHouseNumberChange","handleChangeStepBack","renderHouseNumber","onHouseIdTextFieldBlur","house","textFieldHouseNumber","labelHouseId","containnerRowTopic","hrStyle","descritpTopic","descritpFocus","styleWarning","onClickAutogenHouseNo","dataSolutionRunHouse","clickAutogen","showText","onNoStartBlur","onIdStartBlur","handleHouseIdBlur","StepTwoSelector","alertOutOfBKKFn","submitUpdate","districtIdForHouseId","dataOfRunHouseNumber","houseRequest","setHouseRequest","setIsShow","setShowText","showTextOverTen","setshowTextOverTen","handleClickAutogenHouseNo","houseIdStartLength","houseNoStartSplit","houseNoStartFirstIndex","houseNoStartList","isCal","currentHouseIdLength","zeroStr","j","checkDuplicateHouseId","houseIdList","isNotDuplicate","checkPermissionOnMap","isPerrmission","handleSubmitHouseNumberForm","_houseNumberRdc$stepO","numHouseRequest","regDateTimeStamp","houseno","houseid","CPUDD_OTHERS_FEATURE_LAYER","callbackAddPointTR900","HOUSE","callServiceSaveHouseNumber","handleCloseSaveSuccessAlertMsg","idOver","rmSpecialChar","handleIdStartBlur","lastHouseId","StepTwo_StepTwoView","isNumber","StepTwoHouseUnder10View","StepTwo_StepTwoHouseOver10View","resultSplit","resultNoEnd","noEndNumber","stepPass","isBKKFn","setFormStep","HouseNumberFormStepView","HouseNumberFormStep_StepOne","HouseNumberFormStep_StepTwo_StepTwo","HouseNumber","callCheckBetweenFormWork","isBKKAlert","dirtyOne","stepOnePass","HouseNumber_HouseNumberFormStep","HouseNumber_MenuListModeView","HouseNumber_HouseNumberView","_props$luDistrict","_props$luSubDistrict","onSpatialSearchHouse","houseTRID","DateTimeUtil","editPermission","onClickItem","SearchHouseNumberResultView_ListResult","detailHouseNo","DetailHouseNoStepOneView_RowDeail","houseTypeDes","houseMatName","HouseNo","DetailHouseNoStepTwoView_RowDeail","HouseNoOver","DetailHouseNoStepTwoView_HouseNo","DetailHouseNoStepTwoView_HouseNoOver","DetailHouseNo","callServiceGetLUTActivity","houseTypeName","updateHouseTypeName","callServiceGetHouseMaterial","updateHouseMatName","Detail_DetailHouseNoStepOneView","Detail_DetailHouseNoStepTwoView","Detail_DetailHouseNoView","houseRdc","dirtyStepOne","dirtyStepTwo","openDetail","setDistrict","setSubDistrict","setIsNotBKK","setGraphic","manageMap","Detail_DetailHouseNo","panelContentDataRdc","houseNumberActions","HouseNumberActions","setIsSearch","resultFromSearch","setResultFromSearch","setPoint","searchData","setSearchData","setSpatialSearchData","geometrySpatialSearch","setGeometrySpatialSearch","_useState17","_useState18","setShowLoading","_useState19","_useState20","setActiveSpatialSearch","_useState21","_useState22","setIsOpenFormDetail","_useState23","_useState24","setOpenDetail","_ref$TRrequest","_ref$district","_ref$subDistrict","_ref$permitNo","getUrl","editPermissionData","_useState25","_useState26","openFormForEdit","setOpenFormForEdit","handleFormDetail","selectedItem","isSearchFromSpatial","handleFormForEdit","sortHouseList","tr31ID","houseRNo","houseRNO","buldingArea","numberOfHouse","closeFormEdit","manageParamForUpdate","houserno","confirmDelete","checkDuplicateHouseNumberBeforeSave","updateHouseNumber","HouseRNo","Houses","callServiceUpdateHouseNumber","isDuplicate","handleClickSpatialSearchHouse","handleBack","SearchHouseNumber_SearchHouseNumberView","SearchHouseNumber_ManageHouseEditWithMap","SearchHouseNumber_SearchHouseNumberFormView","SearchHouseNumber_SearchHouseNumberResultView","_ref$listSubDistrict","listSubDistrict","isDistrict","displaySelectAdminpoly","appDate","permisDate","buildingType","sumArea","address","setFillColor","organizationName","userDistrictName","_number","userFullname","generateFinalSheet","rowIndex","columnIndex","generateFooterRport","DEFAULT_SUB_DISTRICT","setListSubDistrict","loadDDLSubDistrict","subDistrictParam","displayDistrict","displaySubDistrict","usergroupName","ConstructionLicenseMonth","ConstructionLicenseDistrict","ConstructionLicenseSubDistrict","itmDistrict","itmSubDistrict","ConstructionLicenseYear","ConstructionLicenseReportExcel","ConstructionLicense_ConstructionLicenseReportView","ConstructionLicenseReportPDF","HouseNumberExporPDF","dataDisplay","sumNum","numHouse","houseID","HouseNumberExcel","textOfTopic","headerExcel","contentTableExcale","calculateNumberOfHouse","accmulator","generateTopic","generateHeader","lastRowNumber","_cells","cell","col","rowBodyFinal","horizontalz","generateBodyFinal","rowReportBy","rowInspectBy","generateContentProcess","_args2","_profile","TR900Month","TR900District","TR900SubDistrict","TR900Year","HouseNumber_HouseNumberReportView","MinisterialRegulationBarChart","isAnimationActive","radioDiv","_ref$listQuarter","listQuarter","radioChange","radioSelected","isHaveDistrict","MinisterialRegulation_MinisterialRegulationBarChart","subZoneArea","MinisterialRegulationExportPDF","quarter","displayDistrictSubDistrict","periodForDisplay","MinisterialRegulationExcel","dataSouce","textTopic","headerTableExcel","rowText","imageChart","addImage","base64","extension","generateImageChart","LOOKUP_QUARTER","timeoutExportPDF","setRadioSelected","setIsHaveDistrict","radioParam","MinisterialReportMonth","MinisterialReportDistrict","MinisterialReportSubDistrict","MinisterialReportQuarter","MinisterialReportYear","chart","MinisterialRegulation_MinisterialRegulationReportView","MinisterialRegulationReportPDF","MuiVirtualizedTable","getRowClassName","onRowClick","clsx","tableRow","flexContainer","tableRowHover","handleClickDownload","rowData","onDownloadClick","cellRenderer","cellData","isDateColumn","isDate","isColumnStatus","isStatusColumn","TableCell_default","tableCell","noClick","numeric","headerRenderer","headerHeight","headerRowRenderer","role","tableProps","rowClassName","headerProps","React","VirtualizedTable","grey","flex","&:last-child","ImportShapeHistoryTable","_props$columnHeader","columnHeader","_props$datasource","_props$styleProps","styleProps","rowGetter","ImportShapeFileHistoryView","ImportShapeFile_ImportShapeHistoryTable","headerTable","onRefFunction","statehistoryData","setStateHistoryData","repeatTimeImportHistory","getImportHistory","loadImportHistoryRepeat","time","setInterval","clearIntervalImportHistoryRepeat","clearInterval","resetIntervalImportHistoryRepeat","handleClickRow","ImportShapeFile_ImportShapeFileHistoryView","importShapeForm_root","historyHeader","btnReset","_ref$ddlLayer","ddlLayer","inputUploadShapeRef","refUploadForm","onImportShapeFile","onClearFormClick","onRefImportShapeFileHistoryFunction","encType","ImportShapeFile_ImportShapeFileHistory","authenData","currentImportShapeData","curentBrowFile","refFunctionImportShapeHistory","datasourceLookup","displayLookup","stateLookupLayer","setStateLookupLayer","loadLookupLayer","lookup","layerITM","displayName","callbackImportShape","getLookupITM","layerImport","lookITM","saveImportShapeData","resetForm","processSaveImportShape","fileData","uploadData","saveParameter","saveData","fileName","callServiceRunProcessImportShape","ImportShapeFile_ImportShapeFileView","objFunction","shapeFile","SubmissionError","validateForm","isColumnAction","isDisplayIconDownload","renderCell","renderCellIcon","CloudDownload_default","ExportShapeFileHistoryTable","ExportShapeFileHistoryTable_VirtualizedTable","ExportShapeFileHistoryView","ExportShapeFile_ExportShapeFileHistoryTable","ExportShapeFileHistory","repeatTimeExportHistory","getExportHistory","loadExportHistoryRepeat","clearIntervalExportHistoryRepeat","resetIntervalExportHistoryRepeat","ExportShapeFile_ExportShapeFileHistoryView","downloadUrl","FieldSpecifyArea","btnPolygone","onChangeSelectArea","onResetActiveButton","resetActiveButton","callbackDrawArea","grid_date","_ref$ddlExplorer","ddlExplorer","_ref$surveyDate","surveyDate","maxDateSurvey","minDateSurvey","onChangeStartDateSurvey","onChangeEndDateSurvey","onRefExportShapeFileHistoryFunction","ExportShapeFile_ExportShapeFileHistory","geometryFromDrawAreaRef","refResetActiveButton","refFunctionExportShapeHistory","datasourceLookupLayer","stateDate","setStateDate","loadLookupSurveyName","lookupLayerData","lookupSurveyorName","processAfterSave","isSuccess","callServiceRunProcessExportShape","processSaveExportShape","layerExport","surveyUserID","startExplorer","endExplorer","_ref261","_ref262","SAVE_SURVEY_EXPORT_SHAPE_REQ","attributeMatchTable","EXPORT_DATE","handleBackToMainMenu","ExportShapeFile_ExportShapeFileView","specifyArea","functionObject","rowBtn","luDataType","onClickClearForm","onChangeSubDistrict","FormDraft","callServiceGetLupDataType","urlLookupDataType","changeTextBoxValue","confirmDistrictChange","isAlertAdminpolyInconsistent","currentAdminpolyData","confirmSubdistrictChange","cancelAdminpolyChange","newDistrictCode","handleChangeSubDistrict","newSubdistrictCode","callBackSubmitForm","initializeValue","Form_FormDraftView","AddDraftPoint","handleCallBackDrawPnt","isLocalBKK","handleCallBackEditGraphic","handleCallBackSubmitForm","callMapServiceSavepoint","callBackSavePoint","callServiceSaveForm","Add_AddDraftPointView","Form_FormDraft","isActiveSelectInMap","onClickSelectInMap","multiRow","FormSearchDraftView_Form","GreenCheckbox","&$checked","isCreate","handleChangeCheckbox","ResultSearchDraftView_ListResult","FormSearcgDraft","handleClickSelecIntMap","callbackDrawSpatilaSearch","getDataTypeByID","dataTypeID","luDataTypeFilter","converFormatDataMapservice","datas","DRAFT_PNT_ID","typeDisplay","createDateDisplay","listResultSearch","createCondition","handleDetail","onDetail","filterListResult","create","update","Search_FormSearchDraftView","ResultSearchDraftView","wordWrap","DetailDraftView_RowDeail","subDistrictDisplay","DetailDraft","drawGraphic","Detail_DetailDraftView","EditDraftPoint","onClearForm","PAGE","SEARCH_DRAFT_PNT","DETAIL_DRAFT_PNT","EDIT_DRAFT_PNT","SearchDraftPoint","mapLookUpDetail","t2","t3","t4","t5","t6","changePage","callServiceDeleteFeature","deleteResults","dirtyEdit","clearEdit","Detail_DetailDraft","Edit_EditDraftPoint","FormSearchDraft","urlServiceSearchResult","Search_SearchDraftPointView","buttonCustom","row_2","colLabel_Sub","luActivityList","onChangeBuildingUse","marerialList","buildingUseList","buildingSubUseList","buildingAdsList","buildingAfterList","ownerList","onChangeForm","initialData","setMinDate","setMaxDate","buildList","setBuildList","activityList","setAsctivityList","setMarerialList","setBuildingUseList","setOwnerList","setBuildingSubUseList","setBuildingAdsList","setBuildingAfterList","onhandleSubmit","initailValuesFormReport","handleChangeBuildingUse","callServiceBuildingType","resultDistrict","Param","DraftBuilding_Form_FormDraftView","onChangeDate","_ref$districtList","districtList","_ref$subDistrictList","subDistrictList","onClickBackForm","handleDistrict","onSubdistrictChange","onSurveyDateChange","PROVINCE","_ref$keepIsAlertIncon","keepIsAlertInconsistentAdminpoly","setKeepIsAlertInconsistent","setKeepAdminpolyStep2","setDataFormTwo","showAlertFn","refIsAlertInconsistentAdminpoly","refCurrentAdminpolyData","districtITM","subdistrictITM","BL_SUB_DISTRICT","Form_FormDraftTwoView","update_year","AddDraftBuilding","esm_extends","keepAdminpolyStep2","dirtyFormAdd","one","two","setData","setDistrictCode","setSubDistrictCode","inBKK","setInBKK","isAlert","handleCallBackDrawPolygon","returnedTarget","handleCallBackAddMap","object","handleSetDataFormTwo","handleDrawPolygon","handleEditPolygon","Add_AddDraftBuildingView","DraftBuilding_Form_FormDraft","Form_FormDraftTwo","FormSearchDraftBuildingView_Form","SURVEY_DATE_DISPLAY","ResultSearchDraftView_GreenCheckbox","Search_ResultSearchDraftView_ListResult","setActiveSelectInMap","setListResult","setIsCreate","setIsUpdate","setListResultSearch","CREATION_DATE_DISPLAY","FormSearchDraftBuildingView","Search_ResultSearchDraftView","DetailBuildingStepOneView_RowDeail","BL_TYPE_DISPLAY","BL_ACT_CODE_DISPLAY","BL_OWNER_DISPLAY","BL_MATL_DISPLAY","BL_MAIN_USE_DISPLAY","BL_USE_DISPLAY","BL_AFTER_CODE_DISPLAY","BL_AD_DISPLAY","DetailBuildingStepTwoView_RowDeail","Detail_DetailBuildingStepOneView","Detail_DetailBuildingStepTwoView","Detail_DetailDraftBuildingView","EditDraftBuilding","setDataEdit","handleCallBackDrawPolygoninitial","graphicinFnc","Edit_EditDraftBuildingView","SEARCH_DRAFT_BLDG","DETAIL_DRAFT_BLDG","EDIT_DRAFT_BLDG","SearchDraftBuilding","callServiceLookup","pmsLuBuildingType","pmsLuActivityType","pmsLuMaterailType","pmsLuBuildingUseType","pmsLuBuildingAds","pmsLuBuildingAfter","pmsLuOwner","resItem","luBuildingType","luActivityType","luMaterailType","luBuildingUseType","luBuildingAds","luBuildingAfter","luOwner","callServiceBuildingSubUseType","BuildingUseType","DetailDraftBuilding","Edit_EditDraftBuilding","FormSearchDraftBuilding","mapLookUpData","luBuildingSubUseType","buildingUseType","buildingSubUseType","materail","buildingAds","buildingAfter","owner","BL_ACT_CODE","BL_AD","BL_AFTER_CODE","t7","t8","t9","t10","t11","t12","t13","Search_SearchDraftBuildingView","maginLeft","magin","listSurveyName","listSurveyLayer","onClickReset","SurveyReportExcel","startRowTableHeader","generateTable","topicRow","dateInitial","surveyLayer","dateReport","setListSurveyName","setListSurveyLayer","callServiceSurveyLayer","callServiceSurveyName","timeStartDate","setHours","setMinutes","setSeconds","timeEndDate","resultSurveyName","resultSurveyLayer","resultSubDistrict","callServiceRequestReport","handleClickSubmitReport","filterFindLayerName","layerSurvey","mapsheet1k","rawang","subdistrictID","surveyorID","surveyName","startTimeStamp","endTimeStamp","SurveyReport_SurveyReportView","textLabel","listTypeOfLandMark","StepLandMark_StepInputLandMark","enableReinitialize","isPointOnMapBKK","setIsPointOnMapBKK","setTypeOfLandMark","districtAndSubDistrictCode","setDistrictAndSubDistrictCode","initailForm","callServiceTypeOfLandMark","resultTypeOfLandMark","handleDrawOnMap","handleCallBackDrawLandMark","setDistrictAndSubDistrictOfLandmark","reCheckGeometry","saveLandmark","callMapServiceSaveLandMark","callBackSaveLandMark","Add_LandMarkView","surveyDateDisplay","iconEdit","_rootResult","LandMarkResultSearch_GreenCheckbox","LandMarkResultSearch_ListResult","resultSearch","openResultView","onEditResultSearch","onDeleteResultSearch","onClickOpenResultSearch","Search_LandMarkFormSearch","Search_LandMarkResultSearch","LandMarkViewMode_RowDeail","typeName","openComponent","dataForViewMode","setDataForViewMode","initailValuesFormEdit","manageDataForViewMode","handleCallBackDrawPntInitial","surveyDateFormat","newData","handleCallBackClose","saveEditModeInLandMark","ViewMode_LandMarkViewMode","ERROR_SELECT","setListTypeOfLandMark","setOpenResultView","setResultSearch","openEditOrView","setOpenEditOrView","dataItem","setDataItem","setIsActiveSelectInMap","initialFormSearch","callBackDrawSpatialSearch","handleSubmitSearch","handleEditResultSearch","handleOpenDetailResultSearch","Search_ManageResultSearch","Search_LandMarkSearchView","setDateForFirstTime","onEditLine","onDrawLine","DraftLine_Form_FormDraftView","AddDraftLine","distanceLine","callMapServiceSaveline","callBackSaveLine","handleEditLine","handleDrawLine","handleCallBackDrawLine","AddDraftLineView","DraftLine_Form_FormDraft","Search_FormSearchDraftView_Form","Search_ResultSearchDraftView_GreenCheckbox","DraftLine_Search_ResultSearchDraftView_ListResult","DRAFT_LINE_ID","DraftLine_Search_FormSearchDraftView","DraftLine_Search_ResultSearchDraftView","Detail_DetailDraftView_RowDeail","DraftLine_Detail_DetailDraftView","EditDraftLine","callServiceSaveMapsheet","SEARCH_DRAFT_LINE","DETAIL_DRAFT_LINE","EDIT_DRAFT_LINE","SearchDraftLine","dirtyFormEdit","DraftLine_Detail_DetailDraft","Edit_EditDraftLine","Search_FormSearchDraft","Search_SearchDraftLineView","callServiceSearchHouseNo","_ref$houseName","houseName","_ref$houseNumber","houseNumber","_ref$subdistrictID","SearchHouseNo_FormSearchHouseNoView","rootItem","ResultSearchHouseNo","shapeType","SearchHouseNo_ResultSearchHouseNoView","SearchHouseNo","ApiSearchHouseNo","SearchHouseNo_SearchHouseNoView","SearchHouseNo_ResultSearchHouseNo","DetailShortcut","onClickDrawGraphicOther","Fragment","Deatail_DetailShortcut","isLoadMapComplete","isMobileView","callBackFailed","AskTheCityPlan_ResultShortcut","ClearIcon","gap","btnGroup","stepLine","hasValue","onClearUpload","onClickUpload","inputUploadRef","images","arrowLeftDisabled","arrowLeftLastDisabled","arrowLeftLastNormal","arrowLeftNormal","arrowRightDisabled","arrowRightLastDisabled","arrowRightLastNormal","arrowRightNormal","Pagination","onPageChange","count","createGoToFirstPageButton","imagePath","createGoToPrevPageButton","createGoToNextPageButton","createGoToLastPageButton","createPages","total","rowPerPage","pages","firstPage","prevPage","nextPage","lastPage","innerWidth","Typography_default","TextColumn","NumberColumn","_this$props$digit","digit","amount","decimalCount","decimal","thousands","negativeSign","ImageColumn","onClickRow","conditionHideEdit","buttonList","renderButton","ButtonPopupColumn","userGroupName","Search_default","DEFAULT_FUNC","fnKey","defaultVal","DataTable","handleAnimationClass","rowControls","allWidth","ctrl","DEFAULT_BTN_CTRL_WIDTH","rowSlideId","countRow","handleSort","bind","assertThisInitialized","colId","sortColumn","sortType","_this$props$handleSor","ImgSortBoth","ImgSortAsc","ImgSortDesc","intViewportHeight","offsetTop","offsetHeight","lstColumns","pagination","lstRowCtrls","noDataMsg","_this$props3$handlePa","handlePageChange","_this$props3$handleRo","handleRowClick","_this$props3$handlerB","handlerBeforeShowControl","headerCssClass","_this$props3$tableOnP","tableOnPanel","_this$props3$tableSea","tableSearchOSS","_this$props3$hasSorta","hasSortable","dangerouslySetInnerHTML","__html","displaySort","getPosition","ctrlOption","displayConditionFn","colorClass","slideRow","citem","Columns_NumberColumn","aligh","Columns_ImageColumn","Columns_ButtonColumn","Columns_ButtonPopupColumn","Columns_ButtonViewColumn","Columns_TextColumn","DataTable_Pagination","ceil","rootTable","onBeforeShowControl","onChangePage","Controls_DataTable_DataTable","ImportOSS","onGetDataTable","createdDate","updatedDate","createDataTable","handleBackMenu","onUpload","currentFile","importOSS","onChangeUploadFile","onClearFile","handleChangePage","handleBeforeShowControl","specSize","finalListIntablePage","lenTableData","tableData","matHeight","hasFile","ImportOSS_ImportOSSView","importOSSHistoryView","ImportSTR","importSTR","ImportSTR_ImportSTRView","importSTRHistoryView","lutDistrict","onChangeHandleStartDate","onChangeHandleEndDate","SearchOSSFormView_Form","SearchOSSForm","SearchOSSFormView","getDataSearchOSSTable","getFilterResult","SearchOSS","onGetLutDistrict","validateFormSearch","formatStringPermitNo","part","format1","format2","format3","format4","searchOSSAction","issuedDate","issuedExpireDate","SearchOSS_SearchOSSView","SearchOSS_SearchOSSForm","SearchOSSAction","onSubmitFormSearch","MarkPointSTRForm","MarkPointSTRForm_MarkPointSTRFormView","onClickMarkPointHouse","onSubmitHouse","onClearEventDraw","onChangeHouseNo","onChangeHouseCode","onChangeRemark","isNotDraw","buttonGroup","hasObjectID","buttonEdit","buttonAdd","buttonClose","Check_default","Clear_default","sectionHouseList","rootHouseList","alertResultText","isShowHouseList","onSubmitFormHouseList","MarkPointSTRResult","MarkPointSTRResult_MarkPointSTRResultView","getDataHouseList","MarkPointSTR","currentHouse","callbackGetPolygonMarkPointSTR","callbackGetPolygonMarkPointSTROld","markCurrentHouse","updateHouseList","objectPolygon","updateCurrentHouse","currentObjectPolygon","onAddOldMarkPointSTR","onConfirmDelete","onApplyDeleteSuccess","updateCurrentHouseNo","updateCurrentHouseCode","updateCurrentRemark","valueID","HID","formatHouseList","MarkPointSTRAction","currentPermitNo","validateHouseSubmit","duplicateResult","latlong","latitudeUsed","longitudeUsed","plgObjectID","onApplyEditSuccess","onSaveToDataBase","onClickInsertData","paramSaveData","onApplyEditDeleteDataPolygon","filterHIDPolygon","filterHouseNumPolygon","updateValueCurrentHouse","clonedArray","_this$state7","MarkPointSTR_MarkPointSTRView","MarkPointSTR_MarkPointSTRForm_MarkPointSTRForm","MarkPointSTR_MarkPointSTRResult_MarkPointSTRResult","MarkPointSTRReducer","rootTitle","onBlurPermitNo","MarkPointSTRSingleForm","MarkPointSTRSingleForm_MarkPointSTRSingleFormView","MarkPointSTRSingle","graphicValue","_mapAction","initialValue","_showAlert","stringHouseCode","paramToSaveDB","MarkPointSTRSingle_MarkPointSTRSingleForm_MarkPointSTRSingleForm","MarkPointSTRSingle_MarkPointSTRSingleView","onClickExport","lutMonth","lutYear","ExportSTRReportExcel","_worksheet$addRow","importOSSAll","importOSSCompletely","importOSSInCompletely","importSTRAll","dataSTRPoint","dataSTRNoPoint","dataOSSPolygon","today","DistrictName","MonthName","YearName","ExportSTRReportPDF","ExportSTR","onGetLutOrganization","thaiYears","DistrictID","Month","Year","formatData","onExportFunction","executeReport","dataMinDate","dataMaxDate","ExportSTR_ExportSTRView","ImportSTRByOfficer","ImportSTRByOfficer_ImportSTRByOfficerView","setsSatis","listVisibleLayer","setListVisibleLayer","getStatistics","manageVisibleLayer","num","goToMainMenu","handleBackAskTheCityPlan","handleBackSearchLandInfo","handleBackSearhContruct","handleBackSearchHouse","Panel_PanelLayoutView","systemProfile","currentPageData","isMobileViewPath","pathname","mobileShortcut","AskTheCityPlan_AskWithShortcut","QueryBuilder_QueryBuilderTool","MenuContent_SearchLandInfo_SearchLandInfo","MenuContent_AskTheCityPlan_AskTheCityPlan","MenuContent_SatisfactionForm_SatisfactionForm","Report_Evaluation_Evaluation","Report_StatisticUser_StatisticUser","Report_StatisticCheckComprehensive_StatisticCheckComprehensive","PMR1_SubmitPmr_SubmitPmr","PMR1_EditPmr","Report_DistrictReport_DistrictReport","AreaReport","Add_AddConstructionLicense","Search_SearchConstruct","MenuContent_HouseNumber_HouseNumber","MenuContent_SearchHouseNumber_SearchHouseNumber","HouseNumber_HouseNumberReport","ConstructionLicense_ConstructionLicenseReport","MinisterialRegulation_MinisterialRegulationReport","Add_AddDraftPoint","Search_SearchDraftPoint","Add_AddDraftLine","Search_SearchDraftLine","Add_AddDraftBuilding","Search_SearchDraftBuilding","Add_LandMark","Search_LandMarkSearch","MenuContent_ImportShapeFile_ImportShapeFile","MenuContent_ExportShapeFile_ExportShapeFile","SueveyReport","MenuContent_SearchHouseNo_SearchHouseNo","MenuContent_ImportOSS_ImportOSS","MenuContent_ImportSTR_ImportSTR","MenuContent_SearchOSS_SearchOSS","MenuContent_MarkPointSTR_MarkPointSTR","MenuContent_MarkPointSTRSingle_MarkPointSTRSingle","MenuContent_ExportSTR_ExportSTR","MenuContent_ImportSTRByOfficer_ImportSTRByOfficer","Panel_Menu_Menu","getCurrentPage","CustomClearIcon","TextFieldLocator","handleTextChange","onTextChange","renderInput","isShowClearIcon","rootTextSearch","inputRoot","inputInput","adornment","TextFieldLocator_CustomClearIcon","onClearText","renderSuggestion","suggestion","itemProps","isHighlighted","highlightedIndex","additionText","getSuggestions","totalResult","searchLocator","refInput","blur","downShiftIsOpen","handleOnFocus","handleOnBlur","onRefInput","downshift_esm","defaultHighlightedIndex","onSelect","onStateChange","getInputProps","getItemProps","getMenuProps","tmp","_rootTextSearch","chip","listMenuBottom","listMenuBottomActive","pointerEvents","divSearch","containerLocator","containerProfile","listMenuActive","onMenuClick","onLocatorChange","onTextLocatorChange","core_index_es","Containers_TextFieldLocator","Panel_PanelLayout","Map_default","rootExpand","sectionHeader","summaryDetail","summaryDetailContent","summaryDetailContentHeader","summaryDetailContentText","summaryFilterResultSection","summaryFilterResultTitle","summaryFilterResultContent","contentHeader","textWrap","closeButton","iconButtonRoot","headerTitle","dataSummary","formatImportedStartDate","formatImportedEndDate","isExpand","onClickToggle","onClickClosePanel","KeyboardArrowDown_default","KeyboardArrowUp_default","placementDistrict","actionType","countPolygon","SearchOSSReportPDF","SearchOSSTable","gotoPoint","queryWithFeature","openTOCLayer","_MapActions","closeTOCLayer","searchOSSRdc","SearchOSSReportExcel","SearchOSSTable_SearchOSSTableView","LayoutMap","manageActionBySystem","satisfactionAndStatisticAction","uniqid","saveStatisticPMR","saveStatisticCAH","handleMenuClick","completeLocator","handleLocatorChange","flatten","handleTextLocatorChange","Web_LayoutMapView","Web_Coordinate_Coordinate","SearchOSS_SearchOSSTable_SearchOSSTable","MapManager","createMap","esriBundle","SimpleRenderer","toolbars","draw","addPoint","resume","complete","USE_PROXY","alwaysUseProxy","PROXY_ALWAYS_USE","proxyUrl","divMap","center","basemap","logo","slider","showLabels","isKeyboardNavigation","districtBMA","BASEMAP_DISTRICT_URL","districtBufferBMA","BASEMAP_DISTRICT_BUFFER_URL","districtLine","districtFill","setStyle","STYLE_NULL","setOutline","districtRenderer","setRenderer","addLayers","chkExtent","_extent","onLoadMap","onClickMap","onMouseMove","createScalebar","createOverviewMap","createBaseMapGallery","createGraphicLayer","GraphicsLayer","gpLayer","OverviewMap","attachTo","startup","getCurrentLocation","navigator","geolocation","getCurrentPosition","pos","coords","isMobile","Basemap","BasemapLayer","BasemapGallery","basemaps","BASEMAPGALLERY","basemapLayer","stringUrl","thumbnailUrl","basemapGallery","showArcGISBasemaps","_selectedBasemap","mapProcess","drawSubmitPmr","drawMeasurement","drawAskTheCityPlan","drawConstruction","onClickCloseBasemapGallery","onClickCloseMeasurement","drawGraphicPMR1Form","isLoadMapToolsComplete","basemapToggle","activeTypeToolbar","showHideBasemapGallery","Web_LayoutMap","Maps_MapTools_MapTools","divBasemapGallery","divBasemapGalleryHeader","MapManagerWithStyle","divMeasurement","divSnapping","TocAction","WithAuthenReducer","PrivateRouteProps","Route","render","Redirect","setMenuBreadcrumb","clearMenuBreadCrumb","getAllUser","getUserByID","getLuOrganization","getLuAllUserGroup","callServiceAddUser","firstname","lastname","identificationNo","telephone","activated","orgID","callServiceUpdateUser","callServiceDeleteUserByID","isMouseEnter","onMouseEnter","onMouseLeave","TextFieldSearchView_CustomClearIcon","TextFieldSearch","handleMouseEnter","handleMouseLeave","handleClearText","Presentationals_TextFieldSearchView","rootTextFieldSearch","rootHeader","userData","countUserData","sortColomn","onClickAddUser","onSortDataTable","onChangeSearch","Containers_TextFieldSearch","modal","divClose","spanText","iconClose","Modal_default","closeAfterTransition","BackdropComponent","Backdrop","BackdropProps","fullName","userName","ListSystemOfUser","handleCloseModal","setIsOpen","listSystem","setListSystem","loadListUser","userGroupID","loadSystem","mapSystemToDisplay","allSystem","systemToDisplay","User_ListSystemOfUserView","ListUser","layoutAction","getListUser","ApiUser","handleChangeSearch","handleSortDataTable","column","userDataSort","buttonType","onEditUser","onDeleteUser","handleDeleteUser","handleListSystemOfUser","showListSystem","userSystemData","dataUser","searched","rpp","onAddUser","User_ListUserView","User_ListSystemOfUser","LayoutAction","paddingColLeft","paddingColRight","luUserGroup","luOrganization","luStatusUser","FormUser","getLookup","luOrganizaition","luAllUserGroup","allLup","callBackCancelForm","isCheckDirty","initial","User_FormUserView","AddUser","handleSubmitAddUser","organizationID","onCancelAddUser","User_AddUserView","User_FormUser","EditUser","getUserData","handleSubmitSaveUser","onCancelEditUser","User_EditUserView","User","handleAddUser","handleCancelAddUser","handleEditUser","editUserID","handleCancelEditUser","renderPage","User_ListUser","User_AddUser","User_EditUser","User_UserView","userGroupData","containerSearchAndButton","buttonAddUserGroup","containerTableUserGroup","onClickAddUserGroup","onClickDeleteItem","onClickEditItem","countUserGroupData","UserGroup_UserGroupTableView","topicView","labelTopicText","onCheckboxChange","systemData","_props$defaultSystemD","defaultSystemData","onDefaultSystemChange","disabledDefault","topicName","disable","systemArr","submitForm","isSameName","defaultSystem","submitFunction","setSystem","setDefaultSystem","disabledDefaultSystem","setDisabledDefaultSystem","callServiceSystem","manageSystemFormat","newSystemFormat","mangeInitailDefaultSystem","handleCheckboxSystem","newArr","handleDefaultSystemChange","UserGroup_SystemView","CustomTableCell","head","TableCell","stickyColumn","stickytRow","stickytRowCol","table_contianer","topic_container","_ref$systemData","_ref$dataToDisplay","dataToDisplay","rederFunctions","functionName","functionSelect","renderRowTable","TableRow_default","subFunction","itemSystem","sysIndex","systemId","Done_default","renderSubRowTable","itemSub","indexSub","Table_default","TableHead_default","TableBody_default","functionData","setDataToDisplay","callServiceGetAllDisplatTable","manageDataForDispplay","systemOfFunction","mergeDataToDisplay","dataCompare","dataToDisplayNew","itemFunction","dataCompareFilter","itemObjData","itemSubFunction","dataCompareSubFilter","TableDisplayView","dirtyForm","EditMode","onClickBackMenu","setFunctions","callServiceLuSystem","callServiceLufunctions","newObj","parent","manageDataForSaveAddUserGroup","valuesIncome","systemValues","functionValues","groupname","function","callServiceUpdateUserGroup","groupid","groupId","callServiceAddUserGroup","UserGroup_UserGroupControlView","submit","SystemControl","FunctionControl","openFormAddOrEdit","setOpenFormAddOrEdit","setPage","setSortType","setSortColumn","setSearch","setUserGroupData","setInitialForm","initialForm","callServiceGetDataUserGroup","filterObj","callServiceDeleteUserGroup","handleClickAddUserGroup","handleEditItem","dataOfUserGroup","evtPage","handleRowClickItem","handleSortColumn","columnSort","sortTypeSort","userGroupDataSort","UserGroup_UserGroupControl","UserGroup_UserGroupView","renderView","getSystem","getLoginHistory","usergroupID","luSystem","onChangeStartDate","onChangeEndDate","onSystemChange","isRequiredUserName","LoginReportExcel","duration","isAllSystem","countColumn","startRowHeader","loginTimestamp","logoutTimestamp","usergroup","ipAddress","endCell","ReportLogin","getLookuo","createLuSystem","ApiReport","resultLoginHistory","userGroup","handleSystemChange","ReportLogin_ReportLoginView","isCheckAuthen","setCheckAuthen","checkAuthen","permission","UserGroup","renderRoute","IconHome","IconMap","_mainHeader","_textHeader","_textHeaderXXS","mainHeader","banner","bannerImage","textHeader","textHeaderXXS","bottomBox","goToCMP","gotToCurrent","MobileHomeView_IconMap","MobileHomeView_IconHome","MobileHome","Presentationals_MobileHomeView","_store","createStore","RootReducer","applyMiddleware","thunkMiddleware","RouteManagement","BrowserRouter","basename","es","store","Switch","AppRoute_PrivateRouteCMS","exact","withRouter","AppRoute_PrivateRoute","WebLayout","UMLayout","URL_PORTAL","App","AppRoute_RouteManagement","secondary","generateClassName","createGenerateClassName","productionPrefix","StylesProvider","CssBaseline_default","utils","getElementById","serviceWorker","ready","registration","unregister"],"mappings":"2EAAAA,EAAAC,QAAA,iqCCAAD,EAAAC,QAAiBC,EAAAC,EAAuB,8ECAxCH,EAAAC,QAAA,gwBCAAD,EAAAC,QAAA,wyBCAAD,EAAAC,QAAA,wyBCAAD,EAAAC,QAAA,owBCAAD,EAAAC,QAAA,wxBCAAD,EAAAC,QAAA,o5BCAAD,EAAAC,QAAA,w5BCAAD,EAAAC,QAAA,4xBCAAD,EAAAC,QAAA,wTCAAD,EAAAC,QAAA,oQCAAD,EAAAC,QAAA,uyMCCaG,EAAc,KACdC,EAAuB,QACvBC,EACT,iEAESC,EAAmB,CAG5BC,sBAAuB,qBACvBC,6BAA8B,0DAGrBC,EAAmB,CAC5BC,qBAAsB,uBACtBC,8BAA+B,gCAC/BC,2BAA4B,6BAC5BC,yBAA0B,2BAC1BC,uBAAwB,yBACxBC,kCAAmC,oCACnCC,wBAAyB,0BACzBC,+BAAgC,iCAChCC,sCACI,wCACJC,uBAAwB,yBACxBC,4BAA6B,8BAC7BC,uBAAwB,yBACxBC,4BAA6B,8BAC7BC,iCAAkC,mCAClCC,oCAAqC,sCACrCC,iCAAkC,mCAClCC,kCAAmC,oCACnCC,iCAAkC,mCAClCC,0BAA2B,4BAC3BC,kCAAmC,oCACnCC,6BAA8B,+BAC9BC,mBAAoB,qBACpBC,0BAA2B,4BAC3BC,+BAAgC,iCAChCC,+BAAgC,iCAChCC,wBAAyB,0BACzBC,uBAAwB,yBACxBC,0BAA2B,4BAC3BC,yBAA0B,2BAC1BC,uBAAwB,yBACxBC,iCAAkC,oCAKzBC,EAAuB,CAChCC,EAAG,CACCC,QAAS,uCACTC,IAAK,KAETC,EAAG,CACC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AGvomGuWFGG42iHM6GUDjPwPTq2pVYU4Y1tY39OqeHE49gOhFIOo9GbWgdxTxSxCw1yNpRymIY2/BRK6bENHd/FUMqhDRKJNkhspuLEf//sylAEGYMuevdwjhVdGIogp9Bzv8X5VnQh+SDZs903XGnFf0g6yDr8hT7bbbUih2SD+BjkuTznISsKSDLILHyOnu8ClnkkSi6IU+xd9Fx3sOzbXyNBnPPr4F/eK+B5nqJXpix9D+L0+BL3hVI1DmN2jiVWVKDvQXagM41tj1hRku3o7ORrwhorKtLIT8upMvs44QtP0c3q+pC1d92oQ2M3+3p0EbPPeRyL3fDrhyu27Y5aUZPGgsgqtL39LqMfCkbiMR9h9v8+U9Wl0SCyAt+gfW/iFBQHfQOtN8xk7IXGg8hifIH2v48z0W9ilit9j8ohShBZgE/QY2T3RNGDYBWiBZHZ+AA9jlPtJuwXUYPIdLyNB0Opf0QPIrW/nucwkCBN0AZJjdJBXLBs+CWU0iML4uNQIW532dhNltTwtcGxHQulApw2bbwxlNLiOjo2XyMKce/Qxm53pXRV1qILrHuLrlOFjEM3Hg3jl79SnRpmNb5Dx7TfirL4/vAa7eh210nciZsj6v6l98Q19Eo4lnNYeQNqLrrx6AEG7Uf0SvS0i7YM3bNzc/RSRF0rnJ18z0/h593SMsR0On8BkyhnJM9trxIAAAAASUVORK5CYII=\"","module.exports = __webpack_public_path__ + \"static/media/Loading.cc537884.svg\";","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABS2lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDIgNzkuMTYwOTI0LCAyMDE3LzA3LzEzLTAxOjA2OjM5ICAgICAgICAiPgogPH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EWlwDS4M9PcLEKM49srYLv44lLIAMKIEVsAMeBpv0ufAM5CK4GOxD2vblkwi2DcwtVGlmsFwL0w7hW7BwsCF/ygvdTjK5SPnNvwAAAABJRU5ErkJggg==\"","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABS2lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDIgNzkuMTYwOTI0LCAyMDE3LzA3LzEzLTAxOjA2OjM5ICAgICAgICAiPgogPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIi8+CiA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgo8P3hwYWNrZXQgZW5kPSJyIj8+nhxg7wAAAK1JREFUOI3tj70JwlAURo8/vZ2QFayFjJBsYGHpFG+CN4WlhRvoBgqipSME7DKAYBMhfN4kN2qZr7lwuN9598GQXzNSEEKw9pJqFspijHXG2PFoCtyBq8FuutwlTIEjMKumskMfYb24BzYNzCXU4hpYGuzpESZGce6RtV34dSxhAWRACayAHfAw2KTPhWcgF8HFYB/Sti+fRLBtYG6hSjOD5VqYdgjfgoWDDflTXrMeMrmCEOnwAAAAAElFTkSuQmCC\"","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABS2lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0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wj0dcYhQxlv36i/VK62EOpxKbD5K+RdgOlTWEtdWi+gHz+jMMdJpfJQAAAABJRU5ErkJggg==\"","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABS2lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDIgNzkuMTYwOTI0LCAyMDE3LzA3LzEzLTAxOjA2OjM5ICAgICAgICAiPgogPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIi8+CiA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgo8P3hwYWNrZXQgZW5kPSJyIj8+nhxg7wAAAP9JREFUOI3t0rtKQ0EQxvGfxygWEQXBIpWFhVpIsLGwUFTwBurrnCc4D6TiDW8gqEVERMTCxk4LUSRo4bU4G5B4IkmXIl8zy+zuf+ebWVpqOrVVJ+I4LiHCAu7RhWvcYQUvlbNJkvwBRhmPPKGIAxTwgTKmsIPe/yrMAq7iCEMhFjCDC4xjD32NAMtYxC4GAzQfoCWMYR/99QLhFcvYxIDU/luAnmAU240AK3sdYf2Ob7SjM+Q+sy7lasDyWMckbjGNbulQijjHXL3AHmxgAjdSm184xAjOMI/neoFrAXaFWTziEsM4xpJff7FaWT3M4VRq80HatwhbobKasJaaVD/NTjMMl0XbCgAAAABJRU5ErkJggg==\"","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABS2lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDIgNzkuMTYwOTI0LCAyMDE3LzA3LzEzLTAxOjA2OjM5ICAgICAgICAiPgogPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIi8+CiA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgo8P3hwYWNrZXQgZW5kPSJyIj8+nhxg7wAAAKJJREFUOI3t0rsOAUEUBuDPpVfhHSSiIlEjQeV19gn2iUQIkaDGg7gUlAqFVe7OJtso/Mk0c3K+mckZ/vm5lLKKURQd8cIUl+9+HMepPeXAgXd0sUY9zw1D4AwHdLBBoyj4wAR7tLFFswgIzwTdoYVlURAqyeIzpNRUc2A1LNDHGeMiYA0r9HDCCNeshtCT5wl2xDCE5QHLPt9mgFsI++dH8wYS7BsB+OIH3AAAAABJRU5ErkJggg==\"","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAkElEQVQoz7XQMQ5AQBCF4dWQSJxC5wwax1Cq1e7BAdxD5SL+Tq/QCM1oNiJidwox0355mXnG/DrEtIQ6azioNZQxI0ykPhTQIwhCR+BmBYtlK7kLJYwWCcJA9M4qdrZrd8pPjZWPtOqdRQy320YSV17OatFC4euts6z39GYMKRPCTKY9UnPQ6P+GtMRfGtPnBCiqhAeJPmkqAAAAAElFTkSuQmCC\"","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZ0lEQVQ4y2NgGLKgquEuFxBPAGI2ahhWCsS/gDibUoO0gPgxEP8H4ttArEyuQYxAPBdqEAxPBImTY5gjEL9DM+wTENuQahAvEO9DMwiGdwAxOymGJQLxTyD+jgWDxCMZRsEoGAVoAADeemwtPcZI2wAAAABJRU5ErkJggg==\"","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZUlEQVQ4y2NgGAWjYBSggaqGu5FA/BOIv2PBIPFEUgxjB+IdQPwfC94HxLykus4GiD+hGfQOiB3J8SojEE9EM2wuSJzcsFMG4ttQgx4DsRalkZENxL+AuJQaMcsGxBOAmGvopk8AVz1sLZgg0bsAAAAASUVORK5CYII=\"","// ########################### ALL CONSTANTS ###########################\r\nexport const BKK_CODE_ID = \"10\";\r\nexport const KEY_ENCRYPT_PASSWORD = \"CPUDD\";\r\nexport const IMG_HIGHLIGHT_POINT =\r\n    \"http://www.clipartandgraphics.com/images/borders/coloroval.gif\";\r\n\r\nexport const LISTFEATURELAYER = {\r\n    // FEATURELAYER_DISTRICT: \"FEATURELAYER_DISTRICT\",\r\n    // FEATURELAYER_DISTRICT_BUFFER: \"FEATURELAYER_DISTRICT_BUFFER\"\r\n    FEATURELAYER_DISTRICT: \"เขต\",\r\n    FEATURELAYER_DISTRICT_BUFFER: \"Buffer เขต 100 เมตร\",\r\n};\r\n\r\nexport const LISTGRAPHICLAYER = {\r\n    GRAPHICLAYER_LOCATOR: \"GRAPHICLAYER_LOCATOR\",\r\n    GRAPHICLAYER_CURRENT_LOCATION: \"GRAPHICLAYER_CURRENT_LOCATION\",\r\n    GRAPHICLAYER_GOTO_LOCATION: \"GRAPHICLAYER_GOTO_LOCATION\",\r\n    GRAPHICLAYER_MEASUREMENT: \"GRAPHICLAYER_MEASUREMENT\",\r\n    GRAPHICLAYER_PMR1_FORM: \"GRAPHICLAYER_PMR1_FORM\", // จุดแดงๆ ของ ผมร.1\r\n    GRAPHICLAYER_SUBMIT_PMR_HIGHLIGHT: \"GRAPHICLAYER_SUBMIT_PMR_HIGHLIGHT\",\r\n    GRAPHICLAYER_SUBMIT_PMR: \"GRAPHICLAYER_SUBMIT_PMR\",\r\n    GRAPHICLAYER_ASK_THE_CITY_PLAN: \"GRAPHICLAYER_ASK_THE_CITY_PLAN\",\r\n    GRAPHICLAYER_ASK_THE_CITY_PLAN_EXTENT:\r\n        \"GRAPHICLAYER_ASK_THE_CITY_PLAN_EXTENT\",\r\n    GRAPHICLAYER_CITY_PLAN: \"GRAPHICLAYER_CITY_PLAN\",\r\n    GRAPHICLAYER_CITY_PLAN_TEXT: \"GRAPHICLAYER_CITY_PLAN_TEXT\",\r\n    GRAPHICLAYER_LAND_PLOT: \"GRAPHICLAYER_LAND_PLOT\",\r\n    GRAPHICLAYER_LAND_PLOT_TEXT: \"GRAPHICLAYER_LAND_PLOT_TEXT\",\r\n    GRAPHICLAYER_DRAW_SPATIAL_SEARCH: \"GRAPHICLAYER_DRAW_SPATIAL_SEARCH\", // ไม่ได้ใช้แล้วเพราะ spatial search ไม่ได้มีการ add graphic แล้ว\r\n    GRAPHICLAYER_CONSTRUCTION_HIGHLIGHT: \"GRAPHICLAYER_CONSTRUCTION_HIGHLIGHT\",\r\n    GRAPHICLAYER_CONSTRUCTION_DETAIL: \"GRAPHICLAYER_CONSTRUCTION_DETAIL\",\r\n    GRAPHICLAYER_CONSTRUCTION_LICENSE: \"GRAPHICLAYER_CONSTRUCTION_LICENSE\",\r\n    GRAPHICLAYER_HOUSE_NUMBER_DETAIL: \"GRAPHICLAYER_HOUSE_NUMBER_DETAIL\", // ทร.900\r\n    GRAPHICLAYER_QUERYBUILDER: \"GRAPHICLAYER_QUERYBUILDER\",\r\n    GRAPHICLAYER_SPATIAL_SEARCH_DRAFT: \"GRAPHICLAYER_SPATIAL_SEARCH_DRAFT\",\r\n    GRAPHICLAYER_DRAFT_HIGHLIGHT: \"GRAPHICLAYER_DRAFT_HIGHLIGHT\",\r\n    GRAPHICLAYER_DRAFT: \"GRAPHICLAYER_DRAFT\", //ทุก draft จะใช้ตัวนี้หมด\r\n    GRAPHICLAYER_IMPORT_SHAPE: \"GRAPHICLAYER_IMPORT_SHAPE\",\r\n    GRAPHICLAYER_DRAW_EXPORT_SHAPE: \"GRAPHICLAYER_DRAW_EXPORT_SHAPE\",\r\n    GRAPHICLAYER_DRAW_GRAPHIC_TOOL: \"GRAPHICLAYER_DRAW_GRAPHIC_TOOL\",\r\n    GRAPHICLAYER_DRAW_POINT: \"GRAPHICLAYER_DRAW_POINT\",\r\n    GRAPHICLAYER_DRAW_LINE: \"GRAPHICLAYER_DRAW_LINE\",\r\n    GRAPHICLAYER_DRAW_POLYGON: \"GRAPHICLAYER_DRAW_POLYGON\",\r\n    GRAPHICLAYER_DRAW_CIRCLE: \"GRAPHICLAYER_DRAW_CIRCLE\",\r\n    GRAPHICLAYER_DRAW_TEXT: \"GRAPHICLAYER_DRAW_TEXT\",\r\n    GRAPHICLAYER_DRAW_HOUSENO_SEARCH: \"GRAPHICLAYER_DRAW_HOUSENO_SEARCH\",\r\n};\r\n\r\nexport const IMPORT_SHAPE_SURVEY_LAYER_ID = \"IMPORT_SHAPE_SURVEY_LAYER\";\r\n\r\nexport const STATUS_IMPORT_EXPORT = {\r\n    D: {\r\n        display: \"สำเร็จ\",\r\n        key: \"D\",\r\n    },\r\n    F: {\r\n        display: \"ไม่สำเร็จ\",\r\n        key: \"F\",\r\n    },\r\n    W: {\r\n        display: \"รอ\",\r\n        key: \"W\",\r\n    },\r\n};\r\n\r\nexport const SYSTEM = {\r\n    PMR1: \"PMR1\",\r\n    CMP: \"CMP\",\r\n    CAH: \"CAH\",\r\n    Survey: \"SURVEY\",\r\n    CMS: \"CMS\",\r\n    UM: \"UM\",\r\n};\r\nexport const SYSTEM_ID = {\r\n    [SYSTEM.PMR1]: \"SYS02\",\r\n    [SYSTEM.CMP]: \"SYS01\",\r\n    [SYSTEM.CAH]: \"SYS03\",\r\n    [SYSTEM.Survey]: \"SYS04\",\r\n    [SYSTEM.UM]: \"SYS05\",\r\n};\r\n\r\nexport const HEADER = {\r\n    //ชื่อระบบ\r\n    CMP: {\r\n        TITLE: \"ระบบตรวจสอบผังเมืองรวมและข้อบัญญัติกรุงเทพมหานคร\",\r\n        SUB_TITLE: \"สำนักการวางผังและพัฒนาเมือง กรุงเทพมหานคร\",\r\n        MENU_TITLE: \"ระบบตรวจสอบผังเมืองรวมกรุงเทพมหานคร\",\r\n    },\r\n    PMR1: {\r\n        TITLE: \"ระบบแจ้งการใช้ประโยชน์ที่ดิน/เปลี่ยนแปลง (ผมร.๑)\",\r\n        SUB_TITLE: \"สำนักการวางผังและพัฒนาเมือง กรุงเทพมหานคร\",\r\n        MENU_TITLE: \"ระบบแจ้งการใช้ประโยชน์ที่ดิน/เปลี่ยนแปลง (ผมร.๑)\",\r\n    },\r\n    CAH: {\r\n        TITLE: \"ระบบการลงจุดแสดงตำแหน่งการอนุญาตก่อสร้างและออกรหัสประจำบ้าน\",\r\n        SUB_TITLE: \"สำนักการวางผังและพัฒนาเมือง กรุงเทพมหานคร\",\r\n        MENU_TITLE:\r\n            \"ระบบการลงจุดแสดงตำแหน่งการอนุญาตก่อสร้างและออกรหัสประจำบ้าน\",\r\n    },\r\n    SURVEY: {\r\n        TITLE: \"ระบบสำรวจและปรับปรุงข้อมูลแผนที่\",\r\n        SUB_TITLE: \"สำนักการวางผังและพัฒนาเมือง กรุงเทพมหานคร\",\r\n        MENU_TITLE: \"ระบบสำรวจและปรับปรุงข้อมูลแผนที่\",\r\n    },\r\n    UM: {\r\n        TITLE: \"ระบบจัดการผูัใช้งาน\",\r\n        SUB_TITLE: \"สำนักการวางผังและพัฒนาเมือง กรุงเทพมหานคร\",\r\n        MENU_TITLE: \"ระบบจัดการผูัใช้งาน\",\r\n    },\r\n    CMS: {\r\n        TITLE: \"ระบบภูมิสารสนเทศบนระบบเครือข่าย\",\r\n        SUB_TITLE: \"สำนักการวางผังและพัฒนาเมือง กรุงเทพมหานคร\",\r\n        MENU_TITLE: \"\",\r\n    },\r\n};\r\n\r\nexport const HEADER_EXPORT_REPORT = {\r\n    // CMP: \"ระบบสอบถามผังเมืองรวม กรุงเทพมหานคร\",\r\n    CMP: \"ระบบตรวจสอบผังเมืองรวมและข้อบัญญัติกรุงเทพมหานคร\",\r\n    PMR1: \"ระบบแจ้งการใช้ประโยชน์ที่ดิน/เปลี่ยนแปลง (ผมร.๑)\",\r\n    CAH: \"ระบบการลงจุดแสดงตำแหน่งการอนุญาตก่อสร้างและออกรหัสประจำบ้าน\",\r\n};\r\n\r\nexport const KEY_LOCALSTORAGE = {\r\n    KEY_TOKEN_LOCAL: \"tokenCPD\",\r\n    KEY_TYPE_LOCAL: \"type\",\r\n    KEY_LOGIN_HISTORY_LOCAL: \"loginHistoryID\",\r\n};\r\n\r\nexport const BTN = {\r\n    TH: {\r\n        BACK: \"ก่อนหน้า\",\r\n        NEXT: \"หน้าต่อไป\",\r\n        OK: \"ตกลง\",\r\n        CONFIRM: \"ยืนยัน\",\r\n        CANCEL: \"ยกเลิก\",\r\n        FINISH: \"เสร็จสิ้น\",\r\n        CONFIRM_LOCATION: \"ยืนยันตำแหน่ง\",\r\n        SEND_EMAIL: \"ส่ง Email ใหม่อีกครั้ง\",\r\n        CLOSE_BUTTON_LABEL: \"ปิดหน้าต่าง\",\r\n        SEARCH: \"ค้นหา\",\r\n        EXPORT_EXCEL: \"EXCEL\",\r\n        EXPORT_PDF: \"PDF\",\r\n        SAVE: \"บันทึก\",\r\n    },\r\n    EN: {\r\n        BACK: \"Previous Page \",\r\n        NEXT: \"Next Page\",\r\n        OK: \"OK\",\r\n        CONFIRM: \"Confirm\",\r\n        CANCEL: \"Cancel\",\r\n        FINISH: \"Finish\",\r\n        CONFIRM_LOCATION: \"Confirm Location\",\r\n        SEND_EMAIL: \"Send Email\",\r\n        CLOSE_BUTTON_LABEL: \"Close\",\r\n        SEARCH: \"Search\",\r\n        EXPORT_EXCEL: \"EXCEL\",\r\n        EXPORT_PDF: \"PDF\",\r\n    },\r\n};\r\n\r\nexport const MONTH = [\r\n    { id: 1, name: \"มกราคม\" },\r\n    { id: 2, name: \"กุมภาพันธ์\" },\r\n    { id: 3, name: \"มีนาคม\" },\r\n    { id: 4, name: \"เมษายน\" },\r\n    { id: 5, name: \"พฤษภาคม\" },\r\n    { id: 6, name: \"มิถุนายน\" },\r\n    { id: 7, name: \"กรกฏาคม\" },\r\n    { id: 8, name: \"สิงหาคม\" },\r\n    { id: 9, name: \"กันยายน\" },\r\n    { id: 10, name: \"ตุลาคม\" },\r\n    { id: 11, name: \"พฤศจิกายน\" },\r\n    { id: 12, name: \"ธันวาคม\" },\r\n];\r\n\r\nexport const EVALUATION_REPORT_LEGEND_COLOR = [\r\n    {\r\n        id: 5,\r\n        name: \"พึงพอใจมากที่สุด\",\r\n        color: \"#6949FF\",\r\n    },\r\n    {\r\n        id: 4,\r\n        name: \"พึงพอใจมาก\",\r\n        color: \"#4EB7FF\",\r\n    },\r\n    {\r\n        id: 3,\r\n        name: \"พึงพอใจปานกลาง\",\r\n        color: \"#5CE952\",\r\n    },\r\n    {\r\n        id: 2,\r\n        name: \"พึงพอใจน้อย\",\r\n        color: \"#FFFB2A\",\r\n    },\r\n    {\r\n        id: 1,\r\n        name: \"พึงพอใจน้อยที่สุด\",\r\n        color: \"#FFAD22\",\r\n    },\r\n];\r\n\r\nexport const SPECIFY_COORDINATE_MODE = {\r\n    LAT_LONG: {\r\n        id: \"M01\",\r\n        name: \"ละติจูด ลองจิจูด\",\r\n    },\r\n    DMS: {\r\n        id: \"M02\",\r\n        name: \"องศา ลิปดา ฟิลิปดา\",\r\n    },\r\n    UTM: {\r\n        id: \"M03\",\r\n        name: \"UTM WGS 1984 47N\",\r\n    },\r\n};\r\n\r\nexport const MEASUREMENT_UNIT = {\r\n    area: {\r\n        squareKilometers: {\r\n            name: \"ตารางกิโลเมตร\",\r\n            value: \"square-kilometers\",\r\n        },\r\n        squareMeters: {\r\n            name: \"ตารางเมตร\",\r\n            value: \"square-meters\",\r\n        },\r\n        raiNagnSquarWa: {\r\n            name: \"ไร่, งาน, ตารางวา\",\r\n            value: \"rai-ngan-squarWa\",\r\n        },\r\n    },\r\n    distance: {\r\n        kilometers: {\r\n            name: \"กิโลเมตร\",\r\n            value: \"kilometers\",\r\n        },\r\n        meters: {\r\n            name: \"เมตร\",\r\n            value: \"meters\",\r\n        },\r\n    },\r\n    location: {\r\n        longLat: {\r\n            name: \"Latitude, Longitude\",\r\n            value: \"long-lat\",\r\n        },\r\n        mercator: {\r\n            name: \"Web Mercator\",\r\n            value: \"mercator\",\r\n        },\r\n        utmZ47: {\r\n            name: \"WGS 1984 Zone 47\",\r\n            value: \"utm-z47\",\r\n        },\r\n    },\r\n};\r\n\r\n// export const BASEMAPGALLERY = [\r\n//     {\r\n//         id: 1,\r\n//         title: \"แผนที่ฐาน สวพ.\",\r\n//         type: \"\",\r\n//         //url: [\"https://bmaportal.cdg.co.th/arcgis/rest/services/cache/IMAGE_FGDS4000T/MapServer\"],\r\n//         url: [\"https://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer\"],\r\n//         thumbnailUrl: \"https://bmawebgis.cdg.co.th/BMA_CPUDD/img/maptools/tn_fgds4000t.jpg\"\r\n//     },\r\n//     {\r\n//         id: 2,\r\n//         title: \"ภาพดาวเทียม พ.ศ. 2561\",\r\n//         type: \"\",\r\n//         //url: [\"https://bmaportal.cdg.co.th/arcgis/rest/services/cache/IMAGE_IMAGERY/MapServer\"],\r\n//         url: [\"https://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer\"],\r\n//         thumbnailUrl: \"https://bmawebgis.cdg.co.th/BMA_CPUDD/img/maptools/tn_image.jpg\"\r\n//     },\r\n//     {\r\n//         id: 3,\r\n//         title: \"Topographic\",\r\n//         type: \"\",\r\n//         url: [\"https://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer\"],\r\n//         thumbnailUrl: \"https://www.arcgis.com/sharing/rest/content/items/ae94c49012e14587af9f943e572ac429/info/thumbnail/topo_map_2.jpg\"\r\n//     },\r\n//     {\r\n//         id: 4,\r\n//         title: \"Streets\",\r\n//         type: \"\",\r\n//         url: [\"https://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer\"],\r\n//         thumbnailUrl: \"https://www.arcgis.com/sharing/rest/content/items/f787aa5ae13646bcb4f06ba387cfcf89/info/thumbnail/world_street_map.jpg\"\r\n//     },\r\n//     {\r\n//         id: 5,\r\n//         title: \"Imagery\",\r\n//         type: \"\",\r\n//         url: [\"https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer\"],\r\n//         thumbnailUrl: \"https://www.arcgis.com/sharing/rest/content/items/070a81e7e1214c5baf668a3291dabc0c/info/thumbnail/tempimagery.jpg\"\r\n//     },\r\n//     {\r\n//         id: 6,\r\n//         title: \"Imagery with Labels\",\r\n//         type: \"\",\r\n//         url: [\"https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer\"],\r\n//         thumbnailUrl: \"https://www.arcgis.com/sharing/rest/content/items/070a81e7e1214c5baf668a3291dabc0c/info/thumbnail/tempimagery.jpg\"\r\n//     },\r\n//     {\r\n//         id: 7,\r\n//         title: \"Dark Gray Canvas\",\r\n//         type: \"\",\r\n//         url: [\"https://services.arcgisonline.com/arcgis/rest/services/Canvas/World_Dark_Gray_Base/MapServer\",\r\n//         \"https://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Reference/MapServer\"],\r\n//         thumbnailUrl: \"https://www.arcgis.com/sharing/rest/content/items/62d7053c24204615bb92666ed87925b9/info/thumbnail/DGCanvasBase.png\"\r\n//     },\r\n//     {\r\n//         id: 8,\r\n//         title: \"Light Gray Canvas\",\r\n//         type: \"\",\r\n//         url: [\"https://services.arcgisonline.com/arcgis/rest/services/Canvas/World_Light_Gray_Base/MapServer\",\r\n//         \"https://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Reference/MapServer\"],\r\n//         thumbnailUrl: \"https://www.arcgis.com/sharing/rest/content/items/3a6042cda02749beb00fe225341fe0c9/info/thumbnail/light_gray_canvas.jpg\"\r\n//     },\r\n//     {\r\n//         id: 9,\r\n//         title: \"National Geographic\",\r\n//         type: \"\",\r\n//         url: [\"https://services.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer\"],\r\n//         thumbnailUrl: \"https://www.arcgis.com/sharing/rest/content/items/f943aafc532045148910f2f4a890550d/info/thumbnail/natgeo.jpg\"\r\n//     },\r\n//     {\r\n//         id: 10,\r\n//         title: \"Terrain with Labels\",\r\n//         type: \"\",\r\n//         url: [\"https://services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Reference_Overlay/MapServer\"],\r\n//         thumbnailUrl: \"https://www.arcgis.com/sharing/rest/content/items/3df08a17e1db4e5480f3112478546612/info/thumbnail/terrain_labels.jpg\"\r\n//     },\r\n//     {\r\n//         id: 11,\r\n//         title: \"Oceans\",\r\n//         type: \"\",\r\n//         url: [\"https://services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer\",\r\n//         \"https://services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Reference/MapServer\"],\r\n//         thumbnailUrl: \"https://www.arcgis.com/sharing/rest/content/items/3e9fe46efc1c4688b1e255106bd3b86f/info/thumbnail/tempoceans.jpg\"\r\n//     },\r\n//     {\r\n//         id: 12,\r\n//         title: \"OpenStreetMap\",\r\n//         type: \"OpenStreetMap\",\r\n//         url: [\"https://c.tile.openstreetmap.org/\"],\r\n//         thumbnailUrl: \"https://www.arcgis.com/sharing/rest/content/items/4aa2f3b443d4445b821de962d28aa3d6/info/thumbnail/temposm.jpg\"\r\n//     }\r\n// ]\r\n\r\nexport const LIST_MENU_LAYOUT_MAP = {\r\n    SEARCH: \"Search\",\r\n    MAP: \"Map\",\r\n    MENU: \"Menu\",\r\n};\r\n\r\nexport const MEASUREMENT_DRAW_MODE = {\r\n    location: \"location\",\r\n    distance: \"distance\",\r\n    area: \"area\",\r\n};\r\n\r\nexport const MEASUREMENT_TYPE_DRAW = {\r\n    point: \"point\",\r\n    polyline: \"polyline\",\r\n    polygon: \"polygon\",\r\n};\r\n\r\nexport const LAT_LONG_BKK = {\r\n    latMin: 13.494273888826921,\r\n    latMax: 13.951978350406907,\r\n    longMin: 100.32618858582009,\r\n    longMax: 100.9396540372135,\r\n};\r\n\r\nexport const DEFAULT_EXTENT_BKK = {\r\n    xmin: 11168260.226603428,\r\n    xmax: 11236550.888271807,\r\n    ymin: 1516258.9127864982,\r\n    ymax: 1568707.7248344242,\r\n};\r\n\r\nexport const RESOURCEWORDS = {\r\n    IMPORT_SHAPE_TEXT: {\r\n        MAXIMUM_UPLOAD_FILE: \"ขนาดไฟล์สูงสุดไม่เกิน 10MB\",\r\n        FILE_TYPE_ACCEPT: \"อัพโหลดไฟล์เฉพาะ .zip เท่านั้น\",\r\n        DATA_MORE_ONE_RING: \"รองรับขอบเขตพื้นที่ปิด 1 รายการ\",\r\n        DATA_MORE_ONE_FEATURE: \"รองรับขอบเขตพื้นที่ปิด 1 รายการ\", //มากกว่า 1 feature\r\n        DATA_MORE_ONE_LAYER: \"ข้อมูลมีมากกว่า 1 ชั้นข้อมูล\", //มากกว่า 1 layer\r\n        DATA_IS_NOT_POLYGON: \"ข้อมูลไม่ใช่รูปปิด\",\r\n        CAN_NOT_READ_FILE: \"ไม่สามารถอ่านไฟล์ได้\",\r\n        INVALID_DATA: \"ข้อมูล Shape ไม่ถูกต้อง\",\r\n        NO_FEATURES_IN_LAYER: \"ไม่พบข้อมูล Features ในชั้นข้อมูล\",\r\n        MISSIONG_DBF: \"ไม่พบไฟล์ .dbj ใน Shapefile ที่ Upload\",\r\n        MISSIONG_PRJ: \"ไม่พบไฟล์ .prj ใน Shapefile ที่ Upload\",\r\n        MISSIONG_SHP: \"ไม่พบไฟล์ .shp ใน Shapefile ที่ Upload\",\r\n        MISSIONG_SHX: \"ไม่พบไฟล์ .shx ใน Shapefile ที่ Upload\",\r\n        MISSIONG_SHX_SHP_DBF:\r\n            \"ไม่พบไฟล์ .shx หรือ .shp หรือ .dbf ใน Shapefile ที่ Upload\",\r\n        ERROR_FILE: \"Shapefile ไม่สมบูรณ์\",\r\n        CONNECT_FAIL: \"การเชื่อมต่อผิดพลาด กรุณาลองใหม่อีกครั้ง\",\r\n    },\r\n    DRAW_GRAPHIC_HEADER: \"วาดกราฟฟิค\",\r\n    //General Text\r\n    GENERAL_TEXT: {\r\n        SEARCH: \"ค้นหา\",\r\n    },\r\n\r\n    //gotolocation\r\n    GOTOLOCATION_HEADER: \"ไปยังตำแหน่ง\",\r\n    GOTOLOCATION_PROJECTION: \"ระบุ ค่าพิกัด\",\r\n    GOTOLOCATION_LATITUDE: \"Latitude\",\r\n    GOTOLOCATION_LONGITUDE: \"Longitude\",\r\n    GOTOLOCATION_LAT_LONG: \"Latitude,Longitude\",\r\n    GOTOLOCATION_X: \"X\",\r\n    GOTOLOCATION_Y: \"Y\",\r\n    GOTOLOCATION_GO: \"ไปยังตำแหน่ง\",\r\n\r\n    //basemap\r\n    BASEMAP_GALLERY: \"แผนที่ฐาน\",\r\n\r\n    //measurement\r\n    MEASUREMENT_HEADER: \"เครื่องมือวัด\",\r\n\r\n    ERROR_TEXT: {\r\n        MORE_THAN_VALUE: \"กรุณาระบุจำนวนไม่เกิน 9,999\",\r\n        NO_EMPTY: \"กรุณาระบุข้อมูล\",\r\n        NO_EMPTY_2: \"ระบุข้อมูล\",\r\n        EMAIL_FAILED: \"รูปแบบอีเมล์ไม่ถูกต้อง\",\r\n        CONFIRM_PASSWORD_FAILED: \"รหัสผ่านไม่ตรงกัน\",\r\n        PASSWORD_LIMIT_DIGIT:\r\n            \"กรุณาระบุตัวอักษรหรือตัวเลข อย่างน้อย 6-20 ตัวอักษร\",\r\n        NAME_LIMIT_DIGIT: \"กรอกตัวอักษรได้ไม่เกิน 100 ตัว\",\r\n        CITIZENID_FAILED: \"เลขบัตรประชาชนไม่ถูกต้อง\", //\"กรุณาระบุเลขประจำตัวประชานชน  13 หลัก\"\r\n        CHANODE_LIMIT_DIGIT: \"กรุณาระบุ 1-10 ตัวอักษร\",\r\n        ACTIVITY_LIMIT_DIGIT: \"กรุณาระบุ 1-100 ตัวอักษร\",\r\n        HOUSE_NO_LIMIT_DIGIT: \"ระบุไม่เกิน 20 ตัวอักษร\",\r\n        ALLEY_NO_LIMIT_DIGIT: \"ระบุไม่เกิน 100 ตัวอักษร\",\r\n        ROAD_NO_LIMIT_DIGIT: \"ระบุไม่เกิน 100 ตัวอักษร\",\r\n        USE_AREA_FAILED: \"พื้นที่ใช้ประโยชน์มากกว่าขนาดแปลงที่ดิน\",\r\n        NGAN_LIMIT_DIGIT: \"0 - 3\",\r\n        SQ_WA_LIMIT_DIGIT: \"0 - 99\",\r\n        NOT_NUMBER: \"กรุณาระบุตัวเลขเท่านั้น\",\r\n        LAT_DEGREES_LIMIT_DIGIT: \"13 เท่านั้น\",\r\n        LONG_DEGREES_LIMIT_DIGIT: \"0 - 100\",\r\n        MINUTES_LIMIT_DIGIT: \"0 - 60\",\r\n        MINUTES_LIMIT_DIGIT_SURVEY: \"0 - 50\",\r\n        MINUTES_LIMIT_DIGIT_SURVEY_BL_NAME: \"กรุณาระบุข้อมูลได้ไม่เกิน 150\",\r\n        MINUTES_LIMIT_DIGIT_SURVEY_BL_VILLAGE: \"กรุณาระบุข้อมูลได้ไม่เกิน 35\",\r\n        MINUTES_LIMIT_DIGIT_SURVEY_BL_POSTCODE: \"ระบุข้อมูลได้ไม่เกิน 5\",\r\n        SECONDS_LIMIT_DIGIT: \"0 - 60\",\r\n        VALIDATION_MAP_NAME_FAIL: \"กรุณาระบุข้อมูล 1 - 100 ตัวอักษร\",\r\n        VALIDATION_MAP_DESC_FAIL: \"กรุณาระบุข้อมูล 1 - 200 ตัวอักษร\",\r\n        MORE_THAN_ONE: \"กรุณาระบุจำนวนมากกว่า 1\",\r\n        NOT_MATCH_TYPE: \"ไม่สัมพันธ์กับการ run เลขที่บ้าน\",\r\n        LIMIT_DIGIT_10: \"กรอกตัวอักษรได้ไม่เกิน 10 ตัว\",\r\n        LIMIT_DIGIT_20: \"กรอกตัวอักษรได้ไม่เกิน 20 ตัว\",\r\n        LIMIT_STR_3: \"กรอกตัวอักษรได้ไม่เกิน 3 ตัว\",\r\n        HOUSEID_LIMIT_DIGIT: \"กรอกตัวเลข 11 หลักเท่านั้น\",\r\n        HAVE_DUPLICATE_HOUSE_NO: \"เลขที่บ้านหรือรหัสประจำบ้านซ้ำ\",\r\n        MOO_ERROR: \"กรุณาระบุหมู่ให้ถูกต้อง\",\r\n        DUPLICATE_NAME: \"มีชื่อนี้ในระบบแล้ว กรุณาระบุชื่อใหม่\",\r\n        WRONG_FORMAT__HOUSE: \"กรุณาระบุเลขที่บ้านให้ถูกต้อง\",\r\n    },\r\n\r\n    REGISTER: {\r\n        REGISTER_FAIL:\r\n            \"ขออภัย เกิดข้อผิดพลาดในการลงทะเบียน กรุณาลองใหม่อีกครั้ง\",\r\n        REGISTER_EXITS: \"ขออภัย พบผู้ใช้งานนี้ในระบบแล้ว กรุณาระบุ e-mail ใหม่\",\r\n    },\r\n\r\n    LOGIN: {\r\n        LOGIN_NOT_ACTIVATED:\r\n            \"โปรดตรวจสอบ e-mail กรุณายืนยันตัวตน ก่อนเข้าใช้ระบบบริหารจัดการภูมิสารสนเทศบนระบบเครือข่าย\",\r\n        LOGIN_WRONG_PASSWORD:\r\n            \"ชื่อผู้ใช้หรือรหัสผ่านไม่ถูกต้อง กรุณาลองใหม่อีกครั้ง\",\r\n        LOGIN_USERNAME_NOT_FOUND: \"ไม่พบชื่อผู้ใช้งาน กรุณาลองใหม่อีกครั้ง\",\r\n        LOGIN_FIAL: \"การเข้าสู่ระบบผิดพลาด กรุณาลองใหม่อีกครั้ง\",\r\n    },\r\n};\r\n\r\nexport const TYPEOFPROJECTION = [\r\n    { id: 1, name: \"UTM WGS 1984 Zone 47N\" },\r\n    { id: 2, name: \"Web Mercator\" },\r\n    { id: 3, name: \"Geographic Coordinate\" },\r\n];\r\n\r\nexport const TITLE_TAB_BROWSER = {\r\n    SURVEY: \"CPUDD - Survey\",\r\n    CMP: \"CPUDD - CMP\",\r\n    CAH: \"CPUDD - CAH\",\r\n    PMR1: \"CPUDD - PMR\",\r\n    UM: \"CPUDD - UM\",\r\n    CMS: \"CPUDD\", // portal,login\r\n};\r\n\r\nexport const TOC_SUFFIX_ID = {\r\n    TOPIC_LAYER: \"_topicTOC\",\r\n    BMA_LAYER: \"_bmaTOC\",\r\n    DEFAULT_LAYER: \"_defaultTOC\",\r\n};\r\n\r\nexport const ADD_LAYER_TOC_MODE = {\r\n    // BMALayer: \"ชั้นข้อมูลระบบบริหารจัดการพื้นที่เขตในกรุงเทพมหานคร\",\r\n    KML: \"KML, KMZ\",\r\n    WMS: \"WMS\",\r\n    WFS: \"WFS\",\r\n    RESTService: \"Rest Service ArcGIS\",\r\n};\r\n\r\nexport const OPTION_IMPORT_KML = {\r\n    URL: \"url\",\r\n    UPLOAD: \"upload\",\r\n};\r\n\r\nexport const TABLE_MAPSHEET1K = {\r\n    PMR1_PNT: \"PMR1_PNT\",\r\n    CONSTRUCT_PNT: \"CONSTRUCT_PNT\",\r\n    HOUSE_PNT: \"HOUSE_PNT\",\r\n    DRAFT_BLDG: \"DRAFT_BLDG\",\r\n    DRAFT_LINE: \"DRAFT_LINE\",\r\n    DRAFT_PNT: \"DRAFT_PNT\",\r\n    LANDMARK: \"LANDMARK\",\r\n};\r\n\r\nexport const FUNCTION_CONTROL = {\r\n    MENU: \"MENU\",\r\n    MAP: \"MAP\",\r\n    OTHER: \"OTHER\",\r\n};\r\n\r\nexport const NOT_DISPLAY_FIELD_LIST = [\r\n    //notDisplayFieldList\r\n    \"OBJECTID\",\r\n    \"OBJECTID_1\",\r\n    \"SHAPE\",\r\n    \"SHAPE.AREA\",\r\n    \"SHAPE.LEN\",\r\n    \"CREATOR\",\r\n    \"UPDATER\",\r\n    \"USER_ID\",\r\n    // ,\r\n    // \"CREATED_DATE\",\r\n    // \"UPDATED_DATE\"\r\n];\r\n\r\nexport const ACTIVE_FUNCTION = {\r\n    ADD_GP_FORM: \"ADD_GP_FORM\",\r\n    EDIT_GP_FORM: \"EDIT_GP_FORM\",\r\n    ASK_PNT: \"ASK_PNT\",\r\n    ASK_POLYGON: \"ASK_POLYGON\",\r\n};\r\n\r\n// ########################### PMR CONSTANTS ###########################\r\n\r\nexport const PROFILE_GROUP_TYPE = {\r\n    OFFICER: {\r\n        id: \"GID1\",\r\n        name: \"เจ้าหน้าที่\",\r\n    },\r\n    PEOPLE: {\r\n        id: \"GID2\",\r\n        name: \"บุคคลทั่วไป\",\r\n    },\r\n    PEOPLE_WITH_PROFILE: {\r\n        id: \"GID3\",\r\n        name: \"ประชาชนที่ลงทะเบียน\",\r\n    },\r\n};\r\n\r\nexport const MODE_SET_POSITION = {\r\n    clickMap: {\r\n        id: \"clickMap\",\r\n        name: \"Click บนแผนที่\",\r\n    },\r\n    currentLocation: {\r\n        id: \"currentLocation\",\r\n        name: \"ตำแหน่งปัจจุบัน\",\r\n    },\r\n    specifyCoordinate: {\r\n        id: \"specifyCoordinate\",\r\n        name: \"ระบุค่าพิกัด\",\r\n    },\r\n};\r\n\r\nexport const PMR_EDIT_STAFF = [\r\n    { ID: 1, value: \"1\", name: \"รหัสคำร้อง\" },\r\n    { ID: 2, value: \"2\", name: \"ชื่อผู้แจ้ง\" },\r\n    { ID: 3, value: \"3\", name: \"เขต,แขวง \" },\r\n    { ID: 4, value: \"4\", name: \"วันที่แจ้ง\" },\r\n];\r\n// ########################### CMP CONSTANTS ###########################\r\nexport const LAYER_ID = {\r\n    CPUDD_QUERY_PLAN: \"CPUDD_QUERY_PLAN\", //ใช้แสดงผล layer ที่เปิดจากรายงานสถิติการขอรับบริการตรวจสอบผังเมือง\r\n};\r\n\r\nexport const SATISFACTION_RATING = [\r\n    { ID: 5, value: \"5\", name: \"5 - พึงพอใจมากที่สุด\" },\r\n    { ID: 4, value: \"4\", name: \"4 - พึงพอใจมาก\" },\r\n    { ID: 3, value: \"3\", name: \"3 - พึงพอใจปานกลาง\" },\r\n    { ID: 2, value: \"2\", name: \"2 - พึงพอใจน้อย\" },\r\n    { ID: 1, value: \"1\", name: \"1 - พึงพอใจน้อยที่สุด\" },\r\n];\r\n\r\nexport const MENU_HEADER_STAFF = {\r\n    portal: \"กลับสู่หน้าหลัก\",\r\n    logout: \"ออกจากระบบ\",\r\n};\r\n\r\nexport const MENU_DISABLE_USER = [\"FUNC15\"];\r\n\r\nexport const TYPE_SEARCH_LAND_INFORMATION = {\r\n    DISTRICT: \"เลขโฉนดที่ดิน + เขต\",\r\n    SURVEY_NO: \"เลขโฉนดที่ดิน + หน้าสำรวจ\",\r\n    SHEET_NO: \"เลขที่ดิน + ระวาง 1:1,000\",\r\n};\r\n\r\n// ########################### CHA CONSTANTS ###########################\r\nexport const MENU_CONSTRUCTION_LICENSE = {\r\n    clickMap: {\r\n        id: \"clickMap\",\r\n        name: \"Click บนแผนที่\",\r\n    },\r\n    currentLocation: {\r\n        id: \"currentLocation\",\r\n        name: \"ตำแหน่งปัจจุบัน\",\r\n    },\r\n    specifyCoordinate: {\r\n        id: \"specifyCoordinate\",\r\n        name: \"ระบุค่าพิกัด\",\r\n    },\r\n};\r\n\r\n// ######################### CAH HOUSE #############################\r\nexport const MENU_HOUSENUMBER = {\r\n    clickMap: {\r\n        id: \"clickMap\",\r\n        name: \"Click บนแผนที่\",\r\n    },\r\n    currentLocation: {\r\n        id: \"currentLocation\",\r\n        name: \"ตำแหน่งปัจจุบัน\",\r\n    },\r\n    specifyCoordinate: {\r\n        id: \"specifyCoordinate\",\r\n        name: \"ระบุค่าพิกัด\",\r\n    },\r\n    landPlot: {\r\n        id: \"landPlot\",\r\n        name: \"ระบุแปลงที่ดิน\",\r\n    },\r\n};\r\n\r\nexport const RUN_HOUSE_NO_METHOD = [\r\n    { id: 1, name: \"ปกติ\" },\r\n    { id: 2, name: \"เฉพาะเลขคู่\" },\r\n    { id: 3, name: \"เฉพาะเลขคี่\" },\r\n];\r\n\r\nexport const SEARCH_CONSTRUCT = {\r\n    SEARCH_FROM: {\r\n        CONSTRUCT_NO: \"เลขที่ใบอนุญาต (อ.1)\",\r\n        HOUSE_RT_NO: \"เลขที่ใบรับแจ้ง (กทม.6)\",\r\n    },\r\n};\r\n\r\n//alert constant\r\nexport const ALERT_MESSAGE = {\r\n    POPUP: {\r\n        OUT_OF_BKK:\r\n            \"ตำแหน่งที่กำหนดอยู่นอกเขตกรุงเทพมหานคร กรุณาระบุตำแหน่งใหม่\",\r\n        POINT_OUT_OF_PERMISSION:\r\n            \"ตำแหน่งที่กำหนดอยู่นอกเขตพื้นที่รับผิดชอบ กรุณาระบุตำแหน่งใหม่\",\r\n        SAVE_SUCCESS: \"บันทึกสำเร็จ\",\r\n        SAVE_FAIL: \"บันทึกไม่สำเร็จ\",\r\n        SYSTEM_ERROR: \"เกิดข้อผิดพลาดจากระบบ\",\r\n        REQUEST_PIN_MAP: \"กรุณาระบุตำแหน่งบนแผนที่\",\r\n        DELETE_SUCCESS: \"ลบสำเร็จ\",\r\n        DELETE_FAIL: \"ลบไม่สำเร็จ\",\r\n        OUT_OF_LAND: \"กำหนดพื้นที่ได้มากสุด\", // เพิ่มจำนวนแล้วตามด้วยหน่วย\r\n    },\r\n    QUESTION: {\r\n        SAVE_IN_EDIT_MODE: \"คุณต้องการบันทึกการแก้ไข?\",\r\n        CANCEL_FORM: \"คุณต้องการกลับสู่เมนูก่อนหน้า?\",\r\n        DELETE: \"คุณต้องการลบ\",\r\n        WARNING_POINT:\r\n            \"เขตและแขวงไม่สอดคล้องกับตำแหน่งบนแผนที่ คุณต้องการทำต่อหรือไม่\",\r\n    },\r\n};\r\n\r\n//########################## USERMANAGEMENT CONSTANTS #######################\r\nexport const BREADCRUMB_MENU_UM = {\r\n    USER: [\"จัดการผู้ใช้งาน\"],\r\n    USER_EDIT: [\"จัดการผู้ใช้งาน\", \"แก้ไขผู้ใช้งาน\"],\r\n    USER_ADD: [\"จัดการผู้ใช้งาน\", \"เพิ่มผู้ใช้งาน\"],\r\n\r\n    USER_GROUP: [\"จัดการกลุ่มผู้ใช้งาน\"],\r\n    USER_GROUP_ADD: [\"จัดการกลุ่มผู้ใช้งาน\", \"เพิ่มกลุ่มผู้ใช้งาน\"],\r\n    USER_GROUP_EDIT: [\"จัดการกลุ่มผู้ใช้งาน\", \"แก้ไขกลุ่มผู้ใช้งาน\"],\r\n\r\n    REPORT_LOGIN: [\"ออกรายงานการเข้าใช้งาน\"],\r\n};\r\n\r\nexport const STATUS_USER = [\r\n    { value: \"0\", name: \"ปิดการใช้งาน\" },\r\n    { value: \"1\", name: \"ใช้งานปกติ\" },\r\n];\r\n\r\n//------------------- draw graphic ----------------------//\r\nexport const DRAW_GRAPHIC_MODE = {\r\n    point: \"point\",\r\n    line: \"line\",\r\n    polygon: \"polygon\",\r\n    circle: \"circle\",\r\n    text: \"text\",\r\n};\r\n\r\nexport const TYPE_OF_FONT = [\r\n    { id: 1, name: \"Tahoma\" },\r\n    { id: 2, name: \"Palatino Linotype\" },\r\n    { id: 3, name: \"Times New Roman\" },\r\n    { id: 4, name: \"Arial\" },\r\n    { id: 5, name: \"Comic Sans MS\" },\r\n    { id: 6, name: \"Impact\" },\r\n    { id: 7, name: \"Georgia\" },\r\n];\r\n\r\nexport const TYPE_OF_STYLE_POINT = [\r\n    { id: 1, name: \"CROSS\" },\r\n    { id: 2, name: \"CIRCLE\" },\r\n    { id: 3, name: \"SQUARE\" },\r\n    { id: 4, name: \"DIAMOND\" },\r\n    { id: 5, name: \"X\" },\r\n];\r\n\r\nexport const TYPE_OF_STYLE_LINE = [\r\n    { id: 1, name: \"SOLID\", esri: \"Solid\" },\r\n    { id: 2, name: \"DASH\", esri: \"Dash\" },\r\n    { id: 3, name: \"DOT\", esri: \"Dot\" },\r\n    { id: 4, name: \"DASHDOT\", esri: \"DashDot\" },\r\n    { id: 5, name: \"DASHDOTDOT\", esri: \"DashDotDot\" },\r\n    { id: 6, name: \"LONGDASH\", esri: \"LongDash\" },\r\n    { id: 7, name: \"LONGDASHDOT\", esri: \"LongDashDot\" },\r\n    { id: 8, name: \"SHORTDASH\", esri: \"ShortDash\" },\r\n    { id: 9, name: \"SHORTDASHDOT\", esri: \"ShortDashDot\" },\r\n    { id: 10, name: \"SHORTDASHDOTDOT\", esri: \"ShortDashDotDot\" },\r\n    { id: 11, name: \"SHORTDOT\", esri: \"ShortDot\" },\r\n];\r\n\r\nexport const TYPE_OF_STYLE_POLYGON_CIRCLE = [\r\n    { id: 1, name: \"SOLID\" },\r\n    { id: 2, name: \"FORWARD\" },\r\n    { id: 3, name: \"BACKWARD\" },\r\n    { id: 4, name: \"CROSS\" },\r\n    { id: 5, name: \"HORIZONTAL\" },\r\n    { id: 6, name: \"VERTICAL\" },\r\n    { id: 7, name: \"NULL\" },\r\n];\r\n\r\nexport const MAP_TOOLS = {\r\n    CURRENT_LOCATION: {\r\n        NAME: \"CURRENT_LOCATION\",\r\n    },\r\n    ZOOM_IN: {\r\n        NAME: \"ZOOM_IN\",\r\n    },\r\n    ZOOM_OUT: {\r\n        NAME: \"ZOOM_OUT\",\r\n    },\r\n    DRAW_GRAPHIC: {\r\n        NAME: \"DRAW_GRAPHIC\",\r\n        SUB_MENU: {\r\n            POINT: \"POINT\",\r\n            LINE: \"LINE\",\r\n            POLYGON: \"POLYGON\",\r\n            CIRCLE: \"CIRCLE\",\r\n        },\r\n    },\r\n    CLEAR_GRAPHIC: {\r\n        NAME: \"CLEAR_GRAPHIC\",\r\n        SUB_MENU: {\r\n            CLEAR_ALL: \"CLEAR_ALL\",\r\n            CLEAR_SELECT: \"CLEAR_SELECT\",\r\n        },\r\n    },\r\n    BASE_MAP: {\r\n        NAME: \"BASE_MAP\",\r\n    },\r\n    GOTO_LOCATION: {\r\n        NAME: \"GOTO_LOCATION\",\r\n    },\r\n    MEASUREMENT: {\r\n        NAME: \"MEASUREMENT\",\r\n    },\r\n    TOC: {\r\n        NAME: \"TOC\",\r\n    },\r\n    IMPORT_FILE: {\r\n        NAME: \"IMPORT_FILE\",\r\n        SUB_MENU: {\r\n            KML: \"KML\",\r\n            WMS: \"WMS\",\r\n        },\r\n    },\r\n    EXPORT_FILE: {\r\n        NAME: \"EXPORT_FILE\",\r\n    },\r\n    PRINT_MAP: {\r\n        NAME: \"PRINT_MAP\",\r\n    },\r\n    QUERY_BUILDER: {\r\n        NAME: \"QUERY_BUILDER\",\r\n    },\r\n    SPATIAL_SEARCH: {\r\n        NAME: \"SPATIAL_SEARCH\",\r\n        SUB_MENU: {\r\n            POLYGON: \"POLYGON\",\r\n            RECTANGLE: \"RECTANGLE\",\r\n            CIRCLE: \"CIRCLE\",\r\n        },\r\n    },\r\n    IDENTIFY: {\r\n        NAME: \"แสดงรายละเอียดข้อมูล\",\r\n    },\r\n};\r\n\r\nexport const SUBMIT_ERROR_MEASSAGE = {\r\n    MSG_01: \"กรุณากรอกข้อมูลที่จำเป็น (*) ให้ครบถ้วน\",\r\n    MSG_02: \"กรุณากรอกข้อมูลให้ถูกต้อง\",\r\n};\r\n\r\nexport const CPUDD_EDITING_LAYER = {\r\n    MAPSERVICE_URL:\r\n        \"https://bmawebgis.cdg.co.th/mapstandard/rest/services/bma/CPUDD_Editing/MapServer/\",\r\n    PMR_MAPSERVICE_ID: 0,\r\n};\r\n\r\nexport const FOOTER_REPORT =\r\n    \"พัฒนาโดยสำนักงานภูมิสารสนเทศ สำนักการวางผังและพัฒนาเมือง\";\r\n","export default {\r\n    root: \"/\",\r\n    rootCMP: \"/CMP\",\r\n    rootPMR: \"/PMR\",\r\n    rootCAH: \"/CAH\",\r\n\r\n    CMSHome: \"/CMSHome\",\r\n    CMSLogin: \"/CMSLogin\",\r\n    CMSLoginStaff: \"/CMSLogin?type=o\",\r\n    CMSPortal: \"/CMSPortal\",\r\n    CMSFormResetPassword: \"/CMSformResetPassword\",\r\n\r\n    CMPWeb: \"/CMPWeb\",\r\n    CMPWebStaff: \"/CMPWeb?type=o\",\r\n\r\n    CMPMobile: \"/CMPMobile\",\r\n    CMPMobileCurrent: \"/CMPMobileCurrent\",\r\n\r\n    CAHWeb: \"/CAHWeb\",\r\n\r\n    PMRLogin: \"/PMRLogin\",\r\n    PMRWeb: \"/PMRWeb\",\r\n    PMRRegister: \"/PMRRegister\",\r\n    PMRActivateUser: \"/PMRActivateUser\",\r\n\r\n    SurveyWeb: \"/SurveyWeb\",\r\n\r\n    UM: \"/Usermanagement\",\r\n    UMUser: \"/Usermanagement/User\",\r\n    UMUserGroup: \"/Usermanagement/UserGroup\",\r\n    UMReportLogin: \"/Usermanagement/ReportLogin\",\r\n};\r\n","import * as actionTypes from '../../../Constants/ActionTypes';\r\n\r\nconst initialState = {\r\n  mapFunction: null,\r\n  onExtentChangeFunction: null,\r\n  onIdentifyClickMap: null,\r\n  onClickMapFunction: null,\r\n  onDrawGraphic: false,\r\n  onClearSelectGraphic: false,\r\n  onZoomInFunction: null,\r\n  onZoomOutFunction: null,\r\n  onMouseMoveMapFunction: null,\r\n  mapFunctionParams: {},\r\n  onMouseMoveCoordinateFunction: null,\r\n  onShowDataTableOSS: false,\r\n};\r\n\r\nexport default (state = initialState, action) => {\r\n  switch (action.type) {\r\n    case actionTypes.MAP_COMMAND:\r\n      return {\r\n        ...state,\r\n        mapFunction: action.mapFunction,\r\n        mapFunctionParams: action.mapFunctionParams,\r\n      };\r\n    case actionTypes.CLEAR_MAP_COMMAND:\r\n      return {\r\n        ...state,\r\n        mapFunction: action.mapFunction,\r\n        mapFunctionParams: action.mapFunctionParams,\r\n      };\r\n    case actionTypes.BIND_EVT_EXTENT_CHANGE:\r\n      return {\r\n        ...state,\r\n        onExtentChangeFunction: action.onExtentChangeFunction,\r\n      };\r\n    case actionTypes.BIND_EVT_CLICK_MAP:\r\n      return {\r\n        ...state,\r\n        onClickMapFunction: action.onClickMapFunction,\r\n      };\r\n    case actionTypes.BIND_EVT_IDENTIFY_CLICK_MAP:\r\n      return {\r\n        ...state,\r\n        onIdentifyClickMap: action.onIdentifyClickMap,\r\n      };\r\n    case actionTypes.BIND_EVT_ZOOM_IN:\r\n      return {\r\n        ...state,\r\n        onZoomInFunction: action.onZoomInFunction,\r\n      };\r\n    case actionTypes.BIND_EVT_ZOOM_OUT:\r\n      return {\r\n        ...state,\r\n        onZoomOutFunction: action.onZoomOutFunction,\r\n      };\r\n    case actionTypes.BIND_EVT_ENABLE_CLEAR_SELECT_GRAPHIC:\r\n      return {\r\n        ...state,\r\n        onClearSelectGraphic: true,\r\n      };\r\n    case actionTypes.BIND_EVT_DISABLE_CLEAR_SELECT_GRAPHIC:\r\n      return {\r\n        ...state,\r\n        onClearSelectGraphic: false,\r\n      };\r\n    case actionTypes.BIND_EVT_ENABLE_DRAW_GRAPHIC:\r\n      return {\r\n        ...state,\r\n        onDrawGraphic: true,\r\n      };\r\n    case actionTypes.BIND_EVT_DISABLE_DRAW_GRAPHIC:\r\n      return {\r\n        ...state,\r\n        onDrawGraphic: false,\r\n      };\r\n    case actionTypes.BIND_EVT_MOUSE_MOVE:\r\n      return {\r\n        ...state,\r\n        onMouseMoveMapFunction: action.onMouseMoveMapFunction,\r\n      };\r\n    case actionTypes.BIND_EVT_MOUSE_MOVE_COORDINATE:\r\n      return {\r\n        ...state,\r\n        onMouseMoveCoordinateFunction: action.onMouseMoveCoordinateFunction,\r\n      };\r\n    case actionTypes.CLEAR_REDUCER:\r\n      return initialState;\r\n    case actionTypes.BIND_EVT_ON_SHOW_DATA_TABLE_OSS:\r\n      return {\r\n        ...state,\r\n        onShowDataTableOSS: action,\r\n      };\r\n    default:\r\n      return state;\r\n  }\r\n};\r\n","import * as actionTypes from '../../Constants/ActionTypes';\r\n\r\nconst panelMapTool = {\r\n  //สำหรับตัว maptool ที่สามารถเปิดได้เพียงครั้งละหนึ่ง (ต้องเอาไปใส่ใน initailize ด้วย)\r\n  GoToLocationFormVisible: false,\r\n  BasemapGalleryVisible: false,\r\n  TocVisible: false,\r\n  MeasurementVisible: false,\r\n  Printmap: false,\r\n  Identify: false,\r\n  DrawGraphicVisible: false,\r\n  CearGraphicVisible: false,\r\n  ZoomToScaleVisible: false,\r\n  MapToolVisible: true,\r\n  // ActiveFucntion: null\r\n};\r\n\r\nconst initailize = {\r\n  // ###### PANEL MAP TOOLS ######\r\n  GoToLocationFormVisible: false,\r\n  BasemapGalleryVisible: false,\r\n  TocVisible: false,\r\n  MeasurementVisible: false,\r\n  Printmap: false,\r\n  Identify: false,\r\n  DrawGraphicVisible: false,\r\n  CearGraphicVisible: false,\r\n  ZoomToScaleVisible: false,\r\n  MapToolVisible: true,\r\n\r\n  // ###### ICON BTN MAP TOOLS ######\r\n  BtnPrintmapVisible: false,\r\n\r\n  // ###### MENU BOTTON FOR MOBILE ######\r\n  Panel: true,\r\n  Map: false,\r\n  Search: false,\r\n  ActiveFunction: null,\r\n};\r\n\r\nexport default (state = initailize, action) => {\r\n  switch (action.type) {\r\n    // ##### MAP TOOLS #####\r\n    case actionTypes.OPEN_MENU_GOTO_LOCATION:\r\n      return { ...state, ...panelMapTool, GoToLocationFormVisible: true };\r\n    case actionTypes.CLOSE_MENU_GOTO_LOCATION:\r\n      return { ...state, GoToLocationFormVisible: false };\r\n    case actionTypes.OPEN_MENU_BASEMAP_GALLERY:\r\n      return { ...state, ...panelMapTool, BasemapGalleryVisible: true };\r\n    case actionTypes.CLOSE_MENU_BASEMAP_GALLERY:\r\n      return { ...state, BasemapGalleryVisible: false };\r\n    case actionTypes.OPEN_MENU_TOC:\r\n      return { ...state, ...panelMapTool, TocVisible: true };\r\n    case actionTypes.CLOSE_MENU_TOC:\r\n      return { ...state, TocVisible: false };\r\n    case actionTypes.OPEN_MENU_MEASUREMENT:\r\n      return {\r\n        ...state,\r\n        ...panelMapTool,\r\n        MeasurementVisible: true,\r\n        ActiveFunction: null,\r\n      };\r\n    case actionTypes.CLOSE_MENU_MEASUREMENT:\r\n      return { ...state, MeasurementVisible: false };\r\n    case actionTypes.OPEN_MENU_DRAWGRAPHIC:\r\n      return {\r\n        ...state,\r\n        ...panelMapTool,\r\n        DrawGraphicVisible: true,\r\n        ActiveFunction: null,\r\n      };\r\n    case actionTypes.CLOSE_MENU_DRAWGRAPHIC:\r\n      return { ...state, DrawGraphicVisible: false };\r\n    case actionTypes.OPEN_MENU_PRINTMAP:\r\n      return { ...state, ...panelMapTool, Printmap: true };\r\n    case actionTypes.CLOSE_MENU_PRINTMAP:\r\n      return { ...state, Printmap: false };\r\n    case actionTypes.OPEN_BTN_PRINTMAP:\r\n      return { ...state, BtnPrintmapVisible: true };\r\n    case actionTypes.CLOSE_BTN_PRINTMAP: //กรณีซ่อมปุ่ม printmap ให้ปิด panel printmap ไปด้วย\r\n      return { ...state, BtnPrintmapVisible: false, Printmap: false };\r\n    case actionTypes.OPEN_IDENTIFY:\r\n      return {\r\n        ...state,\r\n        ...panelMapTool,\r\n        Identify: true,\r\n        ActiveFunction: null,\r\n      };\r\n    case actionTypes.CLOSE_IDENTIFY:\r\n      return { ...state, Identify: false };\r\n    case actionTypes.OPEN_CLEAR_GRAPHIC:\r\n      return { ...state, ...panelMapTool, CearGraphicVisible: true };\r\n    case actionTypes.CLOSE_CLEAR_GRAPHIC:\r\n      return { ...state, CearGraphicVisible: false };\r\n    case actionTypes.OPEN_ZOOM_TO_SCALE:\r\n      return { ...state, ...panelMapTool, ZoomToScaleVisible: true };\r\n    case actionTypes.CLOSE_ZOOM_TO_SCALE:\r\n      return { ...state, ZoomToScaleVisible: false };\r\n    case actionTypes.ACTIVE_FUNCTION:\r\n      return {\r\n        ...state,\r\n        // ...panelMapTool,\r\n        Identify: false,\r\n        MeasurementVisible: false,\r\n        DrawGraphicVisible: false,\r\n        ActiveFunction: action.name,\r\n      };\r\n    case actionTypes.OPEN_MAP_TOOL:\r\n      return {\r\n        ...state,\r\n        MapToolVisible: true,\r\n      };\r\n    case actionTypes.CLOSE_MAP_TOOL:\r\n      return {\r\n        ...state,\r\n        MapToolVisible: false,\r\n      };\r\n\r\n    // ##### PANEL FOR MOBILE #####\r\n    case actionTypes.OPEN_MENU_PANEL:\r\n      return { ...state, Panel: true };\r\n    case actionTypes.CLOSE_MENU_PANEL:\r\n      return { ...state, Panel: false };\r\n    case actionTypes.OPEN_MENU_MAP:\r\n      return { ...state, Map: true };\r\n    case actionTypes.CLOSE_MENU_MAP:\r\n      return { ...state, Map: false };\r\n    case actionTypes.OPEN_MENU_SEARCH:\r\n      return { ...state, Search: true };\r\n    case actionTypes.CLOSE_MENU_SEARCH:\r\n      return { ...state, Search: false };\r\n\r\n    case actionTypes.SET_MOBILE_VIEW:\r\n      return { ...state, MobileView: true };\r\n    case actionTypes.SET_SHORTCUT:\r\n      return { ...state, Shortcut: !state.Shortcut };\r\n\r\n    case actionTypes.CLEAR_REDUCER:\r\n      return initailize;\r\n    default:\r\n      return state;\r\n  }\r\n};\r\n","import * as actionTypes from \"../../../Constants/ActionTypes\";\r\n\r\nconst initialState = {\r\n\ttocLayer: null,\r\n\tselectedNoParentToc: [],//เก็บ layer ปกติที่ไม่มี parent\r\n\tselectedHaveParentToc: [], //เก็บ layer ที่มี parent\r\n\tselectedSublayerToc: [] //เก็บ sublayer\r\n};\r\n\r\nconst tocReducer = (state = initialState, action) => {\r\n\tswitch (action.type) {\r\n\t\tcase actionTypes.SAVE_TOC_LAYER:\r\n\t\t\treturn {\r\n\t\t\t\t...state,\r\n\t\t\t\ttocLayer: action.data\r\n\t\t\t};\r\n\t\tcase actionTypes.SAVE_HAVE_NO_PARENT_TOC_LAYER:\r\n\t\t\treturn {\r\n\t\t\t\t...state,\r\n\t\t\t\tselectedNoParentToc: action.data\r\n\t\t\t};\r\n\t\tcase actionTypes.SAVE_HAVE_PARENT_TOC_LAYER:\r\n\t\t\treturn {\r\n\t\t\t\t...state,\r\n\t\t\t\tselectedHaveParentToc: action.data\r\n\t\t\t};\r\n\t\tcase actionTypes.SAVE_SUB_LAYER_TOC:\r\n\t\t\treturn {\r\n\t\t\t\t...state,\r\n\t\t\t\tselectedSublayerToc: action.data\r\n\t\t\t};\r\n\t\tcase actionTypes.CLEAR_REDUCER:\r\n\t\t\treturn initialState;\r\n\r\n\t\tdefault:\r\n\t\t\treturn state;\r\n\t}\r\n};\r\n\r\nexport default tocReducer;","//######################## ALL ACTION TYPE ########################\r\n//map\r\nexport const MAP_COMMAND = 'MAP_COMMAND';\r\nexport const CLEAR_MAP_COMMAND = 'CLEAR_MAP_COMMAND';\r\nexport const BIND_EVT_EXTENT_CHANGE = 'BIND_EVT_EXTENT_CHANGE';\r\nexport const BIND_EVT_CLICK_MAP = 'BIND_EVT_CLICK_MAP';\r\nexport const BIND_EVT_IDENTIFY_CLICK_MAP = 'BIND_EVT_IDENTIFY_CLICK_MAP';\r\nexport const BIND_EVT_ZOOM_IN = 'BIND_EVT_ZOOM_IN';\r\nexport const BIND_EVT_ZOOM_OUT = 'BIND_EVT_ZOOM_OUT';\r\nexport const BIND_EVT_ENABLE_DRAW_GRAPHIC = 'BIND_EVT_ENABLE_DRAW_GRAPHIC';\r\nexport const BIND_EVT_DISABLE_DRAW_GRAPHIC = 'BIND_EVT_DISABLE_DRAW_GRAPHIC';\r\nexport const BIND_EVT_ENABLE_CLEAR_SELECT_GRAPHIC = 'BIND_EVT_ENABLE_CLEAR_SELECT_GRAPHIC';\r\nexport const BIND_EVT_DISABLE_CLEAR_SELECT_GRAPHIC = 'BIND_EVT_DISABLE_CLEAR_SELECT_GRAPHIC';\r\nexport const BIND_EVT_MOUSE_MOVE = 'BIND_EVT_MOUSE_MOVE';\r\nexport const BIND_EVT_MOUSE_MOVE_COORDINATE = 'BIND_EVT_MOUSE_MOVE_COORDINATE';\r\nexport const BIND_EVT_ON_SHOW_DATA_TABLE_OSS = 'BIND_EVT_ON_SHOW_DATA_TABLE_OSS';\r\n\r\n//menu\r\nexport const OPEN_MENU_GOTO_LOCATION = 'OPEN_MENU_GOTO_LOCATION';\r\nexport const CLOSE_MENU_GOTO_LOCATION = 'CLOSE_MENU_GOTO_LOCATION';\r\nexport const OPEN_MENU_BASEMAP_GALLERY = 'OPEN_MENU_BASEMAP_GALLERY';\r\nexport const CLOSE_MENU_BASEMAP_GALLERY = 'CLOSE_MENU_BASEMAP_GALLERY';\r\nexport const OPEN_MENU_MEASUREMENT = 'OPEN_MENU_MEASUREMENT';\r\nexport const CLOSE_MENU_MEASUREMENT = 'CLOSE_MENU_MEASUREMENT';\r\nexport const OPEN_MENU_DRAWGRAPHIC = 'OPEN_MENU_DRAWGRAPHIC';\r\nexport const CLOSE_MENU_DRAWGRAPHIC = 'CLOSE_MENU_DRAWGRAPHIC';\r\nexport const OPEN_MENU_TOC = 'OPEN_MENU_TOC';\r\nexport const CLOSE_MENU_TOC = 'CLOSE_MENU_TOC';\r\nexport const SAVE_TOC_LAYER = 'SAVE_TOC_LAYER';\r\nexport const OPEN_MENU_PANEL = 'OPEN_MENU_PANEL';\r\nexport const CLOSE_MENU_PANEL = 'CLOSE_MENU_PANEL';\r\nexport const OPEN_MENU_MAP = 'OPEN_MENU_MAP';\r\nexport const CLOSE_MENU_MAP = 'CLOSE_MENU_MAP';\r\nexport const OPEN_MENU_SEARCH = 'OPEN_MENU_SEARCH';\r\nexport const CLOSE_MENU_SEARCH = 'CLOSE_MENU_SEARCH';\r\nexport const SAVE_HAVE_PARENT_TOC_LAYER = 'SAVE_HAVE_PARENT_TOC_LAYER';\r\nexport const SAVE_HAVE_NO_PARENT_TOC_LAYER = 'SAVE_HAVE_NO_PARENT_TOC_LAYER';\r\nexport const SAVE_SUB_LAYER_TOC = 'SAVE_SUB_LAYER_TOC';\r\nexport const OPEN_MENU_PRINTMAP = 'OPEN_MENU_PRINTMAP';\r\nexport const CLOSE_MENU_PRINTMAP = 'CLOSE_MENU_PRINTMAP';\r\nexport const OPEN_BTN_PRINTMAP = 'OPEN_BTN_PRINTMAP';\r\nexport const CLOSE_BTN_PRINTMAP = 'CLOSE_BTN_PRINTMAP';\r\nexport const OPEN_IDENTIFY = 'OPEN_IDENTIFY';\r\nexport const CLOSE_IDENTIFY = 'CLOSE_IDENTIFY';\r\nexport const OPEN_CLEAR_GRAPHIC = 'OPEN_CLEAR_GRAPHIC';\r\nexport const CLOSE_CLEAR_GRAPHIC = 'CLOSE_CLEAR_GRAPHIC';\r\nexport const OPEN_ZOOM_TO_SCALE = 'OPEN_ZOOM_TO_SCALE';\r\nexport const CLOSE_ZOOM_TO_SCALE = 'CLOSE_ZOOM_TO_SCALE';\r\nexport const ACTIVE_FUNCTION = 'ACTIVE_FUNCTION';\r\nexport const CLOSE_MAP_TOOL = 'CLOSE_MAP_TOOL';\r\nexport const OPEN_MAP_TOOL = 'OPEN_MAP_TOOL';\r\n\r\n//Panel\r\nexport const SET_OPEN_PANEL = 'SET_OPEN_PANEL';\r\nexport const SET_CURRENT_PANEL_PAGE = 'SET_CURRENT_PANEL_PAGE';\r\nexport const SET_PMR1_ID = 'SET_PMR1_ID';\r\nexport const CLEAR_PMR1_ID = 'CLEAR_PMR1_ID';\r\n\r\n//authen\r\nexport const GET_LOGIN = 'GET_LOGIN';\r\nexport const CLEAR_USER_PROFILE = 'CLEAR_USER_PROFILE';\r\nexport const CLEAR_REDUCER = 'CLEAR_REDUCER';\r\nexport const UPDATE_SYSTEM = 'UPDATE_SYSTEM';\r\nexport const CLEAR_PROFILE = 'CLEAR_PROFILE';\r\n\r\n//New TOC\r\nexport const ADD_NEW_TOC_LAYER = 'ADD_NEW_TOC_LAYER';\r\nexport const ADD_NEW_TOC_BG_LAYER = 'ADD_NEW_TOC_BG_LAYER';\r\nexport const ADD_NEW_TOC_MINORTOPIC_LAYER = 'ADD_NEW_TOC_MINORTOPIC_LAYER';\r\nexport const SET_CURRENT_TOC_PARENT_EXPANDED_PANEL = 'SET_CURRENT_TOC_PARENT_EXPANDED_PANEL';\r\nexport const CHK_PARENT_OPEN_TOC_LAYER_ITM = 'CHK_PARENT_OPEN_TOC_LAYER_ITM';\r\nexport const CHK_PARENT_OPEN_TOC_BG_LAYER_ITM = 'CHK_PARENT_OPEN_TOC_BG_LAYER_ITM';\r\nexport const INITIALIZE_TOC_FROM_MINOR_TOPIC = 'INITIALIZE_TOC_FROM_MINOR_TOPIC';\r\nexport const REMOVE_TOC_TOPIC_LAYER = 'REMOVE_TOC_TOPIC_LAYER';\r\nexport const SET_DISABLE_LIST_TOC_LAYER = 'SET_DISABLE_LIST_TOC_LAYER';\r\nexport const SET_TOC_LIST_CHECKED = 'SET_TOC_LIST_CHECKED';\r\nexport const SET_TOC_LIST_UNCHECKED = 'SET_TOC_LIST_UNCHECKED';\r\nexport const GET_LIST_DEFAULT_LAYER = 'GET_LIST_DEFAULT_LAYER';\r\nexport const REMOVE_TOC_LAYER_ITEM = 'REMOVE_TOC_LAYER_ITEM';\r\nexport const REMOVE_TOC_BG_LAYER_ITEM = 'REMOVE_TOC_BG_LAYER_ITEM';\r\nexport const SET_TOC_LIST_LAYER = 'SET_TOC_LIST_LAYER';\r\nexport const SET_TOC_LIST_BG_LAYER = 'SET_TOC_LIST_BG_LAYER';\r\nexport const CLEAR_TOC_REDUCER = 'CLEAR_TOC_REDUCER';\r\n\r\n//######################## PMR ACTION TYPE ########################\r\n//submit pmr\r\nexport const SET_LAND_DETAIL = 'SET_LAND_DETAIL';\r\nexport const SET_FORM_STEP_ONE = 'SET_FORM_STEP_ONE';\r\nexport const SET_FORM_STEP_TWO = 'SET_FORM_STEP_TWO';\r\nexport const SET_FORM_STEP_THREE = 'SET_FORM_STEP_THREE';\r\nexport const SET_FORM_STEP_FOUR = 'SET_FORM_STEP_FOUR';\r\nexport const CLEAR_FORM_STEP = 'CLEAR_FORM_STEP';\r\nexport const SET_DISTRICT_PMR1_ID = 'SET_DISTRICT_PMR1_ID';\r\nexport const SET_STATUS_FOUR = 'SET_STATUS_FOUR';\r\nexport const DATA_PMR = 'DATA_PMR';\r\nexport const UPDATE_PMR_FORM = 'UPDATE_PMR_FORM';\r\nexport const SET_ADMINPOLY_STEP_THREE = 'SET_ADMINPOLY_STEP_THREE';\r\n\r\n//######################## CMP ACTION TYPE ########################\r\n//ask the city plan\r\nexport const SAVE_DATA_ASKTHECITYPLAN = 'SAVE_DATA_ASKTHECITYPLAN';\r\nexport const CLEAR_DATA_ASKTHECITYPLAN = 'CLEAR_DATA_ASKTHECITYPLAN';\r\n\r\n//SatisfactionAndStatistic\r\nexport const SAVE_SESSION_ID = 'SAVE_SESSION_ID';\r\nexport const UPDATE_SATISFACTION_STATUS = 'UPDATE_SATISFACTION_STATUS';\r\nexport const UPDATE_STATISTIC_STATUS = 'UPDATE_STATISTIC_STATUS';\r\n\r\n//######################## CAH ACTION TYPE ########################\r\n//construction license\r\nexport const SET_CONSTRUCTION_LICENSE_STEP_ONE = 'SET_CONSTRUCTION_LICENSE_STEP_ONE';\r\nexport const SET_CONSTRUCTION_LICENSE_STEP_TWO = 'SET_CONSTRUCTION_LICENSE_STEP_TWO';\r\nexport const SET_CONSTRUCTION_LICENSE_GEOMETRY = 'SET_CONSTRUCTION_LICENSE_GEOMETRY';\r\nexport const SET_CONSTRUCTION_LICENSE_ADMINPOLY = 'SET_CONSTRUCTION_LICENSE_ADMINPOLY';\r\nexport const SET_DEFAULT_CONSTRUCTION_LICENSE = 'SET_DEFAULT_CONSTRUCTION_LICENSE';\r\n\r\nexport const CLEAR_FORM_CONSTRUCTION_LICENSE = 'CLEAR_FORM_CONSTRUCTION_LICENSE';\r\nexport const SAVE_LU_APPLICATION_TYPE = 'SAVE_LU_APPLICATION_TYPE';\r\nexport const SAVE_LU_CONSTRUCT_TYPE = 'SAVE_LU_CONSTRUCT_TYPE';\r\nexport const SAVE_LU_BLDG_MATERIAL = 'SAVE_LU_BLDG_MATERIAL';\r\nexport const SAVE_LU_ACTIVITY = 'SAVE_LU_ACTIVITY';\r\nexport const SAVE_VALUE_FROM_PMR = 'SAVE_VALUE_FROM_PMR';\r\n\r\n//House Number\r\nexport const SAVE_HOUSE_NUMBER_STEP_ONE = 'SAVE_HOUSE_NUMBER_STEP_ONE';\r\nexport const SAVE_HOUSE_NUMBER_STEP_TWO = 'SAVE_HOUSE_NUMBER_STEP_TWO';\r\nexport const CLEAR_FORM_HOUSE_NUMBER = 'CLEAR_FORM_HOUSE_NUMBER';\r\nexport const SAVE_DISTRICT_AND_SUBDISTRICT = 'SAVE_DISTRICT_AND_SUBDISTRICT';\r\nexport const SAVE_GEOMETRY_TR900 = 'SAVE_GEOMETRY_TR900';\r\nexport const SAVE_DATA_FOR_INITAIL_EDIT_FORM = 'SAVE_DATA_FOR_INITAIL_EDIT_FORM';\r\n\r\n// Search OSS\r\nexport const GET_DATA_SEARCH_OSS_TABLE = 'GET_DATA_SEARCH_OSS_TABLE';\r\nexport const GET_FILTER_RESULT_SEARCH_OSS = 'GET_FILTER_RESULT_SEARCH_OSS';\r\n\r\n// MarkPointSTR\r\nexport const GET_DATA_HOUSE_LIST_STR = 'GET_DATA_HOUSE_LIST_STR';\r\n\r\n//######################## USERMANAGEMENT ######################\r\n// layout\r\nexport const SET_MENU_BREADCRUMB = 'SET_MENU_BREADCRUMB';\r\nexport const CLEAR_MENU_BREADCRUMB = 'CLEAR_MENU_BREADCRUMB';\r\n\r\nexport const SET_MOBILE_VIEW = 'SET_MOBILE_VIEW';\r\nexport const SET_SHORTCUT = 'SET_SHORTCUT';\r\n","import * as actionTypes from \"../../../Constants/ActionTypes\";\r\n\r\nconst initailize = {\r\n    // openPanel: true, //boolean, true = open, false = not open\r\n    currentPage: null, //หน้า Menu หลัก\r\n    pmrID: null//PMRID ส่งจาก ADD ไป VIEW\r\n};\r\n\r\nexport default (state = initailize, action) => {\r\n    switch (action.type) {\r\n        case actionTypes.SET_CURRENT_PANEL_PAGE:\r\n            return { ...state, currentPage: action.functionID }\r\n        case actionTypes.CLEAR_REDUCER:\r\n            return initailize;\r\n        case actionTypes.SET_PMR1_ID:\r\n            return { ...state, pmrID: action.pmrID }\r\n        default:\r\n            return state;\r\n    }\r\n}","import * as actionTypes from \"../../Constants/ActionTypes\";\r\n\r\nconst initialState = {\r\n    isLogin: false,\r\n    profile: null,\r\n    system: null\r\n};\r\n\r\nconst authenReducer = (state = initialState, action) => {\r\n    switch (action.type) {\r\n        case actionTypes.GET_LOGIN:\r\n            return {\r\n                ...state,\r\n                isLogin: action.isLogin,\r\n                profile: action.profile,\r\n                system: action.system\r\n            };\r\n        case actionTypes.UPDATE_PMR_FORM:\r\n            return {\r\n                ...state,\r\n                profile: { ...state.profile, pmr1Form: action.pmr1Form }\r\n            }\r\n        case actionTypes.UPDATE_SYSTEM:\r\n            return {\r\n                ...state,\r\n                system: action.system\r\n            }\r\n        case actionTypes.CLEAR_PROFILE:\r\n            return initialState;\r\n        default:\r\n            return state;\r\n    }\r\n};\r\n\r\nexport default authenReducer;","import * as actionTypes from \"../../../Constants/ActionTypes\";\r\n\r\nconst initailize = {\r\n    stepOne: {},\r\n    stepTwo: {\r\n        chanode: [{}]\r\n    },\r\n    stepThree: {},\r\n    stepFour: {},\r\n    geometry: {},\r\n    status: null\r\n    // districtPMR1ID: null\r\n};\r\n\r\nexport default (state = initailize, action) => {\r\n    switch (action.type) {\r\n        case actionTypes.SET_LAND_DETAIL:\r\n            return {\r\n                ...state,\r\n                stepThree: {\r\n                    ...state.stepThree,\r\n                    lupZone: action.data.lupZone,\r\n                    lupColor: action.data.lupColor,\r\n                    lupUse: action.data.lupUse,\r\n                    lupSubZone: action.data.lupSubZone,\r\n                    lupFar: action.data.lupFar,\r\n                    lupOsr: action.data.lupOsr,\r\n                    lupUserNo: action.data.lupUserNo,\r\n                    // district: action.data.district,\r\n                    // subDistrict: action.data.subDistrict,\r\n                    province: action.data.province\r\n                },\r\n                geometry: action.geometry\r\n            }\r\n        // case actionTypes.SET_DISTRICT_PMR1_ID:\r\n        //     return { ...state, districtPMR1ID: action.data }\r\n\r\n        case actionTypes.SET_ADMINPOLY_STEP_THREE:\r\n            return {\r\n                ...state, stepThree: {\r\n                    ...state.stepThree,\r\n                    district: action.data.district,\r\n                    subDistrict: action.data.subDistrict,\r\n                    province: action.data.province\r\n                }\r\n            }\r\n\r\n        case actionTypes.SET_FORM_STEP_ONE:\r\n            // console.log('action.data',action.data)\r\n            return { ...state, stepOne: action.data }\r\n\r\n        case actionTypes.SET_FORM_STEP_TWO:\r\n            return { ...state, stepTwo: action.data }\r\n\r\n        case actionTypes.SET_FORM_STEP_THREE:\r\n            return { ...state, stepThree: { ...state.stepThree, ...action.data } }\r\n\r\n        case actionTypes.SET_FORM_STEP_FOUR:\r\n            return { ...state, stepFour: action.data }\r\n        case actionTypes.SET_STATUS_FOUR:\r\n            return { ...state, status: action.data }\r\n        case actionTypes.CLEAR_FORM_STEP:\r\n            return initailize\r\n        case actionTypes.CLEAR_REDUCER:\r\n            return initailize;\r\n        default:\r\n            return state;\r\n    }\r\n}\r\n\r\n// stepOne: {\r\n//     date: \"2019-03-18\"\r\n//     other: \"www\"\r\n//     parameterAt: \"Geotalent\"\r\n//     parameterName: \"Todsaporn Sangpook\"\r\n//     parameterRadioOne: \"9\"\r\n//     parameterRadioTwo: \"1\"\r\n//     pmr1id: \"00000000000000000445\"\r\n//     userid: \"UID4\"\r\n// }\r\n\r\n// stepTwo: {\r\n//     chanode: [{\r\n//         chanodengan: \"2\"\r\n//         chanodeno: \"t1\"\r\n//         chanoderai: \"1\"\r\n//         chanodewa: \"3\"\r\n//         landno: \"t3\"\r\n//         surveyno: \"t2\"\r\n//         usengan: \"5\"\r\n//         userai: \"4\"\r\n//         usewa: \"6\"\r\n//     }]\r\n// }\r\n\r\n// stepThree:{\r\n//     alley: \"จรัญสนิทวงศ์13\"\r\n//     district: \"16\"\r\n//     forBusiness: \"ก่อสร้างอาคาร 2 ชั้น\"\r\n//     houseNo: \"992\"\r\n//     province: \"10\"\r\n//     road: \"จรัญสนิทวงศ์\"\r\n//     subDistrict: \"02\"\r\n//     villageNo: \"1\"\r\n\r\n//     lupColor: \"สีแดง\"\r\n//     lupFar: \"0\"\r\n//     lupOsr: \"0\"\r\n//     lupSubZone: \"พ.๕-๗\"\r\n//     lupUse: \"พาณิชยกรรม\"\r\n//     lupUserNo: 2000\r\n//     lupZone: \"พ.๕\"\r\n// }\r\n\r\n//stepFour:{\r\n\r\n// }","import * as actionTypes from \"../../../Constants/ActionTypes\";\r\n\r\nconst initailize = {\r\n    canon: [],\r\n    landUse: [],\r\n    other: []\r\n}\r\n\r\nexport default (state = initailize, action) => {\r\n    switch (action.type) {\r\n        case actionTypes.SAVE_DATA_ASKTHECITYPLAN:\r\n            return {\r\n                canon: action.data.canon,\r\n                landUse: action.data.landUse,\r\n                other: action.data.other\r\n            };\r\n        case actionTypes.CLEAR_DATA_ASKTHECITYPLAN:\r\n            return initailize;\r\n        default:\r\n            return state;\r\n    }\r\n}","import * as actionTypes from \"../../../Constants/ActionTypes\";\r\n\r\nconst initailize = {\r\n    sessionId:null,\r\n    satisfactionStatus:false, //ความพึงพอใจ\r\n    statisticStatus:false // สถิติ\r\n}\r\n\r\nexport default (state = initailize, action) => {\r\n    switch (action.type) {\r\n        case actionTypes.SAVE_SESSION_ID:\r\n            return{...state, sessionId: action.sessionId};\r\n\r\n        case actionTypes.UPDATE_SATISFACTION_STATUS:\r\n            return{...state, satisfactionStatus: action.status};\r\n\r\n        case actionTypes.UPDATE_STATISTIC_STATUS:\r\n            return{...state, statisticStatus: action.status};\r\n                \r\n        // case actionTypes.CLEAR_DATA_ASKTHECITYPLAN:\r\n            // return initailize;\r\n        default:\r\n            return state;\r\n    }\r\n}","import * as ActionTypes from \"../../../Constants/ActionTypes\";\r\nimport { TOC_SUFFIX_ID } from '../../../Constants/Constants';\r\n\r\nconst initialState = {\r\n    listDefaultLayer: [], // รายการ layer ที่ได้จาก service (เอาไปใช้ใน query builder ด้วย)\r\n\r\n    // listCreateBMALayer: [], //ใช้สำหรับ new Layer ที่มาจาก BMALayer UI\r\n    listCreateMinorTopicLayer: [],//ใช้สำหรับ New Layer ที่มาจากการเล่น MinorTopicLayer\r\n\r\n    currentParentExpandPanel: null,//เก็บ Expand (Accordian) ที่เปิดอยู่ล่าสุด\r\n    currentInterestedTopic: {//เก็บหัวข่้อของ Topic ที่กำลังสนใจ\r\n        majorID: null,\r\n        minorID: null\r\n    },\r\n\r\n    // ########## WORKING LAYER ##################\r\n    listCheckedLayer: [], //เก็บ ID ที่ check (idTOC)\r\n    listLayer: [], //รวม ทุก Layer มีผลต่อการแสดงผล UI TOCList (graphic, feature, kml, wfs)\r\n    listDisableTOC: [], //disable รายการบน TOC อันนี้เป็น list of idTOC\r\n\r\n    // ########## BACKGROUND LAYER ###############\r\n    listCheckedBgLayer: [], //เก็บ ID ที่ check background layer (idTOC)\r\n    listBgLayer: [], //เก็บ background layer (wms,rest)\r\n};\r\n\r\nconst NewTOCReducer = (state = initialState, action) => {\r\n    switch (action.type) {\r\n        case ActionTypes.GET_LIST_DEFAULT_LAYER:\r\n            return {\r\n                ...state,\r\n                listDefaultLayer: action.listDefaultLayer\r\n            }\r\n\r\n        //การปิดหรือเปิด expanded (Parent)\r\n        case ActionTypes.SET_CURRENT_TOC_PARENT_EXPANDED_PANEL:\r\n            return {\r\n                ...state,\r\n                currentParentExpandPanel: action.id\r\n            }\r\n\r\n        //เพิ่มหัวเรื่องอันใหม่เข้ามา\r\n        case ActionTypes.ADD_NEW_TOC_LAYER: //working layer\r\n            return {\r\n                ...state,\r\n                listLayer: [...action.listLayer, ...state.listLayer],\r\n                currentParentExpandPanel: null\r\n            }\r\n        case ActionTypes.ADD_NEW_TOC_BG_LAYER: //background layer\r\n            return {\r\n                ...state,\r\n                listBgLayer: [...action.listBgLayer, ...state.listBgLayer],\r\n                // currentParentExpandPanel: null\r\n            }\r\n        case ActionTypes.INITIALIZE_TOC_FROM_MINOR_TOPIC:\r\n\r\n            //กรองเอาแต่ข้อมูลที่มาจากการเพิ่มชั้นข้อมูล (ข้อมูลที่ checked listCheckedLayer)\r\n            const listCheckedBMALayer = state.listCheckedLayer.filter(itm => {\r\n                return itm.indexOf(TOC_SUFFIX_ID.TOPIC_LAYER) < 0;\r\n            });\r\n\r\n            //กรองเอาแต่ข้อมูลที่มาจากการเพิ่มชั้นข้อมูล (ข้อมูลทั้งหมด listLayer)\r\n            const listBMALayer = state.listLayer.filter(itm => {\r\n                return itm.idTOC.indexOf(TOC_SUFFIX_ID.TOPIC_LAYER) < 0;\r\n            })\r\n\r\n            return {\r\n                ...state,\r\n\r\n                //เก็บช้อมูลที่จะเอาไปสร้าง (new Layer)\r\n                listCreateMinorTopicLayer: action.listLayer,\r\n\r\n                //เอาเฉพาะ BMALayer ไว้\r\n                listCheckedLayer: listCheckedBMALayer,\r\n\r\n                //เอา Layer ในหัวข้ออันใหม่เข้ามา และยังคง Layer ที่มาจากการเพิ่มชั้นข้อมูล (BMALayer)\r\n                listLayer: [...action.listLayer, ...listBMALayer],\r\n\r\n                listDisableTOC: [],\r\n\r\n                //ปิด Expand ทั้งหมด\r\n                currentParentExpandPanel: null,\r\n\r\n                //เก็บหัวข้อที่สนใจอันใหม่\r\n                currentInterestedTopic: {\r\n                    majorID: action.majorID,\r\n                    minorID: action.minorID\r\n                }\r\n            }\r\n\r\n        //จัดการกับการ Check หรือ Uncheck\r\n        case ActionTypes.CHK_PARENT_OPEN_TOC_LAYER_ITM: //working layer\r\n            const listLayer = [...state.listCheckedLayer];\r\n            //หาตำแหน่งข้อมูล\r\n            const indexOfTargetLayer = listLayer.indexOf(action.idTOC);\r\n            if (indexOfTargetLayer > -1) {//เจอตำแหน่ง แสดงว่าถูก checked\r\n                listLayer.splice(indexOfTargetLayer, 1);//remove ตำแหน่งที่ indexOfTargetLayer ออก\r\n            }\r\n            else {//ไม่เจอตำแหน่ง แสดงว่าไม่ได้ยังไม่ถูก checked\r\n                listLayer.push(action.idTOC)\r\n            }\r\n            return {\r\n                ...state,\r\n                listCheckedLayer: listLayer\r\n            }\r\n\r\n        //จัดการกับการ Check หรือ Uncheck\r\n        case ActionTypes.CHK_PARENT_OPEN_TOC_BG_LAYER_ITM: //background layer\r\n            const listBgLayer = [...state.listCheckedBgLayer];\r\n            //หาตำแหน่งข้อมูล\r\n            const indexOfTargetBgLayer = listBgLayer.indexOf(action.idTOC);\r\n            if (indexOfTargetBgLayer > -1) {//เจอตำแหน่ง แสดงว่าถูก checked\r\n                listBgLayer.splice(indexOfTargetBgLayer, 1);//remove ตำแหน่งที่ indexOfTargetLayer ออก\r\n            }\r\n            else {//ไม่เจอตำแหน่ง แสดงว่าไม่ได้ยังไม่ถูก checked\r\n                listBgLayer.push(action.idTOC)\r\n            }\r\n            return {\r\n                ...state,\r\n                listCheckedBgLayer: listBgLayer\r\n            }\r\n\r\n        //force checked\r\n        case ActionTypes.SET_TOC_LIST_CHECKED:\r\n            let listChecked = [...state.listCheckedLayer];\r\n            action.listChecked.forEach(idTOC => {\r\n                //ยังไม่ถูก Checked อยู่แล้ว\r\n                if (listChecked.indexOf(idTOC) < 0) {\r\n                    listChecked.push(idTOC);\r\n                }\r\n            })\r\n            return {\r\n                ...state,\r\n                listCheckedLayer: listChecked\r\n            }\r\n\r\n        //force un checked\r\n        case ActionTypes.SET_TOC_LIST_UNCHECKED:\r\n            const listCheckLayerFilter = state.listCheckedLayer.filter(itm => action.listUnCheck.indexOf(itm) === -1)\r\n            return {\r\n                ...state,\r\n                listCheckedLayer: listCheckLayerFilter\r\n            }\r\n\r\n        case ActionTypes.SET_DISABLE_LIST_TOC_LAYER:\r\n            return {\r\n                ...state,\r\n                listDisableTOC: action.listIdTOC\r\n            }\r\n\r\n        //ลบเฉพาะ Topic ออกทั้งหมด\r\n        case ActionTypes.REMOVE_TOC_TOPIC_LAYER:\r\n            //กรองเอาแต่ข้อมูลที่มาจากการเพิ่มชั้นข้อมูล (ข้อมูลที่ checked listCheckedLayer)\r\n            const filterListCheckedBMALayer = state.listCheckedLayer.filter(itm => {\r\n                return itm.indexOf(TOC_SUFFIX_ID.TOPIC_LAYER) < 0;\r\n            });\r\n\r\n            //กรองเอาแต่ข้อมูลที่มาจากการเพิ่มชั้นข้อมูล (ข้อมูลทั้งหมด listLayer)\r\n            const filterListBMALayer = state.listLayer.filter(itm => {\r\n                return itm.idTOC.indexOf(TOC_SUFFIX_ID.TOPIC_LAYER) < 0;\r\n            })\r\n\r\n            return {\r\n                ...state,\r\n\r\n                //เก็บช้อมูลที่จะเอาไปสร้าง (new Layer)\r\n                listCreateMinorTopicLayer: [],\r\n                //เอาเฉพาะ BMALayer ไว้\r\n                listCheckedLayer: filterListCheckedBMALayer,\r\n                //เอา Layer ในหัวข้ออันใหม่เข้ามา และยังคง Layer ที่มาจากการเพิ่มชั้นข้อมูล (BMALayer)\r\n                listLayer: [...filterListBMALayer],\r\n\r\n                listDisableTOC: [],\r\n\r\n                //ปิด Expand ทั้งหมด\r\n                currentParentExpandPanel: null,\r\n                //เก็บหัวข้อที่สนใจอันใหม่\r\n                currentInterestedTopic: {\r\n                    majorID: null,\r\n                    minorID: null\r\n                }\r\n            }\r\n\r\n        //ลบ layer ตามรายการ\r\n        case ActionTypes.REMOVE_TOC_LAYER_ITEM: //working layer\r\n            //ลบข้อมูลออกจาก listCheckedLayer\r\n            const removeCheckedListTarget = state.listCheckedLayer.indexOf(action.idTOC);\r\n            const newListCheckedLayer = [...state.listCheckedLayer]\r\n\r\n            if (removeCheckedListTarget !== -1) {\r\n                newListCheckedLayer.splice(removeCheckedListTarget, 1)\r\n            }\r\n\r\n            //ลบข้อมูลออกจาก listLayer\r\n            const newListLayer = state.listLayer.filter(item => {\r\n                return item.idTOC !== action.idTOC\r\n            })\r\n\r\n            return {\r\n                ...state,\r\n                listCheckedLayer: newListCheckedLayer,\r\n                listLayer: newListLayer\r\n            }\r\n        //ลบ layer ตามรายการ\r\n        case ActionTypes.REMOVE_TOC_BG_LAYER_ITEM: //background layer\r\n            //ลบข้อมูลออกจาก listCheckedLayer\r\n            const removeCheckedBgListTarget = state.listCheckedBgLayer.indexOf(action.idTOC);\r\n            const newListCheckedBgLayer = [...state.listCheckedBgLayer]\r\n            newListCheckedBgLayer.splice(removeCheckedBgListTarget, 1)\r\n\r\n            //ลบข้อมูลออกจาก listLayer\r\n            const newListBgLayer = state.listBgLayer.filter(item => {\r\n                return item.idTOC !== action.idTOC\r\n            })\r\n\r\n            return {\r\n                ...state,\r\n                listCheckedBgLayer: newListCheckedBgLayer,\r\n                listBgLayer: newListBgLayer\r\n            }\r\n\r\n        case ActionTypes.SET_TOC_LIST_LAYER: //working layer\r\n            return {\r\n                ...state,\r\n                listLayer: action.listLayer\r\n            }\r\n        case ActionTypes.SET_TOC_LIST_BG_LAYER: //background layer\r\n            return {\r\n                ...state,\r\n                listBgLayer: action.listBgLayer\r\n            }\r\n        case ActionTypes.CLEAR_TOC_REDUCER:\r\n            return initialState;\r\n        default:\r\n            return state;\r\n    }\r\n};\r\n\r\nexport default NewTOCReducer;","import * as actionTypes from \"../../../Constants/ActionTypes\";\r\n\r\nconst initailize = {\r\n    stepOne: {  },\r\n    stepTwo: {  buildings: [{}]},\r\n    isFirstStepTwo:true, //สำหรับเช็คว่าเป็นการเข้ามาstep two ครั้งแรก\r\n    geometry: null,\r\n    valueFormPmr: { },\r\n    luApplicationType: [],\r\n    luConstructType: [],\r\n    luBldgMaterial: [],\r\n    luActivity: []\r\n};\r\n\r\nexport default (state = initailize, action) => {\r\n    switch (action.type) {\r\n        case actionTypes.SET_CONSTRUCTION_LICENSE_STEP_ONE:\r\n            return { ...state, stepOne: action.data }\r\n        case actionTypes.SET_CONSTRUCTION_LICENSE_STEP_TWO:\r\n            return { ...state, stepTwo: action.data ,isFirstStepTwo:false}\r\n        case actionTypes.SET_CONSTRUCTION_LICENSE_GEOMETRY:\r\n            return { ...state, geometry: action.geometry }\r\n        case actionTypes.SET_CONSTRUCTION_LICENSE_ADMINPOLY:\r\n            return { ...state, stepOne: { ...state.stepOne, districtID: action.districtID, subDistrictID: action.subDistrictID } }\r\n        case actionTypes.SET_DEFAULT_CONSTRUCTION_LICENSE:\r\n            return { ...state, geometry: action.geometry, stepOne: action.stepOne, stepTwo: action.stepTwo }\r\n        case actionTypes.CLEAR_FORM_CONSTRUCTION_LICENSE:\r\n            return { //จะไม่ clear lookup\r\n                ...initailize,\r\n                luApplicationType: state.luApplicationType,\r\n                luConstructType: state.luConstructType,\r\n                luBldgMaterial: state.luBldgMaterial,\r\n                luActivity: state.luActivity\r\n            }\r\n        case actionTypes.SAVE_LU_APPLICATION_TYPE:\r\n            return { ...state, luApplicationType: action.applicationType }\r\n        case actionTypes.SAVE_LU_CONSTRUCT_TYPE:\r\n            return { ...state, luConstructType: action.constructType }\r\n        case actionTypes.SAVE_LU_BLDG_MATERIAL:\r\n            return { ...state, luBldgMaterial: action.bldgMarerial }\r\n        case actionTypes.SAVE_LU_ACTIVITY:\r\n            return { ...state, luActivity: action.activity }\r\n        case actionTypes.SAVE_VALUE_FROM_PMR:\r\n            return { ...state, valueFormPmr: action.data,\r\n                isFirstStepTwo:true //เมื่อมีการเปลี่ยนเลข ผมร ใหม่ก็ต้องsetค่าdefualtให้ stepTwoใหม่\r\n            }\r\n        default:\r\n            return state;\r\n    }\r\n}\r\n\r\n\r\n// geometry: {\r\n//     spatialReference: { wkid: 102100, latestWkid: 3857 }\r\n//     x: 11198746.216119539\r\n//     y: 1542354.4717665813\r\n// }\r\n\r\n// stepOne: {\r\n//     applicationDate: Wed May 22 2019 15: 53: 57 GMT + 0700(เวลาอินโดจีน) { }\r\n//     applicationType: \"1\"\r\n//     constructID: \"1\"\r\n//     constructType: \"2\"\r\n//     districtID: \"28\"\r\n//     houseNo: \"บ้านเลขที่\"\r\n//     moo: \"1\"\r\n//     name: \"KITTIKUN EKIAMPHAN\"\r\n//     permissionID: \"2562\"\r\n//     pmr1ID: \"25620513101203000900\"\r\n//     provinceID: \"10\"\r\n//     road: \"ถนน\"\r\n//     soi: \"ซอย\"\r\n//     subDistrictID: \"01\"\r\n// }\r\n\r\n// stepTwo: {\r\n//     buildings: [\r\n//         {\r\n//             buildingarea: \"3\",\r\n//             carparkarea: \"4\",\r\n//             material: \"1\",\r\n//             numberbuilding: \"1\",\r\n//             numberfloor: \"2\",\r\n//             objective: \"15\",\r\n//         }\r\n//     ]\r\n// }","import * as actionTypes from \"../../../Constants/ActionTypes\";\r\n\r\nconst initailize = {\r\n    stepOne: {},\r\n    stepTwo: {},\r\n    currentDistrictAndSubDistrict:{districtID:null,subDistrictID:null},\r\n    geometry:null\r\n};\r\n\r\nexport default (state = initailize, action) => {\r\n    switch (action.type) {\r\n        case actionTypes.SAVE_HOUSE_NUMBER_STEP_ONE:\r\n            return { ...state, stepOne: action.data }\r\n        case actionTypes.SAVE_HOUSE_NUMBER_STEP_TWO:\r\n            return { ...state, stepTwo: action.data }\r\n        case actionTypes.CLEAR_FORM_HOUSE_NUMBER:\r\n            return initailize\r\n        case actionTypes.SAVE_DISTRICT_AND_SUBDISTRICT:\r\n            return { ...state, currentDistrictAndSubDistrict: action.data }\r\n        case actionTypes.SAVE_GEOMETRY_TR900:\r\n            return { ...state, geometry: action.data }\r\n        default:\r\n            return state;\r\n    }\r\n}","import * as actionTypes from \"../../Constants/ActionTypes\";\r\n\r\nconst initialState = {\r\n\tlistMenuBreadcrumb: []\r\n};\r\n\r\nconst layoutReducer = (state = initialState, action) => {\r\n\tswitch (action.type) {\r\n\t\tcase actionTypes.SET_MENU_BREADCRUMB:\r\n\t\t\treturn { ...state, listMenuBreadcrumb: action.listMenu };\r\n\t\tcase actionTypes.CLEAR_MENU_BREADCRUMB:\r\n\t\t\treturn { ...state, listMenuBreadcrumb: [] };\r\n\t\tdefault:\r\n\t\t\treturn state;\r\n\t}\r\n};\r\n\r\nexport default layoutReducer;","import * as actionType from '../../../Constants/ActionTypes';\r\n\r\nconst initailize = {\r\n  summary: {\r\n    all: 0,\r\n    countCoordinate: 0,\r\n    countNoCoordinate: 0,\r\n  },\r\n  dataTable: [],\r\n  filterResult: {\r\n    startDate: '',\r\n    endDate: '',\r\n    districtId: '',\r\n    permitNo: '',\r\n    districtIdName: '',\r\n    permitNoDisplay: '',\r\n  },\r\n};\r\n\r\nexport default (state = initailize, action) => {\r\n  switch (action.type) {\r\n    case actionType.GET_DATA_SEARCH_OSS_TABLE:\r\n      return { ...state, summary: action.summary, dataTable: action.dataTable };\r\n    case actionType.GET_FILTER_RESULT_SEARCH_OSS:\r\n      return { ...state, filterResult: action.filterResult };\r\n    default:\r\n      return state;\r\n  }\r\n};\r\n","import * as actionTypes from '../../../Constants/ActionTypes';\r\n\r\nconst initailize = {\r\n  houseList: [],\r\n};\r\n\r\nexport default (state = initailize, action) => {\r\n  switch (action.type) {\r\n    case actionTypes.GET_DATA_HOUSE_LIST_STR:\r\n      return { ...state, houseList: action.houseList };\r\n    default:\r\n      return state;\r\n  }\r\n};\r\n","import { combineReducers } from 'redux';\r\nimport { reducer as formReducer } from 'redux-form';\r\nimport map from './Web/Maps/MapReducer';\r\nimport menu from './Web/MenuReducer';\r\nimport toc from './Web/Maps/TocReducer';\r\nimport PanelContentData from './Web/Panel/PanelContentReducer';\r\nimport Authen from './Authentications/AuthenReducer';\r\nimport SubmitPmr from './Web/Panel/SubmitPmrReducer';\r\nimport AskTheCityPlanReducer from './Web/Panel/AskTheCityPlanReducer';\r\nimport SatisfactionAndStatisticReducer from './Web/Panel/SatisfactionAndStatisticReducer';\r\nimport NewTOCReducer from './Web/Maps/NewTOCReducer';\r\nimport Construct from './Web/Panel/ConstructReducer';\r\nimport HouseNumberReducer from './Web/Panel/HouseNumberReducer';\r\nimport LayoutReducer from './Usermanagements/LayoutReducer';\r\nimport SearchOSSReducer from './Web/Panel/SearchOSSReducer';\r\nimport MarkPointSTRReducer from './Web/Panel/MarkPointSTRReducer';\r\n\r\nconst rootReducer = combineReducers({\r\n  map: map,\r\n  menu: menu,\r\n  toc: toc,\r\n  form: formReducer,\r\n  PanelContentData: PanelContentData,\r\n  authen: Authen,\r\n  submitPmr: SubmitPmr,\r\n  AskTheCityPlanData: AskTheCityPlanReducer,\r\n  SatisfactionAndStatisticReducer: SatisfactionAndStatisticReducer,\r\n  newTOCData: NewTOCReducer,\r\n  construct: Construct,\r\n  houseNumberRdc: HouseNumberReducer,\r\n  layout: LayoutReducer,\r\n  searchOSSReducer: SearchOSSReducer,\r\n  markPointSTRReducer: MarkPointSTRReducer,\r\n});\r\n\r\nexport default rootReducer;\r\n","import React from 'react';\r\nimport { withStyles } from '@material-ui/core';\r\nimport Button from '@material-ui/core/Button';\r\n\r\nconst ButtonView = ({\r\n    classes,\r\n    className,\r\n\r\n    label,\r\n    color,\r\n    type,\r\n    onClick,\r\n    disabled\r\n}) => {\r\n    return (\r\n        <Button variant=\"contained\" type={type} className={`${classes[color]} ${className} ${classes.buttonradius}`} onClick={onClick} disabled={disabled} >\r\n            {label}\r\n        </Button>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        height: '42px'\r\n    },\r\n    buttonradius: {\r\n        borderRadius: '2px'\r\n    },\r\n    green: {\r\n        backgroundColor: '#128C2C',\r\n        color: 'white',\r\n        \"&:hover\": {\r\n            backgroundColor: '#128C2C'\r\n        }\r\n    },\r\n    black: {\r\n        backgroundColor: '#494949',\r\n        color: 'white',\r\n        \"&:hover\": {\r\n            backgroundColor: '#494949'\r\n        }\r\n    },\r\n    white: {\r\n        backgroundColor: '#fff',\r\n        color: '#000',\r\n        \"&:hover\": {\r\n            backgroundColor: '#fff'\r\n        }\r\n    }\r\n}))(ButtonView)","import React, { Component } from 'react';\r\nimport ButtonView from '../Presentationals/ButtonView'\r\n\r\nexport default class Button extends Component {\r\n    render() {\r\n        const {\r\n            className,\r\n            label,\r\n            color,\r\n            type,\r\n            onClick,\r\n            disabled,\r\n        } = this.props;\r\n\r\n        return (\r\n            <ButtonView\r\n                className={className}\r\n                label={label}\r\n                color={color}\r\n                type={type}\r\n                onClick={onClick}\r\n                disabled={disabled}\r\n            />\r\n        )\r\n    }\r\n}\r\n\r\nButton.defaultProps = {\r\n    label: \"Button\",\r\n    color: \"green\",\r\n    type: \"\"\r\n}\r\n","import React from 'react';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Paper from '@material-ui/core/Paper';\r\nimport Button from '../Controls/Containers/Button';\r\n\r\nconst HomeView = ({\r\n    classes,\r\n    onClickMenu,\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root} justify=\"center\" alignItems=\"center\">\r\n            <Paper className={classes.paper}>\r\n\r\n                <Grid item xs={12} container className={classes.groupRow}>\r\n                    <Grid item xs={12} container justify=\"center\">\r\n                        <span className={classes.title}>ประชาชน</span>\r\n                    </Grid>\r\n                    <Grid item xs={12} container justify=\"flex-end\">\r\n                        <Button onClick={onClickMenu(\"CMP\")} label=\"สอบถามการใช้ประโยชน์ที่ดิน\" className={classes.btn} />\r\n                    </Grid>\r\n                    <Grid item xs={12} container justify=\"flex-end\">\r\n                        <Button onClick={onClickMenu(\"PMR\")} label=\"ผมร.๑\" className={classes.btn} />\r\n                    </Grid>\r\n                </Grid>\r\n\r\n                <Grid item xs={12} container className={classes.groupRow}>\r\n                    <Grid item xs={12} container justify=\"center\">\r\n                        <span className={classes.title}>เจ้าหน้าที่</span>\r\n                    </Grid>\r\n                    <Grid item xs={12} container justify=\"flex-end\">\r\n                        <Button onClick={onClickMenu(\"Login\")} label=\"เข้าสู่ระบบ\" className={classes.btn} />\r\n                    </Grid>\r\n                </Grid>\r\n            </Paper>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        height: '100%',\r\n        padding: '30px',\r\n    },\r\n    paper: {\r\n        width: '100%',\r\n        maxWidth: '1000px',\r\n        padding: '20px'\r\n    },\r\n    btn: {\r\n        width: \"300px\",\r\n        marginTop: '15px'\r\n    },\r\n    groupRow: {\r\n        padding: '20px',\r\n    },\r\n    title: {\r\n        fontSize: '20px',\r\n        fontWeight: 'bold'\r\n    }\r\n}))(HomeView)\r\n","import React, { Component } from 'react';\r\nimport HomeView from '../Presentationals/HomeView';\r\nimport RouteConfig from '../Config/AppRoute/RouteConfig';\r\n\r\nexport default class Home extends Component {\r\n\r\n    handleClickMenu = menu => evt => {\r\n        // const {history} = this.props;\r\n        switch (menu) {\r\n            case \"CMP\":\r\n                window.location.href = window.ROOT_SYSTEM_URL + RouteConfig.CMPWeb;\r\n                // history.push(RouteConfig.CMPWeb)\r\n                break;\r\n            case \"PMR\":\r\n                window.location.href = window.ROOT_SYSTEM_URL + RouteConfig.CMSLogin;\r\n                // history.push(RouteConfig.CMSLogin)\r\n                break;\r\n            case \"Login\":\r\n                window.location.href = window.ROOT_SYSTEM_URL + RouteConfig.CMSLoginStaff;\r\n                // history.push(RouteConfig.CMSLoginStaff)\r\n                break;\r\n            default:\r\n                break;\r\n        }\r\n    }\r\n\r\n    render() {\r\n        return (\r\n            <HomeView\r\n                onClickMenu={this.handleClickMenu}\r\n            />\r\n        )\r\n    }\r\n}\r\n","import * as Constants from \"../Constants/Constants\";\r\n\r\n//#################################### ALL NORMALIZE ####################################\r\nexport const normalizeFloat = value => {\r\n\r\n    if (value === \".\") {\r\n        return 0\r\n    }\r\n    const onlyNums = !value || !value.length || value[value.length - 1] === '.' ? value : parseFloat(value)\r\n\r\n    return onlyNums\r\n}\r\n\r\nexport const normalizeLatLong = (value) => {\r\n    if (!value) {\r\n        return value\r\n    }\r\n\r\n    const newValue = value.replace(/[^\\d.,]/g, '')\r\n    return newValue\r\n}\r\n\r\nexport const normalizeUsername = (value) => {\r\n    if (!value) {\r\n        return value\r\n    }\r\n\r\n    const newValue = value.replace(/[ก-๛ '\";,!$^&]/g, '')\r\n    return newValue\r\n}\r\n\r\n\r\n\r\nexport const normalizePositiveInteger = value => {\r\n    if (!value) {\r\n        return value\r\n    }\r\n    const onlyNums = value.replace(/[^0-9]/g, '')\r\n    return onlyNums\r\n}\r\n\r\nexport const normalizePositiveFloat = value => {\r\n    if (!value) {\r\n        return value\r\n    }\r\n    const onlyNums = value.replace(/[^0-9.]/g, '')\r\n    return onlyNums\r\n}\r\n\r\nexport const normalizeInteger = value => {\r\n    if (!value) {\r\n        return value\r\n    }\r\n    const onlyNums = value.replace(/[^\\d]/g, '')\r\n    return onlyNums\r\n}\r\n\r\nexport const normalizeNumber = value => {\r\n    if (!value) {\r\n        return value\r\n    }\r\n    const onlyNums = value.replace(/[^-0-9.]/g, '')\r\n    return onlyNums\r\n}\r\n\r\n\r\nexport const normalizeHouseNo = (value) => {\r\n    if (!value) {\r\n        return value\r\n    }\r\n\r\n    const newValue = value.replace(/[^\\d/]/g, '')\r\n    return newValue\r\n}\r\n\r\nexport const checkCitizenId = (id) => {\r\n    if (id.length !== 13)\r\n        return false\r\n\r\n    for (var i = 0, sum = 0; i < 12; i++)\r\n        sum += parseFloat(id.charAt(i)) * (13 - i)\r\n    if ((11 - sum % 11) % 10 !== parseFloat(id.charAt(12)))\r\n        return false\r\n    return true\r\n}\r\n\r\nexport const citizenId13Cha = (value) => {\r\n    if (!value) {\r\n        return value\r\n    }\r\n    const onlyNums = value.replace(/[^\\d]/g, '')\r\n\r\n    if (onlyNums.length <= 13) {\r\n        return onlyNums\r\n    }\r\n}\r\n\r\nexport const checkTextOrNumber = (value) => {\r\n    // return true = ตัวอักษร\r\n    const pattern = new RegExp(/\\D/g);\r\n    const result = pattern.test(value);\r\n\r\n    return result\r\n}\r\n\r\n\r\n//#################################### ALL VALIDATE ####################################\r\nexport const gotoLocationValidate = (values) => {\r\n    const errors = {};\r\n    const chk = /^(0|[1-9]\\d*)(\\.\\d+)?$/\r\n\r\n    if (!values.gotoLongitude) {\r\n        errors.gotoLongitude = Constants.RESOURCEWORDS.VALIDATION_REQUIRED_FIELD;\r\n    }\r\n    else if (!chk.test(values.gotoLongitude)) {\r\n        errors.gotoLongitude = Constants.RESOURCEWORDS.VALIDATION_LONGITUDE_FAIL;\r\n    }\r\n\r\n    if (!values.gotoLatitude) {\r\n        errors.gotoLatitude = Constants.RESOURCEWORDS.VALIDATION_REQUIRED_FIELD;\r\n    }\r\n    else if (!chk.test(values.gotoLatitude)) {\r\n        errors.gotoLatitude = Constants.RESOURCEWORDS.VALIDATION_LATITUDE_FAIL;\r\n    }\r\n\r\n    if (!values.gotoLatLong) {\r\n        errors.gotoLatLong = Constants.RESOURCEWORDS.VALIDATION_REQUIRED_FIELD;\r\n    }\r\n\r\n    return errors;\r\n};\r\n\r\nexport const loginValidate = (values) => {\r\n    const errors = {}\r\n\r\n\r\n    if (!values.username) {\r\n        errors.username = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY\r\n    }\r\n    else if (values.mode === Constants.SYSTEM.PMR1 && !/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}$/i.test(values.username)) {\r\n        errors.username = Constants.RESOURCEWORDS.ERROR_TEXT.EMAIL_FAILED\r\n    }\r\n\r\n    if (!values.password) {\r\n        errors.password = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY\r\n    }\r\n\r\n    return errors\r\n}\r\n\r\nexport const validateFormUtm = values => {\r\n    const errors = {}\r\n\r\n    if (!values.x) {\r\n        errors.x = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2;\r\n    }\r\n\r\n    if (!values.y) {\r\n        errors.y = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2;\r\n    }\r\n\r\n    return errors\r\n}\r\n\r\nexport const validateFormLatLong = values => {\r\n    const errors = {}\r\n\r\n    if (!values.latLong) {\r\n        errors.latLong = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2;\r\n    }\r\n    else {\r\n        if (!(/^(\\-?\\d+(\\.\\d+)?),\\s*(\\-?\\d+(\\.\\d+)?)$/.test(values.latLong))) {\r\n            errors.latLong = 'รูปแบบไม่ถูกต้อง';\r\n        }\r\n    }\r\n    return errors\r\n}\r\n\r\nexport const validateFormDms = values => {\r\n    const errors = {}\r\n\r\n    if (!values.longDegrees) {\r\n        errors.longDegrees = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2;\r\n    } else if (values.longDegrees < 0 || values.longDegrees > 100) {\r\n        errors.longDegrees = Constants.RESOURCEWORDS.ERROR_TEXT.LONG_DEGREES_LIMIT_DIGIT;\r\n    }\r\n\r\n    if (!values.latMinutes) {\r\n        errors.latMinutes = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2;\r\n    } else if (values.latMinutes < 0 || values.latMinutes > 60) {\r\n        errors.latMinutes = Constants.RESOURCEWORDS.ERROR_TEXT.MINUTES_LIMIT_DIGIT;\r\n    }\r\n\r\n    if (!values.longMinutes) {\r\n        errors.longMinutes = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2;\r\n    } else if (values.longMinutes < 0 || values.longMinutes > 60) {\r\n        errors.longMinutes = Constants.RESOURCEWORDS.ERROR_TEXT.MINUTES_LIMIT_DIGIT;\r\n    }\r\n\r\n    if (!values.latSeconds) {\r\n        errors.latSeconds = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2;\r\n    } else if (values.latSeconds < 0 || values.latSeconds > 60) {\r\n        errors.latSeconds = Constants.RESOURCEWORDS.ERROR_TEXT.MINUTES_LIMIT_DIGIT;\r\n    }\r\n\r\n    if (!values.longSeconds) {\r\n        errors.longSeconds = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2;\r\n    } else if (values.longSeconds < 0 || values.longSeconds > 60) {\r\n        errors.longSeconds = Constants.RESOURCEWORDS.ERROR_TEXT.MINUTES_LIMIT_DIGIT;\r\n    }\r\n\r\n    return errors\r\n}\r\n\r\nexport const addLayerTocValidate = values => {\r\n    const errors = {}\r\n    if (!values.kmlName) {\r\n        errors.kmlName = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY\r\n    }\r\n\r\n    if (!values.fileKML && values.importType === Constants.OPTION_IMPORT_KML.UPLOAD) {\r\n        errors.fileKML = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY\r\n    }\r\n\r\n    if (!values.urlKmlFile && values.importType === Constants.OPTION_IMPORT_KML.URL) {\r\n        errors.urlKmlFile = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY\r\n    }\r\n\r\n    if (!values.wmsName) {\r\n        errors.wmsName = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY\r\n    }\r\n\r\n    if (!values.urlWms) {\r\n        errors.urlWms = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY\r\n    }\r\n\r\n    if (!values.layer || values.layer.length === 0) {\r\n        errors.layer = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY\r\n    }\r\n\r\n    if (!values.wfsName) {\r\n        errors.wfsName = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY\r\n    }\r\n\r\n    if (!values.urlWfs) {\r\n        errors.urlWfs = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY\r\n    }\r\n\r\n    if (!values.wfsLayer) {\r\n        errors.wfsLayer = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY\r\n    }\r\n\r\n    if (!values.BMALayers || values.BMALayers.length === 0) {\r\n        errors.BMALayers = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY\r\n    }\r\n\r\n    if (!values.importType) {\r\n        errors.importType = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY\r\n    }\r\n\r\n    if (!values.restName) {\r\n        errors.restName = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY\r\n    }\r\n\r\n    if (!values.urlRest) {\r\n        errors.urlRest = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY\r\n    }\r\n\r\n    if (!values.layerRest || values.layerRest.length === 0) {\r\n        errors.layerRest = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY\r\n    }\r\n\r\n    if (!values.usernameRest) {\r\n        errors.usernameRest = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY\r\n    }\r\n\r\n    if (!values.passwordRest) {\r\n        errors.passwordRest = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY\r\n    }\r\n\r\n    return errors\r\n}\r\n\r\nexport const zoomToScaleValidate = (values) => {\r\n    const errors = {}\r\n\r\n    if (!values.scale || values.scale < 100 || values.scale > 100000) {\r\n        errors.scale = \"ระบุค่าในช่วง 100 - 100000\"\r\n    }\r\n\r\n    return errors\r\n}\r\n\r\n//#################################### PMR VALIDATE ####################################\r\n\r\nexport const forgotPasswordValidate = (values, props) => {\r\n    const errors = {}\r\n\r\n    if (!values.email) {\r\n        errors.email = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY\r\n    }\r\n    else if (!/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}$/i.test(values.email) && props.mode === Constants.SYSTEM.PMR1) {\r\n        errors.email = Constants.RESOURCEWORDS.ERROR_TEXT.EMAIL_FAILED\r\n    }\r\n\r\n    return errors\r\n}\r\n\r\nexport const formResetPasswordValidate = values => {\r\n    const errors = {}\r\n\r\n    if (!values.password || values.password.length > 20 || values.password.length < 6 || /[^a-zA-Z0-9 ]/i.test(values.password)) {\r\n        errors.password = \"กรุณาระบุตัวอักษรหรือตัวเลข อย่างน้อย 6-20 ตัวอักษร\"\r\n    }\r\n\r\n    if (!values.confirmPassword) {\r\n        errors.confirmPassword = \"กรุณาระบุตัวอักษรหรือตัวเลข อย่างน้อย 6-20 ตัวอักษร\"\r\n    } else if (values.confirmPassword !== values.password) {\r\n        errors.confirmPassword = Constants.RESOURCEWORDS.ERROR_TEXT.CONFIRM_PASSWORD_FAILED\r\n    }\r\n\r\n    return errors\r\n}\r\n\r\n\r\nexport const registerValidate = values => {\r\n    const errors = {}\r\n\r\n    if (!values.username) {\r\n        errors.username = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY\r\n    } else if (!/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}$/i.test(values.username)) {\r\n        errors.username = Constants.RESOURCEWORDS.ERROR_TEXT.EMAIL_FAILED\r\n    }\r\n\r\n    if (!values.password) {\r\n        errors.password = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY\r\n    } else if (values.password.length > 20 || values.password.length < 6 || /[^a-zA-Z0-9 ]/i.test(values.password)) { //\r\n        errors.password = Constants.RESOURCEWORDS.ERROR_TEXT.PASSWORD_LIMIT_DIGIT\r\n    }\r\n\r\n    if (!values.confirmPassword) {\r\n        errors.confirmPassword = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY\r\n    } else if (values.confirmPassword.length > 20 || values.confirmPassword.length < 6 || /[^a-zA-Z0-9 ]/i.test(values.password)) { //\r\n        errors.confirmPassword = Constants.RESOURCEWORDS.ERROR_TEXT.PASSWORD_LIMIT_DIGIT\r\n    } else if (values.password && values.password !== values.confirmPassword) {\r\n        errors.confirmPassword = Constants.RESOURCEWORDS.ERROR_TEXT.CONFIRM_PASSWORD_FAILED\r\n    }\r\n\r\n    if (!values.firstName) {\r\n        errors.firstName = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY\r\n    } else if (values.firstName.length > 100) {\r\n        errors.firstName = Constants.RESOURCEWORDS.ERROR_TEXT.NAME_LIMIT_DIGIT\r\n    }\r\n\r\n    if (!values.lastName) {\r\n        errors.lastName = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY\r\n    } else if (values.lastName.length > 100) {\r\n        errors.lastName = Constants.RESOURCEWORDS.ERROR_TEXT.NAME_LIMIT_DIGIT\r\n    }\r\n\r\n    if (!values.identificationID) {\r\n        errors.identificationID = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY\r\n    } else if (!checkCitizenId(values.identificationID)) {\r\n        errors.identificationID = Constants.RESOURCEWORDS.ERROR_TEXT.CITIZENID_FAILED\r\n    }\r\n\r\n    return errors;\r\n}\r\n\r\nexport const formOneValidate = values => {\r\n    const errors = {}\r\n    let errorSubmitMessageRequire = null\r\n    let errorSubmitMessageWrongFormat = null\r\n\r\n    const checkString = (value) => {\r\n        const patt = /\\D/g;\r\n        const isString = patt.test(value);\r\n\r\n        return isString\r\n    }\r\n\r\n    if (values.parameterMoo) {\r\n        if (!checkString(values.parameterMoo)) {\r\n            if (values.parameterMoo.length > 1) {\r\n                const checkMoo = values.parameterMoo.slice(0, 1);\r\n                if (Number(checkMoo) === 0) {\r\n                    errors.parameterMoo = Constants.RESOURCEWORDS.ERROR_TEXT.MOO_ERROR\r\n                    errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n                }\r\n            } else {\r\n                if (Number(values.parameterMoo) === 0) {\r\n                    errors.parameterMoo = Constants.RESOURCEWORDS.ERROR_TEXT.MOO_ERROR\r\n                    errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n                }\r\n            }\r\n        } else {\r\n            errors.parameterMoo = Constants.RESOURCEWORDS.ERROR_TEXT.NOT_NUMBER\r\n            errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n\r\n        }\r\n    }\r\n\r\n    if (values.parameterAt && values.parameterAt.length > 100) {\r\n        errors.parameterAt = Constants.RESOURCEWORDS.ERROR_TEXT.NAME_LIMIT_DIGIT\r\n        errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n    }\r\n\r\n    if (values.parameterName && values.parameterName.length > 100) {\r\n        errors.parameterName = Constants.RESOURCEWORDS.ERROR_TEXT.NAME_LIMIT_DIGIT\r\n        errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n    }\r\n\r\n    if (!values.parameterRadioTwo) {\r\n        errors.parameterRadioTwo = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY\r\n        errorSubmitMessageRequire = Constants.SUBMIT_ERROR_MEASSAGE.MSG_01;\r\n    }\r\n\r\n    if (values.parameterIDCard) {\r\n        if (!checkCitizenId(values.parameterIDCard)) {\r\n            errors.parameterIDCard = Constants.RESOURCEWORDS.ERROR_TEXT.CITIZENID_FAILED\r\n            errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n        }\r\n    }\r\n\r\n    if (values.parameterZipCode) {\r\n        if (checkTextOrNumber(values.parameterZipCode)) {\r\n            errors.parameterZipCode = 'กรุณาระบุเป็นตัวเลขเท่านั้น'\r\n            errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n        }\r\n    }\r\n\r\n    if (errorSubmitMessageRequire) {\r\n        errors.errorForm = errorSubmitMessageRequire\r\n    } else {\r\n        errors.errorForm = errorSubmitMessageWrongFormat\r\n    }\r\n\r\n    return errors;\r\n}\r\n\r\nexport const formTwoValidate = values => {\r\n    const errors = {};\r\n    let errorSubmitMessageRequire = null\r\n    let errorSubmitMessageWrongFormat = null\r\n  \r\n    if (values.chanode) {\r\n        const chanodeArrayErrors = []\r\n\r\n        values.chanode.forEach((itm, ind) => {\r\n            const chanodeErrors = {}\r\n            let allArea = 0;\r\n            let useArea = 0;\r\n\r\n            if (!itm || !itm.chanodeno || itm.chanodeno.length > 10) {\r\n                chanodeErrors.chanodeno = Constants.RESOURCEWORDS.ERROR_TEXT.CHANODE_LIMIT_DIGIT\r\n                errorSubmitMessageRequire = Constants.SUBMIT_ERROR_MEASSAGE.MSG_01;\r\n            }\r\n\r\n            if (!itm || !itm.surveyno || itm.surveyno.length > 10) {\r\n                chanodeErrors.surveyno = Constants.RESOURCEWORDS.ERROR_TEXT.CHANODE_LIMIT_DIGIT\r\n                errorSubmitMessageRequire = Constants.SUBMIT_ERROR_MEASSAGE.MSG_01;\r\n            }\r\n\r\n            if (!itm || !itm.landno || itm.landno.length > 10) {\r\n                chanodeErrors.landno = Constants.RESOURCEWORDS.ERROR_TEXT.CHANODE_LIMIT_DIGIT\r\n                errorSubmitMessageRequire = Constants.SUBMIT_ERROR_MEASSAGE.MSG_01;\r\n            }\r\n\r\n            if (!itm || itm.chanoderai === undefined || itm.chanoderai === \"\") {\r\n                chanodeErrors.chanoderai = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2\r\n                errorSubmitMessageRequire = Constants.SUBMIT_ERROR_MEASSAGE.MSG_01;\r\n            } else {\r\n                allArea += itm.chanoderai * 1600\r\n            }\r\n\r\n            if (!itm || itm.chanodengan === undefined || itm.chanodengan === \"\") {\r\n                chanodeErrors.chanodengan = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2\r\n                errorSubmitMessageRequire = Constants.SUBMIT_ERROR_MEASSAGE.MSG_01;\r\n            } else if (!itm || itm.chanodengan > 3) {\r\n                chanodeErrors.chanodengan = Constants.RESOURCEWORDS.ERROR_TEXT.NGAN_LIMIT_DIGIT\r\n                errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n            } else {\r\n                allArea += itm.chanodengan * 400\r\n\r\n            }\r\n\r\n            if (!itm || itm.chanodewa === undefined || itm.chanodewa === \"\") {\r\n                chanodeErrors.chanodewa = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2\r\n                errorSubmitMessageRequire = Constants.SUBMIT_ERROR_MEASSAGE.MSG_01;\r\n            } else if (!itm || itm.chanodewa > 99) {\r\n                chanodeErrors.chanodewa = Constants.RESOURCEWORDS.ERROR_TEXT.SQ_WA_LIMIT_DIGIT\r\n                errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n            } else {\r\n                allArea += itm.chanodewa * 4\r\n            }\r\n\r\n            if (!itm || itm.userai === undefined || itm.userai === \"\") {\r\n                chanodeErrors.userai = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2\r\n                errorSubmitMessageRequire = Constants.SUBMIT_ERROR_MEASSAGE.MSG_01;\r\n            } else {\r\n                useArea += itm.userai * 1600\r\n            }\r\n\r\n            if (!itm || itm.usengan === undefined || itm.usengan === \"\") {\r\n                chanodeErrors.usengan = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2\r\n                errorSubmitMessageRequire = Constants.SUBMIT_ERROR_MEASSAGE.MSG_01;\r\n            } else if (!itm || itm.usengan > 3) {\r\n                chanodeErrors.usengan = Constants.RESOURCEWORDS.ERROR_TEXT.NGAN_LIMIT_DIGIT\r\n                errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n            } else {\r\n                useArea += itm.usengan * 400\r\n            }\r\n\r\n            if (!itm || itm.usewa === undefined || itm.usewa === \"\") {\r\n                chanodeErrors.usewa = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2\r\n                errorSubmitMessageRequire = Constants.SUBMIT_ERROR_MEASSAGE.MSG_01;\r\n            } else if (!itm || itm.usewa > 99) {\r\n                chanodeErrors.usewa = Constants.RESOURCEWORDS.ERROR_TEXT.SQ_WA_LIMIT_DIGIT\r\n                errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n            } else {\r\n                useArea += itm.usewa * 4\r\n            }\r\n\r\n            if (useArea > allArea) {\r\n                chanodeErrors.errChanode = Constants.RESOURCEWORDS.ERROR_TEXT.USE_AREA_FAILED\r\n                errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n            }\r\n\r\n            if (Object.keys(chanodeErrors).length !== 0) {\r\n                chanodeArrayErrors[ind] = chanodeErrors\r\n            }\r\n        })\r\n\r\n        if (chanodeArrayErrors.length) {\r\n            errors.chanode = chanodeArrayErrors\r\n        }\r\n    }\r\n\r\n    if (errorSubmitMessageRequire) {\r\n        errors.errorForm = errorSubmitMessageRequire\r\n    } else {\r\n        errors.errorForm = errorSubmitMessageWrongFormat\r\n    }\r\n\r\n    return errors;\r\n}\r\n\r\nexport const formThreeValidate = values => {\r\n    const errors = {}\r\n    let errorSubmitMessageRequire = null\r\n    let errorSubmitMessageWrongFormat = null\r\n\r\n    if (!values.forBusiness) {\r\n        errors.forBusiness = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY\r\n        errorSubmitMessageRequire = Constants.SUBMIT_ERROR_MEASSAGE.MSG_01;\r\n    }\r\n\r\n    if (!values.district) {\r\n        errors.district = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY\r\n        errorSubmitMessageRequire = Constants.SUBMIT_ERROR_MEASSAGE.MSG_01;\r\n    }\r\n\r\n    if (!values.subDistrict) {\r\n        errors.subDistrict = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY\r\n        errorSubmitMessageRequire = Constants.SUBMIT_ERROR_MEASSAGE.MSG_01;\r\n    }\r\n\r\n    if (values.houseNo && values.houseNo.length > 20) {\r\n        errors.houseNo = Constants.RESOURCEWORDS.ERROR_TEXT.HOUSE_NO_LIMIT_DIGIT\r\n        errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n\r\n    }\r\n\r\n    if (values.alley && values.alley.length > 100) {\r\n        errors.alley = Constants.RESOURCEWORDS.ERROR_TEXT.ALLEY_NO_LIMIT_DIGIT\r\n        errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n    }\r\n\r\n    if (values.road && values.road.length > 100) {\r\n        errors.road = Constants.RESOURCEWORDS.ERROR_TEXT.ROAD_NO_LIMIT_DIGIT\r\n        errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n    }\r\n\r\n    if (errorSubmitMessageRequire) {\r\n        errors.errorForm = errorSubmitMessageRequire\r\n    } else {\r\n        errors.errorForm = errorSubmitMessageWrongFormat\r\n    }\r\n\r\n    return errors;\r\n}\r\n\r\n// export const formFourValidate = values => {\r\n//     const errors = {}\r\n\r\n//     if (!values.landuseRadio) {\r\n//         errors.landuseRadio = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY\r\n//     }\r\n//     return errors;\r\n// }\r\n\r\nexport const searchHouseNoValidate = (values) => {\r\n    const errors = {};\r\n\r\n    if (!values.houseName && !values.houseNumber && !values.districtID && !values.subDistrictID) {\r\n        errors.houseName = \"ต้องกำหนดอย่างน้อย 1 เงื่อนไข\";\r\n        errors.houseNumber = \"ต้องกำหนดอย่างน้อย 1 เงื่อนไข\";\r\n        errors.districtID = \"ต้องกำหนดอย่างน้อย 1 เงื่อนไข\";\r\n        errors.subDistrictID = \"ต้องกำหนดอย่างน้อย 1 เงื่อนไข\";\r\n    }\r\n\r\n    return errors\r\n}\r\n\r\n//#################################### CMP VALIDATE ####################################\r\nexport const printmapValidate = values => {\r\n    const errors = {}\r\n\r\n    if (!values.paperSize) {\r\n        errors.paperSize = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2;\r\n    }\r\n    if (!values.mapName || values.mapName.length > 100) {\r\n        errors.mapName = Constants.RESOURCEWORDS.ERROR_TEXT.VALIDATION_MAP_NAME_FAIL;\r\n    }\r\n    if (values.mapDescription && values.mapDescription.length > 200) {\r\n        errors.mapDescription = Constants.RESOURCEWORDS.ERROR_TEXT.VALIDATION_MAP_DESC_FAIL;\r\n    }\r\n    if (!values.format) {\r\n        errors.format = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2;\r\n    }\r\n\r\n    return errors\r\n}\r\n\r\nexport const validateAskForBusiness = values => {\r\n    const errors = {}\r\n\r\n    if (!values.luActivity) {\r\n        errors.luActivity = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2;\r\n    }\r\n\r\n    return errors\r\n}\r\n\r\nexport const validateSearchLandInfo = values => {\r\n    const errors = {}\r\n\r\n    if (!values.type) {\r\n        errors.type = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2;\r\n    }\r\n\r\n    if (!values.parcelNo) {\r\n        errors.parcelNo = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2;\r\n    }\r\n\r\n    if (!values.district) {\r\n        errors.district = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2;\r\n    }\r\n\r\n    if (!values.surveyNo) {\r\n        errors.surveyNo = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2;\r\n    }\r\n\r\n    if (!values.landNo) {\r\n        errors.landNo = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2;\r\n    }\r\n\r\n    if (!values.sheetNo) {\r\n        errors.sheetNo = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2;\r\n    }\r\n\r\n    return errors\r\n}\r\n\r\n//#################################### CHA VALIDATE ####################################\r\n\r\nexport const stepOneValidate = (values, props, isButtonSubmit) => {\r\n\r\n    const errors = {}\r\n    let errorSubmitMessageRequire = null\r\n    let errorSubmitMessageWrongFormat = null\r\n\r\n    if (values.TRnumber) {\r\n        if (values.TRnumber.length > 10) {\r\n            errors.TRnumber = Constants.RESOURCEWORDS.ERROR_TEXT.LIMIT_DIGIT_10;\r\n            errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n        }\r\n    }\r\n\r\n    if (values.license) {\r\n        if (values.license.length > 20) {\r\n            errors.license = Constants.RESOURCEWORDS.ERROR_TEXT.LIMIT_DIGIT_20;\r\n            errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n        }\r\n    }\r\n\r\n    if (values.soi) {\r\n        if (values.soi.length > 100) {\r\n            errors.soi = Constants.RESOURCEWORDS.ERROR_TEXT.NAME_LIMIT_DIGIT;\r\n            errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n        }\r\n    }\r\n\r\n\r\n    if (values.road) {\r\n        if (values.road.length > 100) {\r\n            errors.road = Constants.RESOURCEWORDS.ERROR_TEXT.NAME_LIMIT_DIGIT;\r\n            errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n        }\r\n    }\r\n\r\n    if (!values.district) {\r\n        errors.district = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2;\r\n        errorSubmitMessageRequire = Constants.SUBMIT_ERROR_MEASSAGE.MSG_01;\r\n    }\r\n\r\n    if (!values.subDistrict) {\r\n        errors.subDistrict = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2;\r\n        errorSubmitMessageRequire = Constants.SUBMIT_ERROR_MEASSAGE.MSG_01;\r\n\r\n    }\r\n\r\n    if (values.moo) {\r\n        if (values.moo.length > 3) {\r\n            errors.moo = Constants.RESOURCEWORDS.ERROR_TEXT.LIMIT_STR_3;\r\n            errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n        }\r\n    }\r\n\r\n    if (values.TRrequest) {\r\n        if (values.TRrequest.length > 20) {\r\n            errors.TRrequest = Constants.RESOURCEWORDS.ERROR_TEXT.LIMIT_DIGIT_20;\r\n            errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n        }\r\n    } else {\r\n        errors.TRrequest = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2\r\n        errorSubmitMessageRequire = Constants.SUBMIT_ERROR_MEASSAGE.MSG_01;\r\n    }\r\n\r\n\r\n    // if(isButtonSubmit){\r\n    if (errorSubmitMessageRequire) {\r\n        errors.errorForm = errorSubmitMessageRequire\r\n    } else {\r\n        errors.errorForm = errorSubmitMessageWrongFormat\r\n    }\r\n    // }\r\n\r\n\r\n    return errors\r\n}\r\n\r\nexport const stepTwoValidate = (values) => {\r\n    const errors = {};\r\n    const pattern = new RegExp(/\\D/g); // true = มีตัวอักษร\r\n\r\n    let errorSubmitMessageRequire = null\r\n    let errorSubmitMessageWrongFormat = null\r\n\r\n    //////////////////////// For Field Array ///////////////////////////////////\r\n    \r\n\r\n    ///////////////////////////////////////////////////////////////////////////\r\n    //จำนวนรหัสประจำบ้าน\r\n    if (!values.houseNum) {\r\n        errors.houseNum = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2;\r\n        errorSubmitMessageRequire = Constants.SUBMIT_ERROR_MEASSAGE.MSG_01;\r\n    } else if (!values.houseNum || pattern.test(values.houseNum)) {\r\n        errors.houseNum = Constants.RESOURCEWORDS.ERROR_TEXT.NOT_NUMBER;\r\n        errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n    } else if (values.houseNum < 1) {\r\n        errors.houseNum = Constants.RESOURCEWORDS.ERROR_TEXT.MORE_THAN_ONE;\r\n        errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n    } else if(Number(values.houseNum) > 9999) {\r\n        errors.houseNum = Constants.RESOURCEWORDS.ERROR_TEXT.MORE_THAN_VALUE;\r\n        errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n    }else {\r\n        if (!values.runHouseNo) {\r\n            errors.runHouseNo = Constants.RESOURCEWORDS.ERROR_TEXT.NOT_NUMBER;\r\n            errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n        } else {\r\n            //บ้านเกิน 10 หลัง\r\n            if (values.houseNum > 10) { // กรณีจำนวนรหัสประจำบ้านมากกว่า 10 \r\n                //บ้านเลขที่เริ่มต้น\r\n                if (!values.noStart) {\r\n                    errors.noStart = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2;\r\n                    errorSubmitMessageRequire = Constants.SUBMIT_ERROR_MEASSAGE.MSG_01;\r\n                } else {\r\n                    const resultNoStart = values.noStart.split(\"/\");\r\n                    if (resultNoStart.length > 2) { //กรณีใส่ \"/\"\r\n                        errors.noStart = Constants.RESOURCEWORDS.ERROR_TEXT.WRONG_FORMAT__HOUSE;\r\n                        errorSubmitMessageRequire = Constants.SUBMIT_ERROR_MEASSAGE.MSG_01;\r\n                    }\r\n                }\r\n                //บ้านเลขที่สุดท้าย\r\n                if (!values.noEnd) {\r\n                    errors.noEnd = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2;\r\n                    errorSubmitMessageRequire = Constants.SUBMIT_ERROR_MEASSAGE.MSG_01;\r\n                } else {\r\n                    const resultNoEnd = values.noEnd.split(\"/\");\r\n                    if (resultNoEnd.length > 2) {\r\n                        errors.noEnd = Constants.RESOURCEWORDS.ERROR_TEXT.WRONG_FORMAT__HOUSE;\r\n                        errorSubmitMessageRequire = Constants.SUBMIT_ERROR_MEASSAGE.MSG_01;\r\n                    }\r\n                }\r\n                // รหัสประจำบ้านเริ่มต้น\r\n                if (!values.idStart) {\r\n                    errors.idStart = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2;\r\n                    errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n                } else if (pattern.test(values.idStart)) {\r\n                    errors.idStart = Constants.RESOURCEWORDS.ERROR_TEXT.NOT_NUMBER;\r\n                    errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n                } else {\r\n                    const idStartStr = values.idStart.toString();\r\n\r\n                    if (idStartStr.length !== 11) {\r\n                        errors.idStart = Constants.RESOURCEWORDS.ERROR_TEXT.HOUSEID_LIMIT_DIGIT;\r\n                        errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n                    } \r\n                }\r\n                // รหัสประจำบ้านสุดท้าย \r\n                if (!values.idEnd) {\r\n                    errors.idEnd = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2;\r\n                    errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n                } else if (pattern.test(values.idEnd)) {\r\n                    errors.idEnd = Constants.RESOURCEWORDS.ERROR_TEXT.NOT_NUMBER;\r\n                    errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n                } else {\r\n                    const idEndStr = values.idEnd.toString();\r\n\r\n                    if (idEndStr.length !== 11) {\r\n                        errors.idEnd = Constants.RESOURCEWORDS.ERROR_TEXT.HOUSEID_LIMIT_DIGIT;\r\n                        errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n                    } \r\n                }\r\n            } else { // กรณีจำนวนรหัสประจำบ้านน้อยกว่า 10 \r\n                if (values.houseList) {\r\n                    if (values.houseList.length !== 0) {\r\n                        var houseNoValueArr = values.houseList.map(function (item) { return item.houseNo.toString() });\r\n                        var houseIdValueArr = values.houseList.map(function (item) { return item.houseId.toString() });\r\n            \r\n                        var isHouseNoDuplicate = houseNoValueArr.some(function (item, idx) {\r\n                            return houseNoValueArr.indexOf(item) !== idx\r\n                        });\r\n                        var isHouseIdDuplicate = houseIdValueArr.some(function (item, idx) {\r\n                            return houseIdValueArr.indexOf(item) !== idx\r\n                        });\r\n            \r\n                        if (isHouseNoDuplicate || isHouseIdDuplicate) {\r\n                            errors.houseList = { _error: Constants.RESOURCEWORDS.ERROR_TEXT.HAVE_DUPLICATE_HOUSE_NO }\r\n                            errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n                        }\r\n                    }\r\n                }\r\n        \r\n                if (values.houseList) {\r\n                    const houseListArrayErrors = []\r\n                    values.houseList.forEach((itm, ind) => {\r\n                        const houseListErrors = {}\r\n                        let houseNoStr = itm.houseNo.toString()\r\n            \r\n                        //เลขที่บ้านที่ / เกิน\r\n                        if (houseNoStr.split(\"/\").length > 2) { //กรณีใส่ \"/\" เกิน 1 อัน\r\n                            houseListErrors.houseNo = \"ระบุให้ถูกต้อง\";\r\n                            errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n                        } else {\r\n                            if (houseNoStr.split(\"/\")[0] === \"\" || houseNoStr.split(\"/\")[1] === \"\") { //กรณีใส่ \"/\" ข้างหน้า\r\n                                houseListErrors.houseNo = \"ระบุให้ถูกต้อง\";\r\n                                errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n                            }\r\n                        }\r\n            \r\n                        //เลขที่บ้าน\r\n                        if (!itm || !itm.houseNo) {\r\n                            houseListErrors.houseNo = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2\r\n                            errorSubmitMessageRequire = Constants.SUBMIT_ERROR_MEASSAGE.MSG_01;\r\n                        }\r\n                        //รหัสประจำบ้าน\r\n                        if(!itm || !itm.houseId) {\r\n                            houseListErrors.houseId = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2\r\n                            errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_01;\r\n                        } else if (itm.houseId.length !== 11) {\r\n                            houseListErrors.houseId = Constants.RESOURCEWORDS.ERROR_TEXT.HOUSEID_LIMIT_DIGIT\r\n                            errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n                        } \r\n            \r\n                        if (Object.keys(houseListErrors).length !== 0) {\r\n                            houseListArrayErrors[ind] = houseListErrors\r\n                        }\r\n                    })\r\n            \r\n                    if (houseListArrayErrors.length) {\r\n                        errors.houseList = houseListArrayErrors\r\n                    }\r\n                }\r\n\r\n                if (!values.houseIdStart) {\r\n                    errors.houseIdStart = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2;\r\n                    errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n                } else if (pattern.test(values.houseIdStart)) {\r\n                    errors.houseIdStart =\"กรุณาระบุข้อมูลให้ถูกต้อง\";\r\n                    errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n                } else {\r\n                    const houseIdStr = values.houseIdStart.toString();\r\n                    \r\n                    if (houseIdStr.length !== 11) {\r\n                        errors.houseIdStart = Constants.RESOURCEWORDS.ERROR_TEXT.HOUSEID_LIMIT_DIGIT;\r\n                        errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n                    } \r\n                }\r\n\r\n                if (values.runHouseNo === 2) { //กรณีเลือกวิธีรันเลขแบบ เลขคู่\r\n                    if (values.houseNoStart !== undefined) {\r\n                        if (values.houseNoStart.split(\"/\").length > 1) { //กรณีใส่ \"/\"\r\n                            if (parseInt(values.houseNoStart.split(\"/\")[1]) % 2 !== 0) {\r\n                                errors.houseNoStart = Constants.RESOURCEWORDS.ERROR_TEXT.NOT_MATCH_TYPE;\r\n                                errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n                            }\r\n\r\n                        } else {\r\n                            if (parseInt(values.houseNoStart) % 2 !== 0) { //กรณีเลขที่บ้านเริ่มต้นไม่เป็นเลขคู่\r\n                                errors.houseNoStart = Constants.RESOURCEWORDS.ERROR_TEXT.NOT_MATCH_TYPE;\r\n                                errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                } else if (values.runHouseNo === 3) { //กรณีเลือกวิธีรันเลขแบบ เลขคี่\r\n                    if (values.houseNoStart !== undefined) {\r\n                        if (values.houseNoStart.split(\"/\").length > 1) { //กรณีใส่ \"/\"\r\n                            if (parseInt(values.houseNoStart.split(\"/\")[1]) % 2 !== 1) {\r\n                                errors.houseNoStart = Constants.RESOURCEWORDS.ERROR_TEXT.NOT_MATCH_TYPE;\r\n                                errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n                            }\r\n                        } else {\r\n                            if (parseInt(values.houseNoStart) % 2 !== 1) { //กรณีเลขที่บ้านเริ่มต้นไม่เป็นเลขคี่\r\n                                errors.houseNoStart = Constants.RESOURCEWORDS.ERROR_TEXT.NOT_MATCH_TYPE;\r\n                                errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (values.houseNoStart) { //validate กรณีมีการใส่ \"/\"\r\n                    if (values.houseNoStart.split(\"/\").length > 2) { //กรณีใส่ \"/\" เกิน 1 อัน\r\n                        errors.houseNoStart = \"กรุณาระบุข้อมูลให้ถูกต้อง\";\r\n                        errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n                    } else {\r\n                        if (values.houseNoStart.split(\"/\")[0] === \"\" || values.houseNoStart.split(\"/\")[1] === \"\") { //กรณีใส่ \"/\" ข้างหน้า\r\n                            errors.houseNoStart = \"กรุณาระบุข้อมูลให้ถูกต้อง\";\r\n                            errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n                        }\r\n                    }\r\n                }\r\n\r\n                if (!values.houseNoStart) {\r\n                    errors.houseNoStart = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2;\r\n                    errorSubmitMessageRequire = Constants.SUBMIT_ERROR_MEASSAGE.MSG_01;\r\n                }\r\n            }\r\n        }\r\n\r\n    }\r\n\r\n    if (errorSubmitMessageRequire) {\r\n        errors.errorForm = errorSubmitMessageRequire\r\n    } else {\r\n        errors.errorForm = errorSubmitMessageWrongFormat\r\n    }\r\n\r\n    console.log('error',errors)\r\n\r\n    return errors\r\n}\r\n\r\nexport const formConstructStepOneValidate = (values) => {\r\n    const errors = {};\r\n    let errorSubmitMessageRequire = null\r\n    let errorSubmitMessageWrongFormat = null\r\n\r\n    if (!values.applicationType) {\r\n        errors.applicationType = \"กรุณาระบุข้อมูล\"\r\n        errorSubmitMessageRequire = Constants.SUBMIT_ERROR_MEASSAGE.MSG_01;\r\n    }\r\n\r\n    if (values.pmr1ID && values.pmr1ID.length > 100) {\r\n        errors.pmr1ID = \"ระบุได้ไม่เกิน 1-100 ตัวอักษร\"\r\n        errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n    }\r\n\r\n    if (!values.permissionID) {\r\n        errors.permissionID = \"กรุณาระบุข้อมูล\"\r\n        errorSubmitMessageRequire = Constants.SUBMIT_ERROR_MEASSAGE.MSG_01;\r\n    } else if (values.permissionID.length > 20) {\r\n        errors.permissionID = \"ระบุ 1-20 ตัวอักษร\"\r\n        errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n    }\r\n    if (values.houseNo && values.houseNo.length > 20) {\r\n        errors.houseNo = \"ระบุได้ไม่เกิน 20 ตัวอักษร\"\r\n        errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n    }\r\n\r\n    if (values.moo && values.moo.length > 3) {\r\n        errors.moo = \"ระบุได้ไม่เกิน 3 ตัวอักษร\"\r\n        errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n    }\r\n\r\n    if (values.soi && values.soi.length > 100) {\r\n        errors.soi = \"ระบุได้ไม่เกิน 100 ตัวอักษร\"\r\n        errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n    }\r\n\r\n    if (values.road && values.road.length > 100) {\r\n        errors.road = \"ระบุได้ไม่เกิน 100 ตัวอักษร\"\r\n        errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n    }\r\n\r\n    if (errorSubmitMessageRequire) {\r\n        errors.errorForm = errorSubmitMessageRequire\r\n    } else {\r\n        errors.errorForm = errorSubmitMessageWrongFormat\r\n    }\r\n\r\n    return errors\r\n}\r\n\r\nexport const formConstructStepTwoValidate = (values) => {\r\n    const errors = {}\r\n    let errorSubmitMessageRequire = null\r\n    let errorSubmitMessageWrongFormat = null\r\n\r\n    if (values.buildings) {\r\n        const buildingArrayErrors = []\r\n\r\n        values.buildings.forEach((building, index) => {\r\n            const buildingErrors = {};\r\n\r\n            if (!building.objective) {\r\n                buildingErrors.objective = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2;\r\n                errorSubmitMessageRequire = Constants.SUBMIT_ERROR_MEASSAGE.MSG_01;\r\n            }\r\n\r\n            if (!building.numberbuilding) {\r\n                buildingErrors.numberbuilding = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2;\r\n                errorSubmitMessageRequire = Constants.SUBMIT_ERROR_MEASSAGE.MSG_01;\r\n            }\r\n\r\n            if (!building.buildingarea) {\r\n                buildingErrors.buildingarea = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2;\r\n                errorSubmitMessageRequire = Constants.SUBMIT_ERROR_MEASSAGE.MSG_01;\r\n            }\r\n\r\n            if (Object.keys(buildingErrors).length !== 0) {\r\n                buildingArrayErrors[index] = buildingErrors\r\n            }\r\n        })\r\n\r\n        if (buildingArrayErrors.length) {\r\n            errors.buildings = buildingArrayErrors\r\n        }\r\n    }\r\n\r\n    if (errorSubmitMessageRequire) {\r\n        errors.errorForm = errorSubmitMessageRequire\r\n    } else {\r\n        errors.errorForm = errorSubmitMessageWrongFormat\r\n    }\r\n    return errors;\r\n}\r\n\r\nexport const SearchHouseNumberValidate = (values) => {\r\n    const errors = {};\r\n\r\n    if (!values.TRrequest) {\r\n        errors.TRrequest = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2\r\n    }\r\n\r\n    return errors;\r\n\r\n}\r\nexport const searchConstructValidate = (values) => {\r\n    const errors = {}\r\n\r\n    if (!values.permissionID && !values.districtID) {\r\n        errors.permissionID = \"ระบุอย่างน้อย 1 เงื่อนไข\";\r\n        errors.districtID = \"ระบุอย่างน้อย 1 เงื่อนไข\";\r\n    } else {\r\n        if (values.permissionID && values.permissionID.length < 3) {\r\n            errors.permissionID = \"ระบุอย่างน้อย 3 ตัวอักษร\";\r\n        }\r\n    }\r\n\r\n    return errors\r\n}\r\n\r\n\r\n// ###########################  SURVEY #######################\r\nexport const validateFormDraftPnt = (values) => {\r\n    const errors = {}\r\n\r\n    if (!values.name) {\r\n        errors.name = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2;\r\n    }\r\n\r\n    if (!values.districtID) {\r\n        errors.districtID = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2;\r\n    }\r\n\r\n    if (!values.subDistrictID) {\r\n        errors.subDistrictID = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2;\r\n    }\r\n\r\n    if (!values.dataType) {\r\n        errors.dataType = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2;\r\n    }\r\n\r\n    if (!values.date) {\r\n        errors.date = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2;\r\n    }\r\n\r\n    return errors\r\n}\r\n\r\nexport const validateFormDraftBLDG = (values) => {\r\n    const errors = {}\r\n    let errorSubmitMessageRequire = null\r\n    let errorSubmitMessageWrongFormat = null\r\n\r\n    if (values) {\r\n        if (!values.BL_TYPE) {\r\n            errors.BL_TYPE = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2;\r\n            errorSubmitMessageRequire = Constants.SUBMIT_ERROR_MEASSAGE.MSG_01;\r\n        }\r\n\r\n        if (values.BL_ACT_NAME && values.BL_ACT_NAME.length > 50) {\r\n            errors.BL_ACT_NAME = Constants.RESOURCEWORDS.ERROR_TEXT.MINUTES_LIMIT_DIGIT_SURVEY;\r\n            errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n        }\r\n        \r\n        if (values.BL_HID && values.BL_HID.length > 50) {\r\n            errors.BL_HID = Constants.RESOURCEWORDS.ERROR_TEXT.MINUTES_LIMIT_DIGIT_SURVEY;\r\n            errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n        }\r\n\r\n        if (!values.BL_USE) {\r\n            errors.BL_USE = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2;\r\n            errorSubmitMessageRequire = Constants.SUBMIT_ERROR_MEASSAGE.MSG_01;\r\n        }\r\n        if (!values.BL_MAIN_USE) {\r\n            errors.BL_MAIN_USE = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2;\r\n            errorSubmitMessageRequire = Constants.SUBMIT_ERROR_MEASSAGE.MSG_01;\r\n        }\r\n    }\r\n\r\n\r\n    if (errorSubmitMessageRequire) {\r\n        errors.errorForm = errorSubmitMessageRequire\r\n    } else {\r\n        errors.errorForm = errorSubmitMessageWrongFormat\r\n    }\r\n\r\n\r\n    return errors\r\n}\r\n\r\nexport const validateFormDraftBLDGStep2 = (values) => {\r\n    const errors = {}\r\n    let errorSubmitMessageRequire = null\r\n    let errorSubmitMessageWrongFormat = null\r\n\r\n    if (values) {\r\n\r\n        if (!values.BL_NAME) {\r\n            errors.BL_NAME = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2;\r\n            errorSubmitMessageRequire = Constants.SUBMIT_ERROR_MEASSAGE.MSG_01;\r\n        } else if (values.BL_NAME && values.BL_NAME.length > 150) {\r\n            errors.BL_NAME = Constants.RESOURCEWORDS.ERROR_TEXT.MINUTES_LIMIT_DIGIT_SURVEY_BL_NAME;\r\n            errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n        }\r\n\r\n        if (values.BL_SUBNAME && values.BL_SUBNAME.length > 150) {\r\n            errors.BL_SUBNAME = Constants.RESOURCEWORDS.ERROR_TEXT.MINUTES_LIMIT_DIGIT_SURVEY_BL_NAME;\r\n            errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n        }\r\n\r\n        if (values.BL_HOUSENUM && values.BL_HOUSENUM.length > 20) {\r\n            errors.BL_HOUSENUM = Constants.RESOURCEWORDS.ERROR_TEXT.HOUSE_NO_LIMIT_DIGIT;\r\n            errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n        }\r\n        if (values.BL_VILLNUM && values.BL_VILLNUM.length > 10) {\r\n            errors.BL_VILLNUM = Constants.RESOURCEWORDS.ERROR_TEXT.CHANODE_LIMIT_DIGIT;\r\n            errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n        }\r\n\r\n        if (values.BL_VILLAGE && values.BL_VILLAGE.length > 35) {\r\n            errors.BL_VILLAGE = Constants.RESOURCEWORDS.ERROR_TEXT.MINUTES_LIMIT_DIGIT_SURVEY_BL_VILLAGE;\r\n            errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n        }\r\n\r\n        if (values.TROK && values.TROK.length > 100) {\r\n            errors.TROK = Constants.RESOURCEWORDS.ERROR_TEXT.VALIDATION_MAP_NAME_FAIL;\r\n            errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n        }\r\n        if (values.BL_SOI && values.BL_SOI.length > 100) {\r\n            errors.BL_SOI = Constants.RESOURCEWORDS.ERROR_TEXT.VALIDATION_MAP_NAME_FAIL;\r\n            errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n        }\r\n        if (values.BL_ROAD && values.BL_ROAD.length > 50) {\r\n            errors.BL_ROAD = Constants.RESOURCEWORDS.ERROR_TEXT.MINUTES_LIMIT_DIGIT_SURVEY;\r\n            errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n        }\r\n        if (values.BL_POSTCODE && values.BL_POSTCODE.length > 5) {\r\n            errors.BL_POSTCODE = Constants.RESOURCEWORDS.ERROR_TEXT.MINUTES_LIMIT_DIGIT_SURVEY_BL_POSTCODE;\r\n            errorSubmitMessageWrongFormat = Constants.SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n        }\r\n        if (!values.SURVEY_DATE) {\r\n            errors.SURVEY_DATE = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY_2;\r\n            errorSubmitMessageRequire = Constants.SUBMIT_ERROR_MEASSAGE.MSG_01;\r\n        }\r\n\r\n\r\n\r\n\r\n    }\r\n\r\n\r\n    if (errorSubmitMessageRequire) {\r\n        errors.errorForm = errorSubmitMessageRequire\r\n    } else {\r\n        errors.errorForm = errorSubmitMessageWrongFormat\r\n    }\r\n\r\n\r\n    return errors\r\n}\r\n\r\n\r\nexport const validateFormSearchDraftPnt = (values) => {\r\n    const errors = {}\r\n\r\n    if (!values.name && !values.dataType && !values.startDate && !values.endDate) {\r\n        errors.name = \"ระบุอย่างน้อย 1 เงื่อนไข\";\r\n        errors.dataType = \"ระบุอย่างน้อย 1 เงื่อนไข\";\r\n        errors.startDate = \"ระบุอย่างน้อย 1 เงื่อนไข\";\r\n        errors.endDate = \"ระบุอย่างน้อย 1 เงื่อนไข\";\r\n    }\r\n\r\n    if (values.startDate && !values.endDate) {\r\n        errors.endDate = \"ระบุข้อมูล\";\r\n    }\r\n\r\n    if (!values.startDate && values.endDate) {\r\n        errors.startDate = \"ระบุข้อมูล\";\r\n    }\r\n\r\n    return errors\r\n}\r\n\r\nexport const validateFormSearchDraftBLDG = (values) => {\r\n    const errors = {}\r\n\r\n    if (!values.name && !values.buildingType && !values.startDate && !values.endDate) {\r\n        errors.name = \"ระบุอย่างน้อย 1 เงื่อนไข\";\r\n        errors.buildingType = \"ระบุอย่างน้อย 1 เงื่อนไข\";\r\n        errors.startDate = \"ระบุอย่างน้อย 1 เงื่อนไข\";\r\n        errors.endDate = \"ระบุอย่างน้อย 1 เงื่อนไข\";\r\n    }\r\n\r\n    if (values.startDate && !values.endDate) {\r\n        errors.endDate = \"ระบุข้อมูล\";\r\n    }\r\n\r\n    if (!values.startDate && values.endDate) {\r\n        errors.startDate = \"ระบุข้อมูล\";\r\n    }\r\n\r\n    return errors\r\n}\r\n\r\nexport const surveyReportValidate = (values) => {\r\n    const errors = {};\r\n\r\n    if (!values.surveyLayer || values.surveyLayer === -1) {\r\n        errors.surveyLayer = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY;\r\n    }\r\n\r\n    return errors\r\n}\r\n\r\nexport const landMarkValidate = (values) => {\r\n\r\n    const checkString = (value) => {\r\n        const patt = /\\D/g\r\n        const result = patt.test(value);\r\n\r\n        return result\r\n    }\r\n\r\n    const errors = {};\r\n\r\n    if (values.numberOfLandMark) {\r\n        if (checkString(values.numberOfLandMark)) {\r\n            errors.numberOfLandMark = Constants.RESOURCEWORDS.ERROR_TEXT.NOT_NUMBER;\r\n        }\r\n    }\r\n\r\n    if (!values.typeOfLandMark) {\r\n        errors.typeOfLandMark = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY;\r\n    }\r\n\r\n    if (!values.nameOfLandMark) {\r\n        errors.nameOfLandMark = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY;\r\n    }\r\n\r\n    if (!values.district) {\r\n        errors.district = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY;\r\n    }\r\n\r\n    if (!values.subDistrict) {\r\n        errors.subDistrict = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY;\r\n    }\r\n\r\n    if (values.surveyYear) {\r\n        if (checkString(values.surveyYear)) {\r\n            errors.surveyYear = Constants.RESOURCEWORDS.ERROR_TEXT.NOT_NUMBER;\r\n        } else {\r\n            const lenOfValue = values.surveyYear.toString().length;\r\n            if (lenOfValue !== 4) {\r\n                errors.surveyYear = 'กรุณาระบุปีที่สำรวจ 4 หลัก'\r\n            }\r\n        }\r\n\r\n    }\r\n\r\n    return errors\r\n}\r\n\r\nexport const landMarkSearchValidate = (values) => {\r\n    const ERROR_SELECT = 'กรุณาระบุอย่างน้อย 1 เงื่อนไข';\r\n    const errors = {};\r\n\r\n    if (!values.nameOfLandMark && !values.typeOfLandMark && (!values.startDate && !values.endDate)) {\r\n        errors.nameOfLandMark = ERROR_SELECT;\r\n        errors.typeOfLandMark = ERROR_SELECT;\r\n        errors.startDate = ERROR_SELECT;\r\n    }\r\n\r\n    return errors\r\n}\r\n\r\nexport const userFormValidate = (values, props) => {\r\n    const errors = {};\r\n\r\n    if (!values.userName || values.userName.length > 50) {\r\n        errors.userName = \"ระบุ 1 - 50 ตัวอักษร\";\r\n    }\r\n\r\n    if (props.action && props.action === \"ADD\") {\r\n        if (!values.password) {\r\n            errors.password = \"กรุณาระบุตัวอักษรหรือตัวเลข อย่างน้อย 6-20 ตัวอักษร\"\r\n        }\r\n        if (!values.confirmPassword) {\r\n            errors.confirmPassword = \"กรุณาระบุตัวอักษรหรือตัวเลข อย่างน้อย 6-20 ตัวอักษร\"\r\n        }\r\n    }\r\n\r\n    if (values.password && (values.password.length > 20 || values.password.length < 6 || /[^a-zA-Z0-9 ]/i.test(values.password))) {\r\n        errors.password = \"กรุณาระบุตัวอักษรหรือตัวเลข อย่างน้อย 6-20 ตัวอักษร\"\r\n    }\r\n\r\n    if (values.password && !values.confirmPassword) {\r\n        errors.confirmPassword = \"กรุณาระบุตัวอักษรหรือตัวเลข อย่างน้อย 6-20 ตัวอักษร\"\r\n    } else if (values.password && values.confirmPassword !== values.password) {\r\n        errors.confirmPassword = Constants.RESOURCEWORDS.ERROR_TEXT.CONFIRM_PASSWORD_FAILED\r\n    }\r\n\r\n    if (!values.firstName || values.firstName.length > 50) {\r\n        errors.firstName = \"ระบุ 1 - 50 ตัวอักษร\"\r\n    }\r\n\r\n    if (values.lastName && values.lastName.length > 100) {\r\n        errors.lastName = \"ระบุได้ไม่เกิน 100 ตัวอักษร\"\r\n    }\r\n\r\n    if (!values.groupID) {\r\n        errors.groupID = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY\r\n    }\r\n\r\n    if (!values.email || values.email.length > 50) {\r\n        // errors.email = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY\r\n        errors.email = \"ระบุ 1 - 50 ตัวอักษร\"\r\n    } else if (!/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}$/i.test(values.email)) {\r\n        errors.email = Constants.RESOURCEWORDS.ERROR_TEXT.EMAIL_FAILED\r\n    }\r\n\r\n    if (values.identificationNo && !checkCitizenId(values.identificationNo)) {\r\n        errors.identificationNo = Constants.RESOURCEWORDS.ERROR_TEXT.CITIZENID_FAILED\r\n    }\r\n\r\n    if (values.activated === undefined || values.activated === null) { // ต้องเช็คแบบนี้เพราะรับค่ามา 0 กับ 1 \r\n        errors.activated = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY\r\n    }\r\n\r\n    if (values.telephone && values.telephone.length > 100) {\r\n        errors.telephone = \"ระบุได้ไม่เกิน 100 ตัวอักษร\"\r\n    }\r\n\r\n    return errors\r\n}\r\n\r\nexport const reportLoginValidate = values => {\r\n    const errors = {}\r\n\r\n    if (!values.startDate) {\r\n        errors.startDate = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY;\r\n    }\r\n\r\n    if (!values.endDate) {\r\n        errors.endDate = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY;\r\n    }\r\n\r\n    if (!values.system) {\r\n        errors.system = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY;\r\n    } else {\r\n        if(values.system === 'SYS00' && !values.userName) {\r\n            errors.userName = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY;\r\n        }\r\n    }\r\n\r\n    return errors;\r\n}\r\n\r\nexport const searchEditPmr1Validate = values => {\r\n    const errors = {}\r\n\r\n    if (!values.RequestNO) {\r\n        errors.RequestNO = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY;\r\n    }\r\n\r\n    if (!values.RequestName) {\r\n        errors.RequestName = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY;\r\n    }\r\n\r\n    if (!values.RequestDistrict) {\r\n        errors.RequestDistrict = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY;\r\n    }\r\n\r\n    if (!values.RequestSubdistrict) {\r\n        errors.RequestSubdistrict = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY;\r\n    }\r\n\r\n    if (!values.RequestStartDate) {\r\n        errors.RequestStartDate = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY;\r\n    }\r\n\r\n    if (!values.RequestEndDate) {\r\n        errors.RequestEndDate = Constants.RESOURCEWORDS.ERROR_TEXT.NO_EMPTY;\r\n    }\r\n\r\n    return errors;\r\n}","\r\nimport { KEY_LOCALSTORAGE } from '../Constants/Constants';\r\n\r\nexport const getTokenLocalStore = () => {\r\n    return localStorage.getItem(KEY_LOCALSTORAGE.KEY_TOKEN_LOCAL) //ถ้าไม่มีจะคืนค่าเป็น null\r\n}\r\n\r\nexport const getTypeLocalStore = () => {\r\n    return localStorage.getItem(KEY_LOCALSTORAGE.KEY_TYPE_LOCAL) //ถ้าไม่มีจะคืนค่าเป็น null\r\n}\r\n\r\nexport const setTokenLocalStore = (token, type) => { //สามารถส่ง type หรือไม่ส่งมาก็ได้\r\n    localStorage.setItem(KEY_LOCALSTORAGE.KEY_TOKEN_LOCAL, token);\r\n\r\n    if (type) {\r\n        localStorage.setItem(KEY_LOCALSTORAGE.KEY_TYPE_LOCAL, type);\r\n    } else {\r\n        localStorage.removeItem(KEY_LOCALSTORAGE.KEY_TYPE_LOCAL)\r\n    }\r\n}\r\n\r\nexport const getLoginHistoryLocalStore = () => {\r\n    return localStorage.getItem(KEY_LOCALSTORAGE.KEY_LOGIN_HISTORY_LOCAL)\r\n}\r\n\r\nexport const setLoginHistoryLocalStore = loginHistoryID => {\r\n    localStorage.setItem(KEY_LOCALSTORAGE.KEY_LOGIN_HISTORY_LOCAL, loginHistoryID);\r\n}\r\n\r\nexport const clearLoginHistoryLocalStore = () => {\r\n    localStorage.removeItem(KEY_LOCALSTORAGE.KEY_LOGIN_HISTORY_LOCAL)\r\n}\r\n\r\nexport const clearTokenLocalStore = () => {\r\n    localStorage.removeItem(KEY_LOCALSTORAGE.KEY_TOKEN_LOCAL)\r\n    localStorage.removeItem(KEY_LOCALSTORAGE.KEY_TYPE_LOCAL)\r\n    localStorage.removeItem(KEY_LOCALSTORAGE.KEY_LOGIN_HISTORY_LOCAL)\r\n}\r\n","import { getTokenLocalStore } from './LocalStorageUtill';\r\n\r\nconst CreateRequest_ = (reqType) => {\r\n  // const bearerKey = localStorage.getItem(\"token\");\r\n  const bearerKey = getTokenLocalStore();\r\n  return {\r\n    method: reqType,\r\n    headers: {\r\n        'Content-Type': 'application/json',\r\n      Authorization: 'bearer ' + bearerKey,\r\n    },\r\n  };\r\n};\r\n\r\nconst CreateRequestFormData_ = (reqType) => {\r\n  const bearerKey = getTokenLocalStore();\r\n  return {\r\n    method: reqType,\r\n    headers: {\r\n      Authorization: 'bearer ' + bearerKey,\r\n    },\r\n  };\r\n};\r\n\r\nconst CreateRequest = (reqType) => {\r\n  return {\r\n    method: reqType,\r\n    headers: {\r\n      'Content-Type': 'application/json',\r\n    },\r\n  };\r\n};\r\n\r\nexport const fetchGet = (url) => {\r\n  const promise = new Promise((resolve, reject) => {\r\n    fetch(url, CreateRequest('GET'))\r\n      .then((res) => {\r\n        if (res.status === 401) {\r\n          localStorage.clear();\r\n          // window.location = `${process.env.PUBLIC_URL}/login`\r\n          resolve(res);\r\n        } else {\r\n          resolve(res);\r\n        }\r\n      })\r\n      .catch((res) => {\r\n        resolve(res);\r\n      });\r\n  });\r\n\r\n  return promise;\r\n};\r\n\r\nexport const fetchPost = (url, param) => {\r\n  const request = {\r\n    ...CreateRequest('POST'),\r\n    body: JSON.stringify(param),\r\n  };\r\n\r\n  const promise = new Promise((resolve) => {\r\n    fetch(url, request)\r\n      .then((res) => {\r\n        if (res.ok) {\r\n          resolve(res);\r\n        } else {\r\n          throw Error(`Request rejected with status ${res.status}`);\r\n        }\r\n      })\r\n      .catch((res) => {\r\n        resolve(res);\r\n      });\r\n  });\r\n\r\n  return promise;\r\n};\r\n\r\nexport const fetchGet_ = (url) => {\r\n  var promise = new Promise((resolve, reject) => {\r\n    fetch(url, CreateRequest_('GET'))\r\n      .then((res) => {\r\n        if (res.status === 401) {\r\n          localStorage.clear();\r\n          window.location = `${process.env.PUBLIC_URL}`;\r\n          resolve();\r\n        } else {\r\n          resolve(res);\r\n        }\r\n      })\r\n      .catch((res) => {\r\n        resolve('Error!');\r\n      });\r\n  });\r\n\r\n  return promise;\r\n};\r\n\r\nexport const fetchPost_ = (url, param) => {\r\n  const request = { ...CreateRequest_('POST'), body: JSON.stringify(param) };\r\n\r\n  var promise = new Promise((resolve, reject) => {\r\n    fetch(url, request)\r\n      .then((res) => {\r\n        if (res.status === 401) {\r\n          localStorage.clear();\r\n          window.location.href = `${process.env.PUBLIC_URL}`;\r\n          resolve();\r\n        } else {\r\n          resolve(res);\r\n        }\r\n      })\r\n      .catch((res) => {\r\n        resolve('Error!');\r\n      });\r\n  });\r\n\r\n  return promise;\r\n};\r\n\r\nexport const fetchPostFile_ = (url, formData) => {\r\n  const request = { ...CreateRequestFormData_('POST'), body: formData };\r\n\r\n  var promise = new Promise((resolve, reject) => {\r\n    fetch(url, request)\r\n      .then((res) => {\r\n        if (res.status === 401) {\r\n          localStorage.clear();\r\n          window.location.href = `${process.env.PUBLIC_URL}`;\r\n          resolve();\r\n        } else {\r\n          resolve(res);\r\n        }\r\n      })\r\n      .catch((res) => {\r\n        resolve('Error!');\r\n      });\r\n  });\r\n\r\n  return promise;\r\n};\r\n\r\nexport const fetchDel = (url) => {\r\n  return fetch(url, CreateRequest('DELETE'));\r\n};\r\n\r\nexport const fetchPut = (url, param) => {\r\n  const request = { ...CreateRequest('PUT'), body: JSON.stringify(param) };\r\n  return fetch(url, request);\r\n};\r\n\r\n//for fetch mapservice\r\nexport const fetchMapService = (url, formData) => {\r\n  // return fetch(`${window.CONFIG_URL_GIS.DRAFT_BLDG}/deleteFeatures`, {\r\n  const promise = new Promise((resolve, reject) => {\r\n    fetch(url, { method: 'POST', body: formData })\r\n      .then((res) => {\r\n        resolve(res);\r\n      })\r\n      .catch((res) => {\r\n        resolve('Error!');\r\n      });\r\n  });\r\n\r\n  return promise;\r\n};\r\n","import { fetchPost_ } from '../../Utilities/ServiceUtils';\r\n\r\nexport const saveLoginHistory = ({ userID, systemID }) => {\r\n    return fetchPost_(process.env.REACT_APP_SAVE_LOGIN_HISTORY, {\r\n        userID: userID,\r\n        systemID: systemID\r\n    })\r\n        .then(res => {\r\n            if (!res.ok) {\r\n                throw res.status\r\n            }\r\n            return res.json()\r\n        })\r\n        .catch(ex => {\r\n            console.log('ex saveLoginHistory', ex)\r\n        })\r\n}\r\n\r\nexport const saveLogoutHistory = (loginHistoryID) => {\r\n    return fetchPost_(process.env.REACT_APP_SAVE_LOGOUT_HISTORY, {\r\n        id: loginHistoryID\r\n    })\r\n        .then(res => {\r\n            if (!res.ok) {\r\n                throw res.status\r\n            }\r\n            return res.json()\r\n        })\r\n        .catch(ex => {\r\n            console.log('ex saveLogoutHistory', ex)\r\n        })\r\n}\r\n","import * as actionType from \"../../Constants/ActionTypes\";\r\nimport { fetchGet_, fetchGet } from '../../Utilities/ServiceUtils';\r\nimport { SYSTEM } from '../../Constants/Constants';\r\nimport { setTokenLocalStore, clearTokenLocalStore } from '../../Utilities/LocalStorageUtill';\r\n// import { getTypeLocalStore } from '../../../Utilities/LocalStorageUtill';\r\n\r\nexport const updateSystem = (system) => ({\r\n    type: actionType.UPDATE_SYSTEM,\r\n    system: system\r\n})\r\n\r\nexport const getUpdatePmr1Form = () => { //เอาไว้สำหรับดึงค่า pmr1Form ของประชาชนทั่วไปเข้าใช้เมนูแก้ไข ผมร.\r\n    return dispatch => {\r\n        fetchGet_(process.env.REACT_APP_PMT_GET_PROFILE)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status;\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(data => {\r\n                if (data) {\r\n                    dispatch({\r\n                        type: actionType.UPDATE_PMR_FORM,\r\n                        pmr1Form: data && data.pmr1Form ? data.pmr1Form : null,\r\n                    })\r\n                }\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex getProfile PMR', ex)\r\n            })\r\n    }\r\n}\r\n\r\nexport const getMenuCMP = () => { //กรณี user เข้าสู่ระบบ cmp จะไม่ get profile\r\n    return dispatch => {\r\n        return fetchGet(process.env.REACT_APP_GET_FUNCTIONS)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status;\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(result => {\r\n                if (result) {\r\n                    setTokenLocalStore(result.jwtToken);\r\n                    dispatch({\r\n                        type: actionType.GET_LOGIN,\r\n                        isLogin: true,\r\n                        profile: { groupID: 'GID2', ...result },  // hardcode groupID ประชาชนที่ม่ได้ลงทะเบียน\r\n                        system: SYSTEM.CMP\r\n                    })\r\n                }\r\n                return result\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex getMenu CMP', ex)\r\n            })\r\n    }\r\n}\r\n\r\nexport const getProfileUser = system => { // user ที่สร้างโดยการลงทะเบียน\r\n    return dispatch => {\r\n        return fetchGet_(process.env.REACT_APP_PMT_GET_PROFILE)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status;\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(data => {\r\n                if (data) {\r\n                    dispatch({\r\n                        type: actionType.GET_LOGIN,\r\n                        isLogin: true,\r\n                        profile: data,\r\n                        system: system\r\n                    })\r\n                } else {\r\n                    manageGetProfileFail(dispatch)\r\n                }\r\n                return data;\r\n            })\r\n            .catch(ex => {\r\n                manageGetProfileFail(dispatch)\r\n                console.log('ex getProfileUser', ex)\r\n            })\r\n    }\r\n};\r\n\r\nexport const getProfileBMA = system => { // user ที่สร้างโดยเจ้าหน้าที่\r\n    return dispatch => {\r\n        return fetchGet_(process.env.REACT_APP_PMR_GET_PROFILE_BMA)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status;\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(data => {\r\n                if (data) {\r\n                    dispatch({\r\n                        type: actionType.GET_LOGIN,\r\n                        isLogin: true,\r\n                        profile: data,\r\n                        system: system\r\n                    })\r\n                } else {\r\n                    manageGetProfileFail(dispatch)\r\n                }\r\n                return data\r\n            })\r\n            .catch(ex => {\r\n                manageGetProfileFail(dispatch)\r\n                console.log('ex getProfileBMA ', ex)\r\n            })\r\n    }\r\n}\r\n\r\nexport const manageGetProfileFail = (dispatch) => {\r\n    setTimeout(() => {\r\n        clearTokenLocalStore()\r\n        dispatch({\r\n            type: actionType.GET_LOGIN,\r\n            isLogin: null,\r\n        })\r\n    }, 1000)\r\n}\r\n\r\nexport const clearReducer = () => { //จะวิ่งไป clear ทุก reducer ยกเว้น authenReducer\r\n    return {\r\n        type: actionType.CLEAR_REDUCER\r\n    }\r\n}\r\n\r\nexport const clearAllReducer = () => dispatch => {\r\n    dispatch({\r\n        type: actionType.CLEAR_REDUCER\r\n    })\r\n    dispatch({\r\n        type: actionType.CLEAR_PROFILE\r\n    })\r\n}","import React, { Fragment } from 'react';\r\nimport { withStyles } from '@material-ui/core';\r\nimport { Field } from 'redux-form';\r\nimport Grid from '@material-ui/core/Grid'\r\nimport Hidden from '@material-ui/core/Hidden';\r\nimport Paper from '@material-ui/core/Paper';\r\nimport TextField from '@material-ui/core/TextField'\r\nimport InputAdornment from '@material-ui/core/InputAdornment';\r\nimport FormControl from '@material-ui/core/FormControl';\r\nimport FormHelperText from '@material-ui/core/FormHelperText';\r\nimport Button from \"../../Controls/Containers/Button\";\r\nimport { HEADER, SYSTEM } from '../../Constants/Constants';\r\n\r\nconst renderTextField = ({\r\n    label,\r\n    input,\r\n    meta: { touched, invalid, error },\r\n    classes,\r\n    srcImg,\r\n    ...custom\r\n}) => (\r\n        <FormControl className={classes.root} error={touched && invalid}>\r\n            <TextField\r\n                {...input}\r\n                {...custom}\r\n                label={label}\r\n                error={touched && invalid}\r\n                variant=\"outlined\"\r\n                className={classes.textField}\r\n                InputLabelProps={{\r\n                    shrink: true,\r\n                }}\r\n                InputProps={{\r\n                    endAdornment: (\r\n                        <InputAdornment position=\"end\">\r\n                            <img style={{ marginLeft: '5px' }} src={srcImg} />\r\n                        </InputAdornment>\r\n                    ),\r\n                }}\r\n            />\r\n            <FormHelperText className={classes.formHelper}>{touched && invalid && error}</FormHelperText>\r\n        </FormControl>\r\n    )\r\nconst TextFieldRedux = withStyles(theme => ({\r\n    root: {\r\n        marginTop: \"15px\",\r\n        width: '100%',\r\n    },\r\n    textField: {\r\n        [`& input`]: {\r\n            height: '50px',\r\n            padding: '0px 15px 0px 15px',\r\n            WebkitBoxShadow: 'inset 0 0 0px 9999px white',\r\n            backgroundColor: '#FFFFFF'\r\n        },\r\n        [`& input:-webkit-autofill`]: {\r\n            WebkitBoxShadow: 'inset 0 0 0px 9999px white',\r\n            backgroundColor: '#FFFFFF'\r\n        },\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            [`& input`]: {\r\n                height: '40px',\r\n                backgroundColor: '#FFFFFF'\r\n            },\r\n        },\r\n    },\r\n\r\n}))(renderTextField)\r\n\r\nconst LoginView = ({\r\n    classes,\r\n    mode, // PMR หรือ CMS\r\n    handleSubmit,\r\n    onSubmit,\r\n    onClickRegister,\r\n    onClickForgotPassword\r\n}) => {\r\n    const renderFormLogin = () => {\r\n        return <form onSubmit={handleSubmit(onSubmit)} method=\"POST\" className={classes.containerForm}>\r\n            <Grid container spacing={0}>\r\n                <Grid item xs={12}>\r\n                    <Field\r\n                        name=\"username\"\r\n                        component={TextFieldRedux}\r\n                        placeholder={mode === SYSTEM.PMR1 ? 'cpudd@mail.com':'Username'}\r\n                        label={\"Username\"}\r\n                        srcImg={`${process.env.PUBLIC_URL}/img/login/login_user.png`}\r\n                        required\r\n                    />\r\n                </Grid>\r\n                <Grid item xs={12}>\r\n                    <Field\r\n                        name=\"password\"\r\n                        type=\"password\"\r\n                        component={TextFieldRedux}\r\n                        label={'Password'}\r\n                        placeholder=\"Password\"\r\n                        srcImg={`${process.env.PUBLIC_URL}/img/login/login_icn_pw.png`}\r\n                        required\r\n                    />\r\n                </Grid>\r\n                {/* <Grid item xs={12} style={{ alignItems: \"center\", display: 'flex', flexDirection: 'column' }}>\r\n                    <div style={{ width: '150px' }}>\r\n                        <Field\r\n                            name=\"remember\"\r\n                            component=\"input\"\r\n                            type=\"checkbox\"\r\n                        />\r\n                        <label>Remember me</label>\r\n                    </div>\r\n                </Grid> */}\r\n\r\n                <Grid item xs={12} className={`${mode === SYSTEM.PMR1 ? classes.containnerBtnPMR : classes.containnerBtnCMS}`} >\r\n                    <Button\r\n                        type=\"submit\"\r\n                        label=\"เข้าสู่ระบบ\"\r\n                        className={classes.btnLogin}\r\n                    />\r\n                    {mode === SYSTEM.PMR1 && <Button\r\n                        color=\"white\"\r\n                        label=\"ลงทะเบียน\"\r\n                        onClick={onClickRegister}\r\n                        className={classes.btnRegister}\r\n                    />}\r\n                    {<Grid container justify=\"flex-end\" className={classes.forgotPassword}>\r\n                        <div onClick={onClickForgotPassword} ><u>Forgot password ?</u></div>\r\n                    </Grid>}\r\n                </Grid>\r\n            </Grid>\r\n        </form>\r\n    }\r\n\r\n    return (\r\n        <Fragment>\r\n            {/* // ###### Web View #######  */}\r\n            <Hidden smDown key={1}>\r\n                <Grid container className={classes.container}>\r\n                    <Grid item xs={9} sm={8} md={9} className={`${classes.containerBackground} ${mode === SYSTEM.PMR1?classes.pmrBackground:classes.cmsBackground}`}>\r\n                        <div className={classes.containerLogo}>\r\n                            <div className={classes.subContainerLogo} >\r\n                                <img src={`${process.env.PUBLIC_URL}/img/login/login_logo.png`}\r\n                                    className={classes.imgLogo} />\r\n                                <div>\r\n                                    <div className={classes.titleBackground}>{HEADER[mode].TITLE}</div>\r\n                                    <div className={classes.subTitleBackground}>{HEADER[mode].SUB_TITLE}</div>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n                    </Grid >\r\n                    <Grid item xs={3} sm={4} md={3} className={classes.containerLogin} >\r\n                        <Grid item xs={12} className={classes.divLoginHeader}>\r\n                            <div className={classes.titleLogin} >เข้าสู่ระบบ</div>\r\n                            <div className={classes.subTitleLogin}>Login</div>\r\n                        </Grid>\r\n                        <Grid item xs={12} style={{ padding: \"60px 30px\" }}>\r\n                            {renderFormLogin()}\r\n                        </Grid>\r\n                        <Grid item xs={12} className={classes.divLogoFooter}>\r\n                            <div>พบปัญหาติดต่อผู้ดูแลระบบ</div>\r\n                            <div>{`Email : ${window.EMAIL_ADMIN} โทร.${window.TEL_ADMIN}`}</div>\r\n                        </Grid>\r\n                    </Grid>\r\n                </Grid >\r\n            </Hidden >\r\n\r\n            {/* ###### Mobile View ####### */}\r\n            < Hidden mdUp implementation=\"css\" key={2} className={classes.mobileAuthenView} >\r\n                <Grid container className={classes.container}>\r\n                    <Grid item xs={12}  className={`${classes.containerBackgroundMobile} ${mode === SYSTEM.PMR1?classes.pmrBackground:classes.cmsBackground}`}>\r\n                        <div className={classes.containerLogo}>\r\n                            <div className={classes.subContainerLogo} >\r\n                                <img src={`${process.env.PUBLIC_URL}/img/login/login_logo.png`}\r\n                                    className={classes.imgLogo} />\r\n                                <div>\r\n                                    <div className={classes.titleBackground}>{HEADER[mode].TITLE}</div>\r\n                                    <div className={classes.subTitleBackground}>{HEADER[mode].SUB_TITLE}</div>\r\n                                </div>\r\n                            </div>\r\n                        </div>\r\n\r\n                        <div className={classes.containerBottomLogo}>\r\n                            <div className={classes.titleLogin} >เข้าสู่ระบบ</div>\r\n                            <div className={classes.subTitleLogin}>BMA MAP</div>\r\n                        </div>\r\n                        <Paper className={classes.paperLoginForm} elevation={1}>\r\n                            <div className={classes.mobileLoginForm}>\r\n                                {renderFormLogin()}\r\n                            </div>\r\n                        </Paper>\r\n                    </Grid>\r\n                </Grid>\r\n            </Hidden >\r\n        </Fragment >\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        paddingLeft: 0,\r\n        paddingRight: 0\r\n    },\r\n    mobileLoginForm: {\r\n        width: '90%',\r\n        display: 'flex',\r\n        alignItems: 'center'\r\n    },\r\n    container: {\r\n        width: \"100%\",\r\n        height: \"100%\",\r\n    },\r\n    containerForm: {\r\n        width: \"100%\",\r\n    },\r\n    containerBackground: {\r\n        height: '100%',\r\n        // backgroundImage: `url(${process.env.PUBLIC_URL}/img/login/login_bg_admin.png)`,\r\n        backgroundRepeat: 'no-repeat',\r\n        backgroundSize: 'cover',\r\n        backgroundPosition: 'center'\r\n    },\r\n    cmsBackground:{\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/login/login_bg_admin.png)`,\r\n    },\r\n    pmrBackground:{\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/login/login_bg.png)`,\r\n    },\r\n    containerLogin: {\r\n        backgroundColor: \"#F3F4F4\",\r\n    },\r\n    containerLogo: {\r\n        width: '100%',\r\n        marginTop: '60px',\r\n        display: 'flex',\r\n        alignItems: 'center',\r\n        flexDirection: 'column'\r\n    },\r\n    containerBottomLogo: {\r\n        bottom: 'calc(55% - 20px)',\r\n        position: 'absolute',\r\n        display: 'flex',\r\n        flexDirection: 'column',\r\n        alignItems: 'flex-start',\r\n        paddingLeft: '20px'\r\n    },\r\n    subContainerLogo: {\r\n        display: 'flex',\r\n        alignItems: 'center',\r\n        flexDirection: 'row',\r\n    },\r\n    imgLogo: {\r\n        height: \"auto\"\r\n    },\r\n    titleBackground: {\r\n        marginLeft: \"20px\",\r\n        fontSize: \"30px\",\r\n        // color: 'white',\r\n        color: '#fdfdfd',\r\n        textShadow: '2px 2px #36551f',\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            fontSize: \"25px\",\r\n        },\r\n        [theme.breakpoints.down(\"xs\")]: {\r\n            fontSize: \"15px\",\r\n        },\r\n    },\r\n    subTitleBackground: {\r\n        marginLeft: \"20px\",\r\n        fontSize: \"20px\",\r\n        // color: 'white',\r\n        color: '#fdfdfd',\r\n        textShadow: '2px 2px #36551f',\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            fontSize: \"18px\",\r\n        },\r\n        [theme.breakpoints.down(\"xs\")]: {\r\n            fontSize: \"14px\",\r\n        },\r\n    },\r\n    titleLogin: {\r\n        color: \"#ACACAC\",\r\n        fontSize: \"30px\",\r\n        fontWeight: \"bold\",\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            fontSize: \"20px\",\r\n            fontWeight: \"bold\",\r\n            color: \"white\",\r\n        },\r\n    },\r\n    subTitleLogin: {\r\n        fontSize: \"36px\",\r\n        fontWeight: \"bold\",\r\n        color: theme.mainTheme.color1,\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            fontSize: \"26px\",\r\n            fontWeight: \"bold\",\r\n            color: \"white\",\r\n        },\r\n    },\r\n    divLoginHeader: {\r\n        position: \"relative\",\r\n        textAlign: \"left\",\r\n        padding: \"0 0 0 40px\",\r\n        marginTop: \"40%\"\r\n    },\r\n    mobileAuthenView: {\r\n        height: \"100%\"\r\n    },\r\n    containerBackgroundMobile: {\r\n        width: '100%',\r\n        height: '100%',\r\n        // backgroundImage: `url(${process.env.PUBLIC_URL}/img/login/login_bg.png)`,\r\n        backgroundRepeat: 'no-repeat',\r\n        backgroundSize: 'cover',\r\n        backgroundPosition: 'center'\r\n    },\r\n    divLogoFooter: {\r\n        color: \"#242424\",\r\n        fontSize: \"12px\",\r\n        paddingLeft: '35px'\r\n    },\r\n    imgLogoFooter: {\r\n        width: \"100%\",\r\n        height: \"auto\",\r\n        verticalAlign: \"middle\"\r\n    },\r\n    paperLoginForm: {\r\n        position: \"absolute\",\r\n        width: \"100%\",\r\n        height: \"45%\",\r\n        bottom: 0,\r\n        display: \"flex\",\r\n        justifyContent: \"center\",\r\n        minHeight: \"290px\"\r\n    },\r\n    btnLogin: {\r\n        width: '100%'\r\n    },\r\n    btnRegister: {\r\n        marginTop: \"15px\",\r\n        width: '100%',\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            marginTop: \"10px\",\r\n        },\r\n    },\r\n    forgotPassword: {\r\n        marginTop: '10px',\r\n        fontSize: '14px',\r\n        cursor: 'pointer',\r\n        '&:hover': {\r\n            color: 'blue'\r\n        }\r\n    },\r\n    containnerBtnPMR: {\r\n        marginTop: '15px',\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            marginTop: \"5px\",\r\n        },\r\n    },\r\n    containnerBtnCMS: {\r\n        marginTop: '15px',\r\n    }\r\n}))(LoginView)\r\n","import React, { Component, Fragment } from 'react'\r\nimport PropTypes from 'prop-types'\r\nimport LoadingSVG from '../images/Loading.svg'\r\n// # Material UI Importing\r\nimport { withStyles } from '@material-ui/core/styles'\r\n\r\nconst width = 300;\r\n\r\nconst TagLoading = () => {\r\n    return <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"150\" height=\"150\" viewBox=\"0 0 50 50\">\r\n        <path fill=\"#23823f\" d=\"M25,5A20.14,20.14,0,0,1,45,22.88a2.51,2.51,0,0,0,2.49,2.26h0A2.52,2.52,0,0,0,50,22.33a25.14,25.14,0,0,0-50,0,2.52,2.52,0,0,0,2.5,2.81h0A2.51,2.51,0,0,0,5,22.88,20.14,20.14,0,0,1,25,5Z\">\r\n            <animateTransform attributeName=\"transform\" type=\"rotate\" from=\"0 25 25\" to=\"360 25 25\" dur=\"0.5s\" repeatCount=\"indefinite\"/>\r\n        </path>\r\n    </svg>\r\n}\r\n\r\nconst styles = theme => ({\r\n    image: {\r\n        width: width\r\n    },\r\n    root: {\r\n        zIndex: theme.zIndex.drawer + 20,\r\n        backgroundColor: 'rgba(255,255,255,0.5)',\r\n        width: '100%',\r\n        height: '100%',\r\n        position: 'fixed',\r\n        top: '0px',\r\n        left: '0px',\r\n        bottom: '0px',\r\n        right: '0px'\r\n        // opacity: 0.5\r\n    },\r\n    loading:{\r\n        position: 'absolute',\r\n        top:'50%',\r\n        left:'50%',\r\n        transform: 'translate(-50%, -50%)',\r\n        width: '150px',\r\n        height: '150px'\r\n    }\r\n    \r\n})\r\n\r\nclass Loading extends Component {\r\n    \r\n    render() {\r\n        const { classes, isShowLoading = true } = this.props\r\n        // console.log('isShowLoading', isShowLoading)\r\n        return isShowLoading ? (<div className={classes.root}>\r\n            {/* <img src={TagLoading} className={classes.loading} alt='loading'/> */}\r\n            <div className={classes.loading}>\r\n                <TagLoading/>\r\n            </div>\r\n        </div>) \r\n        : <Fragment />\r\n    }\r\n}\r\n\r\nLoading.propTypes = {\r\n    classes: PropTypes.object.isRequired\r\n}\r\n\r\nexport default withStyles(styles)(Loading)","import React, { Component } from 'react'\r\nimport { withStyles } from '@material-ui/core/styles'\r\nimport Dialog from '@material-ui/core/Dialog'\r\nimport DialogActions from '@material-ui/core/DialogActions'\r\nimport DialogContent from '@material-ui/core/DialogContent'\r\nimport DialogContentText from '@material-ui/core/DialogContentText'\r\nimport withMobileDialog from '@material-ui/core/withMobileDialog'\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\n\r\nconst styles = theme => ({\r\n\troot: {\r\n\t\twidth: 500,\r\n\t},\r\n\tcontrol: {\r\n\t\twidth: '100%',\r\n\t\tmarginTop: theme.spacing.unit,\r\n\t\tmarginBottom: theme.spacing.unit,\r\n\t},\r\n\timage: {\r\n\t\twidth: 100\r\n\t},\r\n\tdialogRadius: {\r\n\t\tborderRadius: '2px'\r\n\t},\r\n\tcontent: {\r\n\t\tdisplay: 'flex',\r\n\t\tflexDirection: 'column',\r\n\t\tjustifyContent: 'space-evenly',\r\n\t\ttextAlign: 'left'\r\n\t\t// alignItems: 'center',\r\n\t\t// textAlign: 'center',\r\n\t},\r\n\tbtn: {\r\n\t\tjustifyContent: 'flex-end',\r\n\t\tmarginTop: theme.spacing.unit,\r\n\t\tmarginBottom: theme.spacing.unit * 2,\r\n\t\tpadding: '0px 24px 10px 0px'\r\n\t},\r\n})\r\nexport class AlertMessageView extends Component {\r\n\trender() {\r\n\t\tconst {\r\n\t\t\tclasses,\r\n\t\t\ttext,\r\n\t\t\thandleClose,\r\n\t\t\tbutton,\r\n\t\t\tisOpen,\r\n\t\t\ttitle\r\n\t\t} = this.props\r\n\r\n\t\t// console.log('alert view', this.props)\r\n\r\n\t\treturn (\r\n\t\t\t<div>\r\n\t\t\t\t<Dialog\r\n\t\t\t\t\topen={isOpen}\r\n\t\t\t\t\tonClose={handleClose}\r\n\t\t\t\t\taria-labelledby=\"alert-dialog-title\"\r\n\t\t\t\t\taria-describedby=\"alert-dialog-description\"\r\n\t\t\t\t\tclasses={{\r\n\t\t\t\t\t\tpaper: `${classes.root} ${classes.dialogRadius}`\r\n\t\t\t\t\t}}\r\n\t\t\t\t>\r\n\t\t\t\t\t<DialogTitle id=\"alert-dialog-title\">{title}</DialogTitle>\r\n\t\t\t\t\t<DialogContent className={classes.content}>\r\n\t\t\t\t\t\t<DialogContentText id=\"alert-dialog-description\">\r\n\t\t\t\t\t\t\t{text}\r\n\t\t\t\t\t\t</DialogContentText>\r\n\t\t\t\t\t</DialogContent>\r\n\t\t\t\t\t<DialogActions className={classes.btn} >\r\n\t\t\t\t\t\t{button}\r\n\t\t\t\t\t</DialogActions>\r\n\t\t\t\t</Dialog>\r\n\t\t\t</div>\r\n\t\t);\r\n\t}\r\n}\r\nconst AlertMessageViewWithStyles = withStyles(styles)(AlertMessageView)\r\n\r\nexport default withMobileDialog()(AlertMessageViewWithStyles)\r\n","import React, { Component } from 'react';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport Button from './Button';\r\nimport * as Constants from '../../Constants/Constants';\r\nimport AlertMessageView from '../Presentationals/AlertMessageView';\r\n\r\nexport class AlertMessage extends Component {\r\n  handleCancel = () => {\r\n    const { onCancel } = this.props;\r\n    if (onCancel) {\r\n      onCancel();\r\n    }\r\n  };\r\n  handleConfirm = () => {\r\n    const { onSubmit } = this.props;\r\n    if (onSubmit) {\r\n      onSubmit();\r\n    }\r\n  };\r\n\r\n  checkType = () => {\r\n    const { type, language, cancelButtonLabel, btnCancelName, btnConfirmName, btnCloseName } = this.props;\r\n\r\n    let btn = (\r\n      <Grid container justify={'flex-end'}>\r\n        <Button onClick={this.handleCancel} label={btnCloseName ? btnCloseName : cancelButtonLabel} />\r\n      </Grid>\r\n    );\r\n\r\n    if (type === 2) {\r\n      btn = (\r\n        <Grid container justify={'flex-end'} spacing={8}>\r\n          <Grid item>\r\n            <Button onClick={this.handleCancel} label={btnCancelName ? btnCancelName : Constants.BTN[language].CANCEL} />\r\n          </Grid>\r\n          <Grid item>\r\n            <Button onClick={this.handleConfirm} label={btnConfirmName ? btnConfirmName : Constants.BTN[language].CONFIRM} />\r\n          </Grid>\r\n        </Grid>\r\n      );\r\n    } else if (type === 3) {\r\n      btn = (\r\n        <Grid container justify={'flex-end'} spacing={8}>\r\n          <Grid item>\r\n            <Button onClick={this.handleCancel} label={'เขียนทับ'} />\r\n          </Grid>\r\n          <Grid item>\r\n            <Button onClick={this.handleConfirm} label={'เพิ่มข้อมูลต่อ'} />\r\n          </Grid>\r\n        </Grid>\r\n      );\r\n    }\r\n    return btn;\r\n  };\r\n\r\n  render() {\r\n    const { showAlert, hideAlert, title, text, isHideButton = false } = this.props;\r\n    let btn = null;\r\n\r\n    if (!isHideButton) {\r\n      btn = this.checkType();\r\n    }\r\n\r\n    return <AlertMessageView title={title} text={text} handleClose={hideAlert} button={btn} isOpen={showAlert} />;\r\n  }\r\n}\r\nAlertMessage.defaultProps = {\r\n  title: 'ข้อความจากระบบ',\r\n  type: 1, // 1 = alert, 2 = confirm\r\n  //   btnConfirmName: 'Confirm',\r\n  //   btnCancelName: 'Cancel',\r\n  btnOkName: 'Ok',\r\n  language: 'TH',\r\n  cancelButtonLabel: Constants.BTN['TH'].CLOSE_BUTTON_LABEL,\r\n};\r\nexport default AlertMessage;\r\n","import React, { Component } from \"react\";\r\n\r\nconst WithLoading = WrapComponent => {\r\n    class Loading extends Component {\r\n        constructor() {\r\n            super();\r\n            this.state = {\r\n                isShowLoading: false\r\n            }\r\n        }\r\n\r\n        showLoading = () => {\r\n            this.setState({\r\n                isShowLoading: true,\r\n            })\r\n        }\r\n\r\n        hideLoading = () => {\r\n            this.setState({\r\n                isShowLoading: false,\r\n            })\r\n        }\r\n\r\n        render() {\r\n            const { isShowLoading } = this.state;\r\n\r\n            return (\r\n                <WrapComponent\r\n                    isShowLoading={isShowLoading}\r\n                    showLoading={this.showLoading}\r\n                    hideLoading={this.hideLoading}\r\n                    {...this.props}\r\n                />\r\n            );\r\n        }\r\n    }\r\n\r\n    return Loading\r\n};\r\n\r\nexport default WithLoading;","import React, { Component } from \"react\";\r\n\r\nconst WithAlertMessage = WrapComponent => {\r\n    class AlertMessage extends Component {\r\n        constructor() {\r\n            super();\r\n            this.state = {\r\n                altMsg: \"\",\r\n                altTitle: \"ข้อความจากระบบ\",\r\n                altType: \"\",\r\n                isShowAlt: false,\r\n                callbackClose: null, //callback สำหรับปิด alert\r\n                callbackConfirm: null, //callback สำหรับกดยืนยัน \r\n                callbackCancel: null, //callback สำหรับยกเลิก\r\n                param: null\r\n            }\r\n        }\r\n\r\n        showAlert = ({\r\n            altMsg = \"\",\r\n            altTitle = \"ข้อความจากระบบ\",\r\n            altType = \"\",\r\n            callbackClose = null,\r\n            callbackConfirm = null,\r\n            callbackCancel = null,\r\n            param = null\r\n        }) => {\r\n            this.setState({\r\n                isShowAlt: true,\r\n                altMsg: altMsg,\r\n                altTitle: altTitle,\r\n                altType: altType,\r\n                callbackClose: callbackClose,\r\n                callbackConfirm: callbackConfirm,\r\n                callbackCancel: callbackCancel,\r\n                param\r\n            })\r\n        }\r\n\r\n        hideAlert = () => {\r\n            this.setState({\r\n                altMsg: \"\",\r\n                altTitle: \"ข้อความจากระบบ\",\r\n                altType: \"\",\r\n                isShowAlt: false,\r\n                callbackClose: null,\r\n                callbackConfirm: null,\r\n                callbackCancel: null,\r\n                param: null\r\n            })\r\n        }\r\n\r\n        handleConfirm = () => {\r\n            const { callbackConfirm, param } = this.state;\r\n            callbackConfirm && callbackConfirm(param)\r\n        }\r\n\r\n        handleClose = () => {\r\n            const { callbackClose } = this.state;\r\n\r\n            if (callbackClose) {\r\n                callbackClose()\r\n            } else {\r\n                this.hideAlert();\r\n            }\r\n        }\r\n\r\n        handleCancel = () => {\r\n            const { callbackCancel } = this.state;\r\n\r\n            if (callbackCancel) {\r\n                callbackCancel()\r\n            } else {\r\n                this.hideAlert();\r\n            }\r\n        }\r\n\r\n        render() {\r\n            const {\r\n                altMsg,\r\n                altTitle,\r\n                altType,\r\n                isShowAlt,\r\n            } = this.state;\r\n\r\n            return (\r\n                <WrapComponent\r\n                    altMsg={altMsg}\r\n                    altTitle={altTitle}\r\n                    altType={altType}\r\n                    isShowAlt={isShowAlt}\r\n                    callbackClose={this.handleClose}\r\n                    callbackConfirm={this.handleConfirm}\r\n                    callbackCancel={this.handleCancel}\r\n                    showAlert={this.showAlert}\r\n                    hideAlert={this.hideAlert}\r\n                    {...this.props}\r\n                />\r\n            );\r\n        }\r\n    }\r\n\r\n    return AlertMessage\r\n};\r\n\r\nexport default WithAlertMessage;","import React, { Component } from 'react';\r\nimport AlertMessage from './AlertMessage';\r\n\r\n/* \r\n    ### วิธีการใช้งาน ###\r\n    1. component ที่ทำการเรียกใช้งานจากต้องใช้ withLoading เพื่อให้ได้ props ที่จะนำมาจัดการกับ alert\r\n    2. เรียกใช้ด้วย <AlertMessageSuper {...this.props} />\r\n*/\r\n\r\nexport default class AlertMessageSuper extends Component {\r\n    render() {\r\n        const {\r\n            isShowAlt,\r\n            altTitle,\r\n            altMsg,\r\n            altType,\r\n            callbackClose,\r\n            callbackConfirm\r\n        } = this.props;\r\n\r\n        return (\r\n            <AlertMessage\r\n                showAlert={isShowAlt}\r\n                title={altTitle}\r\n                text={altMsg}\r\n                type={altType} // 1 = alert, 2 = confirm\r\n                onCancel={callbackClose}\r\n                onSubmit={callbackConfirm}\r\n            />\r\n        )\r\n    }\r\n}\r\n","import React,{Fragment} from 'react'\r\nimport { withStyles } from '@material-ui/core'\r\nimport { MuiThemeProvider, createMuiTheme } from \"@material-ui/core\";\r\nimport TextField from '@material-ui/core/TextField';\r\nimport FormControl from '@material-ui/core/FormControl';\r\nimport FormHelperText from '@material-ui/core/FormHelperText';\r\nimport InputAdornment from '@material-ui/core/InputAdornment';\r\n\r\nconst checkMaxLength = (value, maxLength) => {\r\n\r\n    if (maxLength) {\r\n        if (value.length <= maxLength) {\r\n            return value\r\n        } else {\r\n            return value.slice(0, maxLength)\r\n        }\r\n    }\r\n    else {\r\n        return value\r\n    }\r\n}\r\n\r\nconst theme = createMuiTheme({\r\n    palette: {\r\n        primary: {\r\n            main: '#128C2C', //main color\r\n            dark: '#128C2C', //active color\r\n            contrastText: '#fff' //text color\r\n        },\r\n    },\r\n    disabled: {\r\n        color: 'black'\r\n    },\r\n    typography: {\r\n        useNextVariants: true,\r\n    },\r\n})\r\n\r\nconst TextFieldReduxView = ({\r\n    classes,\r\n    className,\r\n    classNameTextField,\r\n    input,\r\n    label,\r\n    type,\r\n    meta: { touched, error, invalid },\r\n    required,\r\n    placeholder,\r\n    icon,\r\n    iconColor,\r\n    disabled,\r\n    multiline = false,\r\n    rows = 1,\r\n    maxLength,\r\n    onClick,\r\n    labelSecond\r\n}) => {\r\n    // console.log('maxLength', maxLength)\r\n    const asterisk = required ? <span className={classes.txtErr} >*</span> : \"\"\r\n    return (\r\n        // <MuiThemeProvider theme={theme}>\r\n        <Fragment>\r\n            <FormControl className={`${classes.control} ${className}`} error={touched && invalid}>\r\n                <span className={classes.labelStyle} >\r\n                    {label && <label className={`${touched && invalid ? classes.txtErr : \"\"}`} required>{label}{asterisk}</label>}\r\n                </span>\r\n                    {/* <br/> */}\r\n                <span> {labelSecond && <label className={`${touched && invalid ? classes.txtErr : \"\"}`} required>{labelSecond}</label>}</span>\r\n                <TextField\r\n                    {...input}\r\n                    disabled={disabled}\r\n                    error={invalid && touched}\r\n                    type={type}\r\n                    multiline={multiline}\r\n                    rows={rows}\r\n                    className={`${classes.textField} ${classNameTextField}`}\r\n                    variant=\"outlined\"\r\n                    placeholder={placeholder}\r\n                    InputLabelProps={{ required: false }}\r\n                    InputProps={icon && {\r\n                        startAdornment: (\r\n                            <InputAdornment position=\"start\" variant='standard' disableTypography disablePointerEvents>\r\n                                <span style={{ color: iconColor }}> {icon} </span>\r\n                            </InputAdornment>\r\n                        ),\r\n                    }}\r\n                    onChange={({ target: { value } }) => input.onChange(checkMaxLength(value, maxLength))}\r\n                    onClick={disabled ? undefined : onClick}\r\n                />\r\n\r\n            </FormControl>\r\n                <FormHelperText className={classes.formHelper}>{touched && invalid && error}</FormHelperText>\r\n            </Fragment>\r\n        // </MuiThemeProvider>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    control: {\r\n        width: '100%',\r\n        // height: '70px',\r\n        minHeight: '70px',\r\n\r\n        /// แบบนี้คือไม่ต้องมีการกำหนด padding ที่คนเรียกใช้มัน ///\r\n        // height: '70px',\r\n        // paddingTop: '10px',\r\n        // paddingLeft: '10px',\r\n        // paddingRight: '10px'\r\n    },\r\n    textField: {\r\n        width: '100%',\r\n        [`& input`]: {\r\n            height: '39px',\r\n            padding: '0px 15px 0px 15px',\r\n            backgroundColor: 'white',\r\n        },\r\n        [`& label`]: {\r\n            top: '-5px'\r\n        },\r\n        [`& input:-webkit-autofill`]: {\r\n            WebkitBoxShadow: 'inset 0 0 0px 9999px white'\r\n        }\r\n    },\r\n    txtErr: {\r\n        color: 'red'\r\n    },\r\n    formHelper: {\r\n        color: \"red\",\r\n        marginTop: \"0px\",\r\n        marginLeft: 15,\r\n        fontFamily: \"prompt\"\r\n    },\r\n    labelStyle: {\r\n        marginBottom: '5px',\r\n        fontSize: \"16px\"\r\n    },\r\n    disabled: {\r\n        color: 'black'\r\n    }\r\n}))(TextFieldReduxView)\r\n","import React, { Component } from 'react'\r\nimport TextFieldReduxView from '../Presentationals/TextFieldReduxView'\r\n\r\nexport default class TextFieldRedux extends Component {\r\n    render() {\r\n        const {\r\n            className,\r\n            classNameTextField,\r\n            input,\r\n            label,//=\"textfield label xxxx\",\r\n            labelSecond,\r\n            type,\r\n            meta,\r\n            required,\r\n            placeholder,\r\n            icon,\r\n            iconColor,\r\n            disabled,\r\n            multiline,\r\n            rows,\r\n            maxLength,\r\n            onClick\r\n        } = this.props;\r\n\r\n        return (\r\n            <TextFieldReduxView\r\n                className={className}\r\n                classNameTextField={classNameTextField}\r\n                input={input}\r\n                label={label}\r\n                labelSecond={labelSecond}\r\n                type={type}\r\n                meta={meta}\r\n                required={required}\r\n                placeholder={placeholder}\r\n                icon={icon}\r\n                iconColor={iconColor}\r\n                disabled={disabled}\r\n                multiline={multiline}\r\n                rows={rows}\r\n                maxLength={maxLength}\r\n                onClick={onClick}\r\n            />\r\n        )\r\n    }\r\n}\r\n\r\nTextFieldRedux.defaultProps = {\r\n    required: false\r\n}\r\n","import React from 'react'\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport { Field } from 'redux-form';\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\nimport Grid from \"@material-ui/core/Grid\";\r\nimport Button from '../../Controls/Containers/Button';\r\nimport TextField from '../../Controls/Containers/TextFieldRedux';\r\nimport Loading from '../../Controls/Containers/Loading';\r\n\r\nconst ForgotPasswordView = ({\r\n    classes,\r\n    isShowLoading,\r\n    isOpenForgotPassword,\r\n    handleSubmit,\r\n    onSubmit,\r\n    onCancel\r\n}) => {\r\n    return (\r\n        <Dialog\r\n            open={isOpenForgotPassword}\r\n            classes={{ paper: classes.rootDialog }}\r\n        >\r\n            <form onSubmit={handleSubmit(onSubmit)} method=\"POST\">\r\n                <Loading isShowLoading={isShowLoading} />\r\n                <DialogTitle>{\"Forgot Password\"}</DialogTitle>\r\n                <DialogContent\r\n                    classes={{ root: classes.rootContent }}\r\n                >\r\n                    <Grid container>\r\n                        <Grid item xs={12}>\r\n                            <Field\r\n                                name=\"email\"\r\n                                component={TextField}\r\n                                label={\"Username\"}\r\n                                required\r\n                            />\r\n                        </Grid>\r\n                    </Grid>\r\n                </DialogContent>\r\n                <DialogActions>\r\n                    <Grid container justify=\"center\" spacing={16}>\r\n                        <Grid item>\r\n                            <Button\r\n                                onClick={onCancel}\r\n                                label=\"ยกเลิก\"\r\n                            />\r\n                        </Grid>\r\n                        <Grid item>\r\n                            <Button\r\n                                type=\"submit\"\r\n                                label=\"ตกลง\"\r\n                            />\r\n                        </Grid>\r\n                    </Grid>\r\n                </DialogActions>\r\n            </form>\r\n        </Dialog>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    rootDialog: {\r\n        width: '100%',\r\n    },\r\n    rootContent: {\r\n        padding: '5px 24px 0px',\r\n        height: '100px'\r\n    },\r\n}))(ForgotPasswordView)\r\n","import React, { Component, Fragment } from 'react'\r\nimport { reduxForm } from 'redux-form'\r\nimport { compose } from \"recompose\";\r\nimport { forgotPasswordValidate } from '../../Utilities/Validate';\r\nimport { fetchGet } from '../../Utilities/ServiceUtils';\r\nimport { SYSTEM, ALERT_MESSAGE } from '../../Constants/Constants';\r\nimport WithAlertMessage from '../../HOC/WithAlertMessage';\r\nimport WithLoading from '../../HOC/WithLoading';\r\nimport AlertMessageSuper from '../../Controls/Containers/AlertMessageSuper';\r\nimport ForgotPasswordView from '../../Presentationals/Authentications/ForgotPasswordView';\r\n\r\nclass ForgotPassword extends Component {\r\n\r\n\tcallServiceForgotPassword = (email) => {\r\n\t\treturn fetchGet(`${process.env.REACT_APP_PMR_FORGOT_PASSWORD}?email=${email}`)\r\n\t\t\t.then(res => {\r\n\t\t\t\tif (!res.ok) {\r\n\t\t\t\t\tthrow res.status\r\n\t\t\t\t}\r\n\t\t\t\treturn res.json();\r\n\t\t\t})\r\n\t\t\t.then(result => {\r\n\t\t\t\treturn result\r\n\t\t\t})\r\n\t\t\t.catch(ex => {\r\n\t\t\t\tconsole.log(\"ex callServiceForgotPassword\", ex)\r\n\t\t\t})\r\n\t}\r\n\r\n\tcallServiceForGotPasswordBMA = username => {\r\n\t\treturn fetchGet(`${process.env.REACT_APP_CMS_FORGOT_PASSWORD}?username=${username}`)\r\n\t\t\t.then(res => {\r\n\t\t\t\tif (!res.ok) {\r\n\t\t\t\t\tthrow res.status\r\n\t\t\t\t}\r\n\t\t\t\treturn res.json();\r\n\t\t\t})\r\n\t\t\t.then(result => {\r\n\t\t\t\treturn result\r\n\t\t\t})\r\n\t\t\t.catch(ex => {\r\n\t\t\t\tconsole.log(\"ex callServiceForGotPasswordBMA\", ex)\r\n\t\t\t})\r\n\t}\r\n\r\n\thandleSubmit = async values => {\r\n\t\tconst { showAlert, showLoading, hideLoading } = this.props;\r\n\t\tshowLoading();\r\n\t\tconst result = this.props.mode === SYSTEM.PMR1 ? await this.callServiceForgotPassword(values.email) : await this.callServiceForGotPasswordBMA(values.email)\r\n\r\n\t\tif (result && result.statusCode === 1) {\r\n\t\t\tconst email = this.props.mode === SYSTEM.PMR1 ? values.email : result.email;\r\n\t\t\tshowAlert({\r\n\t\t\t\taltMsg: `ระบบได้ส่ง link สำหรับตั้งรหัสผ่านใหม่ไปยัง ${email} โปรดตรวจสอบ e-mail `,\r\n\t\t\t\tcallbackClose: this.handleCancel\r\n\t\t\t})\r\n\t\t} else if (result && result.statusCode === 0) {\r\n\t\t\tshowAlert({ altMsg: \"ไม่พบผู้ใช้งานนี้ในระบบ\" })\r\n\t\t} else {\r\n\t\t\tshowAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR })\r\n\t\t}\r\n\t\thideLoading();\r\n\t}\r\n\r\n\thandleCancel = () => {\r\n\t\tconst { onCloseForgotPassword, hideAlert } = this.props;\r\n\r\n\t\thideAlert();\r\n\t\tif (onCloseForgotPassword) {\r\n\t\t\tonCloseForgotPassword()\r\n\t\t}\r\n\t}\r\n\r\n\trender() {\r\n\t\tconst {\r\n\t\t\tisOpenForgotPassword,\r\n\t\t\tisShowLoading,\r\n\t\t\thandleSubmit,\r\n\t\t} = this.props;\r\n\r\n\t\treturn (\r\n\t\t\t<Fragment>\r\n\t\t\t\t<ForgotPasswordView\r\n\t\t\t\t\tisShowLoading={isShowLoading}\r\n\t\t\t\t\tisOpenForgotPassword={isOpenForgotPassword}\r\n\t\t\t\t\thandleSubmit={handleSubmit}\r\n\t\t\t\t\tonSubmit={this.handleSubmit}\r\n\t\t\t\t\tonCancel={this.handleCancel}\r\n\t\t\t\t/>\r\n\t\t\t\t<AlertMessageSuper {...this.props} />\r\n\t\t\t</Fragment>\r\n\t\t)\r\n\t}\r\n}\r\n\r\nconst reduxFormParameter = {\r\n\tform: \"forgotpassword\",\r\n\tvalidate: forgotPasswordValidate\r\n};\r\n\r\nconst enhance = compose(\r\n\treduxForm(reduxFormParameter),\r\n\tWithAlertMessage,\r\n\tWithLoading\r\n);\r\n\r\nexport default enhance(ForgotPassword)\r\n","import React, { Component, Fragment } from 'react';\r\nimport { reduxForm } from \"redux-form\";\r\nimport { compose } from \"recompose\";\r\nimport { sha256 } from \"js-sha256\";\r\nimport { connect } from 'react-redux';\r\nimport { bindActionCreators } from 'redux';\r\n\r\nimport { loginValidate } from \"../../Utilities/Validate\";\r\nimport { fetchPost } from '../../Utilities/ServiceUtils';\r\nimport { SYSTEM, KEY_ENCRYPT_PASSWORD } from '../../Constants/Constants';\r\nimport { setTokenLocalStore, setLoginHistoryLocalStore } from '../../Utilities/LocalStorageUtill';\r\n\r\nimport * as ApiPrivateRoute from '../../Config/AppRoute/ApiPrivateRoute';\r\nimport * as AuthenAction from '../../Actions/Authentications/AuthenAction';\r\n\r\nimport LoginView from '../../Presentationals/Authentications/LoginView';\r\nimport RouteConfig from '../../Config/AppRoute/RouteConfig';\r\nimport Loading from '../../Controls/Containers/Loading';\r\nimport AlertMessage from '../../Controls/Containers/AlertMessage';\r\nimport WithLoading from '../../HOC/WithLoading';\r\nimport WithAlertMessage from '../../HOC/WithAlertMessage';\r\nimport ForgotPassword from './ForgotPassword';\r\n\r\nclass LoginStaff extends Component {\r\n    constructor() {\r\n        super();\r\n        const url = new URL(window.location.href);\r\n        const param = url.searchParams.get(\"type\");\r\n        this.mode = param === \"o\" ? SYSTEM.CMS : SYSTEM.PMR1;\r\n        this.state = {\r\n            isOpenForgotPassword: false\r\n        }\r\n    }\r\n\r\n    componentDidMount() {\r\n        this.props.change(\"mode\", this.mode)\r\n    }\r\n\r\n    handleLogin = (value) => {\r\n        if (this.mode === SYSTEM.CMS) {\r\n            this.callServiceLoginStaff({ username: value.username, password: value.password })\r\n        } else if (this.mode === SYSTEM.PMR1) {\r\n            this.callServiceLoginUser({ username: value.username, password: value.password });\r\n        }\r\n    }\r\n\r\n    callServiceLoginUser = ({ username, password }) => {\r\n        const { showAlert, showLoading, hideLoading, authenAction } = this.props;\r\n\r\n        showLoading();\r\n        return fetchPost(process.env.REACT_APP_PMR_LOGIN, {\r\n            Username: username,\r\n            Password: sha256.hmac(KEY_ENCRYPT_PASSWORD, password)\r\n        })\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json()\r\n            })\r\n            .then(result => {\r\n                if (result && result.statusCode) {\r\n                    switch (result.statusCode) {\r\n                        case 1: //success\r\n                            setTokenLocalStore(result.jwtToken)\r\n                            setTimeout(() => { // หน่วงเพื่อให้ token เข้า localstore ทัน\r\n                                authenAction.getProfileUser()\r\n                            }, 200);\r\n                            break;\r\n                        case -3:\r\n                            showAlert({ altMsg: \"ผู้ใช้งานยังไม่ยืนยันตัวตน กรุณายืนยันตัวตนก่อนเข้าใช้งาน\" })\r\n                            break;\r\n                        default:\r\n                            showAlert({ altMsg: \"Username หรือ Password ไม่ถูกต้อง\" })\r\n                            break;\r\n                    }\r\n                }\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex getLogin', ex)\r\n            })\r\n            .finally(() => {\r\n                hideLoading();\r\n            })\r\n    }\r\n\r\n    saveLoginHistory = async (userID, system) => {\r\n        const result = await ApiPrivateRoute.saveLoginHistory({\r\n            userID: userID,\r\n            systemID: system\r\n        })\r\n        result && result.id && setLoginHistoryLocalStore(result.id)\r\n    }\r\n\r\n    callServiceLoginStaff = ({ username, password }) => {\r\n        const { showAlert, showLoading, hideLoading, authenAction } = this.props;\r\n        showLoading();\r\n        fetchPost(process.env.REACT_APP_LOGIN_CMS, {\r\n            username,\r\n            password: sha256.hmac(KEY_ENCRYPT_PASSWORD, password)\r\n        })\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status;\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(async result => {\r\n                if (result && result.statusCode) {\r\n                    switch (result.statusCode) {\r\n                        case 1: //success\r\n                            setTokenLocalStore(result.jwtToken, \"o\")\r\n                            setTimeout(() => { // หน่วงเพื่อให้ token เข้า localstore ทัน\r\n                                authenAction.getProfileBMA()\r\n                            }, 200);\r\n                            break;\r\n                        case -3:\r\n                            // showAlert({ altMsg: \"User status is inactivate\" })\r\n                            showAlert({altMsg:\"ผู้ใช้งานยังไม่ยืนยันตัวตน กรุณายืนยันตัวตนก่อนเข้าใช้งาน\"})\r\n                            break;\r\n                        default:\r\n                            showAlert({ altMsg: \"Username หรือ Password ไม่ถูกต้อง\" })\r\n                            break;\r\n                    }\r\n                }\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceLogin cms', ex)\r\n            })\r\n            .finally(() => {\r\n                hideLoading();\r\n            })\r\n    }\r\n\r\n    handleRegister = () => {\r\n        this.props.history.push(RouteConfig.PMRRegister)\r\n    }\r\n\r\n    handleForgotPassword = () => {\r\n        this.setState(prevState => ({\r\n            isOpenForgotPassword: !prevState.isOpenForgotPassword\r\n        }))\r\n    }\r\n\r\n    render() {\r\n        const { isOpenForgotPassword } = this.state;\r\n        const {\r\n            isShowAlt,\r\n            altTitle,\r\n            altMsg,\r\n            altType,\r\n            callbackConfirm,\r\n            callbackCancel,\r\n\r\n            isShowLoading,\r\n            handleSubmit,\r\n        } = this.props;\r\n\r\n        return (\r\n            <Fragment>\r\n                <LoginView\r\n                    mode={this.mode}\r\n                    handleSubmit={handleSubmit}\r\n                    onSubmit={this.handleLogin}\r\n                    onClickRegister={this.handleRegister}\r\n                    onClickForgotPassword={this.handleForgotPassword}\r\n                />\r\n                <AlertMessage\r\n                    title={altTitle}\r\n                    text={altMsg}\r\n                    type={altType}\r\n                    showAlert={isShowAlt}\r\n                    onSubmit={callbackConfirm}\r\n                    onCancel={callbackCancel}\r\n                />\r\n                <Loading isShowLoading={isShowLoading} />\r\n                <ForgotPassword\r\n                    mode={this.mode}\r\n                    isOpenForgotPassword={isOpenForgotPassword}\r\n                    onCloseForgotPassword={this.handleForgotPassword}\r\n                />\r\n            </Fragment>\r\n        )\r\n    }\r\n}\r\n\r\nconst reduxFormParameter = {\r\n    form: \"loginstaff\",\r\n    validate: loginValidate\r\n};\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    authenAction: bindActionCreators(AuthenAction, dispatch)\r\n})\r\n\r\nconst enhance = compose(\r\n    WithAlertMessage,\r\n    WithLoading,\r\n    reduxForm(reduxFormParameter),\r\n    connect(null, mapDispatchToProps)\r\n);\r\n\r\nexport default enhance(LoginStaff);\r\n","import React from 'react'\r\nimport Grid from \"@material-ui/core/Grid\";\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\nimport { Field } from 'redux-form';\r\nimport { HEADER } from '../../Constants/Constants';\r\nimport TextField from '../../Controls/Containers/TextFieldRedux';\r\nimport Button from '../../Controls/Containers/Button';\r\n\r\nconst FormResetPasswordView = ({\r\n    classes,\r\n    type,\r\n    handleSubmit,\r\n    onSubmit,\r\n    onCancel\r\n}) => {\r\n    return (\r\n        <Grid container justify=\"center\" className={classes.root}>\r\n\r\n            <Grid item className={classes.containerLogo}>\r\n                <div className={classes.subContainerLogo} >\r\n                    <img src={`${process.env.PUBLIC_URL}/img/login/login_logo.png`}\r\n                        className={classes.imgLogo} alt={'login logo'} />\r\n                    <div>\r\n                        <div className={classes.titleBackground}>{type === 'o' ? HEADER.CMS.TITLE : HEADER.PMR1.TITLE}</div>\r\n                        <div className={classes.subTitleBackground}>{type === 'o' ? HEADER.CMS.SUB_TITLE : HEADER.PMR1.SUB_TITLE}</div>\r\n                    </div>\r\n                </div>\r\n            </Grid>\r\n\r\n            <form onSubmit={handleSubmit(onSubmit)} method=\"POST\">\r\n                <Grid container className={classes.rootPaper}>\r\n                    <Grid item xs={12}>\r\n                        <div className={classes.txtTitle}>Reset Password</div>\r\n                    </Grid>\r\n\r\n                    <Field\r\n                        type=\"password\"\r\n                        name=\"password\"\r\n                        component={TextField}\r\n                        label={\"Password\"}\r\n                        required\r\n                    />\r\n                    <Field\r\n                        type=\"password\"\r\n                        name=\"confirmPassword\"\r\n                        component={TextField}\r\n                        label={\"Confirm Password\"}\r\n                        required\r\n                    />\r\n\r\n                    <Grid container justify=\"center\" className={classes.bottom} spacing={16}>\r\n                        <Grid item>\r\n                            <Button\r\n                                onClick={onCancel}\r\n                                label=\"ยกเลิก\"\r\n                            />\r\n                        </Grid>\r\n                        <Grid item>\r\n                            <Button\r\n                                type=\"submit\"\r\n                                label=\"ตกลง\"\r\n                            />\r\n                        </Grid>\r\n                    </Grid>\r\n                </Grid>\r\n            </form>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        height: '100%',\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/login/login_bg.png)`,\r\n        backgroundRepeat: 'no-repeat',\r\n        backgroundSize: 'cover',\r\n        backgroundPosition: 'center',\r\n        position: 'relative'\r\n    },\r\n    rootPaper: {\r\n        width: '100%',\r\n        maxWidth: '600px',\r\n        // height: '500px'\r\n        padding: '24px',\r\n        boxShadow: \"0px 1px 5px 0px rgba(0,0,0,0.2), 0px 2px 2px 0px rgba(0,0,0,0.14), 0px 3px 1px -2px rgba(0,0,0,0.12)\",\r\n        borderRadius: \"4px\",\r\n        backgroundColor: 'white'\r\n    },\r\n    txtTitle: {\r\n        fontSize: \"1.3125rem\",\r\n        marginBottom: '20px'\r\n    },\r\n    bottom: {\r\n        marginTop: '10px'\r\n    },\r\n    containerLogo: {\r\n        width: '100%',\r\n        display: 'flex',\r\n        alignItems: 'center',\r\n        flexDirection: 'column',\r\n        marginTop: '5%',\r\n        height: '50px'\r\n    },\r\n    subContainerLogo: {\r\n        display: 'flex',\r\n        alignItems: 'center',\r\n        flexDirection: 'row',\r\n    },\r\n    imgLogo: {\r\n        height: \"auto\"\r\n    },\r\n    titleBackground: {\r\n        marginLeft: \"20px\",\r\n        fontSize: \"30px\",\r\n        color: 'white',\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            fontSize: \"25px\",\r\n        },\r\n        [theme.breakpoints.down(\"xs\")]: {\r\n            fontSize: \"15px\",\r\n        },\r\n    },\r\n    subTitleBackground: {\r\n        marginLeft: \"20px\",\r\n        fontSize: \"20px\",\r\n        color: 'white',\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            fontSize: \"18px\",\r\n        },\r\n        [theme.breakpoints.down(\"xs\")]: {\r\n            fontSize: \"14px\",\r\n        },\r\n    },\r\n}))(FormResetPasswordView)\r\n","import React, { Component, Fragment } from 'react'\r\nimport { reduxForm } from 'redux-form'\r\nimport { compose } from \"recompose\";\r\nimport { sha256 } from \"js-sha256\";\r\nimport { formResetPasswordValidate } from '../../Utilities/Validate';\r\nimport { fetchPost } from '../../Utilities/ServiceUtils';\r\nimport RouteConfig from '../../Config/AppRoute/RouteConfig';\r\nimport WithAlertMessage from '../../HOC/WithAlertMessage';\r\nimport AlertMessageSuper from '../../Controls/Containers/AlertMessageSuper';\r\nimport FormResetPasswordView from '../../Presentationals/Authentications/FormResetPasswordView';\r\nimport WithLoading from '../../HOC/WithLoading';\r\nimport Loading from '../../Controls/Containers/Loading';\r\n\r\nclass FormResetPassword extends Component {\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tconst url = new URL(window.location.href);\r\n\t\tthis.userID = url.searchParams.get(\"userID\");\r\n\t\tthis.type = url.searchParams.get(\"type\");\r\n\t}\r\n\r\n\thandleSubmit = values => {\r\n\t\tconst { showAlert } = this.props;\r\n\t\tconst encPassword = sha256.hmac(\"CPUDD\", values.password);\r\n\r\n\t\tif (this.userID) {\r\n\t\t\tshowAlert({\r\n\t\t\t\taltMsg: \"คุณต้องการรีเซตรหัสผ่าน ?\",\r\n\t\t\t\taltType: 2,\r\n\t\t\t\tcallbackConfirm: this.handleConfirmRetPassword(encPassword)\r\n\t\t\t})\r\n\t\t} else {\r\n\t\t\tshowAlert({ altMsg: \"เกิดข้อผิดพลาด กรุณาลองใหม่อีกครั้ง\" })\r\n\t\t}\r\n\t}\r\n\r\n\thandleConfirmRetPassword = encPassword => async evt => {\r\n\t\tconst { showAlert, hideAlert, showLoading, hideLoading } = this.props;\r\n\t\tawait hideAlert()\r\n\t\tshowLoading();\r\n\t\tthis.callServiceResetPassword(encPassword)\r\n\t\t\t.then(result => {\r\n\t\t\t\tif (result.statusCode === 1) {\r\n\t\t\t\t\tshowAlert({\r\n\t\t\t\t\t\taltMsg: \"บันทึกข้อมูลเสร็จสิ้น\",\r\n\t\t\t\t\t\tcallbackClose: this.handleCancel\r\n\t\t\t\t\t})\r\n\t\t\t\t} else {\r\n\t\t\t\t\tshowAlert({\r\n\t\t\t\t\t\taltMsg: \"บันทึกข้อมูลไม่สำเร็จ กรุณาลองใหม่อีกครั้ง\"\r\n\t\t\t\t\t})\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.finally(ex => {\r\n\t\t\t\thideLoading();\r\n\t\t\t})\r\n\t}\r\n\r\n\tcallServiceResetPassword = (encPassword) => {\r\n\t\tconst url = this.type === \"o\" ? process.env.REACT_APP_CMS_RESET_PASSWORD : process.env.REACT_APP_PMR_RESET_PASSWORD\r\n\r\n\t\treturn fetchPost(url, {\r\n\t\t\t// UserID: this.props.match.params.userID,\r\n\t\t\tUserID: this.userID,\r\n\t\t\tPassword: encPassword\r\n\t\t})\r\n\t\t\t.then(res => {\r\n\t\t\t\tif (!res.ok) {\r\n\t\t\t\t\tthrow res.status\r\n\t\t\t\t}\r\n\t\t\t\treturn res.json();\r\n\t\t\t})\r\n\t\t\t.then(result => {\r\n\t\t\t\treturn result\r\n\t\t\t})\r\n\t\t\t.catch(ex => {\r\n\t\t\t\tconsole.log('ex callServiceResetPassword', ex)\r\n\t\t\t})\r\n\t}\r\n\r\n\thandleCancel = () => {\r\n\t\tconst { history } = this.props;\r\n\t\tconst path = this.type === 'o' ? RouteConfig.CMSLoginStaff : RouteConfig.CMSLogin\r\n\t\thistory.push(path)\r\n\t}\r\n\r\n\trender() {\r\n\t\tconst { handleSubmit, isShowLoading } = this.props;\r\n\r\n\t\treturn (\r\n\t\t\t<Fragment>\r\n\t\t\t\t<FormResetPasswordView\r\n\t\t\t\t\ttype={this.type}\r\n\t\t\t\t\thandleSubmit={handleSubmit}\r\n\t\t\t\t\tonSubmit={this.handleSubmit}\r\n\t\t\t\t\tonCancel={this.handleCancel}\r\n\t\t\t\t/>\r\n\t\t\t\t<AlertMessageSuper {...this.props} />\r\n\t\t\t\t<Loading isShowLoading={isShowLoading} />\r\n\t\t\t</Fragment>\r\n\t\t)\r\n\t}\r\n}\r\n\r\nconst reduxFormParameter = {\r\n\tform: \"formChangePassword\",\r\n\tvalidate: formResetPasswordValidate\r\n};\r\n\r\nconst enhance = compose(\r\n\treduxForm(reduxFormParameter),\r\n\tWithLoading,\r\n\tWithAlertMessage\r\n);\r\n\r\nexport default enhance(FormResetPassword);","import React from 'react'\r\nimport PropTypes from 'prop-types';\r\nimport { withStyles } from '@material-ui/core'\r\nimport { Field } from 'redux-form';\r\nimport { citizenId13Cha } from '../../Utilities/Validate';\r\nimport Button from \"../../Controls/Containers/Button\"\r\nimport TextFieldRedux from '../../Controls/Containers/TextFieldRedux';\r\n\r\nconst RegisterView = ({\r\n    classes,\r\n    handleSubmit,\r\n    onSubmit,\r\n    onClickCancel\r\n}) => {\r\n    return (\r\n        <div className={classes.root}>\r\n            <div className={classes.containerForm}>\r\n                <form onSubmit={handleSubmit(onSubmit)} method=\"POST\" className={classes.form}>\r\n                    <div className={classes.titleText}>ลงทะเบียน</div>\r\n                    <Field\r\n                        name=\"username\"\r\n                        placeholder=\"e.g. example@mail.com\"\r\n                        component={TextFieldRedux}\r\n                        classNameTextField={classes.textField}\r\n                        label={\"Username\"}\r\n                        required\r\n                    />\r\n                    <Field\r\n                        name=\"password\"\r\n                        type=\"password\"\r\n                        component={TextFieldRedux}\r\n                        classNameTextField={classes.textField}\r\n                        label={'Password'}\r\n                        required\r\n                    />\r\n                    <Field\r\n                        name=\"confirmPassword\"\r\n                        type=\"password\"\r\n                        component={TextFieldRedux}\r\n                        classNameTextField={classes.textField}\r\n                        label={'Confirm Password'}\r\n                        required\r\n                    />\r\n                    <Field\r\n                        name=\"firstName\"\r\n                        classNameTextField={classes.textField}\r\n                        component={TextFieldRedux}\r\n                        label={'ชื่อ'}\r\n                        required\r\n                    />\r\n                    <Field\r\n                        name=\"lastName\"\r\n                        component={TextFieldRedux}\r\n                        classNameTextField={classes.textField}\r\n                        label={'นามสกุล'}\r\n                        required\r\n                    />\r\n                    <Field\r\n                        name=\"identificationID\"\r\n                        component={TextFieldRedux}\r\n                        normalize={citizenId13Cha}\r\n                        classNameTextField={classes.textField}\r\n                        label={'เลขบัตรประชาชน'}\r\n                        required\r\n                    />\r\n                    <div className={classes.containerBottom}>\r\n                        <Button\r\n                            label=\"ยกเลิก\"\r\n                            onClick={onClickCancel}\r\n                            className={classes.button}\r\n                        />\r\n                        <Button\r\n                            type=\"submit\"\r\n                            label=\"ตกลง\"\r\n                            className={classes.button}\r\n                        />\r\n                    </div>\r\n                </form>\r\n            </div>\r\n        </div>\r\n    )\r\n}\r\n\r\nRegisterView.propTypes = {\r\n    handleSubmit: PropTypes.func,\r\n    onSubmit: PropTypes.func,\r\n    onClickCancel: PropTypes.func,\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        width: '100%',\r\n        height: '100%',\r\n        display: 'flex',\r\n        justifyContent: 'center',\r\n        backgroundColor: 'yellow',\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/login/login_bg.png)`,\r\n        backgroundRepeat: 'no-repeat',\r\n        backgroundSize: 'cover',\r\n        backgroundPosition: 'center',\r\n    },\r\n    containerForm: {\r\n        width: '60%',\r\n        maxWidth: '900px',\r\n        height: 'auto',\r\n        display: 'flex',\r\n        flexDirection: 'column',\r\n        justifyContent: 'center',\r\n        [theme.breakpoints.down(\"xs\")]: {\r\n            width: '100%',\r\n        },\r\n    },\r\n    containerBottom: {\r\n        width: '100%',\r\n        justifyContent: 'center',\r\n        display: 'flex',\r\n    },\r\n    form: {\r\n        backgroundColor: 'white',\r\n        padding: '20px',\r\n        boxShadow: \"0 4px 8px 0 rgba(0, 0, 0, 0.1), 0 6px 20px 0 rgba(0, 0, 0, 0.1)\"\r\n    },\r\n    button: {\r\n        // width: '200px',\r\n        margin: '10px'\r\n    },\r\n    textField: {\r\n        [theme.breakpoints.down(\"xs\")]: {\r\n            [`& input`]: {\r\n                height: '35px',\r\n            },\r\n        }\r\n    },\r\n    titleText: {\r\n        fontSize: \"1.25rem\",\r\n        marginBottom: '24px'\r\n    }\r\n}))(RegisterView)\r\n","import React, { Component, Fragment } from 'react';\r\nimport { reduxForm } from 'redux-form';\r\nimport { sha256 } from \"js-sha256\";\r\nimport { compose } from \"recompose\";\r\nimport { connect } from \"react-redux\";\r\n\r\nimport { fetchPost } from '../../Utilities/ServiceUtils';\r\nimport { registerValidate } from \"../../Utilities/Validate\";\r\nimport * as Constants from \"../../Constants/Constants\";\r\nimport RegisterView from \"../../Presentationals/Authentications/RegisterView\";\r\nimport RouteConfig from '../../Config/AppRoute/RouteConfig';\r\nimport AlertMessage from '../../Controls/Containers/AlertMessageSuper';\r\nimport WithAlertMessage from \"../../HOC/WithAlertMessage\";\r\nimport WithLoading from '../../HOC/WithLoading';\r\nimport Loading from '../../Controls/Containers/Loading';\r\n\r\nclass Register extends Component {\r\n\r\n    handleSubmit = data => {\r\n        this.callServiceRegister(data)\r\n    }\r\n\r\n    handleClickCancel = () => {\r\n        const { history } = this.props;\r\n        history.push(RouteConfig.CMSLogin)\r\n    }\r\n\r\n    callServiceRegister = ({\r\n        username,\r\n        password,\r\n        firstName,\r\n        lastName,\r\n        identificationID\r\n    }) => {\r\n        this.props.showLoading();\r\n        fetchPost(process.env.REACT_APP_PMR_REGISTER, {\r\n            username: username,\r\n            password: sha256.hmac(Constants.KEY_ENCRYPT_PASSWORD, password),\r\n            firstName: firstName,\r\n            lastName: lastName,\r\n            identificationID: identificationID\r\n        })\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(data => {\r\n                const { showAlert } = this.props;\r\n\r\n                switch (data.statusCode) {\r\n                    case 1:\r\n                        showAlert({\r\n                            altMsg: `ขอบคุณ คุณ ${firstName} ${lastName} ที่ลงทะเบียน ระบบได้ส่ง link สำหรับยืนยันตัวตนไปยัง ${username} โปรดตรวจสอบ e-mail เพื่อยืนยันตัวตน ก่อนใช้ระบบ`,\r\n                            altType: 1,\r\n                            callbackClose: this.handleClickCancel,\r\n                        })\r\n                        break;\r\n                    case 0:\r\n                        showAlert({\r\n                            altMsg: Constants.RESOURCEWORDS.REGISTER.REGISTER_FAIL,\r\n                            altType: 1,\r\n                            callbackClose: this.handleCloseAlertMsg,\r\n                        })\r\n                        break;\r\n                    case -1:\r\n                        showAlert({\r\n                            altMsg: Constants.RESOURCEWORDS.REGISTER.REGISTER_EXITS,\r\n                            altType: 1,\r\n                            callbackClose: this.handleCloseAlertMsg,\r\n                        })\r\n                        break;\r\n                    default:\r\n                        break;\r\n                }\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceRegister', ex)\r\n            })\r\n            .finally(()=>{\r\n                this.props.hideLoading();\r\n            })\r\n    }\r\n\r\n    handleCloseAlertMsg = () => {\r\n        this.props.hideAlert();\r\n    }\r\n\r\n    render() {\r\n        const { handleSubmit, isShowLoading } = this.props;\r\n\r\n        return (\r\n            <Fragment>\r\n                <RegisterView\r\n                    handleSubmit={handleSubmit}\r\n                    onSubmit={this.handleSubmit}\r\n                    onClickCancel={this.handleClickCancel}\r\n                />\r\n                <AlertMessage {...this.props} />\r\n                <Loading isShowLoading={isShowLoading} />\r\n            </Fragment>\r\n        )\r\n    }\r\n}\r\n\r\nconst reduxFormParameter = {\r\n    form: \"register\",\r\n    validate: registerValidate\r\n};\r\n\r\nconst enhance = compose(\r\n    connect(\r\n        null,\r\n        null\r\n    ), //เพื่อแก้ปัญหา props Route ไม่สามารถรับ component ที่ครอบด้วย redux form เพรียวๆ ได้\r\n    reduxForm(reduxFormParameter),\r\n    WithLoading,\r\n    WithAlertMessage\r\n);\r\n\r\n\r\nexport default enhance(Register)\r\n\r\n","import React from 'react'\r\nimport PropTypes from 'prop-types'\r\nimport { withStyles } from '@material-ui/core';\r\nimport Button from '../../Controls/Containers/Button';\r\n\r\nconst ActivateUserView = ({\r\n    classes,\r\n    onClickClose\r\n}) => {\r\n    return (\r\n        <div className={classes.root}>\r\n            <div className={classes.containerForm}>\r\n                <div className={classes.containnerContent}>\r\n                    {/* <label>ยืนยันตัวตนเรียบร้อย ขอบคุณที่ลงทะเบียนระบบบริหารจัดการภูมิสารสนเทศบนระบบเครือข่าย</label> */}\r\n                    <label>ยืนยันตัวตนเรียบร้อย ขอบคุณที่ลงทะเบียนระบบแจ้งการใช้ประโยชน์ที่ดิน/เปลี่ยนแปลง (ผมร.๑)</label>\r\n                    <div className={classes.containerBottom}>\r\n                        <Button\r\n                            label=\"ปิด\"\r\n                            onClick={onClickClose}\r\n                            className={classes.button}\r\n                        />\r\n                    </div>\r\n                </div>\r\n            </div>\r\n        </div>\r\n    )\r\n}\r\n\r\nActivateUserView.propTypes = {\r\n    onClickClose: PropTypes.func\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        width: '100%',\r\n        height: '100%',\r\n        display: 'flex',\r\n        justifyContent: 'center',\r\n        backgroundColor: 'yellow',\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/login/login_bg.png)`,\r\n        backgroundRepeat: 'no-repeat',\r\n        backgroundSize: 'cover',\r\n        backgroundPosition: 'center',\r\n    },\r\n    containerForm: {\r\n        width: '60%',\r\n        maxWidth: '560px',\r\n        height: 'auto',\r\n        display: 'flex',\r\n        flexDirection: 'column',\r\n        justifyContent: 'center',\r\n        [theme.breakpoints.down(\"xs\")]: {\r\n            width: '100%',\r\n        },\r\n    },\r\n    containerBottom: {\r\n        width: '100%',\r\n        justifyContent: 'flex-end',\r\n        display: 'flex',\r\n    },\r\n    containnerContent: {\r\n        backgroundColor: 'white',\r\n        padding: '30px',\r\n    },\r\n    button: {\r\n        // width: '100px',\r\n        marginTop: '50px'\r\n    },\r\n}))(ActivateUserView)\r\n","import React, { Component } from 'react';\r\nimport ActivateUserView from '../../Presentationals/Authentications/ActivateUserView';\r\nimport RouteConfig from '../../Config/AppRoute/RouteConfig';\r\nimport { fetchGet } from '../../Utilities/ServiceUtils';\r\n\r\nexport default class ActivateUser extends Component {\r\n\r\n    componentDidMount = () => {\r\n        // const { match } = this.props;\r\n        \r\n        // if (match && match.params && match.params.userID) {\r\n        //     this.callServiceActiveUser(match.params.userID)\r\n        // }\r\n\t\tconst url = new URL(window.location.href);\r\n        const userID = url.searchParams.get(\"userID\");\r\n        userID && this.callServiceActiveUser(userID)\r\n    }\r\n\r\n    handleClickClose = () => {\r\n        const { history } = this.props;\r\n        history.push(RouteConfig.CMSLogin)\r\n        // window.location.href = window.SYSTEM_URL.CMS.ROOT_CMS + RouteConfig.CMSLogin;\r\n    }\r\n\r\n    callServiceActiveUser = (userID) => {\r\n        fetchGet(`${process.env.REACT_APP_PMT_ACTIVE_USER}?userid=${userID}`)\r\n            .catch(ex => {\r\n                console.log('ex callServiceActiveUser', ex)\r\n            })\r\n    }\r\n\r\n    render() {\r\n        return (\r\n            <ActivateUserView\r\n                onClickClose={this.handleClickClose}\r\n            />\r\n        )\r\n    }\r\n}\r\n","import React, { Fragment } from 'react'\r\nimport PropTypes from 'prop-types'\r\nimport classNames from 'classnames'\r\nimport { withStyles } from '@material-ui/core/styles'\r\nimport { Link } from 'react-router-dom'\r\nimport Drawer from '@material-ui/core/Drawer'\r\nimport Hidden from '@material-ui/core/Hidden'\r\nimport ListItemIcon from '@material-ui/core/ListItemIcon'\r\nimport ListItemText from '@material-ui/core/ListItemText'\r\nimport MenuItem from '@material-ui/core/MenuItem'\r\n\r\nconst drawerWidth = 260\r\n\r\nconst styles = theme => ({\r\n    toolbar: {\r\n        height: 64,\r\n        display: 'flex',\r\n        alignItems: 'center',\r\n        paddingLeft: theme.spacing.unit * 2,\r\n        backgroundColor: theme.palette.primary.main,\r\n        flexShrink: 0\r\n    },\r\n    drawer: {\r\n        height: '100%'\r\n    },\r\n    drawerPaper: {\r\n        border: 'none',\r\n        height: '100%',\r\n        width: drawerWidth,\r\n        [theme.breakpoints.up('md')]: {\r\n            position: 'relative',\r\n        },\r\n        backgroundColor: '#8A8A91' //#353942\r\n    },\r\n    // menu: {\r\n    //     color: '#EFEFF1'\r\n    // },\r\n    menuItem: {\r\n        backgroundColor: '#2D3039'\r\n    },\r\n    myJobMenu: {\r\n        backgroundColor: '#EFEFF1',\r\n        color: '#353942'\r\n    },\r\n    link: {\r\n        textDecoration: 'none'\r\n    },\r\n    selected: {\r\n        backgroundColor: '#5B5B5F !important'\r\n    },\r\n    menu: {\r\n        height: 32,\r\n        color: '#fff',\r\n        whiteSpace: 'normal',\r\n        lineHeight: 'unset',\r\n        fontSize: '14px'\r\n    },\r\n    menuFlex: {\r\n        justifyContent: 'space-between',\r\n        height: '90%',\r\n        flexDirection: 'column',\r\n        paddingTop: '70px'\r\n    },\r\n    listItemIcon: {\r\n        marginRight: 0,\r\n        color: theme.palette.common.white\r\n    },\r\n    rootListItemText: {\r\n        padding: '0px'\r\n    },\r\n})\r\n\r\nconst ListMenu = ({\r\n    classes,\r\n    listMenu,\r\n    onClickUsermanual\r\n}) => {\r\n    return <Fragment>\r\n        {listMenu.map((item, index) => (\r\n            <Link\r\n                to={item.to}\r\n                key={index}\r\n                className={classes.link}\r\n            >\r\n                <MenuItem\r\n                    className={classes.menu}\r\n                    classes={{\r\n                        selected: classes.menuItemClass\r\n                    }}\r\n                >\r\n                    <ListItemIcon className={classes.listItemIconClass}>\r\n                        <img alt=\"\" src={item.img} />\r\n                    </ListItemIcon>\r\n                    <ListItemText primary={item.name} classes={{ root: classes.rootListItemText }} disableTypography />\r\n                </MenuItem>\r\n            </Link>\r\n        ))}\r\n        <MenuItem\r\n            className={classes.menu}\r\n            classes={{\r\n                selected: classes.menuItemClass\r\n            }}\r\n            onClick={onClickUsermanual}\r\n        >\r\n            <ListItemIcon className={classes.listItemIconClass}>\r\n                <img alt=\"\" src={`${process.env.PUBLIC_URL}/img/usermanagement/um_menu4_normal.png`} />\r\n            </ListItemIcon>\r\n            <ListItemText primary=\"ดาวน์โหลดคู่มือการใช้งานระบบ\" classes={{ root: classes.rootListItemText }} disableTypography />\r\n        </MenuItem >\r\n    </Fragment>\r\n}\r\n\r\nconst MenuView = ({\r\n    classes,\r\n    openMyJobDetail,\r\n    theme,\r\n    mobileOpen,\r\n    handleDrawerToggle,\r\n    listMenu,\r\n    onClickUsermanual\r\n}) => {\r\n\r\n    return [\r\n        <Hidden mdUp key=\"web\">\r\n            <Drawer\r\n                variant=\"temporary\"\r\n                anchor={theme.direction === 'rtl' ? 'right' : 'left'}\r\n                open={mobileOpen}\r\n                onClose={handleDrawerToggle}\r\n                classes={{\r\n                    paper: classNames(classes.drawerPaper, {\r\n                        [classes.myJobMenu]: openMyJobDetail,\r\n                    }),\r\n                    docked: classes.drawer\r\n                }}\r\n                ModalProps={{\r\n                    keepMounted: true, // Better open performance on mobile.\r\n                }}\r\n            >\r\n                <div className={classes.menuFlex}>\r\n                    <ListMenu\r\n                        classes={classes}\r\n                        listMenu={listMenu}\r\n                        onClickUsermanual={onClickUsermanual}\r\n                    />\r\n                </div>\r\n            </Drawer>\r\n        </Hidden>,\r\n        <Hidden smDown implementation=\"css\" key=\"mobile\">\r\n            <Drawer\r\n                variant=\"permanent\"\r\n                open\r\n                classes={{\r\n                    paper: classNames(classes.drawerPaper, {\r\n                        [classes.myJobMenu]: openMyJobDetail,\r\n                    }),\r\n                    docked: classes.drawer\r\n                }}\r\n            >\r\n                <div className={classes.menuFlex}>\r\n                    <ListMenu\r\n                        classes={classes}\r\n                        listMenu={listMenu}\r\n                        onClickUsermanual={onClickUsermanual}\r\n                    />\r\n                </div>\r\n            </Drawer>\r\n        </Hidden>\r\n    ]\r\n}\r\n\r\nMenuView.propTypes = {\r\n    classes: PropTypes.object.isRequired\r\n}\r\n\r\nexport default withStyles(styles, { withTheme: true })(MenuView)","import React, { Component } from 'react';\r\nimport MenuView from '../../Presentationals/UserManagements/MenuView';\r\nimport RouteConfig from '../../Config/AppRoute/RouteConfig';\r\n\r\nconst LIST_MENU = [\r\n    {\r\n        id: \"UM01\",\r\n        name: \"จัดการผู้ใช้งาน\",\r\n        to: RouteConfig.UMUser,\r\n        img: `${process.env.PUBLIC_URL}/img/usermanagement/um_menu1_normal.png`\r\n    },\r\n    {\r\n        id: \"UM02\",\r\n        name: \"จัดการกลุ่มผู้ใช้งาน\",\r\n        to: RouteConfig.UMUserGroup,\r\n        img: `${process.env.PUBLIC_URL}/img/usermanagement/um_menu2_normal.png`\r\n    },\r\n    {\r\n        id: \"UM03\",\r\n        name: \"รายงานประวัติการเข้าใช้งานระบบ\",\r\n        to: RouteConfig.UMReportLogin,\r\n        img: `${process.env.PUBLIC_URL}/img/usermanagement/um_menu8_normal.png`\r\n    },\r\n]\r\n\r\nexport class Menu extends Component {\r\n\r\n    onClickLink = (value) => {\r\n        return value.to\r\n    }\r\n\r\n    handleDownloadUsermanual = () =>{\r\n        window.open(window.URL_USERMANUAL.UM)\r\n    }\r\n\r\n    render() {\r\n        const {\r\n            mobileOpen,\r\n            handleDrawerToggle,\r\n        } = this.props\r\n\r\n        return <MenuView\r\n            mobileOpen={mobileOpen}\r\n            handleDrawerToggle={handleDrawerToggle}\r\n            listMenu={LIST_MENU}\r\n            onClickUsermanual={this.handleDownloadUsermanual}\r\n        />\r\n    }\r\n}\r\n\r\nexport default Menu","import React from 'react'\r\nimport { withStyles } from '@material-ui/core/styles'\r\nimport IconButton from '@material-ui/core/IconButton';\r\nimport MoreVertIcon from '@material-ui/icons/MoreVert';\r\nimport Popover from '@material-ui/core/Popover';\r\nimport MenuList from \"@material-ui/core/MenuList\";\r\nimport MenuItem from \"@material-ui/core/MenuItem\";\r\n\r\nconst styles = theme => ({\r\n\troot: {\r\n\t\tcolor: 'white'\r\n\t},\r\n\ticon: {\r\n\t\tcolor: 'white'\r\n\t},\r\n\tmenuUser: {\r\n\t\ttop: '1%',\r\n\t},\r\n\tlink: {\r\n\t\ttextDecoration: 'none'\r\n\t},\r\n\tmenuItem:{\r\n\t\t// maxWidth:''\r\n\r\n\t\t// maxWidth: \"250px\",\r\n\t\ttextOverflow:'ellipsis',\r\n\t\twhiteSpace:'nowrap',\r\n\t\toverflow:'hidden',\r\n\t\tdisplay:'block'\r\n\t}\r\n})\r\nexport const MenuUserView = ({\r\n\tclasses,\r\n\topenMenu,\r\n\tlistMenus,\r\n\tanchorElMenu,\r\n\tonClose,\r\n\tonClick,\r\n\tonClickMenu,\r\n}) => {\r\n\tconst createListMenu = () => {\r\n\t\treturn listMenus.map((menu, index) => (\r\n\t\t\t<MenuList key={`${menu.id}-${index}`} onClick={onClickMenu(menu)}>\r\n\t\t\t\t<MenuItem className={classes.menuItem}>{menu.name}</MenuItem>\r\n\t\t\t</MenuList>\r\n\t\t))\r\n\t}\r\n\r\n\treturn (\r\n\t\t<div>\r\n\t\t\t<IconButton className={classes.icon}\r\n\t\t\t\taria-label=\"More\"\r\n\t\t\t\taria-owns={openMenu ? \"simple-popper\" : undefined}\r\n\t\t\t\taria-haspopup=\"true\"\r\n\t\t\t\tonClick={onClick}\r\n\t\t\t>\r\n\t\t\t\t<MoreVertIcon />\r\n\t\t\t</IconButton>\r\n\r\n\t\t\t<Popover\r\n\t\t\t\tid=\"simple-popper\"\r\n\t\t\t\topen={openMenu}\r\n\t\t\t\tanchorEl={anchorElMenu}\r\n\t\t\t\tonClose={onClose}\r\n\t\t\t\tanchorOrigin={{\r\n\t\t\t\t\tvertical: 'bottom',\r\n\t\t\t\t\thorizontal: 'center',\r\n\t\t\t\t}}\r\n\t\t\t\ttransformOrigin={{\r\n\t\t\t\t\tvertical: 'top',\r\n\t\t\t\t\thorizontal: 'center',\r\n\t\t\t\t}}\r\n\t\t\t\tclassName={classes.menuUser}\r\n\t\t\t>\r\n\t\t\t\t{createListMenu()}\r\n\t\t\t</Popover>\r\n\t\t</div>\r\n\t)\r\n}\r\n\r\nexport default withStyles(styles)(MenuUserView);\r\n","import * as actionTypes from '../../../Constants/ActionTypes';\r\n\r\nexport const bindMapCommand = (mapFunction, params) => ({\r\n  type: actionTypes.MAP_COMMAND,\r\n  mapFunction: mapFunction,\r\n  mapFunctionParams: params,\r\n});\r\n\r\nexport const bindClearMapCommand = () => ({\r\n  type: actionTypes.CLEAR_MAP_COMMAND,\r\n  mapFunction: null,\r\n  mapFunctionParams: {},\r\n});\r\n\r\nexport const bindEvtExtentChange = (callbackFunction) => ({\r\n  type: actionTypes.BIND_EVT_EXTENT_CHANGE,\r\n  onExtentChangeFunction: callbackFunction,\r\n});\r\n\r\nexport const bindEvtClickMap = (callbackFunction) => ({\r\n  type: actionTypes.BIND_EVT_CLICK_MAP,\r\n  onClickMapFunction: callbackFunction,\r\n});\r\n\r\nexport const bindEvtClickMapIdentify = (callbackFunction) => ({\r\n  type: actionTypes.BIND_EVT_IDENTIFY_CLICK_MAP,\r\n  onIdentifyClickMap: callbackFunction,\r\n});\r\n\r\nexport const bindEvtEnableDrawGraphic = (callbackFunction) => ({\r\n  type: actionTypes.BIND_EVT_ENABLE_DRAW_GRAPHIC,\r\n});\r\n\r\nexport const bindEvtDisableDrawGraphic = (callbackFunction) => ({\r\n  type: actionTypes.BIND_EVT_DISABLE_DRAW_GRAPHIC,\r\n});\r\n\r\nexport const bindEvtEnableClearSelectGraphic = (callbackFunction) => ({\r\n  type: actionTypes.BIND_EVT_ENABLE_CLEAR_SELECT_GRAPHIC,\r\n});\r\n\r\nexport const bindEvtDisableClearSelectGraphic = (callbackFunction) => ({\r\n  type: actionTypes.BIND_EVT_DISABLE_CLEAR_SELECT_GRAPHIC,\r\n});\r\n\r\nexport const bindEvtZoomIn = (callbackFunction) => ({\r\n  type: actionTypes.BIND_EVT_ZOOM_IN,\r\n  onZoomInFunction: callbackFunction,\r\n});\r\n\r\nexport const bindEvtZoomOut = (callbackFunction) => ({\r\n  type: actionTypes.BIND_EVT_ZOOM_OUT,\r\n  onZoomOutFunction: callbackFunction,\r\n});\r\n\r\nexport const bindEvtMouseMove = (callbackFunction) => ({\r\n  type: actionTypes.BIND_EVT_MOUSE_MOVE,\r\n  onMouseMoveMapFunction: callbackFunction,\r\n});\r\n\r\nexport const bindEvtMouseMoveCoordinate = (callbackFunction) => ({\r\n  type: actionTypes.BIND_EVT_MOUSE_MOVE_COORDINATE,\r\n  onMouseMoveCoordinateFunction: callbackFunction,\r\n});\r\n\r\nexport const bindEvtOnShowDataTableOss = (callbackFunction) => ({\r\n  type: actionTypes.BIND_EVT_ON_SHOW_DATA_TABLE_OSS,\r\n  onShowDataTableOSS: callbackFunction,\r\n});\r\n","const _getDatumConstants = sr => {\r\n    let SEMI_MAJOR_AXIS = 0;\r\n    let INVERSE_FLATTENING = 0;\r\n    let ns = \"N\";\r\n    let zone = 47;\r\n    if (sr >= 32600 || sr === 4326 || sr === 102100 || sr === 3857) {\r\n        SEMI_MAJOR_AXIS = 6378137.0;\r\n        INVERSE_FLATTENING = 298.25722356300003;\r\n        if (sr >= 32700) {\r\n            zone = sr - 32700;\r\n            ns = \"S\";\r\n        } else if (sr >= 32600) {\r\n            zone = sr - 32600;\r\n            ns = \"N\";\r\n        }\r\n    } else if (sr >= 24000 || sr === 4240) {\r\n        SEMI_MAJOR_AXIS = 6377276.3449999997;\r\n        INVERSE_FLATTENING = 300.80169999999998;\r\n        if (sr >= 24000) {\r\n            zone = sr - 24000;\r\n            ns = \"N\";\r\n        }\r\n    } else {\r\n        throw new Error(\"this 'srid' is not support\");\r\n    }\r\n\r\n    return {\r\n        SEMI_MAJOR_AXIS: SEMI_MAJOR_AXIS,\r\n        INVERSE_FLATTENING: INVERSE_FLATTENING,\r\n        zone: zone,\r\n        ns: ns\r\n    };\r\n};\r\n\r\n// const _getTransfromConstants = (inSR, outSR) => {\r\n//     let x, y, z;\r\n//     if (inSR >= 32600 || inSR === 4326 || inSR === 102100 || inSR === 3857) {\r\n//         if (outSR >= 24000 || outSR == 4240) {\r\n//             x = -209.0;\r\n//             y = -818.0;\r\n//             z = -290.0;\r\n//         }\r\n//     } else if (inSR >= 24000 || inSR === 4240) {\r\n//         if (\r\n//             outSR >= 32600 ||\r\n//             outSR === 4326 ||\r\n//             outSR === 102100 ||\r\n//             outSR === 3857\r\n//         ) {\r\n//             x = 209.0;\r\n//             y = 818.0;\r\n//             z = 290.0;\r\n//         }\r\n//     } else {\r\n//         throw new Error(\"this 'srid' is not support\");\r\n//     }\r\n//     return { x: x, y: y, z: z };\r\n// };\r\n\r\nconst _getGCSSpatialreference = sr => {\r\n    if (sr >= 32600 || sr === 4326 || sr === 102100 || sr === 3857) {\r\n        return 4326;\r\n    } else if (sr >= 24000 || sr === 4240) {\r\n        return 4240;\r\n    } else {\r\n        throw new Error(\"this 'srid' is not support\");\r\n    }\r\n};\r\n\r\nconst _getUTMSpatialreference = (sr, zone) => {\r\n    if (sr >= 32600 || sr === 4326 || sr === 102100 || sr === 3857) {\r\n        return 32600 + Number(zone);\r\n    } else if (sr >= 24000 || sr === 4240) {\r\n        return 24000 + Number(zone);\r\n    } else {\r\n        throw new Error(\"this 'srid' is not support\");\r\n    }\r\n};\r\n\r\nexport const toUTM = (geometry, toZone = 47) => {\r\n    let spatialReference = { wkid: 32647 };\r\n    let datumConstans = _getDatumConstants(spatialReference.wkid);\r\n    let outSR = _getUTMSpatialreference(spatialReference.wkid, toZone);\r\n    let SEMI_MAJOR_AXIS = datumConstans.SEMI_MAJOR_AXIS;\r\n    let INVERSE_FLATTENING = datumConstans.INVERSE_FLATTENING;\r\n    // let ns = datumConstans.ns;\r\n    const convertorFunctionOfToUTM = (lat, lon) => {\r\n        let FALSE_EASTING = 500000.0;\r\n        let FALSE_NORTHING = 0;\r\n        let K0 = 0.9996;\r\n        let ZONE_WIDTH = 6;\r\n        let MERIDIAN_OF_ZONE = -177;\r\n\r\n        let f = 1.0 / INVERSE_FLATTENING;\r\n        let e2 = 2.0 * f - f * f;\r\n        //    var b = SEMI_MAJOR_AXIS * (1.0 - f);\r\n        //    var n = (SEMI_MAJOR_AXIS - b) / (SEMI_MAJOR_AXIS + b);\r\n        //    var nx2 = n * n;\r\n        //    var nx3 = nx2 * n;\r\n        //    var nx4 = nx2 * nx2;\r\n        //    var g = ((SEMI_MAJOR_AXIS * (1.0 - n) * (1.0 - nx2) * (1.0 + (9.0 * nx2) / 4.0 + (225.0 * nx4) / 64.0)) * Math.PI) / 180.0;\r\n        let e4 = e2 * e2;\r\n        let e6 = e2 * e4;\r\n        let long_of_west = MERIDIAN_OF_ZONE - 1.5 * ZONE_WIDTH;\r\n        let meridian_of_zone_o = long_of_west + ZONE_WIDTH / 2.0;\r\n        let a0 = 1.0 - e2 / 4.0 - (3.0 * e4) / 64.0 - (5.0 * e6) / 256.0;\r\n        let a2 = (3.0 / 8.0) * (e2 + e4 / 4.0 + (15.0 * e6) / 128.0);\r\n        let a4 = (15.0 / 256.0) * (e4 + (3.0 * e6) / 4.0);\r\n        let a6 = (35.0 * e6) / 3072.0;\r\n\r\n        let rad_lat = (lat * Math.PI) / 180.0;\r\n        let sin_lat = Math.sin(rad_lat);\r\n        let sin_2_lat = Math.sin(2.0 * rad_lat);\r\n        let sin_4_lat = Math.sin(4.0 * rad_lat);\r\n        let sin_6_lat = Math.sin(6.0 * rad_lat);\r\n\r\n        let cos_lat_1 = Math.cos(rad_lat);\r\n        let cos_lat_2 = cos_lat_1 * cos_lat_1;\r\n        let cos_lat_3 = cos_lat_2 * cos_lat_1;\r\n        let cos_lat_4 = cos_lat_2 * cos_lat_2;\r\n        let cos_lat_5 = cos_lat_3 * cos_lat_2;\r\n        // let cos_lat_6 = cos_lat_3 * cos_lat_3;\r\n        let cos_lat_7 = cos_lat_4 * cos_lat_3;\r\n\r\n        let rho =\r\n            (SEMI_MAJOR_AXIS * (1.0 - e2)) /\r\n            Math.pow(1.0 - e2 * sin_lat * sin_lat, 1.5);\r\n        let nu = SEMI_MAJOR_AXIS / Math.pow(1.0 - e2 * sin_lat * sin_lat, 0.5);\r\n\r\n        let central_meridian_0 = toZone * ZONE_WIDTH + meridian_of_zone_o;\r\n        let diff_lon = ((lon - central_meridian_0) * Math.PI) / 180.0;\r\n        let diff_lon_1 = diff_lon;\r\n        let diff_lon_2 = diff_lon_1 * diff_lon_1;\r\n        let diff_lon_3 = diff_lon_2 * diff_lon_1;\r\n        let diff_lon_4 = diff_lon_2 * diff_lon_2;\r\n        let diff_lon_5 = diff_lon_3 * diff_lon_2;\r\n        let diff_lon_6 = diff_lon_3 * diff_lon_3;\r\n        let diff_lon_7 = diff_lon_4 * diff_lon_3;\r\n        let diff_lon_8 = diff_lon_4 * diff_lon_4;\r\n\r\n        let psi_1 = nu / rho;\r\n        let psi_2 = psi_1 * psi_1;\r\n        let psi_3 = psi_2 * psi_1;\r\n        let psi_4 = psi_2 * psi_2;\r\n\r\n        let tan_lat_1 = Math.tan(rad_lat);\r\n        let tan_lat_2 = tan_lat_1 * tan_lat_1;\r\n        let tan_lat_4 = tan_lat_2 * tan_lat_2;\r\n        let tan_lat_6 = tan_lat_4 * tan_lat_2;\r\n\r\n        let east_1_term = nu * diff_lon_1 * cos_lat_1;\r\n        let east_2_term =\r\n            (nu * diff_lon_3 * cos_lat_3 * (psi_1 - tan_lat_2)) / 6.0;\r\n        let east_3_term =\r\n            (nu *\r\n                diff_lon_5 *\r\n                cos_lat_5 *\r\n                (4.0 * psi_3 * (1.0 - 6.0 * tan_lat_2) +\r\n                    psi_2 * (1.0 + 8.0 * tan_lat_2) -\r\n                    psi_1 * (2.0 * tan_lat_2) +\r\n                    tan_lat_4)) /\r\n            120.0;\r\n        let east_4_term =\r\n            (nu *\r\n                diff_lon_7 *\r\n                cos_lat_7 *\r\n                (61.0 - 479.0 * tan_lat_2 + 179.0 * tan_lat_4 - tan_lat_6)) /\r\n            5040.0;\r\n        let sum_east_term =\r\n            east_1_term + east_2_term + east_3_term + east_4_term;\r\n        let sum_east_term_K0 = K0 * sum_east_term;\r\n\r\n        let md_1_term = SEMI_MAJOR_AXIS * a0 * rad_lat;\r\n        let md_2_term = -1.0 * (SEMI_MAJOR_AXIS * a2 * sin_2_lat);\r\n        let md_3_term = SEMI_MAJOR_AXIS * a4 * sin_4_lat;\r\n        let md_4_term = -1.0 * (SEMI_MAJOR_AXIS * a6 * sin_6_lat);\r\n        let sum_md = md_1_term + md_2_term + md_3_term + md_4_term;\r\n\r\n        let north_1_term = (nu * sin_lat * diff_lon_2 * cos_lat_1) / 2.0;\r\n        let north_2_term =\r\n            (nu *\r\n                sin_lat *\r\n                diff_lon_4 *\r\n                cos_lat_3 *\r\n                (4.0 * psi_2 + psi_1 - tan_lat_2)) /\r\n            24.0;\r\n        let north_3_term =\r\n            (nu *\r\n                sin_lat *\r\n                diff_lon_6 *\r\n                cos_lat_5 *\r\n                (8.0 * psi_4 * (11.0 - 24.0 * tan_lat_2) -\r\n                    28.0 * psi_3 * (1.0 - 6.0 * tan_lat_2) +\r\n                    psi_2 * (1.0 - 32.0 * tan_lat_2) -\r\n                    psi_1 * (2.0 * tan_lat_2) +\r\n                    tan_lat_4)) /\r\n            720.0;\r\n        let north_4_term =\r\n            (nu *\r\n                sin_lat *\r\n                diff_lon_8 *\r\n                cos_lat_7 *\r\n                (1385.0 - 3111.0 * tan_lat_2 + 543.0 * tan_lat_4 - tan_lat_6)) /\r\n            40320.0;\r\n        let sum_north_term =\r\n            sum_md + north_1_term + north_2_term + north_3_term + north_4_term;\r\n        let sum_north_term_K0 = K0 * sum_north_term;\r\n\r\n        let easting = sum_east_term_K0 + FALSE_EASTING;\r\n        let northing = sum_north_term_K0 + FALSE_NORTHING;\r\n\r\n        return [easting, northing];\r\n    };\r\n    let jsonGeometry = {};\r\n    if (geometry.spatialReference.wkid === 4326) {\r\n        // let points = convertorFunctionOfToUTM(\r\n        //     geometry.latitude,\r\n        //     geometry.longitude\r\n        // );\r\n        let points = convertorFunctionOfToUTM(\r\n            geometry.x,\r\n            geometry.y\r\n        );\r\n        jsonGeometry = { x: points[0], y: points[1] };\r\n    } else if (geometry.paths) {\r\n        jsonGeometry = {\r\n            // paths: array.map(\r\n            //     geometry.paths,\r\n            //     lang.hitch(this, function(path) {\r\n            //         return array.map(\r\n            //             path,\r\n            //             lang.hitch(this, function(point) {\r\n            //                 return convertorFunctionOfToUTM(point[1], point[0]);\r\n            //             })\r\n            //         );\r\n            //     })\r\n            // ),\r\n            paths: geometry.paths.map(path => {\r\n                return path.map(point => {\r\n                    return convertorFunctionOfToUTM(point[1], point[0]);\r\n                });\r\n            })\r\n        };\r\n    }\r\n    jsonGeometry[\"spatialReference\"] = { wkid: outSR };\r\n    return jsonGeometry; //geomJsonUtil.fromJson(jsonGeometry);\r\n};\r\n\r\n\r\nexport const fromUTM = (geometry, toZone = 47) => {\r\n    let spatialReference = { wkid: 4326 };\r\n    let datumConstans = _getDatumConstants(spatialReference.wkid);\r\n    let outSR = _getGCSSpatialreference(spatialReference.wkid);\r\n    let SEMI_MAJOR_AXIS = datumConstans.SEMI_MAJOR_AXIS;\r\n    // let INVERSE_FLATTENING = datumConstans.INVERSE_FLATTENING;\r\n    let zone = toZone;\r\n    let ns = datumConstans.ns;\r\n    var convertorFunctionOfFromUTM = (y, x) => {\r\n        let lat, long;\r\n        let k0 = 0.9996;\r\n        let a = SEMI_MAJOR_AXIS;\r\n        let b = 6356752.3142;\r\n        // let f = INVERSE_FLATTENING;\r\n        let e = Math.sqrt(1 - Math.pow(b / a, 2));\r\n        let eisq = (e * e) / (1 - e * e);\r\n\r\n        let ei =\r\n            (1 - Math.pow(1 - e * e, 1 / 2)) / (1 + Math.pow(1 - e * e, 1 / 2));\r\n        let C1 = (3 * ei) / 2 - (27 * Math.pow(ei, 3)) / 32;\r\n\r\n        //21 * ei ^ 2 / 16 - 55 * ei ^ 4 / 32\r\n        let C2 = (21 * Math.pow(ei, 2)) / 16 - (55 * Math.pow(ei, 4)) / 32;\r\n\r\n        //151 * ei ^ 3 / 96\r\n        let C3 = (151 * Math.pow(ei, 3)) / 96;\r\n\r\n        //1097 * ei ^ 4 / 512\r\n        var C4 = (1097 * Math.pow(ei, 4)) / 512;\r\n\r\n        // let CorrectedNorthing;\r\n        let EastPrime;\r\n        let ArcLength;\r\n        let mu;\r\n        let fp;\r\n        let _C1, T1, N1, R1, D;\r\n        let Fact1, Fact2, Fact3, Fact4, LoFact1, LoFact2, LoFact3, DeltaLong;\r\n        let ZoneCM, RawLatitude;\r\n\r\n        if (!zone) zone = 47;\r\n        if (!ns) ns = \"N\";\r\n        // if (ns === \"N\") CorrectedNorthing = y;\r\n        // else CorrectedNorthing = 10000000 - y;\r\n\r\n        EastPrime = 500000 - x;\r\n        ArcLength = y / k0;\r\n        mu =\r\n            ArcLength /\r\n            (a *\r\n                (1 -\r\n                    Math.pow(e, 2) / 4 -\r\n                    (3 * Math.pow(e, 4)) / 64 -\r\n                    (5 * Math.pow(e, 6)) / 256));\r\n        fp =\r\n            mu +\r\n            C1 * Math.sin(2 * mu) +\r\n            C2 * Math.sin(4 * mu) +\r\n            C3 * Math.sin(6 * mu) +\r\n            C4 * Math.sin(8 * mu);\r\n        _C1 = eisq * Math.pow(Math.cos(fp), 2);\r\n        T1 = Math.pow(Math.tan(fp), 2);\r\n        //a / (1 - (e * SIN(L3)) ^ 2) ^ (1 / 2)\r\n        N1 = a / Math.pow(1 - Math.pow(e * Math.sin(fp), 2), 1 / 2);\r\n        R1 =\r\n            (a * (1 - e * e)) /\r\n            Math.pow(1 - Math.pow(e * Math.sin(fp), 2), 3 / 2);\r\n        D = EastPrime / (N1 * k0);\r\n        Fact1 = (N1 * Math.tan(fp)) / R1;\r\n        Fact2 = (D * D) / 2;\r\n        Fact3 =\r\n            ((5 + 3 * T1 + 10 * _C1 - 4 * _C1 * _C1 - 9 * eisq) *\r\n                Math.pow(D, 4)) /\r\n            24;\r\n        Fact4 =\r\n            ((61 +\r\n                90 * T1 +\r\n                298 * _C1 +\r\n                45 * T1 * T1 -\r\n                252 * eisq -\r\n                3 * _C1 * _C1) *\r\n                Math.pow(D, 6)) /\r\n            720;\r\n        LoFact1 = D;\r\n        LoFact2 = ((1 + 2 * T1 + _C1) * Math.pow(D, 3)) / 6;\r\n        LoFact3 =\r\n            ((5 -\r\n                2 * _C1 +\r\n                28 * T1 -\r\n                3 * Math.pow(_C1, 2) +\r\n                8 * eisq +\r\n                24 * Math.pow(T1, 2)) *\r\n                Math.pow(D, 5)) /\r\n            120;\r\n        DeltaLong = (LoFact1 - LoFact2 + LoFact3) / Math.cos(fp);\r\n        ZoneCM = 6 * zone - 183;\r\n        RawLatitude = (180 * (fp - Fact1 * (Fact2 + Fact3 + Fact4))) / Math.PI;\r\n\r\n        if (ns === \"N\") lat = RawLatitude;\r\n        else lat = -RawLatitude;\r\n        long = ZoneCM - (DeltaLong * 180) / Math.PI;\r\n        return [long, lat];\r\n    };\r\n    var jsonGeometry = {};\r\n    if (geometry.x) {\r\n        let points = convertorFunctionOfFromUTM(geometry.y, geometry.x);\r\n        jsonGeometry = { x: points[0], y: points[1] };\r\n    } else if (geometry.paths) {\r\n        jsonGeometry = {\r\n            // paths: array.map(\r\n            //     geometry.paths,\r\n            //     lang.hitch(this, function(path) {\r\n            //         return array.map(\r\n            //             path,\r\n            //             lang.hitch(this, function(point) {\r\n            //                 return convertorFunctionOfFromUTM(point[1], point[0]);\r\n            //             })\r\n            //         );\r\n            //     })\r\n            // ),\r\n            paths: geometry.paths.map(path => {\r\n                return path.map(point => {\r\n                    return convertorFunctionOfFromUTM(point[1], point[0]);\r\n                });\r\n            })\r\n        };\r\n    }\r\n    jsonGeometry[\"spatialReference\"] = { wkid: outSR };\r\n    return jsonGeometry;\r\n};\r\n","import * as Constants from '../Constants/Constants';\r\n\r\nexport const isFindString = (str, searching) => {\r\n    let checking = false;\r\n    if (str) {\r\n        checking = str.toUpperCase().indexOf(searching.toUpperCase()) !== -1;\r\n    }\r\n    return checking;\r\n\r\n};\r\n\r\nconst compareObjSortASC = attrName => (a, b) => {\r\n    return a[attrName].localeCompare(b[attrName], \"th\", {\r\n        sensitivity: \"base\"\r\n    });\r\n};\r\nconst compareObjSortDESC = attrName => (a, b) => {\r\n    return b[attrName].localeCompare(a[attrName], \"th\", {\r\n        sensitivity: \"base\"\r\n    });\r\n};\r\nexport const sortObjASC = (arrObjData, attrName) => {\r\n    const result = arrObjData.sort(compareObjSortASC(attrName));\r\n    return result;\r\n};\r\nexport const sortObjDESC = (arrObjData, attrName) => {\r\n    const result = arrObjData.sort(compareObjSortDESC(attrName));\r\n    return result;\r\n};\r\n\r\nexport const objectToArray = objData => {\r\n    //แปลง obj เป็น array\r\n    return Object.keys(objData).map(key => {\r\n        return objData[key];\r\n    });\r\n};\r\n\r\nexport const numberWithCommas = (n = \"\", fixedNumber = 0) => {\r\n    //ใส่ comma ให้ตัวเลข\r\n    let parts = (+n).toFixed(fixedNumber).split(\".\");\r\n    let num = parts[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\") + (+parts[1] ? \".\" + parts[1] : \"\");\r\n    return num;\r\n};\r\n\r\nexport const numberFormat = (number, { minimumFractionDigits = 0, maximumFractionDigits = 2} = {} ) => {\r\n    // return number.toLocaleString(\"th-TH\", { minimumFractionDigits: 0, maximumFractionDigits: 2 })\r\n    return number.toLocaleString(\"th-TH\", { minimumFractionDigits: minimumFractionDigits, maximumFractionDigits: maximumFractionDigits })\r\n}\r\n\r\nexport const checkFileOnServer = url => {\r\n    return fetch(url).then(response => {\r\n        return response.ok;\r\n    }).catch(ex => { //รอแก้ config ที่ server\r\n        return true\r\n    });\r\n};\r\n\r\nexport const svg2pngBase64 = (domNodeSVG, canvasWidth = 350, canvasHeight = 350) => {\r\n    return new Promise((resolv, reject) => {\r\n        try {\r\n            const svgURL = new XMLSerializer().serializeToString(domNodeSVG);\r\n            const svgBlob = new Blob([svgURL], { type: \"image/svg+xml;charset=utf-8\" });\r\n            const url = URL.createObjectURL(svgBlob);\r\n            const img = new Image();\r\n            const canvas = document.createElement(\"canvas\")\r\n            canvas.width = canvasWidth;\r\n            canvas.height = canvasHeight;\r\n            const ctx = canvas.getContext(\"2d\");\r\n            img.onload = function () {\r\n                ctx.drawImage(img, 0, 0, img.width, img.height, 0, 0, canvas.width, canvas.height);\r\n                var png = canvas.toDataURL(\"image/png\");\r\n                resolv(png)\r\n                URL.revokeObjectURL(png);\r\n            };\r\n            img.src = url;\r\n        }\r\n        catch (err) {\r\n            reject(null)\r\n        }\r\n    })\r\n}\r\n\r\nexport const getUniqueKey = () => {\r\n    const date = new Date();\r\n\r\n    return `${date.getHours()}${date.getMinutes()}${date.getSeconds()}${date.getMilliseconds()}`\r\n}\r\n\r\nexport const xml2json = (srcDOM) => {\r\n    let children = [...srcDOM.children];\r\n\r\n    // base case for recursion. \r\n    if (!children.length) {\r\n        return srcDOM.innerHTML\r\n    }\r\n\r\n    // initializing object to be returned. \r\n    let jsonResult = {};\r\n\r\n    for (let child of children) {\r\n\r\n        // checking is child has siblings of same name. \r\n        let childIsArray = children.filter(eachChild => eachChild.nodeName === child.nodeName).length > 1;\r\n\r\n        // if child is array, save the values as array, else as strings. \r\n        if (childIsArray) {\r\n            if (jsonResult[child.nodeName] === undefined) {\r\n                jsonResult[child.nodeName] = [xml2json(child)];\r\n            } else {\r\n                jsonResult[child.nodeName].push(xml2json(child));\r\n            }\r\n        } else {\r\n            jsonResult[child.nodeName] = xml2json(child);\r\n        }\r\n    }\r\n\r\n    return jsonResult;\r\n}\r\n\r\nexport const displayImportExportStatus = (shortStatus) => {\r\n    const key = shortStatus.toUpperCase();\r\n    return Constants.STATUS_IMPORT_EXPORT[key].display;\r\n}\r\n\r\nexport const isEmptyObj = (obj) => {\r\n    for (var key in obj) {\r\n        if (obj.hasOwnProperty(key))\r\n            return false;\r\n    }\r\n    return true;\r\n}\r\n\r\nexport const shortcutText = (str=\"\", numChar, isSuffixDot=false) => {\r\n    // console.log('str => ', str.length);\r\n    // console.log('numChar =-> ', numChar);\r\n    let strCut = str;\r\n    if(numChar){\r\n        if(strCut.length <= numChar){\r\n            return str;\r\n        }\r\n        else{\r\n            return `${strCut.substr(0, numChar)}${isSuffixDot && '...'}`;\r\n        }\r\n    }\r\n    else{\r\n        return strCut;\r\n    }\r\n}","import EsriLoader from 'esri-loader';\r\nimport * as UTMConverters from './UTMConverter';\r\n\r\nconst options = {\r\n  url: 'https://js.arcgis.com/3.27/',\r\n};\r\n\r\nexport const convertLatLong = async (x, y) => {\r\n  let convertLatLong = null;\r\n  return EsriLoader.loadModules(['esri/geometry/webMercatorUtils'], options).then(([webMercatorUtils]) => {\r\n    convertLatLong = webMercatorUtils.xyToLngLat(x, y);\r\n    return convertLatLong;\r\n  });\r\n};\r\n\r\nexport const getCoordinateConvertByLatLong = (lat, long) => {\r\n  return EsriLoader.loadModules(['esri/geometry/Point']).then(([Point]) => {\r\n    lat = parseFloat(lat.toFixed(6));\r\n    long = parseFloat(long.toFixed(6));\r\n    const point = new Point(long, lat);\r\n    const utmZ47 = UTMConverters.toUTM(point);\r\n    const result = {\r\n      utmZ47: {\r\n        x: utmZ47.x,\r\n        y: utmZ47.y,\r\n      },\r\n    };\r\n    return result;\r\n  });\r\n};\r\n\r\nexport const calculateDistance = (geometry, unit, isGeodesic = true) => {\r\n  return EsriLoader.loadModules(['esri/geometry/geometryEngine']).then(([geometryEngine]) => {\r\n    const geodesicWkid = [3857, 102100, 4326];\r\n    let result = '';\r\n    let multiplier = 1;\r\n\r\n    if (unit === 'wa') {\r\n      unit = 'meters';\r\n      multiplier = 0.5;\r\n    } else if (unit === 'inch') {\r\n      unit = 'feet';\r\n      multiplier = 12;\r\n    }\r\n\r\n    if (isGeodesic === true) {\r\n      if (geodesicWkid.indexOf(geometry.spatialReference.wkid) >= 0) {\r\n        result = geometryEngine.geodesicLength(geometryEngine.simplify(geometry), unit);\r\n      } else {\r\n        result = geometryEngine.planarLength(geometryEngine.simplify(geometry), unit);\r\n      }\r\n    } else {\r\n      result = geometryEngine.planarLength(geometryEngine.simplify(geometry), unit);\r\n    }\r\n    return result * multiplier;\r\n  });\r\n};\r\n\r\nexport const calRaiNganSquareWa = (squareMeter) => {\r\n  const num_decimal = 2;\r\n  let tmpSquareMeter = squareMeter;\r\n  const rai = parseInt(tmpSquareMeter / 1600, 10); // 1 ไร่ = 1600 ตารางเมตร : ไร่ = ตารางเมตร/1600\r\n  tmpSquareMeter %= 1600; //เอาตารางเมตรที่เหลือ\r\n  const ngan = parseInt(tmpSquareMeter / 400, 10); // 1 งาน = 400 ตารางเมตร: งาน = ตารางเมตร/400\r\n  tmpSquareMeter %= 400; //เอาตารางเมตรที่เหลือ\r\n  const squareWa = (tmpSquareMeter / 4).toFixed(num_decimal); // 100 ตารางวา  = 400 ตารางเมตร : ตารางวา = ตารางเมตร/4\r\n  return {\r\n    rai,\r\n    ngan,\r\n    squareWa,\r\n  };\r\n};\r\n","import {\r\n    format,\r\n    addYears\r\n} from \"date-fns\";\r\nimport thLocale from \"date-fns/locale/th\";\r\nimport enLocale from \"date-fns/locale/en-US\";\r\nimport 'moment/locale/th'\r\nimport moment from 'moment'\r\nmoment.locale('th')\r\n\r\nexport const dateThaiFormat = dateTime => {\r\n    const thmonth = [\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    const dateThaiFormat = `${dateTime.getDate()} ${\r\n        thmonth[dateTime.getMonth()]\r\n    } ${0 + dateTime.getFullYear() + 543}`;\r\n\r\n    return dateThaiFormat;\r\n};\r\n\r\nexport const convertDateTimeToDisplayDate = (date, strFormat=\"d MMM yyyy hh:mm:ss\", strLocal='th') => {//local =  'th' or 'en'\r\n    const newDate = new Date(date);\r\n    let localDetect = thLocale;\r\n    let tmpDateTime = addYears(newDate, 543);\r\n    if(strLocal === 'en'){\r\n        tmpDateTime = newDate;\r\n        localDetect = enLocale;\r\n    }\r\n    // console.log('==========>>> ', format(tmpDateTime, strFormat, { locale: localDetect}));\r\n    return format(tmpDateTime, strFormat, { locale: localDetect})\r\n}\r\n\r\nexport const convertDatetimeToCallService = (date) => {\r\n    const newDate = new Date(date);\r\n    //console.log('==========>>> ',date, newDate.getTime());\r\n    return newDate.getTime()\r\n}\r\n\r\nexport const convertDateToFormatTHFromMoment = (date, format = 'DD/MM/YYYY') => {\r\n    let newDate = moment(date).add(543, 'year').format(format)\r\n    if (newDate) return newDate\r\n    else return '-'\r\n}","import EsriLoader from 'esri-loader';\r\nimport * as Constants from '../Constants/Constants';\r\nimport * as UTMConverters from '../Utilities/UTMConverter';\r\nimport * as Utils from '../Utilities/Utils';\r\nimport * as MapUtils from '../Utilities/MapUtils';\r\nimport * as DateTimeUtils from '../Utilities/DateTimeUtil';\r\nimport enLocale from 'date-fns/locale/en-US';\r\nimport _, { map } from 'lodash';\r\nimport { format } from 'date-fns';\r\nimport { fetchMapService } from '../Utilities/ServiceUtils';\r\n\r\nconst options = {\r\n  url: 'https://js.arcgis.com/3.27/',\r\n};\r\n\r\nlet current = null;\r\nlet CPUDD_Query_Plan = null;\r\n\r\nlet editSubmitPmr = null;\r\nlet editConstruct = null;\r\nlet editDraftPnt = null;\r\nlet editDraftLine = null;\r\n\r\nlet gpMoveSubmitPmr = null;\r\nlet gpMoveConstruct = null;\r\nlet gpMoveDraftPnt = null;\r\nlet gpMoveDraftLine = null;\r\nlet gpMoveDraftPolygonLine = null;\r\n\r\nlet evtDrawMm = null;\r\nlet evtDrawSubmitPmr = null;\r\nlet evtDrawAsp = null;\r\nlet evtDrawConstruct = null;\r\nlet evtDrawDraft = null;\r\nlet evtDrawSpatial = null;\r\nlet evtSelectionCompleteSp = null;\r\nlet drawAddLayer = null;\r\n\r\nlet evtDrawMap = null;\r\n\r\nlet geometrySpDraft = null; // เอาไว้สำหรับ refresh query task ใหม่ โดยจะเก็บ param เดิมเอาไว้\r\n\r\nexport const zoomIn = ({ map }) => {\r\n  let zoom = map.getZoom();\r\n  map.setZoom(zoom + 1);\r\n};\r\n\r\nexport const zoomOut = ({ map }) => {\r\n  let zoom = map.getZoom();\r\n  map.setZoom(zoom - 1);\r\n};\r\n\r\nexport const drawPinCurrentAndPan = (mapParam, params) => {\r\n  current = {\r\n    long: params.long,\r\n    lat: params.lat,\r\n  };\r\n\r\n  drawPinCurrentLocation({ map: mapParam.map }, params);\r\n  if (params.pan) {\r\n    panToPoint(mapParam.map, params);\r\n  }\r\n};\r\n\r\nexport const panToPoint = (map, params) => {\r\n  map.centerAt([params.long, params.lat]);\r\n};\r\n\r\nexport const drawPinCurrentLocation = (mapParam, params) => {\r\n  EsriLoader.loadModules(['esri/geometry/Point', 'esri/graphic', 'esri/symbols/PictureMarkerSymbol'], options).then(\r\n    ([Point, Graphic, PictureMarkerSymbol]) => {\r\n      clearGraphic(mapParam, [Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CURRENT_LOCATION]);\r\n      let picPin = new PictureMarkerSymbol(`${process.env.PUBLIC_URL}/img/maptools/current_location.png`, 20, 20);\r\n      const point = new Point(params.long, params.lat);\r\n      const gp = new Graphic(point, picPin);\r\n\r\n      gp.setAttributes({\r\n        CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CURRENT_LOCATION,\r\n      });\r\n      mapParam.map.graphics.add(gp);\r\n      //Pboy fix override\r\n      //gpLayer.add(gp);\r\n    }\r\n  );\r\n};\r\n\r\nexport const gotoLocation = (mapParam, value) => {\r\n  EsriLoader.loadModules(['esri/geometry/webMercatorUtils', 'esri/geometry/Point', 'esri/graphic', 'esri/symbols/PictureMarkerSymbol'], options).then(\r\n    ([webMercatorUtils, Point, Graphic, PictureMarkerSymbol]) => {\r\n      let point = null;\r\n      if (value.projection === 1) {\r\n        let newPoint = new Point({\r\n          x: value.longitude,\r\n          y: value.latitude,\r\n          spatialReference: { wkid: 32647 },\r\n        });\r\n        let latLong = UTMConverters.fromUTM(newPoint);\r\n        if (\r\n          latLong.x >= Constants.LAT_LONG_BKK.longMin &&\r\n          latLong.x <= Constants.LAT_LONG_BKK.longMax &&\r\n          latLong.y >= Constants.LAT_LONG_BKK.latMin &&\r\n          latLong.y <= Constants.LAT_LONG_BKK.latMax\r\n        ) {\r\n          point = new Point({\r\n            longitude: latLong.x,\r\n            latitude: latLong.y,\r\n          });\r\n\r\n          panToPoint(mapParam.map, { long: latLong.x, lat: latLong.y });\r\n        } else {\r\n          value.showAlert({ altMsg: 'ตำแหน่งที่ระบุอยู่นอกขอบเขตกทม.' });\r\n        }\r\n      } else if (value.projection === 2) {\r\n        let longLat = webMercatorUtils.xyToLngLat(value.longitude, value.latitude);\r\n        if (\r\n          longLat[0] >= Constants.LAT_LONG_BKK.longMin &&\r\n          longLat[0] <= Constants.LAT_LONG_BKK.longMax &&\r\n          longLat[1] >= Constants.LAT_LONG_BKK.latMin &&\r\n          longLat[1] <= Constants.LAT_LONG_BKK.latMax\r\n        ) {\r\n          point = new Point({\r\n            longitude: longLat[0],\r\n            latitude: longLat[1],\r\n          });\r\n          panToPoint(mapParam.map, { long: longLat[0], lat: longLat[1] });\r\n        } else {\r\n          value.showAlert({ altMsg: 'ตำแหน่งที่ระบุอยู่นอกขอบเขตกทม.' });\r\n        }\r\n      } else {\r\n        if (\r\n          value.longitude >= Constants.LAT_LONG_BKK.longMin &&\r\n          value.longitude <= Constants.LAT_LONG_BKK.longMax &&\r\n          value.latitude >= Constants.LAT_LONG_BKK.latMin &&\r\n          value.latitude <= Constants.LAT_LONG_BKK.latMax\r\n        ) {\r\n          point = new Point({\r\n            longitude: value.longitude,\r\n            latitude: value.latitude,\r\n          });\r\n          panToPoint(mapParam.map, {\r\n            long: value.longitude,\r\n            lat: value.latitude,\r\n          });\r\n        } else {\r\n          value.showAlert({ altMsg: 'ตำแหน่งที่ระบุอยู่นอกขอบเขตกทม.' });\r\n        }\r\n      }\r\n      // const gotoLocationLayer = map.getLayer(Constants.LISTGRAPHICLAYER.GRAPHICLAYER_GOTO_LOCATION);\r\n      // gotoLocationLayer.clear();\r\n      clearGraphic(mapParam, [Constants.LISTGRAPHICLAYER.GRAPHICLAYER_GOTO_LOCATION]);\r\n\r\n      if (point) {\r\n        const symbol = new PictureMarkerSymbol(`${process.env.PUBLIC_URL}/img/maptools/pin.png`, 40, 40);\r\n        if(value.offset) {\r\n          symbol.setOffset(0,value.offset);\r\n        }\r\n        const graphic = new Graphic(point, symbol);\r\n\r\n        graphic.setAttributes({\r\n          CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_GOTO_LOCATION,\r\n        });\r\n        mapParam.map.graphics.add(graphic);\r\n        // gotoLocationLayer.add(graphic);\r\n      }\r\n    }\r\n  );\r\n};\r\n\r\nexport const zoomToScale = (mapParam, { scale }) => {\r\n  mapParam.map.setScale(scale);\r\n};\r\n\r\nexport const getPointPMR = (mapParam, { mapserviceUrl = null, pmr1ID = null, callback } = {}) => {\r\n  return EsriLoader.loadModules(['esri/tasks/query', 'esri/tasks/QueryTask'], options).then(async ([Query, QueryTask]) => {\r\n    if (mapserviceUrl && pmr1ID) {\r\n      const qParame = new Query();\r\n      qParame.where = `PMR1_ID = '${pmr1ID}'`;\r\n      qParame.outSpatialReference = { wkid: 4326 };\r\n      qParame.returnGeometry = true;\r\n      qParame.outFields = ['*'];\r\n      const qTask = await new QueryTask(mapserviceUrl);\r\n      return qTask.execute(qParame, (response) => {\r\n        callback(response);\r\n      });\r\n    }\r\n  });\r\n};\r\n\r\nexport const drawGraphicToolbar = async (mapParam, params) => {\r\n  EsriLoader.loadModules(['esri/toolbars/draw'], options).then(([Draw]) => {\r\n    let activateType = null;\r\n\r\n    switch (params.drawMode) {\r\n      case Constants.DRAW_GRAPHIC_MODE.point:\r\n        // toolbar.activate(Draw.POINT);\r\n        activateType = Draw.POINT;\r\n        break;\r\n      case Constants.DRAW_GRAPHIC_MODE.line:\r\n        // toolbar.activate(Draw.POLYLINE);\r\n        activateType = Draw.POLYLINE;\r\n        break;\r\n      case Constants.DRAW_GRAPHIC_MODE.polygon:\r\n        // toolbar.activate(Draw.POLYGON);\r\n        activateType = Draw.POLYGON;\r\n        break;\r\n      case Constants.DRAW_GRAPHIC_MODE.circle:\r\n        // toolbar.activate(Draw.CIRCLE);\r\n        activateType = Draw.CIRCLE;\r\n        break;\r\n      case Constants.DRAW_GRAPHIC_MODE.text:\r\n        // toolbar.activate(Draw.POINT);\r\n        activateType = Draw.POINT;\r\n        break;\r\n      case 'close':\r\n        // toolbar.deactivate();\r\n        clearEvtDrawMap(mapParam);\r\n        break;\r\n      default:\r\n        break;\r\n    }\r\n\r\n    if (activateType) {\r\n      createEvtDrawMap(mapParam, {\r\n        activateType: activateType,\r\n        callbackDrawComplete: () => (evt) => {\r\n          params.callback(evt.geometry);\r\n        },\r\n      });\r\n    }\r\n\r\n    // if (evtDrawMap) {\r\n    // \tevtDrawMap.remove();\r\n    // }\r\n\r\n    // if (toolbar !== null) {\r\n    // \ttoolbar.deactivate();\r\n    // }\r\n\r\n    // if (drawAddLayer) {\r\n    // \tdrawAddLayer.deactivate();\r\n    // \tmapParam.map.setMapCursor(\"default\");\r\n    // }\r\n\r\n    // var selectQuery = new Query();\r\n    // selectQuery.outFields = \"*\";\r\n    // toolbar = new Draw(mapParam.map);\r\n\r\n    // evtDrawMap = toolbar.on(\"draw-complete\", (evt) => {\r\n    // \tparams.callback(evt.geometry)\r\n    // });\r\n  });\r\n};\r\n\r\nexport const clearAllGraphic = (mapParam) => {\r\n  const listGraphicClear = mapParam.map.graphics.graphics\r\n    .filter((graphic) => {\r\n      return (\r\n        graphic.attributes &&\r\n        graphic.attributes.CUSTOM_KEY &&\r\n        graphic.attributes.CUSTOM_KEY !== Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CURRENT_LOCATION &&\r\n        graphic.attributes.CUSTOM_KEY !== Constants.LISTGRAPHICLAYER.GRAPHICLAYER_PMR1_FORM\r\n      );\r\n    })\r\n    .map((gpWorking) => gpWorking.attributes.CUSTOM_KEY);\r\n\r\n  clearGraphic(mapParam, listGraphicClear);\r\n};\r\n\r\nexport const clearAllGraphicMapTools = (mapParam) => {\r\n  clearGraphic(mapParam, [\r\n    Constants.LISTGRAPHICLAYER.GRAPHICLAYER_DRAW_POINT,\r\n    Constants.LISTGRAPHICLAYER.GRAPHICLAYER_DRAW_CIRCLE,\r\n    Constants.LISTGRAPHICLAYER.GRAPHICLAYER_DRAW_POLYGON,\r\n    Constants.LISTGRAPHICLAYER.GRAPHICLAYER_DRAW_LINE,\r\n    Constants.LISTGRAPHICLAYER.GRAPHICLAYER_DRAW_TEXT,\r\n  ]);\r\n};\r\n\r\nexport const clearOnlyGraphicGoToLocation = (mapParam) => {\r\n  // console.log('clear only graphaphic location')\r\n  clearGraphic(mapParam, [Constants.LISTGRAPHICLAYER.GRAPHICLAYER_GOTO_LOCATION]);\r\n};\r\n\r\n// export const clearGraphic = (mapParam, arrGraphicLayer) => {\r\n// \tlet layer = null;\r\n// \tarrGraphicLayer.map((id) => {\r\n// \t\tlayer = mapParam.map.getLayer(id);\r\n// \t\ttry {\r\n// \t\t\tif (layer !== undefined) {\r\n// \t\t\t\tlayer.clear();\r\n// \t\t\t}\r\n// \t\t}\r\n// \t\tcatch (err) {//case ที่เป็น Dynamic Layer\r\n// \t\t\t//layer.setVisibility(false);\r\n// \t\t}\r\n// \t\tmapParam.map.graphics.graphics.map((element) => {\r\n// \t\t\tif (element.attributes && (element.attributes[\"CUSTOM_KEY\"] === id)) mapParam.map.graphics.remove(element);\r\n// \t\t\treturn true\r\n// \t\t});\r\n\r\n// \t\treturn true\r\n// \t});\r\n// }\r\nconst _delay = (delayTime = 200) => {\r\n  return new Promise((resolve) => setTimeout(resolve, delayTime));\r\n};\r\n\r\nexport const clearGraphic = async (mapParam, arrGraphicLayer = []) => {\r\n  let layer = null;\r\n  arrGraphicLayer.forEach((id) => {\r\n    layer = mapParam.map.getLayer(id);\r\n    if (layer !== undefined) {\r\n      layer.clear();\r\n    }\r\n    // delete graphic elements that contain \"CUSTOM_KEY\" equal id\r\n    mapParam.map.graphics.graphics.forEach(async (element) => {\r\n      if (element.attributes && element.attributes['CUSTOM_KEY'] === id) {\r\n        await _delay(); //แก้ปัญหาเคลียร์ไม่ทัน\r\n        mapParam.map.graphics.remove(element);\r\n      }\r\n    });\r\n  });\r\n};\r\n\r\nexport const clickClearGraphic = (mapParam, value) => {\r\n  if (\r\n    value.objMap.mapClickObject.graphic &&\r\n    value.objMap.mapClickObject.graphic.attributes &&\r\n    value.objMap.mapClickObject.graphic.attributes.CUSTOM_KEY &&\r\n    value.objMap.mapClickObject.graphic.attributes.CUSTOM_KEY !== Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CURRENT_LOCATION &&\r\n    value.objMap.mapClickObject.graphic.attributes.CUSTOM_KEY !== Constants.LISTGRAPHICLAYER.GRAPHICLAYER_PMR1_FORM\r\n  ) {\r\n    mapParam.map.graphics.remove(value.objMap.mapClickObject.graphic);\r\n  }\r\n};\r\n\r\n// export const deactiveDrawToolbar = (mapParam, statusMenu = true) => {\r\n// \t// if (toolbar !== null) {\r\n// \t// \ttoolbar.deactivate();\r\n// \t// }\r\n\r\n// \tif (statusMenu) {\r\n// \t\tmapParam.map.setMapCursor(\"pointer\");\r\n// \t} else {\r\n// \t\tmapParam.map.setMapCursor(\"default\");\r\n// \t}\r\n// };\r\n\r\nexport const addKmlLayer = (mapParam, { id, urlKml, kmlName, callback, showAlert, listDisableTOC, lastTocLayerID }) => {\r\n  EsriLoader.loadModules(['esri/layers/KMLLayer'], options).then(([KMLLayer]) => {\r\n    const kml = new KMLLayer(urlKml, { id: id, visible: false });\r\n\r\n    kml.on('error', ({ error }) => {\r\n      showAlert({ altMsg: error.message });\r\n      callback();\r\n    });\r\n\r\n    kml.on('load', ({ layer }) => {\r\n      if (layer && layer._fLayers) {\r\n        const listSubLayer = [];\r\n        let indexLayerDisable = null;\r\n        let indexLastLayer = mapParam.map.graphicsLayerIds.indexOf(lastTocLayerID);\r\n\r\n        if (listDisableTOC.length > 0) {\r\n          //มี layer ที่ disable\r\n          indexLayerDisable = mapParam.map.graphicsLayerIds.indexOf(listDisableTOC[0]); //หาตำแหน่ง index ของ layer ที่ disable ใน graphicsLayerIds\r\n        }\r\n\r\n        if (layer._fLayers.length > 1) {\r\n          //กรณีมี sub layer มากกว่า 1\r\n          layer._fLayers.forEach((itmLayer, index) => {\r\n            listSubLayer.push({\r\n              id: itmLayer.id,\r\n              kmlName: `${kmlName}_${index + 1}`,\r\n            });\r\n            if (indexLayerDisable) {\r\n              mapParam.map.addLayer(itmLayer, indexLayerDisable++);\r\n            } else {\r\n              mapParam.map.addLayer(itmLayer, ++indexLastLayer);\r\n            }\r\n          });\r\n        } else {\r\n          //กรณีมี sub layer เดียว\r\n          listSubLayer.push({\r\n            id: layer._fLayers[0].id,\r\n            kmlName: kmlName,\r\n          });\r\n          mapParam.map.addLayer(layer._fLayers[0], indexLayerDisable);\r\n        }\r\n        callback(listSubLayer);\r\n      } else {\r\n        callback();\r\n      }\r\n    });\r\n  });\r\n};\r\n\r\nexport const addWMSLayer = (mapParam, { id, urlWms, wmsName, layerID, callback, showAlert }) => {\r\n  EsriLoader.loadModules(['esri/layers/WMSLayer'], options).then(([WMSLayer]) => {\r\n    const wms = new WMSLayer(urlWms, {\r\n      visibleLayers: layerID,\r\n      id: id,\r\n      visible: false,\r\n    });\r\n\r\n    wms.on('error', function({ error }) {\r\n      // alert(error.message)\r\n      showAlert({ altMsg: error.message });\r\n      callback();\r\n    });\r\n\r\n    wms.on('load', function(evt) {\r\n      //console.log(\"bb evt\", evt)\r\n    });\r\n    mapParam.map.on('layer-add-result', function(error, layer) {\r\n      console.log('wms onlayer-add-result', error, layer);\r\n    });\r\n\r\n    mapParam.map.addLayer(wms);\r\n    callback({ id, wmsName });\r\n  });\r\n};\r\n\r\nexport const addWFSLayer = (mapParam, { id, urlWfs, wfsName, layerName, callback, listDisableTOC, lastTocLayerID }) => {\r\n  EsriLoader.loadModules(['esri/layers/WFSLayer'], options).then(([WFSLayer]) => {\r\n    const layerNameSplit = layerName.split(':'); //ตัด prefix ออก\r\n    let wfsname = layerNameSplit.length > 0 ? layerNameSplit[1] : layerName;\r\n    const opts = {\r\n      id: id,\r\n      url: urlWfs,\r\n      name: wfsname,\r\n    };\r\n    let indexLayerDisable = null;\r\n    if (listDisableTOC.length > 0) {\r\n      //มี layer ที่ disable\r\n      indexLayerDisable = mapParam.map.graphicsLayerIds.indexOf(listDisableTOC[0]); //หาตำแหน่ง index ของ layer ที่ disable ใน graphicsLayerIds\r\n    }\r\n    const wfs = new WFSLayer();\r\n    wfs.fromJson(opts);\r\n    wfs.setVisibility(false);\r\n\r\n    if (indexLayerDisable) {\r\n      mapParam.map.addLayer(wfs, indexLayerDisable);\r\n    } else {\r\n      let indexLastLayer = mapParam.map.graphicsLayerIds.indexOf(lastTocLayerID);\r\n      mapParam.map.addLayer(wfs, ++indexLastLayer);\r\n    }\r\n    callback({ id, wfsName });\r\n  });\r\n};\r\n\r\nexport const addDefaultLayer = (mapParam, { defaultLayer, callback, userID, groupID }) => {\r\n  EsriLoader.loadModules(\r\n    ['esri/layers/FeatureLayer', 'esri/layers/ArcGISDynamicMapServiceLayer', 'esri/layers/ArcGISImageServiceLayer'],\r\n    options\r\n  ).then(([FeatureLayer, DynamicLayer, ArcGISImageServiceLayer]) => {\r\n    try {\r\n      let listDefaultLayersRevers = [...defaultLayer];\r\n      listDefaultLayersRevers.reverse();\r\n      listDefaultLayersRevers.forEach((itm) => {\r\n        const option = {\r\n          id: itm.idTOC,\r\n          name: itm.name,\r\n          visible: false,\r\n          outFields: ['*'],\r\n        };\r\n        // มีบาง layer ที่ new แบบ snapshot\r\n        if (window.LAYER_ID_SNAPSHOT.indexOf(itm.name) !== -1) {\r\n          option.mode = FeatureLayer.MODE_SNAPSHOT;\r\n        }\r\n\r\n        let layer;\r\n        if (itm.id === 35) {\r\n          layer = new DynamicLayer(`${itm.mapserviceURL}`, {\r\n            id: option.id,\r\n            visible: false,\r\n          });\r\n        } else if (itm.id === 36) {\r\n          layer = new ArcGISImageServiceLayer(`${itm.mapserviceURL}`, {\r\n            id: option.id,\r\n            visible: false,\r\n          });\r\n        } else {\r\n          layer = new FeatureLayer(`${itm.mapserviceURL}${itm.mapserviceID}`, option);\r\n        }\r\n\r\n        if (\r\n          itm.mapserviceID == Constants.CPUDD_EDITING_LAYER.PMR_MAPSERVICE_ID &&\r\n          itm.mapserviceURL == Constants.CPUDD_EDITING_LAYER.MAPSERVICE_URL\r\n        ) {\r\n          //setsetDefinitionExpression ให้แสดงจุด ผมร.1 เฉพาะของตัวเอง\r\n          // layer.setDefinitionExpression(`CREATOR = '${userID}' `);\r\n\r\n          //  ให้แสดงจุด ผมร.1 เฉพาะของตัวเอง (กรณีเป็นประชาชนที่ลงทะเบียน)\r\n          if (groupID === Constants.PROFILE_GROUP_TYPE.PEOPLE_WITH_PROFILE.id) {\r\n            layer.setDefinitionExpression(`CREATOR = '${userID}' `);\r\n          }\r\n        }\r\n\r\n        mapParam.map.addLayer(layer);\r\n      });\r\n      callback(defaultLayer);\r\n    } catch (err) {\r\n      callback();\r\n      console.log('err => ', err);\r\n    }\r\n  });\r\n};\r\n\r\nexport const addRestLayer = (mapParam, { id, url, layerRest, restName, listLegend, callback, showAlert }) => {\r\n  EsriLoader.loadModules(['esri/layers/ArcGISDynamicMapServiceLayer', 'esri/config', 'esri/IdentityManager'], options).then(\r\n    ([DynamicLayer, esriConfig, esriId]) => {\r\n      //esriConfig.defaults.io.corsEnabledServers.push(\"mapdynamic.nostramap.com\");\r\n      if (esriConfig.defaults.io.corsEnabledServers.indexOf('null://undefined') > 1)\r\n        esriConfig.defaults.io.corsEnabledServers.splice(esriConfig.defaults.io.corsEnabledServers.indexOf('null://undefined'), 1);\r\n      let arrRESTURL = url.split('?');\r\n      if (arrRESTURL.length > 1) {\r\n        let registerURL = arrRESTURL[0].substr(0, arrRESTURL[0].indexOf('/services') + 9);\r\n        let registerToken = arrRESTURL[1].replace('token=', '');\r\n        esriId.registerToken({\r\n          server: registerURL,\r\n          token: registerToken,\r\n        });\r\n        if (esriConfig.defaults.io.corsEnabledServers.indexOf('null://undefined') > 1)\r\n          esriConfig.defaults.io.corsEnabledServers.splice(esriConfig.defaults.io.corsEnabledServers.indexOf('null://undefined'), 1);\r\n        url = arrRESTURL[0];\r\n      }\r\n      const restLayer = new DynamicLayer(url, {\r\n        id: id,\r\n        visible: false,\r\n      });\r\n      restLayer.setVisibleLayers(layerRest);\r\n      restLayer.on('error', ({ error }) => {\r\n        showAlert({ altMsg: error.message });\r\n        callback();\r\n      });\r\n      restLayer.on('load', ({ layer }) => {\r\n        mapParam.map.addLayer(layer);\r\n        callback({ id, restName, listLegend });\r\n      });\r\n    }\r\n  );\r\n};\r\n\r\nexport const removeTOCLayerItem = (mapParam, idTOC) => {\r\n  const layer = mapParam.map.getLayer(idTOC);\r\n  if (layer) {\r\n    mapParam.map.removeLayer(layer);\r\n  }\r\n};\r\n\r\nexport const reorderTOC = (mapParam, { sourceLayer, destinationLayer }) => {\r\n  const indexDestinationLayerMap = mapParam.map.graphicsLayerIds.indexOf(destinationLayer.idTOC);\r\n  //layer ของตัวที่เราสนใจ\r\n  const layer = mapParam.map.getLayer(sourceLayer.idTOC);\r\n  mapParam.map.reorderLayer(layer, indexDestinationLayerMap);\r\n};\r\n\r\nexport const reorderBgTOC = (mapParam, { sourceLayer, destinationLayer }) => {\r\n  const layerID = mapParam.map.getLayersVisibleAtScale().map((layer) => layer.id);\r\n  const indexDestinationLayerMap = layerID.indexOf(destinationLayer.idTOC);\r\n\r\n  //layer ของตัวที่เราสนใจ\r\n  const layer = mapParam.map.getLayer(sourceLayer.idTOC);\r\n  mapParam.map.reorderLayer(layer, indexDestinationLayerMap);\r\n};\r\n\r\nexport const setTOCVisibleLayer = (mapParam, { layerID, isVisible = true }) => {\r\n  const layer = mapParam.map.getLayer(layerID);\r\n  \r\n  if (layer) {\r\n    layer.setVisibility(isVisible);\r\n  }\r\n};\r\n\r\nexport const setMultiVisibleLayers = (mapParam, { layerIDs, isVisible = true }) => {\r\n  layerIDs &&\r\n    layerIDs.forEach((layerID) => {\r\n      setTOCVisibleLayer(mapParam, { layerID, isVisible });\r\n    });\r\n};\r\n\r\nexport const visibleTocLayer = ({ map }, value) => {\r\n  let layer = map.getLayer('rice');\r\n\r\n  if (value.visibleLayer) {\r\n    let arr = value.arrLayerId;\r\n    arr.push(value.layerIdCurrent);\r\n    layer.setVisibleLayers(arr);\r\n  } else {\r\n    let arr = value.arrLayerId;\r\n    let id = value.layerIdCurrent;\r\n\r\n    let x = arr.filter((value) => value !== id);\r\n    layer.setVisibleLayers(x);\r\n  }\r\n};\r\n\r\nexport const changeBaseMap = ({ map }, value) => {\r\n  map.basemapGallery.select(`basemap_${value}`);\r\n};\r\n\r\nconst getLayerByID = (map, layerID) => {\r\n  return map.getLayer(layerID);\r\n};\r\n\r\nexport const IdentifyComprehensivePlan = (mapParam, { geometry, callbackFn }) => {\r\n  //PMR\r\n  EsriLoader.loadModules(['esri/tasks/IdentifyTask', 'esri/tasks/IdentifyParameters', 'esri/tasks/query', 'esri/tasks/QueryTask'], options).then(\r\n    async ([IdentifyTask, IdentifyParameters, Query, QueryTask]) => {\r\n      let districtPMR1ID = null;\r\n      let query = new Query();\r\n      query.geometry = geometry;\r\n      query.outFields = ['SUBDISTRICT_ID'];\r\n      let queryTask = new QueryTask(window.CONFIG_URL_GIS.SUBDISTRICT_BASEMAP);\r\n      await queryTask.execute(\r\n        query,\r\n        (res) => {\r\n          if (res.features.length > 0) {\r\n            districtPMR1ID = res.features[0].attributes.SUBDISTRICT_ID;\r\n          }\r\n        },\r\n        (error) => {\r\n          console.log(error);\r\n        }\r\n      );\r\n\r\n      const url = window.CONFIG_URL_GIS.COMPREHENSIVE_PLAN;\r\n      const identifyTask = new IdentifyTask(url);\r\n      const identifyParams = new IdentifyParameters();\r\n      identifyParams.tolerance = 0;\r\n      identifyParams.returnGeometry = true;\r\n      identifyParams.layerOption = IdentifyParameters.LAYER_OPTION_ALL;\r\n      identifyParams.width = mapParam.map.width;\r\n      identifyParams.height = mapParam.map.height;\r\n      identifyParams.geometry = geometry;\r\n      identifyParams.mapExtent = mapParam.map.extent;\r\n      identifyParams.returnFieldName = true;\r\n      await identifyTask.execute(\r\n        identifyParams,\r\n        (idResults) => {\r\n          if (callbackFn) {\r\n            callbackFn(idResults, geometry, districtPMR1ID);\r\n          }\r\n        },\r\n        (error) => {\r\n          console.log('Error: Identify Comprehensive plan => ', error);\r\n          if (callbackFn) {\r\n            callbackFn(null);\r\n          }\r\n        }\r\n      );\r\n    }\r\n  );\r\n};\r\n\r\n//เริ่มทำการวัด\r\nexport const createDrawMeasurement = (mapParam, { callback, type }) => {\r\n  EsriLoader.loadModules(['dojo/keys', 'esri/sniff'], options).then(([keys, has]) => {\r\n    clearGraphic(mapParam, [Constants.LISTGRAPHICLAYER.GRAPHICLAYER_MEASUREMENT]);\r\n    // mapParam.map.setMapCursor(\"crosshair\");\r\n    mapParam.map.enableSnapping({\r\n      snapKey: has('mac') ? keys.META : keys.CTRL,\r\n    });\r\n\r\n    if (evtDrawMm) {\r\n      evtDrawMm.remove();\r\n    }\r\n\r\n    createEvtDrawMap(mapParam, {\r\n      callback,\r\n      activateType: type,\r\n      callbackDrawComplete: addGraphicDrawMeasurement,\r\n    });\r\n\r\n    // evtDrawMm = mapParam.drawMeasurement.on(\"draw-complete\", addGraphicDrawMeasurement(mapParam, callback));\r\n    // mapParam.drawMeasurement.activate(type);\r\n  });\r\n};\r\n\r\n//หลังทำการวัดเสร็จ\r\nconst addGraphicDrawMeasurement = (mapParam, { callback }) => (evt) => {\r\n  EsriLoader.loadModules(\r\n    ['esri/symbols/SimpleMarkerSymbol', 'esri/symbols/SimpleFillSymbol', 'esri/graphic', 'esri/symbols/SimpleLineSymbol', 'esri/Color'],\r\n    options\r\n  ).then(async ([SimpleMarkerSymbol, SimpleFillSymbol, Graphic, SimpleLineSymbol, Color]) => {\r\n    let symbol = null;\r\n    let result = {};\r\n\r\n    clearGraphic(mapParam, [Constants.LISTGRAPHICLAYER.GRAPHICLAYER_MEASUREMENT]);\r\n\r\n    switch (evt.geometry.type) {\r\n      case Constants.MEASUREMENT_TYPE_DRAW.point: //calculate point\r\n        await calLocation(evt.geometry).then((resultLocation) => {\r\n          result = resultLocation;\r\n        });\r\n        symbol = new SimpleMarkerSymbol({\r\n          color: Color([255, 0, 0]),\r\n          type: 'simplemarkersymbol',\r\n          style: 'STYLE_CIRCLE',\r\n          outline: {\r\n            color: Color([0, 0, 0]),\r\n            width: 1,\r\n          },\r\n        });\r\n        break;\r\n      case Constants.MEASUREMENT_TYPE_DRAW.polygon: //calculate polygon\r\n        await calArea(evt.geometry).then((resultArea) => {\r\n          result = resultArea;\r\n        });\r\n        symbol = new SimpleFillSymbol(\r\n          SimpleFillSymbol.STYLE_SOLID,\r\n          new SimpleLineSymbol('solid', new Color([255, 0, 0]), 2),\r\n          new Color([0, 0, 0, 0.25])\r\n        );\r\n        break;\r\n      case Constants.MEASUREMENT_TYPE_DRAW.polyline: //calculate line\r\n        result = await calDistance(evt.geometry);\r\n        symbol = new SimpleFillSymbol('solid', new SimpleLineSymbol('solid', new Color([255, 0, 0]), 2), null);\r\n        break;\r\n      default:\r\n        break;\r\n    }\r\n    callback(result);\r\n    // measurementLayer.add(new Graphic(evt.geometry, symbol));\r\n    const graphic = new Graphic(evt.geometry, symbol);\r\n    graphic.setAttributes({\r\n      CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_MEASUREMENT,\r\n    });\r\n    mapParam.map.graphics.add(graphic);\r\n  });\r\n};\r\n\r\nexport const calLocation = (geometry, type) => {\r\n  return EsriLoader.loadModules(['esri/geometry/webMercatorUtils'], options).then(async ([webMercatorUtils]) => {\r\n    const result = {};\r\n    const { location } = Constants.MEASUREMENT_UNIT;\r\n    if (!type) {\r\n      const latLong = webMercatorUtils.xyToLngLat(geometry.x, geometry.y);\r\n      const utm = await MapUtils.getCoordinateConvertByLatLong(latLong[0], latLong[1]);\r\n      result[location.longLat.value] = [latLong[1].toFixed(5), latLong[0].toFixed(5)];\r\n      result[location.mercator.value] = [geometry.x.toFixed(2), geometry.y.toFixed(2)];\r\n      result[location.utmZ47.value] = [utm.utmZ47.x.toFixed(2), utm.utmZ47.y.toFixed(2)];\r\n      return result;\r\n    } else {\r\n      switch (type) {\r\n        case location.longLat.value:\r\n          const latLon = webMercatorUtils.xyToLngLat(geometry.x, geometry.y);\r\n          return [latLon[1].toFixed(5), latLon[0].toFixed(5)];\r\n        case location.mercator.value:\r\n          return [geometry.x.toFixed(2), geometry.y.toFixed(2)];\r\n        case location.utmZ47.value:\r\n          const latLonForUmt = webMercatorUtils.xyToLngLat(geometry.x, geometry.y);\r\n          const utm = await MapUtils.getCoordinateConvertByLatLong(latLonForUmt[0], latLonForUmt[1]);\r\n          return [utm.utmZ47.x.toFixed(2), utm.utmZ47.y.toFixed(2)];\r\n\r\n        default:\r\n          break;\r\n      }\r\n    }\r\n  });\r\n};\r\n\r\nexport const calArea = (geometry) => {\r\n  return EsriLoader.loadModules(['esri/geometry/geometryEngine'], options).then(([GeometryEngine]) => {\r\n    const result = {};\r\n    const { area } = Constants.MEASUREMENT_UNIT;\r\n    const { numberFormat } = Utils;\r\n    const squareKilometers = GeometryEngine.geodesicArea(geometry, 'square-kilometers');\r\n    const squareMeters = GeometryEngine.geodesicArea(geometry, 'square-meters');\r\n    const raiNagnSquarWa = MapUtils.calRaiNganSquareWa(squareMeters);\r\n\r\n    result[area.squareKilometers.value] = `${numberFormat(Math.abs(squareKilometers), {\r\n      minimumFractionDigits: 0,\r\n      maximumFractionDigits: 4,\r\n    })} ตร.กม.`;\r\n    result[area.squareMeters.value] = `${numberFormat(Math.abs(squareMeters))} ตร.ม.`;\r\n    result[area.raiNagnSquarWa.value] = `${numberFormat(Math.abs(raiNagnSquarWa.rai))} ไร่ ${Math.abs(raiNagnSquarWa.ngan)} งาน ${numberFormat(\r\n      Math.abs(raiNagnSquarWa.squareWa)\r\n    )} ตร.ว.`;\r\n\r\n    return result;\r\n  });\r\n};\r\n\r\nexport const calDistance = async (geometry) => {\r\n  const result = {};\r\n  const { distance } = Constants.MEASUREMENT_UNIT;\r\n  const { numberFormat } = Utils;\r\n  const kilometers = await MapUtils.calculateDistance(geometry, 'kilometers');\r\n  const meters = await MapUtils.calculateDistance(geometry, 'meters');\r\n\r\n  await Promise.all([kilometers, meters]).then(function(values) {\r\n    result[distance.kilometers.value] = `${numberFormat(values[0])} กิโลเมตร`;\r\n    result[distance.meters.value] = `${numberFormat(values[1])} เมตร`;\r\n  });\r\n\r\n  return result;\r\n};\r\n\r\nexport const clearDrawMesurement = (mapParam) => {\r\n  // mapParam.map.setMapCursor(\"default\");\r\n  // mapParam.drawMeasurement.deactivate();\r\n  clearEvtDrawMap(mapParam);\r\n  clearGraphic(mapParam, [Constants.LISTGRAPHICLAYER.GRAPHICLAYER_MEASUREMENT]);\r\n};\r\n\r\nexport const zoomQueryBuilder = (mapParam, { mapserviceUrl = null, objectID = null } = {}) => {\r\n  return EsriLoader.loadModules(\r\n    [\r\n      'esri/tasks/query',\r\n      'esri/tasks/QueryTask',\r\n      'esri/graphic',\r\n      'esri/Color',\r\n      'esri/symbols/SimpleMarkerSymbol',\r\n      'esri/symbols/SimpleFillSymbol',\r\n      'esri/symbols/SimpleLineSymbol',\r\n    ],\r\n    options\r\n  ).then(([Query, QueryTask, Graphic, Color, SimpleMarkerSymbol, SimpleFillSymbol, SimpleLineSymbol]) => {\r\n    if (mapserviceUrl && objectID) {\r\n      const qParame = new Query();\r\n      qParame.where = `OBJECTID  = ${objectID}`;\r\n      qParame.outSpatialReference = { wkid: 102100 };\r\n      qParame.returnGeometry = true;\r\n      qParame.outFields = ['OBJECTID '];\r\n      const qTask = new QueryTask(mapserviceUrl);\r\n\r\n      qTask.execute(qParame, (response) => {\r\n        if (response.features) {\r\n          const geometry = response.features[0].geometry;\r\n          clearGraphic(mapParam, [Constants.LISTGRAPHICLAYER.GRAPHICLAYER_QUERYBUILDER]);\r\n\r\n          if (response.geometryType === 'esriGeometryPoint') {\r\n            let lvZoom = mapParam.map.getZoom();\r\n            if (lvZoom < 15) {\r\n              lvZoom = 15;\r\n            }\r\n            mapParam.map.centerAndZoom(geometry, lvZoom);\r\n          } else {\r\n            mapParam.map.setExtent(geometry.getExtent().expand(1.5), true);\r\n          }\r\n\r\n          let symbol = null;\r\n\r\n          switch (response.geometryType) {\r\n            case 'esriGeometryPolygon':\r\n              symbol = new SimpleFillSymbol(\r\n                SimpleFillSymbol.STYLE_SOLID,\r\n                new SimpleLineSymbol('solid', new Color([255, 0, 0]), 3),\r\n                new Color([255, 0, 0, 0.25])\r\n              );\r\n              break;\r\n            case 'esriGeometryPoint':\r\n            case 'point':\r\n              symbol = new SimpleMarkerSymbol({\r\n                color: Color([25, 179, 25]),\r\n                type: 'simplemarkersymbol',\r\n                style: 'STYLE_CIRCLE',\r\n                outline: {\r\n                  color: Color([0, 0, 0]),\r\n                  width: 1,\r\n                },\r\n              });\r\n              break;\r\n            case 'esriGeometryPolyline':\r\n              symbol = new SimpleLineSymbol(SimpleLineSymbol.STYLE_DASHDOT, new Color([255, 0, 0]), 10);\r\n              break;\r\n            default:\r\n              break;\r\n          }\r\n\r\n          if (symbol) {\r\n            const graphic = new Graphic(geometry, symbol);\r\n            graphic.setAttributes({\r\n              CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_QUERYBUILDER,\r\n            });\r\n            mapParam.map.graphics.add(graphic);\r\n          }\r\n        }\r\n      });\r\n    }\r\n  });\r\n};\r\n\r\n//สั่งสร้าง Draw ยื่นแบบ ผมร1.\r\nexport const drawPointSubmitPmr = (mapParam, { callback }) => {\r\n  // mapParam.map.setMapCursor(\"crosshair\");\r\n  // if (evtDrawSubmitPmr) {\r\n  // \tevtDrawSubmitPmr.remove();\r\n  // }\r\n  // evtDrawSubmitPmr = mapParam.drawSubmitPmr.on(\"draw-complete\", addGraphicDrawGraphicSubmitPmr(mapParam, callback));\r\n  // mapParam.drawSubmitPmr.activate(\"point\");\r\n\r\n  createEvtDrawMap(mapParam, {\r\n    callbackDrawComplete: addGraphicDrawGraphicSubmitPmr,\r\n    callback,\r\n    activateType: 'point',\r\n  });\r\n};\r\n\r\n//หลังวาดยื่นแบบ ผมร1.เสร็จ\r\nconst addGraphicDrawGraphicSubmitPmr = (mapParam, { callback }) => (evt) => {\r\n  EsriLoader.loadModules(['esri/symbols/SimpleMarkerSymbol', 'esri/graphic', 'esri/Color'], options).then(([SimpleMarkerSymbol, Graphic, Color]) => {\r\n    clearDrawPointSubmitPmr(mapParam);\r\n    clearGraphic(mapParam, [Constants.LISTGRAPHICLAYER.GRAPHICLAYER_SUBMIT_PMR]);\r\n    const symbol = new SimpleMarkerSymbol({\r\n      color: Color([25, 179, 25]),\r\n      type: 'simplemarkersymbol',\r\n      style: 'STYLE_CIRCLE',\r\n      outline: {\r\n        color: Color([0, 0, 0]),\r\n        width: 1,\r\n      },\r\n    });\r\n\r\n    const graphic = new Graphic(evt.geometry, symbol);\r\n    callback(evt, graphic);\r\n    graphic.setAttributes({\r\n      CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_SUBMIT_PMR,\r\n    });\r\n    mapParam.map.graphics.add(graphic);\r\n  });\r\n};\r\nexport const drawPointEditPMRForm = (mapParam, params) => {\r\n  EsriLoader.loadModules(\r\n    [\r\n      'esri/symbols/SimpleMarkerSymbol',\r\n      'esri/graphic',\r\n      'esri/Color',\r\n      'esri/geometry/Point',\r\n      'esri/geometry/webMercatorUtils',\r\n      'esri/SpatialReference',\r\n    ],\r\n    options\r\n  ).then(([SimpleMarkerSymbol, Graphic, Color, Point, webMercatorUtils, SpatialReference]) => {\r\n    let symbol = null;\r\n    // const submitPmrLayer = getLayerByID(mapParam.map, Constants.LISTGRAPHICLAYER.GRAPHICLAYER_SUBMIT_PMR);\r\n    // submitPmrLayer.clear();\r\n    clearGraphic(mapParam, [Constants.LISTGRAPHICLAYER.GRAPHICLAYER_SUBMIT_PMR]);\r\n\r\n    let webMercator = webMercatorUtils.lngLatToXY(params.geometry.x, params.geometry.y);\r\n    let newPoint = new Point(webMercator, new SpatialReference({ wkid: 102100, latestWkid: 3857 }));\r\n\r\n    symbol = new SimpleMarkerSymbol({\r\n      // color: Color([25, 179, 25]),\r\n      color: params.symbolColor ? Color(params.symbolColor) : Color([25, 179, 25]),\r\n      type: 'simplemarkersymbol',\r\n      style: 'STYLE_CIRCLE',\r\n      outline: {\r\n        color: Color([0, 0, 0]),\r\n        width: 1,\r\n      },\r\n    });\r\n    mapParam.map.centerAt(params.geometry);\r\n    //submitPmrLayer.add(graphic);\r\n    const graphic = new Graphic(newPoint, symbol, params.attributes);\r\n    graphic.setAttributes({\r\n      CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_SUBMIT_PMR,\r\n    });\r\n    mapParam.map.graphics.add(graphic);\r\n    params.callback({ geometry: newPoint }, graphic);\r\n  });\r\n};\r\n\r\nexport const currentLocationSubmitPmr = (mapParam, params) => {\r\n  if (!current) {\r\n    alert('กรุณาเปิด GPS');\r\n    return;\r\n  }\r\n  EsriLoader.loadModules(\r\n    [\r\n      'esri/symbols/SimpleMarkerSymbol',\r\n      'esri/graphic',\r\n      'esri/Color',\r\n      'esri/geometry/Point',\r\n      'esri/geometry/webMercatorUtils',\r\n      'esri/SpatialReference',\r\n    ],\r\n    options\r\n  ).then(([SimpleMarkerSymbol, Graphic, Color, Point, webMercatorUtils, SpatialReference]) => {\r\n    let symbol = null;\r\n    // const submitPmrLayer = getLayerByID(mapParam.map, Constants.LISTGRAPHICLAYER.GRAPHICLAYER_SUBMIT_PMR);\r\n    // submitPmrLayer.clear();\r\n    clearGraphic(mapParam, [Constants.LISTGRAPHICLAYER.GRAPHICLAYER_SUBMIT_PMR]);\r\n    let webMercator = webMercatorUtils.lngLatToXY(current.long, current.lat);\r\n    let newPoint = new Point(webMercator, new SpatialReference({ wkid: 102100, latestWkid: 3857 }));\r\n\r\n    symbol = new SimpleMarkerSymbol({\r\n      color: Color([25, 179, 25]),\r\n      type: 'simplemarkersymbol',\r\n      style: 'STYLE_CIRCLE',\r\n      outline: {\r\n        color: Color([0, 0, 0]),\r\n        width: 1,\r\n      },\r\n    });\r\n    const graphic = new Graphic(newPoint, symbol);\r\n    // submitPmrLayer.add(graphic);\r\n    graphic.setAttributes({\r\n      CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_SUBMIT_PMR,\r\n    });\r\n    mapParam.map.graphics.add(graphic);\r\n\r\n    params.callback({ geometry: newPoint }, graphic);\r\n  });\r\n};\r\n\r\nexport const SaveGeometryPMR1 = (mapParam, { value, callbackFn }) => {\r\n  EsriLoader.loadModules(['esri/layers/FeatureLayer', 'esri/graphic'], options).then(([FeatureLayer, Graphic]) => {\r\n    const { authenRdc } = value;\r\n    const featureLayer = new FeatureLayer(`${window.SAVE_GEOMETY_PMR1}`);\r\n    let gp = new Graphic(value.geometry);\r\n    gp.attributes = {\r\n      OBJECTID: value.ObjectId,\r\n      PMR1_ID: value.pmr1id,\r\n      STATUS: value.statusCode,\r\n      DISTRICT_ID: value.pmr1DistrictID,\r\n      NAME: value.name,\r\n      UPDATER: authenRdc.profile.userID,\r\n      UPDATED_DATE: DateTimeUtils.convertDatetimeToCallService(value.date),\r\n    };\r\n\r\n    if (value.status === 'Edit') {\r\n      // featureLayer.applyEdits(null, [gp], null, (evt) => {\r\n      // \t//console.log('evt', evt)\r\n      // }, (error) => {\r\n      // \tconsole.log('ex SaveGeometryPMR1', error);\r\n      // \tcallbackFn(value.ObjectId)\r\n      // });\r\n\r\n      const dataFeatures = JSON.stringify([\r\n        {\r\n          geometry: gp.geometry,\r\n          attributes: gp.attributes,\r\n        },\r\n      ]);\r\n\r\n      const formData = new FormData();\r\n      formData.append('Features', dataFeatures);\r\n      formData.append('rollbackOnFailure', true);\r\n      formData.append('f', 'json');\r\n\r\n      fetchUpdateFeature({\r\n        url: window.SAVE_GEOMETY_PMR1,\r\n        formData,\r\n      }).then((result) => {\r\n        if (result && result.updateResults && result.updateResults.length && result.updateResults[0].success) {\r\n          callbackFn(result.updateResults[0].objectId);\r\n        } else {\r\n          callbackFn();\r\n        }\r\n      });\r\n    } else {\r\n      gp.attributes['CREATOR'] = authenRdc.profile.userID;\r\n      gp.attributes['CREATED_DATE'] = DateTimeUtils.convertDatetimeToCallService(value.date);\r\n\r\n      featureLayer.applyEdits(\r\n        [gp],\r\n        null,\r\n        null,\r\n        (evt) => {\r\n          if (evt) {\r\n            callbackFn(evt[0].objectId);\r\n          } else {\r\n            callbackFn(null);\r\n          }\r\n        },\r\n        (error) => {\r\n          console.log(error);\r\n        }\r\n      );\r\n    }\r\n  });\r\n};\r\n\r\nexport const getDistrictAndSubDistrictFormPoint = (mapParam, { geometry, callbackFn }) => {\r\n  return EsriLoader.loadModules(['esri/tasks/query', 'esri/tasks/QueryTask'], options).then(([Query, QueryTask]) => {\r\n    return new Promise((resolv, reject) => {\r\n      const qParame = new Query();\r\n      qParame.geometry = geometry;\r\n      qParame.returnGeometry = false;\r\n      qParame.outFields = ['*'];\r\n      const qTask = new QueryTask(`${window.CONFIG_URL_GIS.SUBDISTRICT_BASEMAP}`);\r\n      qTask.execute(\r\n        qParame,\r\n        (response) => {\r\n          let result = null;\r\n          if (response.features.length > 0) {\r\n            result = response.features[0].attributes;\r\n            callbackFn(result, geometry);\r\n          } else {\r\n            callbackFn(null);\r\n          }\r\n          resolv(result);\r\n        },\r\n        (err) => {\r\n          // console.log('err', err)\r\n          callbackFn({ errMsg: err });\r\n        }\r\n      );\r\n    });\r\n  });\r\n};\r\n\r\nexport const editGraphicSubmitPmr = (mapParam, { graphic, callback }) => {\r\n  EsriLoader.loadModules(\r\n    ['esri/toolbars/edit', 'esri/symbols/PictureMarkerSymbol', 'esri/graphic', 'esri/symbols/SimpleMarkerSymbol', 'esri/Color'],\r\n    options\r\n  ).then(([Edit, PictureMarkerSymbol, Graphic, SimpleMarkerSymbol, Color]) => {\r\n    // const editGraphicLayer = getLayerByID(mapParam.map, Constants.LISTGRAPHICLAYER.GRAPHICLAYER_SUBMIT_PMR_HIGHLIGHT);\r\n    const selectionSymbol = new PictureMarkerSymbol(Constants.IMG_HIGHLIGHT_POINT, 50, 50);\r\n    const graphicBorder = new Graphic(graphic.geometry, selectionSymbol, 50, 50);\r\n\r\n    if (editSubmitPmr) {\r\n      editSubmitPmr = null;\r\n    }\r\n\r\n    if (gpMoveSubmitPmr) {\r\n      gpMoveSubmitPmr.remove();\r\n    }\r\n\r\n    clearGraphic(mapParam, [Constants.LISTGRAPHICLAYER.GRAPHICLAYER_SUBMIT_PMR_HIGHLIGHT]);\r\n    graphicBorder.setAttributes({\r\n      CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_SUBMIT_PMR_HIGHLIGHT,\r\n    });\r\n    mapParam.map.graphics.add(graphicBorder);\r\n\r\n    editSubmitPmr = new Edit(mapParam.map);\r\n    mapParam.map.graphics.remove(graphic);\r\n    mapParam.map.graphics.add(graphic);\r\n    editSubmitPmr.activate(Edit.MOVE, graphic);\r\n\r\n    gpMoveSubmitPmr = editSubmitPmr.on('graphic-move-stop', (data) => {\r\n      if (data.graphic && data.graphic.geometry) {\r\n        clearGraphic(mapParam, [Constants.LISTGRAPHICLAYER.GRAPHICLAYER_SUBMIT_PMR, Constants.LISTGRAPHICLAYER.GRAPHICLAYER_SUBMIT_PMR_HIGHLIGHT]);\r\n\r\n        const graphicBorder = new Graphic(data.graphic.geometry, selectionSymbol, 50, 50);\r\n        graphicBorder.setAttributes({\r\n          CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_SUBMIT_PMR_HIGHLIGHT,\r\n        });\r\n        mapParam.map.graphics.add(graphicBorder);\r\n\r\n        const pointSymbol = new SimpleMarkerSymbol({\r\n          color: Color([25, 179, 25]),\r\n          type: 'simplemarkersymbol',\r\n          style: 'STYLE_CIRCLE',\r\n          outline: {\r\n            color: Color([0, 0, 0]),\r\n            width: 1,\r\n          },\r\n        });\r\n\r\n        const graphicPoint = new Graphic(data.graphic.geometry, pointSymbol);\r\n        graphicPoint.setAttributes({\r\n          CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_SUBMIT_PMR,\r\n        });\r\n        mapParam.map.graphics.add(graphicPoint);\r\n        editSubmitPmr.activate(Edit.MOVE, graphicPoint);\r\n\r\n        callback(data.graphic.geometry, data.graphic);\r\n      }\r\n    });\r\n  });\r\n};\r\n\r\nexport const clearEditPmr = (mapParam) => {\r\n  clearGraphic(mapParam, [Constants.LISTGRAPHICLAYER.GRAPHICLAYER_SUBMIT_PMR_HIGHLIGHT]);\r\n\r\n  if (gpMoveSubmitPmr) {\r\n    gpMoveSubmitPmr.remove();\r\n  }\r\n\r\n  if (editSubmitPmr) {\r\n    editSubmitPmr.deactivate();\r\n    editSubmitPmr = null;\r\n  }\r\n};\r\n\r\nexport const clearEvtDrawPmr = (mapParam) => {\r\n  // mapParam.drawSubmitPmr.deactivate();\r\n  clearEvtDrawMap(mapParam);\r\n  mapParam.map.setMapCursor('default');\r\n};\r\n\r\nexport const clearSubmitPmr = (mapParam, listLayer = []) => {\r\n  clearGraphic(mapParam, listLayer);\r\n  evtDrawSubmitPmr = null;\r\n};\r\n\r\nexport const clearDrawPointSubmitPmr = (mapParam) => {\r\n  // mapParam.drawSubmitPmr.deactivate();\r\n  // mapParam.map.setMapCursor(\"default\");\r\n  clearEvtDrawMap(mapParam);\r\n  clearGraphic(mapParam, [Constants.LISTGRAPHICLAYER.GRAPHICLAYER_SUBMIT_PMR, Constants.LISTGRAPHICLAYER.GRAPHICLAYER_SUBMIT_PMR_HIGHLIGHT]);\r\n};\r\n\r\nexport const createLayerBasemapToc = (mapParam) => {\r\n  EsriLoader.loadModules(['esri/layers/ArcGISDynamicMapServiceLayer'], options).then(([DynamicLayer]) => {\r\n    var basemapLayerTocDynamic = new DynamicLayer(`${`${window.COMPREHENSIVE_URL}`}`, {\r\n      id: `${`CPUDD_BASEMAP`}`,\r\n      visible: false,\r\n      opacity: 0.6,\r\n    });\r\n\r\n    mapParam.map.addLayer(basemapLayerTocDynamic);\r\n  });\r\n};\r\n\r\nexport const visibleToc = (mapParam, layerId) => {\r\n  let layer = mapParam.map.getLayer(`${`CPUDD_BASEMAP`}`);\r\n\r\n  if (layerId.length !== 0) {\r\n    layer.setVisibleLayers(layerId); //layer ที่จะให้แสดง\r\n    layer.setVisibility(true); // set ให้ layer นี้แสดง\r\n  } else {\r\n    layer.setVisibleLayers(layerId);\r\n    layer.setVisibility(false);\r\n  }\r\n};\r\n\r\nexport const specifyCoordinate = (mapParam, { x, y, unit = 'Mercator', callback, layerName, isZoomToResult = false, symbolColor }) => {\r\n  return EsriLoader.loadModules(\r\n    ['esri/geometry/Point', 'esri/symbols/SimpleMarkerSymbol', 'esri/Color', 'esri/graphic', 'esri/geometry/webMercatorUtils'],\r\n    options\r\n  ).then(async ([Point, SimpleMarkerSymbol, Color, Graphic, webMercatorUtils]) => {\r\n    let geoMerkator = [];\r\n    if (unit === 'LatLong') {\r\n      geoMerkator = webMercatorUtils.lngLatToXY(parseFloat(x), parseFloat(y));\r\n    } else if (unit === 'Utm') {\r\n      let newPoint = new Point({\r\n        x: x,\r\n        y: y,\r\n        spatialReference: { wkid: 32647 },\r\n      });\r\n      let latLong = UTMConverters.fromUTM(newPoint);\r\n      geoMerkator = webMercatorUtils.lngLatToXY(parseFloat(latLong.x), parseFloat(latLong.y));\r\n    }\r\n\r\n    const point = new Point({\r\n      x: geoMerkator[0],\r\n      y: geoMerkator[1],\r\n      spatialReference: { wkid: 102100 },\r\n    });\r\n    const symbol = new SimpleMarkerSymbol({\r\n      color: symbolColor ? Color(symbolColor) : Color([25, 179, 25]),\r\n      type: 'simplemarkersymbol',\r\n      style: 'STYLE_CIRCLE',\r\n      outline: {\r\n        color: Color([0, 0, 0]),\r\n        width: 1,\r\n      },\r\n    });\r\n    mapParam.map.centerAt(point);\r\n    const graphic = new Graphic(point, symbol);\r\n    graphic.setAttributes({ CUSTOM_KEY: layerName });\r\n\r\n    clearGraphic(mapParam, [layerName]);\r\n    mapParam.map.graphics.add(graphic);\r\n\r\n    if (isZoomToResult) {\r\n      mapParam.map.centerAndZoom(point, 18);\r\n    }\r\n\r\n    callback(point, graphic);\r\n  });\r\n};\r\nexport const drawGraphicPointPMR1 = (mapParam, { mapserviceUrl = null, creator = null, callback } = {}) => {\r\n  return EsriLoader.loadModules(\r\n    [\r\n      'esri/tasks/query',\r\n      'esri/tasks/QueryTask',\r\n      'esri/graphic',\r\n      'esri/Color',\r\n      'esri/geometry/Point',\r\n      'esri/SpatialReference',\r\n      'esri/tasks/ProjectParameters',\r\n      'esri/symbols/SimpleMarkerSymbol',\r\n    ],\r\n    options\r\n  ).then(async ([Query, QueryTask, Graphic, Color, Point, SpatialReference, ProjectParameters, SimpleMarkerSymbol]) => {\r\n    const outSpatialReference = new SpatialReference({\r\n      wkid: 102100,\r\n    });\r\n    if (mapserviceUrl && creator) {\r\n      const qParame = new Query();\r\n      qParame.where = `CREATOR = '${creator}'`;\r\n      qParame.outSpatialReference = { wkid: 4326 };\r\n      qParame.returnGeometry = true;\r\n      qParame.outFields = ['*'];\r\n      const qTask = await new QueryTask(mapserviceUrl);\r\n\r\n      return qTask.execute(qParame, (response) => {\r\n        if (response.features.length !== 0) {\r\n          // const pmr1FormLayer = getLayerByID(mapParam.map, Constants.LISTGRAPHICLAYER.GRAPHICLAYER_PMR1_FORM);\r\n          // pmr1FormLayer.clear();\r\n          clearGraphic(mapParam, [Constants.LISTGRAPHICLAYER.GRAPHICLAYER_PMR1_FORM]);\r\n\r\n          for (let index in response.features) {\r\n            let val = response.features[index].geometry;\r\n            let point = new Point({\r\n              x: val['x'],\r\n              y: val['y'],\r\n              spatialReference: { wkid: 4326 },\r\n            });\r\n            var PrjParams = new ProjectParameters();\r\n            PrjParams.geometries = [point];\r\n            PrjParams.outSR = outSpatialReference;\r\n            const symbolPoint = new SimpleMarkerSymbol({\r\n              color: Color([238, 69, 0, 1]),\r\n              type: 'simplemarkersymbol',\r\n              style: 'STYLE_CIRCLE',\r\n              outline: {\r\n                color: Color([0, 0, 0]),\r\n                width: 1,\r\n              },\r\n            });\r\n\r\n            const graphic = new Graphic(point, symbolPoint);\r\n            graphic.setAttributes({\r\n              CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_PMR1_FORM,\r\n            });\r\n            mapParam.map.graphics.add(graphic);\r\n            // pmr1FormLayer.add(graphic);\r\n          }\r\n        }\r\n      });\r\n    }\r\n  });\r\n};\r\nexport const drawGraphicPointPMR1Form = (mapParam, val) => {\r\n  EsriLoader.loadModules(\r\n    [\r\n      'esri/graphic',\r\n      'esri/Color',\r\n      'esri/geometry/Point',\r\n      'esri/SpatialReference',\r\n      'esri/tasks/GeometryService',\r\n      'esri/tasks/ProjectParameters',\r\n      'esri/symbols/SimpleMarkerSymbol',\r\n    ],\r\n    options\r\n  ).then(([Graphic, Color, Point, SpatialReference, GeometryService, ProjectParameters, SimpleMarkerSymbol]) => {\r\n    const outSpatialReference = new SpatialReference({\r\n      wkid: 102100,\r\n    });\r\n    const geometryService = new GeometryService('https://utility.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer');\r\n\r\n    let point = new Point({\r\n      x: val[0],\r\n      y: val[1],\r\n      spatialReference: { wkid: 32647 },\r\n    });\r\n    var PrjParams = new ProjectParameters();\r\n    PrjParams.geometries = [point];\r\n    PrjParams.outSR = outSpatialReference;\r\n\r\n    const symbolPoint = new SimpleMarkerSymbol({\r\n      color: Color([238, 69, 0, 1]),\r\n      type: 'simplemarkersymbol',\r\n      style: 'STYLE_CIRCLE',\r\n      outline: {\r\n        color: Color([0, 0, 0]),\r\n        width: 1,\r\n      },\r\n    });\r\n\r\n    geometryService.project(PrjParams, function(outputpoint) {\r\n      if (outputpoint) {\r\n        // const pmr1FormLayer = getLayerByID(mapParam.map, Constants.LISTGRAPHICLAYER.GRAPHICLAYER_PMR1_FORM);\r\n        // pmr1FormLayer.add(graphic);\r\n        const graphic = new Graphic(outputpoint[0], symbolPoint);\r\n        graphic.setAttributes({\r\n          CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_PMR1_FORM,\r\n        });\r\n        mapParam.map.graphics.add(graphic);\r\n      }\r\n    });\r\n  });\r\n};\r\n\r\nexport const PrintMapPMR1 = async (mapParam, { pmr1id, callback }) => {\r\n  const pmr1codeForPrintMap = pmr1id;\r\n  // const currentLocationLayer = mapParam.map.getLayer(Constants.LISTGRAPHICLAYER.GRAPHICLAYER_SUBMIT_PMR);\r\n\r\n  // if (currentLocationLayer.graphics.length > 0) {\r\n  // \tawait mapParam.map.centerAt(currentLocationLayer.graphics[0].geometry);\r\n  // }\r\n\r\n  mapParam.map.graphics.graphics.forEach((graphic) => {\r\n    if (graphic.attributes && graphic.attributes.CUSTOM_KEY && graphic.attributes.CUSTOM_KEY === Constants.LISTGRAPHICLAYER.GRAPHICLAYER_SUBMIT_PMR) {\r\n      if (graphic.geometry) {\r\n        mapParam.map.centerAt(graphic.geometry);\r\n      }\r\n    }\r\n  });\r\n\r\n  EsriLoader.loadModules(['esri/tasks/PrintTemplate', 'esri/tasks/PrintTask', 'esri/tasks/PrintParameters'], options).then(\r\n    ([PrintTemplate, PrintTask, PrintParameters]) => {\r\n      var url = window.PRINT_MAP_URL;\r\n      var printMap = new PrintTask(url);\r\n\r\n      var params = new PrintParameters();\r\n      var template = new PrintTemplate();\r\n\r\n      const dateTime = DateTimeUtils.dateThaiFormat(new Date());\r\n\r\n      // template.layout = \"pmr1_map_A4\";\r\n      //template.forceFeatureAttributes = true;\r\n      //template.preserveScale = true;\r\n      template.layout = 'CPUDD_PMR1_Map_A4';\r\n      template.showAttribution = true;\r\n      template.format = 'png32';\r\n\r\n      template.layoutOptions = {\r\n        customTextElements: [{ CUSTOM_PMR1_ID: pmr1codeForPrintMap }, { CUSTOM_DATE: dateTime }],\r\n      };\r\n\r\n      params.map = mapParam.map;\r\n      params.template = template;\r\n\r\n      setTimeout(() => {\r\n        // ใส่เพื่อให้ map เลื่อนไปยังจุด pmr ก่อน งั้นไม่ทันกัน\r\n        printMap.execute(\r\n          params,\r\n          (result) => {\r\n            // console.log(result)\r\n            // if (result) {\r\n            // \twindow.open(result.url)\r\n            // }\r\n            callback(result.url);\r\n          },\r\n          (err) => {\r\n            // console.log('err :: ', err);\r\n            console.log('err', err);\r\n            if (callback) {\r\n              callback(null);\r\n            }\r\n          }\r\n        );\r\n      }, 500);\r\n    }\r\n  );\r\n};\r\n\r\nexport const clearGraphicLocator = (mapParam) => {\r\n  // const locatorLayer = getLayerByID(mapParam.map, Constants.LISTGRAPHICLAYER.GRAPHICLAYER_LOCATOR);\r\n  // locatorLayer.clear();\r\n  clearGraphic(mapParam, [Constants.LISTGRAPHICLAYER.GRAPHICLAYER_LOCATOR]);\r\n};\r\n\r\nconst drawLocator = (mapParam, { type = null, listPoint = [] } = {}) => {\r\n  EsriLoader.loadModules([\r\n    'esri/graphic',\r\n    'esri/geometry/Polyline',\r\n    'esri/geometry/Polygon',\r\n    'esri/geometry/Point',\r\n    'esri/SpatialReference',\r\n    'esri/tasks/GeometryService',\r\n    // \"esri/geometry/webMercatorUtils\",\r\n    'esri/tasks/ProjectParameters',\r\n    'esri/symbols/SimpleMarkerSymbol',\r\n    'esri/symbols/SimpleFillSymbol',\r\n    'esri/symbols/SimpleLineSymbol',\r\n    'esri/Color',\r\n  ]).then(\r\n    ([\r\n      Graphic,\r\n      Polyline,\r\n      Polygon,\r\n      Point,\r\n      SpatialReference,\r\n      GeometryService, // webMercatorUtils,\r\n      ProjectParameters,\r\n      SimpleMarkerSymbol,\r\n      SimpleFillSymbol,\r\n      SimpleLineSymbol,\r\n      Color,\r\n    ]) => {\r\n      // const locatorLayer = getLayerByID(mapParam.map, Constants.LISTGRAPHICLAYER.GRAPHICLAYER_LOCATOR);\r\n      // locatorLayer.clear();\r\n      clearGraphic(mapParam, [Constants.LISTGRAPHICLAYER.GRAPHICLAYER_LOCATOR]);\r\n\r\n      const geometryService = new GeometryService('https://utility.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer');\r\n      const PrjParams = new ProjectParameters();\r\n      switch (type) {\r\n        case 'ST_POINT':\r\n          const symbolPoint = new SimpleMarkerSymbol({\r\n            color: Color([238, 69, 0, 1]),\r\n            type: 'simplemarkersymbol',\r\n            style: 'STYLE_CIRCLE',\r\n            outline: {\r\n              color: Color([0, 0, 0]),\r\n              width: 1,\r\n            },\r\n          });\r\n          const point = new Point(listPoint[0], listPoint[1], new SpatialReference({ wkid: 32647 }));\r\n          PrjParams.geometries = [point];\r\n          PrjParams.outSR = new SpatialReference({ wkid: 4326 });\r\n          geometryService.project(PrjParams, function(outputpoint) {\r\n            if (outputpoint.length !== 0) {\r\n              const graphic = new Graphic(outputpoint[0], symbolPoint);\r\n              graphic.setAttributes({\r\n                CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_LOCATOR,\r\n              });\r\n              mapParam.map.graphics.add(graphic);\r\n              // locatorLayer.add(graphic);\r\n            }\r\n          });\r\n          break;\r\n        case 'ST_POLYGON':\r\n          const symbolPolygon = new SimpleFillSymbol(\r\n            SimpleFillSymbol.STYLE_SOLID,\r\n            new SimpleLineSymbol(SimpleLineSymbol.STYLE_DASHDOT, new Color([255, 0, 0]), 2),\r\n            new Color([255, 255, 0, 0.25])\r\n          );\r\n          const polygon = new Polygon({\r\n            rings: listPoint,\r\n            spatialReference: { wkid: 32647 },\r\n          });\r\n\r\n          // console.log('polygon', polygon)\r\n          PrjParams.geometries = [polygon];\r\n          PrjParams.outSR = new SpatialReference({ wkid: 4326 });\r\n          geometryService.project(PrjParams, function(outputpoint) {\r\n            if (outputpoint.length !== 0) {\r\n              const graphic = new Graphic(outputpoint[0], symbolPolygon);\r\n              // locatorLayer.add(graphic);\r\n              graphic.setAttributes({\r\n                CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_LOCATOR,\r\n              });\r\n              mapParam.map.graphics.add(graphic);\r\n            }\r\n          });\r\n          break;\r\n        case 'ST_MULTIPOLYGON':\r\n          const symbolMultiPolygon = new SimpleFillSymbol(\r\n            SimpleFillSymbol.STYLE_SOLID,\r\n            new SimpleLineSymbol(SimpleLineSymbol.STYLE_DASHDOT, new Color([255, 0, 0]), 2),\r\n            new Color([255, 255, 0, 0.25])\r\n          );\r\n          const multipolygon = new Polygon({\r\n            rings: listPoint,\r\n            spatialReference: { wkid: 32647 },\r\n          });\r\n          PrjParams.geometries = [multipolygon];\r\n          PrjParams.outSR = new SpatialReference({ wkid: 4326 });\r\n          geometryService.project(PrjParams, function(outputpoint) {\r\n            if (outputpoint.length !== 0) {\r\n              const graphic = new Graphic(outputpoint[0], symbolMultiPolygon);\r\n              // locatorLayer.add(graphic);\r\n              graphic.setAttributes({\r\n                CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_LOCATOR,\r\n              });\r\n              mapParam.map.graphics.add(graphic);\r\n            }\r\n          });\r\n          break;\r\n        case 'ST_MULTILINESTRING':\r\n          const symbolMultiLine = new SimpleLineSymbol(SimpleLineSymbol.STYLE_DASH, new Color([238, 69, 0, 1]), 3);\r\n          const multiline = new Polyline({\r\n            paths: listPoint,\r\n            spatialReference: { wkid: 32647 },\r\n          });\r\n          PrjParams.geometries = [multiline];\r\n          PrjParams.outSR = new SpatialReference({ wkid: 4326 });\r\n          geometryService.project(PrjParams, function(outputpoint) {\r\n            if (outputpoint.length !== 0) {\r\n              const graphic = new Graphic(outputpoint[0], symbolMultiLine);\r\n              // locatorLayer.add(graphic);\r\n              graphic.setAttributes({\r\n                CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_LOCATOR,\r\n              });\r\n              mapParam.map.graphics.add(graphic);\r\n            }\r\n          });\r\n          break;\r\n        case 'ST_LINESTRING':\r\n          const symbolLine = new SimpleLineSymbol(SimpleLineSymbol.STYLE_DASH, new Color([238, 69, 0, 1]), 3);\r\n          const polyline = new Polyline({\r\n            paths: listPoint,\r\n            spatialReference: { wkid: 32647 },\r\n          });\r\n          PrjParams.geometries = [polyline];\r\n          PrjParams.outSR = new SpatialReference({ wkid: 4326 });\r\n          geometryService.project(PrjParams, function(outputpoint) {\r\n            if (outputpoint.length !== 0) {\r\n              const graphic = new Graphic(outputpoint[0], symbolLine);\r\n              // locatorLayer.add(graphic);\r\n              graphic.setAttributes({\r\n                CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_LOCATOR,\r\n              });\r\n              mapParam.map.graphics.add(graphic);\r\n            }\r\n          });\r\n          break;\r\n        default:\r\n          console.log('Unknow draw type Locator.');\r\n          break;\r\n      }\r\n    }\r\n  );\r\n};\r\n\r\n//################################ CMP ################################\r\n\r\nexport const zoomLocator = (mapParam, val) => {\r\n  EsriLoader.loadModules(\r\n    [\r\n      'esri/graphic',\r\n      'esri/geometry/Polygon',\r\n      'esri/geometry/Point',\r\n      'esri/SpatialReference',\r\n      'esri/tasks/GeometryService',\r\n      'esri/geometry/webMercatorUtils',\r\n      'esri/tasks/ProjectParameters',\r\n    ],\r\n    options\r\n  ).then(async ([Graphic, Polygon, Point, SpatialReference, GeometryService, webMercatorUtils, ProjectParameters]) => {\r\n    const outSpatialReference = new SpatialReference({\r\n      wkid: 102100, //Sphere_Sinusoidal\r\n    });\r\n    const geometryService = new GeometryService('https://utility.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer');\r\n\r\n    if (val.drawRings) {\r\n      drawLocator(mapParam, {\r\n        type: val.type,\r\n        listPoint: val.drawRings,\r\n      });\r\n    }\r\n\r\n    let point;\r\n    var PrjParams;\r\n    // let polygon;\r\n    if (val.type === 'ST_POINT') {\r\n      try {\r\n        point = new Point({\r\n          x: val.rings[0][0],\r\n          y: val.rings[0][1],\r\n          spatialReference: { wkid: 32647 },\r\n        });\r\n        PrjParams = new ProjectParameters();\r\n        PrjParams.geometries = [point];\r\n        PrjParams.outSR = outSpatialReference;\r\n\r\n        geometryService.project(PrjParams, function(outputpoint) {\r\n          if (outputpoint) {\r\n            mapParam.map.centerAndZoom(outputpoint[0], 15);\r\n          }\r\n\r\n          if (val.callbackCompleteLocator) {\r\n            val.callbackCompleteLocator();\r\n          }\r\n        });\r\n      } catch (error) {\r\n        if (val.callbackCompleteLocator) {\r\n          val.callbackCompleteLocator();\r\n        }\r\n      }\r\n    } else {\r\n      try {\r\n        // new Promise(async (resolve, reject) => {\r\n\r\n        // \tconst isPolygon = val.rings[0][0][0] ? true:false ;\r\n        // \tconsole.log(isPolygon);\r\n        // \tif (val.type === \"ST_POLYGON\" || isPolygon) {\r\n        // \t\tpolygon = await new Polygon({\r\n        // \t\t\trings: val.rings,\r\n        // \t\t\tspatialReference: { wkid: 32647 }\r\n        // \t\t});\r\n        // \t} else if (val.type !== \"ST_POLYGON\" && !isPolygon) {\r\n        // \t\tpolygon = await new Polygon(new SpatialReference({ wkid: 32647 }));\r\n        // \t\tawait polygon.addRing(val.rings);//loop add\r\n        // \t}\r\n\r\n        // \tawait resolve()\r\n\r\n        // }).then((resolve) => {\r\n        // console.log(\"polygon\",polygon);\r\n        // console.log(\"val\",val.rings);\r\n        let polygonZoom = new Polygon(new SpatialReference({ wkid: 3857 }));\r\n        polygonZoom.addRing(val.rings);\r\n        mapParam.map.setExtent(polygonZoom.getExtent().expand(1.5));\r\n        if (val.callbackCompleteLocator) {\r\n          val.callbackCompleteLocator();\r\n        }\r\n        // PrjParams = new ProjectParameters();\r\n        // PrjParams.geometries = [polygon];\r\n        // PrjParams.outSR = outSpatialReference;\r\n        // geometryService.project(PrjParams, function (outputpoint) {\r\n        // \tif (outputpoint) {\r\n        // \t\tmapParam.map.setExtent(outputpoint[0].getExtent().expand(1), true)\r\n        // \t}\r\n\r\n        // \tif (val.callbackCompleteLocator) {\r\n        // \t\tval.callbackCompleteLocator()\r\n        // \t}\r\n        // });\r\n        // })\r\n      } catch (error) {\r\n        if (val.callbackCompleteLocator) {\r\n          val.callbackCompleteLocator();\r\n        }\r\n      }\r\n    }\r\n  });\r\n};\r\nexport const getResultCurrent = (mapParam, params) => {\r\n  if (!current) {\r\n    alert('กรุณาเปิด GPS');\r\n    // if (params.isMobileView) {\r\n    //     return params.callBackFailed();\r\n    // }\r\n    return;\r\n  }\r\n  EsriLoader.loadModules(\r\n    [\r\n      'esri/symbols/SimpleMarkerSymbol',\r\n      'esri/graphic',\r\n      'esri/Color',\r\n      'esri/geometry/Point',\r\n      'esri/geometry/webMercatorUtils',\r\n      'esri/SpatialReference',\r\n    ],\r\n    options\r\n  ).then(([SimpleMarkerSymbol, Graphic, Color, Point, webMercatorUtils, SpatialReference]) => {\r\n    let symbol = null;\r\n    // const askTheCityPlanLayer = getLayerByID(mapParam.map, Constants.LISTGRAPHICLAYER.GRAPHICLAYER_ASK_THE_CITY_PLAN);\r\n    // const cityPlanLayer = getLayerByID(mapParam.map, Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CITY_PLAN);\r\n    // const askTheCityPlanLayerForExtent = getLayerByID(mapParam.map, Constants.LISTGRAPHICLAYER.GRAPHICLAYER_ASK_THE_CITY_PLAN_EXTENT);\r\n\r\n    // askTheCityPlanLayer.clear();\r\n    // askTheCityPlanLayerForExtent.clear();\r\n    // cityPlanLayer.clear();\r\n    clearGraphic(mapParam, [\r\n      Constants.LISTGRAPHICLAYER.GRAPHICLAYER_ASK_THE_CITY_PLAN,\r\n      Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CITY_PLAN,\r\n      Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CITY_PLAN_TEXT,\r\n      Constants.LISTGRAPHICLAYER.GRAPHICLAYER_ASK_THE_CITY_PLAN_EXTENT,\r\n    ]);\r\n\r\n    let webMercator = webMercatorUtils.lngLatToXY(current.long, current.lat);\r\n    let newPoint = new Point(webMercator, new SpatialReference({ wkid: 102100, latestWkid: 3857 }));\r\n\r\n    symbol = new SimpleMarkerSymbol({\r\n      color: Color([25, 179, 25]),\r\n      type: 'simplemarkersymbol',\r\n      style: 'STYLE_CIRCLE',\r\n      outline: {\r\n        color: Color([0, 0, 0]),\r\n        width: 1,\r\n      },\r\n    });\r\n    const graphic = new Graphic(newPoint, symbol);\r\n    graphic.setAttributes({\r\n      CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_ASK_THE_CITY_PLAN,\r\n    });\r\n    mapParam.map.graphics.add(graphic);\r\n    //pboy fix override\r\n    params.callback(graphic);\r\n    ////askTheCityPlanLayer.add(graphic);\r\n  });\r\n};\r\n\r\nexport const resetDrawAskTheCityPlan = (mapParam) => {\r\n  clearEvtDrawMap(mapParam);\r\n  clearGraphic(mapParam, [\r\n    Constants.LISTGRAPHICLAYER.GRAPHICLAYER_ASK_THE_CITY_PLAN,\r\n    Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CITY_PLAN,\r\n    Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CITY_PLAN_TEXT,\r\n    Constants.LISTGRAPHICLAYER.GRAPHICLAYER_ASK_THE_CITY_PLAN_EXTENT,\r\n  ]);\r\n};\r\n\r\n//สั่งสร้าง Draw\r\nexport const createDrawAskTheCityPlan = (mapParam, { callback, type, showAlert }) => {\r\n  EsriLoader.loadModules(['esri/geometry/geometryEngine'], options).then(([geometryEngine]) => {\r\n    clearGraphic(mapParam, [\r\n      Constants.LISTGRAPHICLAYER.GRAPHICLAYER_ASK_THE_CITY_PLAN,\r\n      Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CITY_PLAN,\r\n      Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CITY_PLAN_TEXT,\r\n      Constants.LISTGRAPHICLAYER.GRAPHICLAYER_ASK_THE_CITY_PLAN_EXTENT,\r\n    ]);\r\n\r\n    createEvtDrawMap(mapParam, {\r\n      activateType: type,\r\n      callbackDrawComplete: () => (evt) => {\r\n        const area = geometryEngine.geodesicArea(evt.geometry, 'square-meters');\r\n        if (area > 32000) {\r\n          // 20 ไร่\r\n          // alert(\"ขนาดพื้นที่เกิน 20 ไร่ กรุณาระบุพื้นที่ไม่เกิน 20 ไร่\")\r\n          showAlert({\r\n            altMsg: 'ขนาดพื้นที่เกิน 20 ไร่ กรุณาระบุพื้นที่ไม่เกิน 20 ไร่',\r\n          });\r\n          callback();\r\n        } else {\r\n          callback(evt);\r\n        }\r\n      },\r\n    });\r\n  });\r\n};\r\n\r\nexport const specifyCoordinateCMP = (mapParam, { x, y, unit = 'Mercator', callback }) => {\r\n  //เปลื่ยนจาก specifyCoordinate\r\n  return EsriLoader.loadModules(\r\n    ['esri/geometry/Point', 'esri/symbols/SimpleMarkerSymbol', 'esri/Color', 'esri/graphic', 'esri/geometry/webMercatorUtils'],\r\n    options\r\n  ).then(async ([Point, SimpleMarkerSymbol, Color, Graphic, webMercatorUtils]) => {\r\n    let geoMerkator = [];\r\n    if (unit === 'LatLong') {\r\n      geoMerkator = webMercatorUtils.lngLatToXY(parseFloat(x), parseFloat(y));\r\n    } else if (unit === 'Utm') {\r\n      let newPoint = new Point({\r\n        x: x,\r\n        y: y,\r\n        spatialReference: { wkid: 32647 },\r\n      });\r\n      let latLong = UTMConverters.fromUTM(newPoint);\r\n      geoMerkator = webMercatorUtils.lngLatToXY(parseFloat(latLong.x), parseFloat(latLong.y));\r\n    }\r\n\r\n    const point = new Point({\r\n      x: geoMerkator[0],\r\n      y: geoMerkator[1],\r\n      spatialReference: { wkid: 102100 },\r\n    });\r\n    const symbol = new SimpleMarkerSymbol({\r\n      color: Color([25, 179, 25]),\r\n      type: 'simplemarkersymbol',\r\n      style: 'STYLE_CIRCLE',\r\n      outline: {\r\n        color: Color([0, 0, 0]),\r\n        width: 1,\r\n      },\r\n    });\r\n    mapParam.map.centerAt(point);\r\n    // const askTheCityPlanLayer = getLayerByID(mapParam.map, Constants.LISTGRAPHICLAYER.GRAPHICLAYER_ASK_THE_CITY_PLAN);\r\n    // const cityPlanLayer = getLayerByID(mapParam.map, Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CITY_PLAN);\r\n    // const askTheCityPlanLayerForExtent = getLayerByID(mapParam.map, Constants.LISTGRAPHICLAYER.GRAPHICLAYER_ASK_THE_CITY_PLAN_EXTENT);\r\n    // cityPlanLayer.clear();\r\n    // askTheCityPlanLayer.clear();\r\n    // askTheCityPlanLayerForExtent.clear();\r\n\r\n    clearGraphic(mapParam, [\r\n      Constants.LISTGRAPHICLAYER.GRAPHICLAYER_ASK_THE_CITY_PLAN,\r\n      Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CITY_PLAN,\r\n      Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CITY_PLAN_TEXT,\r\n      Constants.LISTGRAPHICLAYER.GRAPHICLAYER_ASK_THE_CITY_PLAN_EXTENT,\r\n    ]);\r\n\r\n    const graphic = new Graphic(point, symbol);\r\n    graphic.setAttributes({\r\n      CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_ASK_THE_CITY_PLAN,\r\n    });\r\n    mapParam.map.graphics.add(graphic);\r\n    //pboy fix override\r\n    //askTheCityPlanLayer.add(new Graphic(point, symbol));\r\n    callback(point);\r\n  });\r\n};\r\n\r\n//หลังวาดเสร็จแล้ว\r\nexport const addGraphicDrawAskTheCityPlan = (mapParam, { callback, evt }) => {\r\n  EsriLoader.loadModules(['esri/symbols/SimpleMarkerSymbol', 'esri/symbols/SimpleFillSymbol', 'esri/graphic', 'esri/Color'], options).then(\r\n    ([SimpleMarkerSymbol, SimpleFillSymbol, Graphic, Color]) => {\r\n      let symbol = null;\r\n      let graphic = null;\r\n\r\n      // const askTheCityPlanLayer = getLayerByID(mapParam.map, Constants.LISTGRAPHICLAYER.GRAPHICLAYER_ASK_THE_CITY_PLAN);\r\n      // const askTheCityPlanLayerForExtent = getLayerByID(mapParam.map, Constants.LISTGRAPHICLAYER.GRAPHICLAYER_ASK_THE_CITY_PLAN_EXTENT);\r\n      // const cityPlanLayer = getLayerByID(mapParam.map, Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CITY_PLAN);\r\n      // const landPlotLayer = getLayerByID(mapParam.map, Constants.LISTGRAPHICLAYER.GRAPHICLAYER_LAND_PLOT);\r\n\r\n      // cityPlanLayer.clear();\r\n      // askTheCityPlanLayer.clear();\r\n      // askTheCityPlanLayerForExtent.clear();\r\n      // landPlotLayer.clear();\r\n\r\n      clearGraphic(mapParam, [\r\n        Constants.LISTGRAPHICLAYER.GRAPHICLAYER_ASK_THE_CITY_PLAN,\r\n        Constants.LISTGRAPHICLAYER.GRAPHICLAYER_ASK_THE_CITY_PLAN_EXTENT,\r\n        Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CITY_PLAN,\r\n        Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CITY_PLAN_TEXT,\r\n        Constants.LISTGRAPHICLAYER.GRAPHICLAYER_LAND_PLOT,\r\n      ]);\r\n\r\n      switch (evt.geometry.type) {\r\n        case 'point':\r\n          symbol = new SimpleMarkerSymbol({\r\n            color: Color([25, 179, 25]),\r\n            type: 'simplemarkersymbol',\r\n            style: 'STYLE_CIRCLE',\r\n            outline: {\r\n              color: Color([0, 0, 0]),\r\n              width: 1,\r\n            },\r\n          });\r\n          callback(evt);\r\n          graphic = new Graphic(evt.geometry, symbol);\r\n          break;\r\n        case 'polygon':\r\n          callback(evt);\r\n          symbol = new SimpleFillSymbol();\r\n          graphic = new Graphic(evt.geometry, symbol);\r\n          // }\r\n          break;\r\n        default:\r\n          break;\r\n      }\r\n\r\n      if (graphic) {\r\n        graphic.setAttributes({\r\n          CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_ASK_THE_CITY_PLAN,\r\n        });\r\n        mapParam.map.graphics.add(graphic);\r\n        //pboy fix override\r\n        //askTheCityPlanLayer.add(graphic);\r\n      }\r\n    }\r\n  );\r\n};\r\n\r\nexport const setDefultMap = (mapParam) => {\r\n  // mapParam.map.setMapCursor(\"default\");\r\n  // mapParam.drawAskTheCityPlan.deactivate();\r\n\r\n  // typeAskTheCityPlan = null\r\n  // เพิ่ม Constants.LISTGRAPHICLAYER.GRAPHICLAYER_LAND_PLOT มาเพื่อลบตอนสอบถามผังเมือง->ระบุแปลงที่ดิน\r\n  clearEvtDrawMap(mapParam);\r\n  clearGraphic(mapParam, [\r\n    Constants.LISTGRAPHICLAYER.GRAPHICLAYER_ASK_THE_CITY_PLAN,\r\n    Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CITY_PLAN_TEXT,\r\n    Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CITY_PLAN,\r\n    Constants.LISTGRAPHICLAYER.GRAPHICLAYER_LAND_PLOT,\r\n  ]);\r\n};\r\n\r\nexport const IdentifyComprehensivePlanCMP = (mapParam, { geometry, callbackFn }) => {\r\n  //CMP เปลื่ยนชื่อจาก IdentifyComprehensivePlan\r\n  EsriLoader.loadModules(['esri/tasks/IdentifyTask', 'esri/tasks/IdentifyParameters'], options).then(([IdentifyTask, IdentifyParameters]) => {\r\n    const url = window.CONFIG_URL_GIS.COMPREHENSIVE_PLAN;\r\n    const identifyTask = new IdentifyTask(url);\r\n    const identifyParams = new IdentifyParameters();\r\n    identifyParams.tolerance = 0;\r\n    identifyParams.returnGeometry = true;\r\n    identifyParams.layerOption = IdentifyParameters.LAYER_OPTION_ALL;\r\n    identifyParams.width = mapParam.map.width;\r\n    identifyParams.height = mapParam.map.height;\r\n    identifyParams.geometry = geometry;\r\n    identifyParams.mapExtent = mapParam.map.extent;\r\n    identifyParams.returnFieldName = true;\r\n\r\n    identifyTask.execute(\r\n      identifyParams,\r\n      (idResults) => {\r\n        if (callbackFn) {\r\n          callbackFn(idResults, geometry);\r\n        }\r\n      },\r\n      (error) => {\r\n        console.log('Error: Identify Comprehensive plan => ', error);\r\n        if (callbackFn) {\r\n          callbackFn(null);\r\n        }\r\n      }\r\n    );\r\n  });\r\n};\r\n\r\nexport const createLayerComprehensivePlanToc = (mapParam) => {\r\n  //ComprehensivePlan\r\n  EsriLoader.loadModules(['esri/layers/ArcGISDynamicMapServiceLayer'], options).then(([DynamicLayer]) => {\r\n    var basemapLayerTocDynamic = new DynamicLayer(`${window.COMPREHENSIVE_URL}`, {\r\n      id: `${`CPUDD_BASEMAP`}`,\r\n      visible: false,\r\n      opacity: 0.6,\r\n    });\r\n    //   console.log(\"basemapLayerTocDynamic\",basemapLayerTocDynamic)\r\n    mapParam.map.addLayer(basemapLayerTocDynamic);\r\n  });\r\n};\r\n\r\nexport const landuseExtent = (mapParam, geometry) => {\r\n  EsriLoader.loadModules(['esri/graphic', 'esri/symbols/SimpleFillSymbol'], options).then(async ([Graphic, SimpleFillSymbol]) => {\r\n    mapParam.map.setExtent(geometry.getExtent().expand(1.5), true); //extent\r\n    const symbol = new SimpleFillSymbol();\r\n    // const askTheCityPlanLayerForExtent = getLayerByID(mapParam.map, Constants.LISTGRAPHICLAYER.GRAPHICLAYER_ASK_THE_CITY_PLAN_EXTENT);\r\n    // askTheCityPlanLayerForExtent.clear();\r\n    // askTheCityPlanLayerForExtent.add(new Graphic(geometry, symbol));\r\n    clearGraphic(mapParam, [Constants.LISTGRAPHICLAYER.GRAPHICLAYER_ASK_THE_CITY_PLAN_EXTENT]);\r\n\r\n    const graphic = new Graphic(geometry, symbol);\r\n    graphic.setAttributes({\r\n      CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_ASK_THE_CITY_PLAN_EXTENT,\r\n    });\r\n    mapParam.map.graphics.add(graphic);\r\n  });\r\n};\r\n\r\nconst drawText = (mapParam, { geometry, displayText = '', hideLoading, customKey = Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CITY_PLAN_TEXT }) => {\r\n  EsriLoader.loadModules(['esri/graphic', 'esri/Color', 'esri/tasks/GeometryService', 'esri/symbols/TextSymbol', 'esri/symbols/Font'], options).then(\r\n    ([Graphic, Color, GeometryService, TextSymbol, Font]) => {\r\n      const geometryService = new GeometryService('https://utility.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer');\r\n      geometryService.labelPoints(geometry, ([labelPoint] = []) => {\r\n        const font = new Font('20px', Font.STYLE_NORMAL, Font.VARIANT_NORMAL, Font.WEIGHT_BOLDER);\r\n        const textSymbol = new TextSymbol(displayText, font, new Color([0, 0, 0]));\r\n        const labelPointGraphic = new Graphic(labelPoint, textSymbol);\r\n        labelPointGraphic.setAttributes({ CUSTOM_KEY: customKey });\r\n        mapParam.map.graphics.add(labelPointGraphic);\r\n        hideLoading && hideLoading();\r\n      });\r\n    }\r\n  );\r\n};\r\n\r\nexport const drawGraphicCityPlan = (mapParam, { obj, loadingFunction }) => {\r\n  //console.log(loadingFunction)\r\n  const showLoading = () => {\r\n    if (loadingFunction && loadingFunction.showLoading) {\r\n      loadingFunction.showLoading();\r\n    }\r\n  };\r\n  const hideLoading = () => {\r\n    if (loadingFunction && loadingFunction.hideLoading) {\r\n      loadingFunction.hideLoading();\r\n    }\r\n  };\r\n\r\n  EsriLoader.loadModules(\r\n    [\r\n      'esri/symbols/SimpleMarkerSymbol',\r\n      'esri/symbols/SimpleFillSymbol',\r\n      'esri/symbols/SimpleLineSymbol',\r\n      'esri/geometry/Polyline',\r\n      'esri/geometry/Polygon',\r\n      'esri/graphic',\r\n      'esri/Color',\r\n      'esri/tasks/GeometryService',\r\n      'esri/tasks/ProjectParameters',\r\n      'esri/SpatialReference',\r\n    ],\r\n    options\r\n  ).then(\r\n    async ([\r\n      SimpleMarkerSymbol,\r\n      SimpleFillSymbol,\r\n      SimpleLineSymbol,\r\n      Polyline,\r\n      Polygon,\r\n      Graphic,\r\n      Color,\r\n      GeometryService,\r\n      ProjectParameters,\r\n      SpatialReference,\r\n    ]) => {\r\n      let symbol = null;\r\n      let graphic = null;\r\n      showLoading();\r\n      const geometryService = await new GeometryService('https://utility.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer');\r\n      const PrjParams = new ProjectParameters();\r\n\r\n      // const cityPlanLayer = getLayerByID(mapParam.map, Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CITY_PLAN);\r\n      // cityPlanLayer.clear();\r\n      clearGraphic(mapParam, [Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CITY_PLAN, Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CITY_PLAN_TEXT]);\r\n\r\n      switch (obj.geometryType) {\r\n        case 'point':\r\n          symbol = new SimpleMarkerSymbol({\r\n            color: Color([25, 179, 25]),\r\n            type: 'simplemarkersymbol',\r\n            style: 'STYLE_CIRCLE',\r\n            outline: {\r\n              color: Color([0, 0, 0]),\r\n              width: 1,\r\n            },\r\n          });\r\n\r\n          hideLoading();\r\n          break;\r\n        case 'esriGeometryPolyline':\r\n          if (obj.feature.geometry.spatialReference !== 102100) {\r\n            PrjParams.geometries = [obj.feature.geometry];\r\n            PrjParams.outSR = new SpatialReference({ wkid: 4326 });\r\n            geometryService.project(PrjParams, (outputpoint) => {\r\n              if (outputpoint.length !== 0) {\r\n                symbol = new SimpleFillSymbol(\r\n                  SimpleFillSymbol.STYLE_SOLID,\r\n                  new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color([255, 0, 0]), 3)\r\n                );\r\n                graphic = new Graphic(outputpoint[0], symbol);\r\n                mapParam.map.setExtent(graphic.geometry.getExtent().expand(2.5), true);\r\n                graphic.setAttributes({\r\n                  CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CITY_PLAN,\r\n                });\r\n                mapParam.map.graphics.add(graphic);\r\n                //pboy fix override\r\n                //cityPlanLayer.add(graphic);\r\n                hideLoading();\r\n              }\r\n            });\r\n          } else {\r\n            symbol = new SimpleFillSymbol(\r\n              SimpleFillSymbol.STYLE_SOLID,\r\n              new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color([255, 0, 0]), 3)\r\n            );\r\n            let polyline = new Polyline(obj.feature.geometry);\r\n            graphic = new Graphic(polyline, symbol);\r\n            mapParam.map.setExtent(graphic.geometry.getExtent().expand(2.5), true);\r\n            graphic.setAttributes({\r\n              CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CITY_PLAN,\r\n            });\r\n            mapParam.map.graphics.add(graphic);\r\n            //pboy fix override\r\n            //cityPlanLayer.add(graphic);\r\n            hideLoading();\r\n          }\r\n\r\n          break;\r\n        case 'esriGeometryPolygon':\r\n          if (obj.feature.geometry.spatialReference !== 102100) {\r\n            PrjParams.geometries = [obj.feature.geometry];\r\n            PrjParams.outSR = new SpatialReference({ wkid: 4326 });\r\n            geometryService.project(PrjParams, (outputpoint) => {\r\n              if (outputpoint.length !== 0) {\r\n                symbol = new SimpleFillSymbol(\r\n                  SimpleFillSymbol.STYLE_SOLID,\r\n                  new SimpleLineSymbol('solid', new Color([255, 0, 0]), 3),\r\n                  new Color([255, 0, 0, 0.25])\r\n                );\r\n                graphic = new Graphic(outputpoint[0], symbol);\r\n                mapParam.map.setExtent(graphic.geometry.getExtent().expand(2.5), true);\r\n                graphic.setAttributes({\r\n                  CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CITY_PLAN,\r\n                });\r\n                // console.log(\"BDEBUG graphic\", graphic);\r\n                mapParam.map.graphics.add(graphic);\r\n                //pboy fix override\r\n                //cityPlanLayer.add(graphic);\r\n              }\r\n\r\n              // drawText(mapParam, outputpoint, obj.displayText, hideLoading);\r\n              drawText(mapParam, {\r\n                geometry: outputpoint,\r\n                displayText: obj.displayText,\r\n                hideLoading,\r\n              });\r\n            });\r\n          } else {\r\n            symbol = new SimpleFillSymbol(\r\n              SimpleFillSymbol.STYLE_SOLID,\r\n              new SimpleLineSymbol('solid', new Color([255, 0, 0]), 3),\r\n              new Color([255, 0, 0, 0.25])\r\n            );\r\n            let polygon = new Polygon(obj.feature.geometry);\r\n            graphic = new Graphic(polygon, symbol);\r\n            mapParam.map.setExtent(graphic.geometry.getExtent().expand(2.5), true);\r\n            graphic.setAttributes({\r\n              CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CITY_PLAN,\r\n            });\r\n            mapParam.map.graphics.add(graphic);\r\n            //pboy fix override\r\n            //cityPlanLayer.add(graphic);\r\n            // drawText(cityPlanLayer, obj.feature.geometry, obj.displayText, hideLoading);\r\n            // drawText(mapParam, obj.feature.geometry, obj.displayText, hideLoading);\r\n            drawText(mapParam, {\r\n              geometry: obj.feature.geometry,\r\n              displayText: obj.displayText,\r\n              hideLoading,\r\n            });\r\n          }\r\n          break;\r\n        default:\r\n          hideLoading();\r\n          break;\r\n      }\r\n    }\r\n  );\r\n};\r\n\r\nexport const printMapForMapTool = (mapParam, { callback, param }) => {\r\n  // สำหรับ print maptool\r\n  EsriLoader.loadModules(['esri/tasks/PrintTemplate', 'esri/tasks/PrintTask', 'esri/tasks/PrintParameters'], options).then(\r\n    ([PrintTemplate, PrintTask, PrintParameters]) => {\r\n      try {\r\n        var url = window.PRINT_MAP_URL;\r\n        var printMap = new PrintTask(url);\r\n        var params = new PrintParameters();\r\n        var template = new PrintTemplate();\r\n        const dateTime = DateTimeUtils.dateThaiFormat(new Date());\r\n\r\n        template.exportOptions = {\r\n          width: 800,\r\n          height: 1100,\r\n          dpi: 96,\r\n        };\r\n        template.layout = param.paperSize;\r\n        template.showAttribution = true;\r\n        template.format = param.format;\r\n\r\n        const mapDescription = param.mapDescription ? param.mapDescription : '';\r\n        template.layoutOptions = {\r\n          customTextElements: [{ CUSTOM_TITLE: param.mapName }, { CUSTOM_DESC: mapDescription }, { CUSTOM_DATE: dateTime }],\r\n        };\r\n        params.map = mapParam.map;\r\n        params.template = template;\r\n        params.async = true;\r\n\r\n        printMap.execute(params, (result) => {\r\n          //console.log(result)\r\n          if (result) {\r\n            window.open(result.url);\r\n          }\r\n          callback();\r\n        });\r\n      } catch (err) {\r\n        console.log('err', err);\r\n      }\r\n    }\r\n  );\r\n};\r\n\r\nexport const printMapForComPlanQuery = (mapParam, { callback, param, lup, station, canon, transp, opsName }) => {\r\n  //print map สำหรับสอบถามผังเมือง\r\n  EsriLoader.loadModules(['esri/tasks/PrintTemplate', 'esri/tasks/PrintTask', 'esri/tasks/PrintParameters'], options).then(\r\n    ([PrintTemplate, PrintTask, PrintParameters]) => {\r\n      try {\r\n        var url = window.PRINT_MAP_URL;\r\n        var printMap = new PrintTask(url);\r\n        var params = new PrintParameters();\r\n        var template = new PrintTemplate();\r\n        const dateTime = DateTimeUtils.dateThaiFormat(new Date());\r\n        const lupParam = [];\r\n\r\n        for (let i = 0; i < 5; i++) {\r\n          lupParam.push({\r\n            [`CUSTOM_LUP_ZONE${i + 1}`]: lup[i] && lup[i].zone ? lup[i].zone : '',\r\n          });\r\n          lupParam.push({\r\n            [`CUSTOM_LUP_FAR${i + 1}`]: lup[i] && lup[i].far ? lup[i].far : '',\r\n          });\r\n          lupParam.push({\r\n            [`CUSTOM_LUP_OSR${i + 1}`]: lup[i] && lup[i].osr ? lup[i].osr : '',\r\n          });\r\n        }\r\n\r\n        template.exportOptions = {\r\n          width: 800,\r\n          height: 1100,\r\n          dpi: 96,\r\n        };\r\n        template.layout = param.paperSize;\r\n        template.showAttribution = true;\r\n        template.format = param.format;\r\n        // console.log('param.paperSize', param.paperSize)\r\n\r\n        const mapDescription = param.mapDescription ? param.mapDescription : '';\r\n        template.layoutOptions = {\r\n          customTextElements: [\r\n            { CUSTOM_TITLE: param.mapName },\r\n            { CUSTOM_DESC: mapDescription },\r\n            { CUSTOM_DATE: dateTime },\r\n            { CUSTOM_STATION_BUFFER: station.buffer },\r\n            { CUSTOM_STATION_NAME: station.name },\r\n            { CUSTOM_TRANSP_PRJ: transp.prj },\r\n            { CUSTOM_TRANSP_WIDTH: transp.width },\r\n            { CUSTOM_BDCTL_ZONE: canon.zone },\r\n            { CUSTOM_BDCTL_CODE: canon.code },\r\n            { CUSTOM_BDCTL_NAME: canon.name },\r\n            { CUSTOM_OPS_NAME: opsName },\r\n            ...lupParam,\r\n          ],\r\n        };\r\n        params.map = mapParam.map;\r\n        params.template = template;\r\n        params.async = true;\r\n\r\n        printMap.execute(params, (result) => {\r\n          //console.log(result)\r\n          if (result) {\r\n            window.open(result.url);\r\n          }\r\n          callback();\r\n        });\r\n      } catch (err) {\r\n        console.log('err', err);\r\n      }\r\n    }\r\n  );\r\n};\r\n\r\nexport const printMapForReport = (mapParam, { attribute, callback }) => {\r\n  //สำหรับ รายงานสถิตการขอรับบริการตรวจสอบผังเมือง\r\n  let extenPoint = null;\r\n  let extenPoly = null;\r\n  EsriLoader.loadModules(\r\n    [\r\n      'esri/tasks/query',\r\n      'esri/tasks/QueryTask',\r\n      'esri/geometry/geometryEngine',\r\n      'esri/tasks/PrintTemplate',\r\n      'esri/tasks/PrintTask',\r\n      'esri/tasks/PrintParameters',\r\n    ],\r\n    options\r\n  ).then(async ([Query, QueryTask, geometryEngine, PrintTemplate, PrintTask, PrintParameters]) => {\r\n    const qParame = new Query();\r\n    qParame.where = `${CPUDD_Query_Plan}`;\r\n    qParame.outSpatialReference = { wkid: 102100 };\r\n    qParame.returnGeometry = true;\r\n    // const qTask = new QueryTask(`${window.CPUDD_QUERY_PLAN_LAYER}/0`)\r\n    const qTask = new QueryTask(window.CPUDD_QUERY_PLAN_LAYER_PNT);\r\n\r\n    await qTask.executeForExtent(qParame, (response) => {\r\n      if (response) {\r\n        extenPoint = response.extent;\r\n      }\r\n    });\r\n    // const qTask2 = new QueryTask(`${window.CPUDD_QUERY_PLAN_LAYER}/1`)\r\n    const qTask2 = new QueryTask(window.CPUDD_QUERY_PLAN_LAYER_POLYGON);\r\n    await qTask2.executeForExtent(qParame, (response) => {\r\n      if (response) {\r\n        extenPoly = response.extent;\r\n      }\r\n    });\r\n\r\n    const listExtend = [];\r\n\r\n    if (extenPoint && extenPoint.xmax && !isNaN(extenPoint.xmax)) {\r\n      //เช็คเพิ่มกรณีค่าเป็น NaN\r\n      listExtend.push(extenPoint);\r\n    }\r\n\r\n    if (extenPoly && extenPoly.xmax && !isNaN(extenPoly.xmax)) {\r\n      //เช็คเพิ่มกรณีค่าเป็น NaN\r\n      listExtend.push(extenPoly);\r\n    }\r\n\r\n    var union = await geometryEngine.union(listExtend);\r\n    await mapParam.map.setExtent(union.getExtent().expand(2.5));\r\n\r\n    var url = window.PRINT_MAP_URL;\r\n    var printMap = new PrintTask(url);\r\n    var params = new PrintParameters();\r\n    var template = new PrintTemplate();\r\n    template.layout = 'CPUDD_ComPlanQuery_Officer_A4';\r\n    //template.layout = \"CPUDD_MAP_A4_Landscape\";\r\n    // template.exportOptions = {\r\n    // \twidth: 850,\r\n    // \theight: 605,\r\n    // \tdpi: 96\r\n    // }\r\n    template.layoutOptions = {\r\n      customTextElements: [{ CUSTOM_DATE: DateTimeUtils.dateThaiFormat(new Date()) }],\r\n    };\r\n\r\n    template.showAttribution = true;\r\n    template.format = 'PNG32';\r\n    params.map = mapParam.map;\r\n    params.template = template;\r\n\r\n    printMap.execute(\r\n      params,\r\n      (result) => {\r\n        if (callback) {\r\n          callback(result.url, attribute);\r\n        }\r\n      },\r\n      (err) => {\r\n        if (callback) {\r\n          callback(null);\r\n        }\r\n      }\r\n    );\r\n  });\r\n};\r\n\r\nexport const mapRemoveLayer = ({ map }, layerID) => {\r\n  //ลบ Layer ออกจากแผนที่\r\n  const layer = map.getLayer(layerID);\r\n  if (layer) {\r\n    map.removeLayer(layer);\r\n  }\r\n};\r\n\r\nexport const addLayerCPUDDQueryPlan = (mapParam, layerDefinitions = null) => {\r\n  //สำหรับแสดง CPUDD_Query_Plan  <ผูกกับ รายงานสถิติการขอรับตรวจสอบผังเมือง>\r\n  EsriLoader.loadModules(['esri/graphic', 'esri/layers/ArcGISDynamicMapServiceLayer'], options).then(([Graphic, DynamicLayer]) => {\r\n    const layer = mapParam.map.getLayer(Constants.LAYER_ID.CPUDD_QUERY_PLAN);\r\n\r\n    if (layer) {\r\n      mapParam.map.removeLayer(layer);\r\n    }\r\n\r\n    const queryPlanLayer = new DynamicLayer(window.CPUDD_QUERY_PLAN_LAYER, {\r\n      id: Constants.LAYER_ID.CPUDD_QUERY_PLAN,\r\n      visble: true,\r\n    });\r\n\r\n    queryPlanLayer.setVisibleLayers([3, 4]);\r\n\r\n    //ปรับมาใช้เวลาปกติไม่ต้อง -7\r\n    const strStartDateUTC = `${format(new Date(), 'yyyy-MM-dd', {\r\n      locale: enLocale,\r\n    })} 00:00:00`;\r\n    const strEndDateUTC = `${format(new Date(), 'yyyy-MM-dd', {\r\n      locale: enLocale,\r\n    })} 23:59:59`;\r\n\r\n    const condition = `QUERY_DATE BETWEEN timestamp '${strStartDateUTC}' AND timestamp '${strEndDateUTC}'`;\r\n    CPUDD_Query_Plan = condition;\r\n\r\n    let layerDefinitions = [];\r\n    // layerDefinitions[3] = condition;\r\n    // layerDefinitions[4] = condition;\r\n\r\n    layerDefinitions[window.LAYER_ID_REPORT_COMPREHENSIVE[0]] = condition;\r\n    layerDefinitions[window.LAYER_ID_REPORT_COMPREHENSIVE[1]] = condition;\r\n\r\n    queryPlanLayer.setLayerDefinitions(layerDefinitions);\r\n    mapParam.map.addLayer(queryPlanLayer);\r\n  });\r\n};\r\n\r\nexport const filterCPUDDQueryPlan = ({ map }, { startDate, endDate }) => {\r\n  //สำหรับ Filter Graphic CPUDD_Query_Plan <ผูกกับ รายงานสถิติการขอรับตรวจสอบผังเมือง>\r\n  const layer = map.getLayer(Constants.LAYER_ID.CPUDD_QUERY_PLAN);\r\n\r\n  // const startDateUTC = addDays(new Date(startDate), -1);\r\n  // const strStartDateUTC = `${format(startDateUTC, 'yyyy-MM-dd', { locale: enLocale })} 17:00:00`\r\n  // const endDateUTC = new Date(endDate);\r\n  // const strEndDateUTC = `${format(endDateUTC, 'yyyy-MM-dd', { locale: enLocale })} 16:59:59`\r\n\r\n  //ปรับมาใช้เวลาปกติไม่ต้อง -7\r\n  const startDateUTC = new Date(startDate);\r\n  const strStartDateUTC = `${format(startDateUTC, 'yyyy-MM-dd', {\r\n    locale: enLocale,\r\n  })} 00:00:00`;\r\n  const endDateUTC = new Date(endDate);\r\n  const strEndDateUTC = `${format(endDateUTC, 'yyyy-MM-dd', {\r\n    locale: enLocale,\r\n  })} 23:59:59`;\r\n\r\n  const condition = `QUERY_DATE BETWEEN timestamp '${strStartDateUTC}' AND timestamp '${strEndDateUTC}'`;\r\n  CPUDD_Query_Plan = condition;\r\n  let layerDefinitions = [];\r\n  // layerDefinitions[3] = condition;\r\n  // layerDefinitions[4] = condition;\r\n\r\n  layerDefinitions[window.LAYER_ID_REPORT_COMPREHENSIVE[0]] = condition;\r\n  layerDefinitions[window.LAYER_ID_REPORT_COMPREHENSIVE[1]] = condition;\r\n\r\n  layer.setLayerDefinitions(layerDefinitions);\r\n};\r\n\r\nexport const addShapeAskForBusiness = (mapParam, param) => {\r\n  EsriLoader.loadModules(['esri/layers/FeatureLayer', 'esri/graphic'], options).then(([FeatureLayer, Graphic]) => {\r\n    const featureLayer = new FeatureLayer(param.url);\r\n    var gp = new Graphic();\r\n    gp.setGeometry(param.geometry);\r\n    gp.setAttributes({\r\n      ACTIVITY: param.activity,\r\n      QUERY_DATE: Date.parse(new Date()),\r\n      USER_ID: param.userId,\r\n    });\r\n    featureLayer.applyEdits(\r\n      [gp],\r\n      null,\r\n      null,\r\n      (evt) => {\r\n        if (evt) {\r\n          let callbackResult = { ...evt[0], ...param }; //merge object\r\n          param.callback(callbackResult);\r\n        } else {\r\n          param.callback(false);\r\n        }\r\n      },\r\n      (error) => {\r\n        console.log(error);\r\n      }\r\n    );\r\n  });\r\n};\r\n\r\nexport const zoomLandplot = (mapParam, val) => {\r\n  //ใช้ใน function ค้นหาข้อมูลที่ดิน และค้นหาเลขที่บ้าน\r\n  EsriLoader.loadModules(\r\n    ['esri/geometry/Polygon', 'esri/geometry/Point', 'esri/SpatialReference', 'esri/tasks/GeometryService', 'esri/tasks/ProjectParameters'],\r\n    options\r\n  ).then(async ([Polygon, Point, SpatialReference, GeometryService, ProjectParameters]) => {\r\n    const outSpatialReference = new SpatialReference({\r\n      wkid: 102100, //Sphere_Sinusoidal\r\n    });\r\n    const geometryService = new GeometryService('https://utility.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer');\r\n    let PrjParams;\r\n\r\n    if (val.drawRings) {\r\n      drawLandplot(mapParam, {\r\n        type: val.type,\r\n        listPoint: val.drawRings,\r\n        callbackFn: val.callbackFn,\r\n        landNo: val.landNo,\r\n        isKeepGraphic: val.isKeepGraphic,\r\n      });\r\n    }\r\n\r\n    val.showLoading && val.showLoading();\r\n\r\n    if (val.type === 'ST_POINT') {\r\n      let point = new Point({\r\n        x: val.rings[0][0],\r\n        y: val.rings[0][1],\r\n        spatialReference: { wkid: 32647 },\r\n      });\r\n      PrjParams = new ProjectParameters();\r\n      PrjParams.geometries = [point];\r\n      PrjParams.outSR = outSpatialReference;\r\n\r\n      geometryService.project(\r\n        PrjParams,\r\n        function(outputpoint) {\r\n          if (outputpoint) {\r\n            mapParam.map.centerAndZoom(outputpoint[0], 15);\r\n          }\r\n          val.hideLoading && val.hideLoading();\r\n        },\r\n        function(err) {\r\n          val.hideLoading && val.hideLoading();\r\n        }\r\n      );\r\n    } else {\r\n      let polygon = new Polygon(new SpatialReference({ wkid: 32647 }));\r\n      polygon.addRing(val.rings);\r\n      PrjParams = new ProjectParameters();\r\n      PrjParams.geometries = [polygon];\r\n      PrjParams.outSR = outSpatialReference;\r\n\r\n      geometryService.project(\r\n        PrjParams,\r\n        function(outputpoint) {\r\n          if (outputpoint) {\r\n            mapParam.map.setExtent(outputpoint[0].getExtent().expand(1.5), true);\r\n          }\r\n          val.hideLoading && val.hideLoading();\r\n        },\r\n        function(err) {\r\n          val.hideLoading && val.hideLoading();\r\n        }\r\n      );\r\n    }\r\n  });\r\n};\r\n\r\nconst drawLandplot = (mapParam, { type = null, listPoint = [], callbackFn, landNo, isKeepGraphic = false } = {}) => {\r\n  EsriLoader.loadModules([\r\n    'esri/graphic',\r\n    'esri/geometry/Polyline',\r\n    'esri/geometry/Polygon',\r\n    'esri/geometry/Point',\r\n    'esri/SpatialReference',\r\n    'esri/tasks/GeometryService',\r\n    'esri/tasks/ProjectParameters',\r\n    'esri/symbols/SimpleMarkerSymbol',\r\n    'esri/symbols/SimpleFillSymbol',\r\n    'esri/symbols/SimpleLineSymbol',\r\n    'esri/Color',\r\n  ]).then(\r\n    ([\r\n      Graphic,\r\n      Polyline,\r\n      Polygon,\r\n      Point,\r\n      SpatialReference,\r\n      GeometryService,\r\n      ProjectParameters,\r\n      SimpleMarkerSymbol,\r\n      SimpleFillSymbol,\r\n      SimpleLineSymbol,\r\n      Color,\r\n    ]) => {\r\n      if (!isKeepGraphic) {\r\n        clearGraphic(mapParam, [Constants.LISTGRAPHICLAYER.GRAPHICLAYER_LAND_PLOT, Constants.LISTGRAPHICLAYER.GRAPHICLAYER_LAND_PLOT_TEXT]);\r\n      }\r\n\r\n      const geometryService = new GeometryService('https://utility.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer');\r\n      const PrjParams = new ProjectParameters();\r\n\r\n      switch (type) {\r\n        case 'ST_POINT':\r\n          const symbolPoint = new SimpleMarkerSymbol({\r\n            color: Color([238, 69, 0, 1]),\r\n            type: 'simplemarkersymbol',\r\n            style: 'STYLE_CIRCLE',\r\n            outline: {\r\n              color: Color([0, 0, 0]),\r\n              width: 1,\r\n            },\r\n          });\r\n          const point = new Point(listPoint[0], listPoint[1], new SpatialReference({ wkid: 32647 }));\r\n          PrjParams.geometries = [point];\r\n          PrjParams.outSR = new SpatialReference({ wkid: 4326 });\r\n          geometryService.project(PrjParams, function(outputpoint) {\r\n            if (outputpoint.length !== 0) {\r\n              const graphic = new Graphic(outputpoint[0], symbolPoint);\r\n              graphic.setAttributes({\r\n                CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_LAND_PLOT,\r\n              });\r\n              mapParam.map.graphics.add(graphic);\r\n              drawText(mapParam, {\r\n                geometry: [outputpoint[0]],\r\n                displayText: landNo,\r\n                customKey: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_LAND_PLOT_TEXT,\r\n              });\r\n            }\r\n          });\r\n          break;\r\n        case 'ST_POLYGON':\r\n          const symbolPolygon = new SimpleFillSymbol(\r\n            SimpleFillSymbol.STYLE_SOLID,\r\n            new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color([255, 0, 0]), 2),\r\n            new Color([255, 255, 0, 0.25])\r\n          );\r\n          const polygon = new Polygon({\r\n            rings: listPoint,\r\n            spatialReference: { wkid: 32647 },\r\n          });\r\n          PrjParams.geometries = [polygon];\r\n          PrjParams.outSR = new SpatialReference({ wkid: 4326 });\r\n          geometryService.project(PrjParams, function(outputpoint) {\r\n            if (outputpoint.length !== 0) {\r\n              const graphic = new Graphic(outputpoint[0], symbolPolygon);\r\n              graphic.setAttributes({\r\n                CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_LAND_PLOT,\r\n              });\r\n              mapParam.map.graphics.add(graphic);\r\n              drawText(mapParam, {\r\n                geometry: [outputpoint[0]],\r\n                displayText: landNo,\r\n                customKey: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_LAND_PLOT_TEXT,\r\n              });\r\n            }\r\n          });\r\n          // callbackFn(PrjParams.geometries[0]);//โยน geometry กลับไปให้หน้า ResultSearchLandInfo\r\n          break;\r\n        case 'ST_LINESTRING':\r\n          const symbolLine = new SimpleLineSymbol(SimpleLineSymbol.STYLE_DASH, new Color([238, 69, 0, 1]), 3);\r\n          const polyline = new Polyline({\r\n            paths: listPoint,\r\n            spatialReference: { wkid: 32647 },\r\n          });\r\n          PrjParams.geometries = [polyline];\r\n          PrjParams.outSR = new SpatialReference({ wkid: 4326 });\r\n          geometryService.project(PrjParams, function(outputpoint) {\r\n            if (outputpoint.length !== 0) {\r\n              const graphic = new Graphic(outputpoint[0], symbolLine);\r\n              graphic.setAttributes({\r\n                CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_LAND_PLOT,\r\n              });\r\n              mapParam.map.graphics.add(graphic);\r\n              drawText(mapParam, {\r\n                geometry: [outputpoint[0]],\r\n                displayText: landNo,\r\n                customKey: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_LAND_PLOT_TEXT,\r\n              });\r\n            }\r\n          });\r\n          break;\r\n        default:\r\n          console.log('Unknow draw type Locator.');\r\n          break;\r\n      }\r\n      callbackFn(PrjParams.geometries[0]); //โยน geometry กลับไปให้หน้า ResultSearchLandInfo\r\n    }\r\n  );\r\n};\r\n\r\nexport const clearGraphicSearchLandInfo = (mapParam) => {\r\n  clearGraphic(mapParam, [Constants.LISTGRAPHICLAYER.GRAPHICLAYER_LAND_PLOT, Constants.LISTGRAPHICLAYER.GRAPHICLAYER_LAND_PLOT_TEXT]);\r\n};\r\n\r\nexport const IdentifyMapTool = (map, mapPoint) => {\r\n  EsriLoader.loadModules(['esri/InfoTemplate', 'esri/tasks/query', 'esri/tasks/QueryTask'], options).then(([InfoTemplate, Query, QueryTask]) => {\r\n    const scaleMap = map.getScale();\r\n    const queryParam = new Query();\r\n    queryParam.returnGeometry = true;\r\n    queryParam.outFields = ['*'];\r\n    queryParam.geometry = mapPoint;\r\n    queryParam.units = 'meters';\r\n    queryParam.distance = 10;\r\n\r\n    const listPromise = [];\r\n    if (map.graphicsLayerIds.length > 0) {\r\n      map.graphicsLayerIds.forEach((layerID) => {\r\n        const isGRAPHICLAYER = layerID.indexOf('GRAPHICLAYER') > 0; //เป็น GraphicLayer\r\n        const isFEATURELAYER = layerID.indexOf('FEATURELAYER') > 0; //เป็น FeatureLayer\r\n        if (!isGRAPHICLAYER && !isFEATURELAYER) {\r\n          const instanceLayer = map.getLayer(layerID);\r\n          if (instanceLayer && instanceLayer.visible && !_.isNil(instanceLayer.url)) {\r\n            //ตรวจสอบว่าดึงข้อมูล Layer มาได้ && เปิด layer && ต้องมี url\r\n            // เช็คว่าอยู่ใน scale ที่มองเห็นไหม\r\n            // const isScaleMap = (instanceLayer.minScale === 0 || (scaleMap >= instanceLayer.maxScale && scaleMap <= instanceLayer.minScale))\r\n            const isScaleMap = instanceLayer.minScale === 0 || scaleMap <= instanceLayer.minScale;\r\n\r\n            isScaleMap &&\r\n              listPromise.push(\r\n                new Promise((resolve) => {\r\n                  const queryTask = new QueryTask(instanceLayer.url);\r\n                  queryTask.execute(queryParam, (layerData) => {\r\n                    if (layerData.features.length > 0) {\r\n                      const template = new InfoTemplate('Attributes', '${*}');\r\n                      template.setTitle(instanceLayer._name);\r\n                      layerData.features.forEach((feature) => {\r\n                        feature.setInfoTemplate(template);\r\n\r\n                        // Delete attribute fields that do not display like add update feature\r\n                        Constants.NOT_DISPLAY_FIELD_LIST.forEach((fieldName) => {\r\n                          delete feature.attributes[fieldName];\r\n                        });\r\n\r\n                        //make Data for diaplay on popup\r\n                        layerData.fields.forEach((field) => {\r\n                          if (_.isNull(feature.attributes[field.name])) {\r\n                            delete feature.attributes[field.name];\r\n                          } else if (!_.isEqual(field.name, field.alias)) {\r\n                            if (/(_DATE|_date)$/.test(field.name)) {\r\n                              //Field ที่เป็น date\r\n                              const currentAttrValue = feature.attributes[field.name];\r\n                              feature.attributes[field.name] = DateTimeUtils.convertDateTimeToDisplayDate(currentAttrValue, 'd MMM yyyy HH:mm น.');\r\n                            }\r\n\r\n                            feature.attributes[field.alias] = feature.attributes[field.name];\r\n                            delete feature.attributes[field.name];\r\n                          } else if (/(_DATE|_date)$/.test(field.name)) {\r\n                            //Field ที่เป็น date\r\n                            const currentAttrValue = feature.attributes[field.name];\r\n                            feature.attributes[field.name] = DateTimeUtils.convertDateTimeToDisplayDate(currentAttrValue, 'd MMM yyyy HH:mm น.');\r\n                          }\r\n                        });\r\n                      });\r\n                      resolve(layerData.features);\r\n                    } else {\r\n                      resolve(null);\r\n                    } //end if\r\n                  });\r\n                })\r\n              );\r\n          }\r\n        }\r\n      });\r\n    }\r\n\r\n    //กรณีมีข้อมูล Layer จะทำการเปิด popup\r\n    if (listPromise.length > 0) {\r\n      Promise.all(listPromise).then((listResults) => {\r\n        if (listResults && listResults.length > 0) {\r\n          const listFeaturesDisplay = [];\r\n          //foreach ตามจำนวนชั้นข้อมูล\r\n          listResults.forEach((features) => {\r\n            if (features) {\r\n              //ผลลัพธ์ในแต่ละชั้นข้อมูลมีมากกว่า 1 รายการ\r\n              features.forEach((feature) => {\r\n                listFeaturesDisplay.push(feature);\r\n              });\r\n              //listFeatureDisplay.push(feature)\r\n            }\r\n          });\r\n          if (listFeaturesDisplay.length > 0) {\r\n            map.infoWindow.set('titleInBody', false);\r\n            map.infoWindow.setFeatures(listFeaturesDisplay);\r\n            map.infoWindow.show(mapPoint);\r\n          } else {\r\n            map.infoWindow.clearFeatures();\r\n            map.infoWindow.set('titleInBody', false);\r\n            map.infoWindow.setFeatures(null);\r\n            map.infoWindow.show(mapPoint);\r\n          }\r\n        } else {\r\n          map.infoWindow.clearFeatures();\r\n          map.infoWindow.hide();\r\n        }\r\n      });\r\n    }\r\n  });\r\n};\r\n\r\n//ตรวจสอบว่าจุดอยู่ในขอบเขตไหม\r\nexport const checkPermissionPointOnMap = (mapParam, { geometry, callback }) => {\r\n  EsriLoader.loadModules(['esri/geometry/geometryEngine'], options).then(([GeometryEngine]) => {\r\n    const districtLayer = getLayerByID(mapParam.map, Constants.LISTFEATURELAYER.FEATURELAYER_DISTRICT_BUFFER);\r\n    const districtGraphic = districtLayer ? districtLayer.graphics[0] : undefined;\r\n\r\n    if (!districtGraphic) {\r\n      callback(true);\r\n    } else {\r\n      const check = GeometryEngine.intersects(districtGraphic.geometry, geometry);\r\n\r\n      if (check) {\r\n        callback(true);\r\n      } else {\r\n        callback(false);\r\n      }\r\n    }\r\n  });\r\n};\r\n\r\nexport const createEvtDrawMap = (mapParam, params) => {\r\n  mapParam.map.setMapCursor('crosshair');\r\n  mapParam.drawMap.deactivate();\r\n\r\n  if (evtDrawMap) {\r\n    evtDrawMap.remove();\r\n  }\r\n  evtDrawMap = mapParam.drawMap.on('draw-complete', params.callbackDrawComplete(mapParam, params));\r\n  mapParam.drawMap.activate(params.activateType);\r\n};\r\n\r\nexport const clearEvtDrawMap = (mapParam) => {\r\n  mapParam.map.setMapCursor('default');\r\n  mapParam.drawMap.deactivate();\r\n\r\n  if (evtDrawMap) {\r\n    evtDrawMap.remove();\r\n  }\r\n};\r\n\r\n//สั่งสร้าง Draw ขอใบอนุญาตก่อสร้าง\r\nexport const drawPointConstructionLicense = (mapParam, { callback }) => {\r\n  // clearGraphicConstructionLicense(mapParam)\r\n  // mapParam.drawMeasurement.deactivate();\r\n  // mapParam.map.setMapCursor(\"crosshair\");\r\n  // if (evtDrawConstruct) {\r\n  // \tevtDrawConstruct.remove();\r\n  // }\r\n  // evtDrawConstruct = mapParam.drawConstruction.on(\"draw-complete\", addGraphicConstructionLicense(mapParam, callback));\r\n  // mapParam.drawConstruction.activate(\"point\");\r\n\r\n  createEvtDrawMap(mapParam, {\r\n    callbackDrawComplete: addGraphicConstructionLicense,\r\n    activateType: 'point',\r\n    callback,\r\n  });\r\n};\r\n\r\nexport const creatGraphicPointConstruct = (mapParam, { callback, latitude, longitude }) => {\r\n  //จากหน้าแก้ไข\r\n  EsriLoader.loadModules(\r\n    ['esri/symbols/SimpleMarkerSymbol', 'esri/graphic', 'esri/Color', 'esri/geometry/Point', 'esri/geometry/webMercatorUtils'],\r\n    options\r\n  ).then(([SimpleMarkerSymbol, Graphic, Color, Point, webMercatorUtils]) => {\r\n    clearGraphicConstructionLicense(mapParam);\r\n    // const constructionLayer = getLayerByID(mapParam.map, Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CONSTRUCTION_LICENSE);\r\n\r\n    const geoMercator = webMercatorUtils.lngLatToXY(longitude, latitude);\r\n    const point = new Point(geoMercator[0], geoMercator[1], {\r\n      wkid: 102100,\r\n      latestWkid: 3857,\r\n    });\r\n    const symbol = new SimpleMarkerSymbol({\r\n      color: Color([25, 179, 25]),\r\n      type: 'simplemarkersymbol',\r\n      style: 'STYLE_CIRCLE',\r\n      outline: {\r\n        color: Color([0, 0, 0]),\r\n        width: 1,\r\n      },\r\n    });\r\n    const graphic = new Graphic(point, symbol);\r\n\r\n    graphic.setAttributes({\r\n      CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CONSTRUCTION_LICENSE,\r\n    });\r\n    mapParam.map.graphics.add(graphic);\r\n\r\n    // constructionLayer.add(graphic);\r\n    mapParam.map.centerAndZoom(point, 18);\r\n    callback({ geometry: point }, graphic);\r\n  });\r\n};\r\n\r\n//หลังวาด ขอใบอนุญาตก่อสร้างเสร็จ\r\nconst addGraphicConstructionLicense = (mapParam, { callback }) => (evt) => {\r\n  // clearGraphicConstructionLicense(mapParam)\r\n  EsriLoader.loadModules(['esri/symbols/SimpleMarkerSymbol', 'esri/graphic', 'esri/Color'], options).then(([SimpleMarkerSymbol, Graphic, Color]) => {\r\n    clearGraphicConstructionLicense(mapParam);\r\n    const symbol = new SimpleMarkerSymbol({\r\n      color: Color([25, 179, 25]),\r\n      type: 'simplemarkersymbol',\r\n      style: 'STYLE_CIRCLE',\r\n      outline: {\r\n        color: Color([0, 0, 0]),\r\n        width: 1,\r\n      },\r\n    });\r\n    const graphic = new Graphic(evt.geometry, symbol);\r\n    callback(evt, graphic);\r\n    graphic.setAttributes({\r\n      CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CONSTRUCTION_LICENSE,\r\n    });\r\n    mapParam.map.graphics.add(graphic);\r\n  });\r\n};\r\n\r\nexport const currentLocationConstructionLicense = (mapParam, params) => {\r\n  //console.log(\"currentLocationConstructionLicense\",currentLocationConstructionLicense)\r\n  if (!current) {\r\n    alert('กรุณาเปิด GPS');\r\n    return;\r\n  }\r\n  EsriLoader.loadModules(\r\n    [\r\n      'esri/symbols/SimpleMarkerSymbol',\r\n      'esri/graphic',\r\n      'esri/Color',\r\n      'esri/geometry/Point',\r\n      'esri/geometry/webMercatorUtils',\r\n      'esri/SpatialReference',\r\n      // \"esri/symbols/PictureMarkerSymbol\",\r\n    ],\r\n    options\r\n  ).then(([SimpleMarkerSymbol, Graphic, Color, Point, webMercatorUtils, SpatialReference]) => {\r\n    // PictureMarkerSymbol\r\n    let symbol = null;\r\n    // const constructionLayer = getLayerByID(mapParam.map, Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CONSTRUCTION_LICENSE);\r\n    // constructionLayer.clear();\r\n    clearGraphicConstructionLicense(mapParam);\r\n    let webMercator = webMercatorUtils.lngLatToXY(current.long, current.lat);\r\n    let newPoint = new Point(webMercator, new SpatialReference({ wkid: 102100, latestWkid: 3857 }));\r\n\r\n    symbol = new SimpleMarkerSymbol({\r\n      color: Color([25, 179, 25]),\r\n      type: 'simplemarkersymbol',\r\n      style: 'STYLE_CIRCLE',\r\n      outline: {\r\n        color: Color([0, 0, 0]),\r\n        width: 1,\r\n      },\r\n    });\r\n\r\n    // const editGraphicLayer = getLayerByID(mapParam.map, Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CONSTRUCTION_HIGHLIGHT);\r\n    // const selectionSymbol = new PictureMarkerSymbol(\"http://www.clipartandgraphics.com/images/borders/coloroval.gif\", 50, 50);\r\n\r\n    // const graphicBorder = new Graphic(newPoint, selectionSymbol, 50, 50);\r\n    // editGraphicLayer.clear();\r\n    // editGraphicLayer.add(graphicBorder);\r\n\r\n    const graphic = new Graphic(newPoint, symbol);\r\n\r\n    graphic.setAttributes({\r\n      CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CONSTRUCTION_LICENSE,\r\n    });\r\n    mapParam.map.graphics.add(graphic);\r\n    // constructionLayer.add(graphic);\r\n    params.callback({ geometry: newPoint }, graphic);\r\n  });\r\n};\r\n\r\nexport const editGraphicConstructionLicense = (mapParam, { graphic, callback }) => {\r\n  EsriLoader.loadModules(\r\n    ['esri/toolbars/edit', 'esri/symbols/PictureMarkerSymbol', 'esri/graphic', 'esri/symbols/SimpleMarkerSymbol', 'esri/Color'],\r\n    options\r\n  ).then(([Edit, PictureMarkerSymbol, Graphic, SimpleMarkerSymbol, Color]) => {\r\n    // const editGraphicLayer = getLayerByID(mapParam.map, Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CONSTRUCTION_HIGHLIGHT);\r\n    const selectionSymbol = new PictureMarkerSymbol(Constants.IMG_HIGHLIGHT_POINT, 50, 50);\r\n    const graphicBorder = new Graphic(graphic.geometry, selectionSymbol, 50, 50);\r\n    if (editConstruct) {\r\n      editConstruct = null;\r\n    }\r\n\r\n    if (gpMoveConstruct) {\r\n      gpMoveConstruct.remove();\r\n    }\r\n\r\n    // editGraphicLayer.clear();\r\n    clearGraphic(mapParam, [Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CONSTRUCTION_HIGHLIGHT]);\r\n    graphicBorder.setAttributes({\r\n      CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CONSTRUCTION_HIGHLIGHT,\r\n    });\r\n    mapParam.map.graphics.add(graphicBorder);\r\n    // editGraphicLayer.add(graphicBorder);\r\n\r\n    //////////////////// draw point ใหม่ เพื่อให้ layer นี้มีลำดับการแสดงผลอยู่ข้างบนตัว layer ของ highlight ////////////////////////////////\r\n    clearGraphic(mapParam, [Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CONSTRUCTION_LICENSE]);\r\n    const pointSymbol = new SimpleMarkerSymbol({\r\n      color: Color([25, 179, 25]),\r\n      type: 'simplemarkersymbol',\r\n      style: 'STYLE_CIRCLE',\r\n      outline: {\r\n        color: Color([0, 0, 0]),\r\n        width: 1,\r\n      },\r\n    });\r\n    const graphicPoint = new Graphic(graphic.geometry, pointSymbol);\r\n\r\n    graphicPoint.setAttributes({\r\n      CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CONSTRUCTION_LICENSE,\r\n    });\r\n    mapParam.map.graphics.add(graphicPoint);\r\n\r\n    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n    editConstruct = new Edit(mapParam.map);\r\n    editConstruct.activate(Edit.MOVE, graphicPoint);\r\n\r\n    gpMoveConstruct = editConstruct.on('graphic-move-stop', ({ graphic }) => {\r\n      if (graphic && graphic.geometry) {\r\n        const graphicBorder = new Graphic(graphic.geometry, selectionSymbol, 50, 50);\r\n        const graphicPoint = new Graphic(graphic.geometry, pointSymbol);\r\n        // editGraphicLayer.clear();\r\n        // editGraphicLayer.add(graphicBorder);\r\n        clearGraphic(mapParam, [\r\n          Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CONSTRUCTION_HIGHLIGHT,\r\n          Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CONSTRUCTION_LICENSE,\r\n        ]);\r\n        graphicBorder.setAttributes({\r\n          CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CONSTRUCTION_HIGHLIGHT,\r\n        });\r\n        mapParam.map.graphics.add(graphicBorder);\r\n\r\n        //////////////////// draw point ใหม่ เพื่อให้ layer นี้มีลำดับการแสดงผลอยู่ข้างบนตัว layer ของ highlight ////////////////////////////////\r\n        graphicPoint.setAttributes({\r\n          CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CONSTRUCTION_LICENSE,\r\n        });\r\n        mapParam.map.graphics.add(graphicPoint);\r\n        //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\r\n        editConstruct.activate(Edit.MOVE, graphicPoint);\r\n        callback(graphic.geometry, graphic);\r\n      }\r\n    });\r\n  });\r\n};\r\n\r\nexport const clearGraphicConstructionLicense = (mapParam) => {\r\n  // mapParam.drawConstruction.deactivate();\r\n  // mapParam.map.setMapCursor(\"default\");\r\n\r\n  clearEvtDrawMap(mapParam);\r\n  clearGraphic(mapParam, [\r\n    Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CONSTRUCTION_LICENSE,\r\n    Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CONSTRUCTION_HIGHLIGHT,\r\n  ]);\r\n\r\n  editConstruct = null;\r\n\r\n  if (gpMoveConstruct) {\r\n    gpMoveConstruct.remove();\r\n  }\r\n  // if (evtDrawConstruct) {\r\n  // \tevtDrawConstruct.remove();\r\n  // }\r\n};\r\n\r\nexport const clearGraphicHouseNumber = (mapParam) => {\r\n  clearEvtDrawMap(mapParam);\r\n  clearGraphic(mapParam, [\r\n    Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CONSTRUCTION_LICENSE,\r\n    Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CONSTRUCTION_HIGHLIGHT,\r\n    Constants.LISTGRAPHICLAYER.GRAPHICLAYER_LAND_PLOT,\r\n    Constants.LISTGRAPHICLAYER.GRAPHICLAYER_LAND_PLOT_TEXT,\r\n  ]);\r\n\r\n  editConstruct = null;\r\n\r\n  if (gpMoveConstruct) {\r\n    gpMoveConstruct.remove();\r\n  }\r\n};\r\n\r\nexport const clearEditConstruct = (mapParam) => {\r\n  // const editGraphicLayer = getLayerByID(mapParam.map, Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CONSTRUCTION_HIGHLIGHT);\r\n  // editGraphicLayer.clear();\r\n  clearGraphic(mapParam, [Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CONSTRUCTION_HIGHLIGHT]);\r\n\r\n  if (gpMoveConstruct) {\r\n    gpMoveConstruct.remove();\r\n  }\r\n\r\n  if (editConstruct) {\r\n    editConstruct.deactivate();\r\n  }\r\n};\r\n\r\nexport const deActivateConstruct = (mapParam) => {\r\n  // if (evtDrawDraft) {\r\n  // \tevtDrawDraft.remove();\r\n  // }\r\n  // mapParam.map.setMapCursor(\"default\");\r\n  // mapParam.drawConstruction.deactivate();\r\n  clearEvtDrawMap(mapParam);\r\n};\r\n\r\nexport const addConstructionLicense = (param) => {\r\n  EsriLoader.loadModules(['esri/layers/FeatureLayer', 'esri/graphic', 'esri/geometry/webMercatorUtils'], options).then(\r\n    async ([FeatureLayer, Graphic, webMercatorUtils]) => {\r\n      const featureLayer = new FeatureLayer(`${window.CONFIG_URL_GIS.CONSTRUCT_PNT}`);\r\n      let geoUTM = null;\r\n      if (param.geometry) {\r\n        const geoLatLong = webMercatorUtils.xyToLngLat(param.geometry.x, param.geometry.y);\r\n        geoUTM = await MapUtils.getCoordinateConvertByLatLong(geoLatLong[0], geoLatLong[1]);\r\n      }\r\n      var gp = new Graphic();\r\n      gp.setGeometry(param.geometry);\r\n      gp.setAttributes({\r\n        CONSTRUCT_ID: param.constructID,\r\n        APPLICATION_TYPE: param.applicationType,\r\n        APPLICANT_NAME: param.name,\r\n        APPLICATION_DATE: param.applicationDate,\r\n        PERMISSION_ID: param.permissionID,\r\n        HOUSE_NO: param.houseNo,\r\n        MOO: param.moo,\r\n        SOI: param.soi,\r\n        ROAD: param.road,\r\n        SUBDISTRICT_ID: param.subDistrictID,\r\n        DISTRICT_ID: param.districtID,\r\n        PROVINCE_ID: 10,\r\n        NUM_BLDG: param.numBLDG, // จำนวนอาคารที่ก่อสร้าง,\r\n        PMR1_ID: param.pmr1ID,\r\n        CONTRUCT_TYPE: param.constructType,\r\n        CHANODE_NO: param.chanodeNO, // หมายเลขโฉนด,\r\n        LAND_NO: param.landNo, // หมายเลขที่ดิน,\r\n        PERMISSION_DATE: param.permissionDate,\r\n        OWNER_NAME: param.ownerName, // ชื่อผู้ได้รับอนุญาต,\r\n        TROK: param.trok, // ตรอก,\r\n        APPLICANT_TELNO: param.applicantTelNo, // เบอร์โทรศัพท์ผู้ยื่นคำขอ,\r\n        USE_AREA: param.landuseArea,\r\n        CREATOR: param.userID,\r\n        CREATED_DATE: param.createDate,\r\n        UPDATER: param.userID,\r\n        UPDATED_DATE: param.createDate,\r\n        REMARK: param.remark, // หมายเหตุ\r\n        H_XCOOR: geoUTM && geoUTM.utmZ47 && geoUTM.utmZ47.x,\r\n        H_YCOOR: geoUTM && geoUTM.utmZ47 && geoUTM.utmZ47.y,\r\n      });\r\n\r\n      featureLayer.applyEdits(\r\n        [gp],\r\n        null,\r\n        null,\r\n        (evt) => {\r\n          if (evt && evt[0]) {\r\n            param.callback({ ...evt[0], ...param });\r\n          } else {\r\n            param.callback();\r\n          }\r\n        },\r\n        (error) => {\r\n          console.log('ex addConstructionLicense', error);\r\n          param.callback();\r\n        }\r\n      );\r\n    }\r\n  );\r\n};\r\n\r\nexport const updateConstructionLicense = (param) => {\r\n  EsriLoader.loadModules(['esri/graphic', 'esri/geometry/webMercatorUtils'], options).then(async ([Graphic, webMercatorUtils]) => {\r\n    const geoMercatorPrev = webMercatorUtils.lngLatToXY(param.geometryPrev.longitude, param.geometryPrev.latitude);\r\n    var gp = new Graphic();\r\n\r\n    let geoUTM = null;\r\n    if (geoMercatorPrev[0] !== param.geometry.x || geoMercatorPrev[1] !== param.geometry.y) {\r\n      //เช็คว่ามีการแก้ไขตำแหน่งไหม\r\n      gp.setGeometry(param.geometry);\r\n\r\n      const geoLatLong = webMercatorUtils.xyToLngLat(param.geometry.x, param.geometry.y);\r\n      geoUTM = await MapUtils.getCoordinateConvertByLatLong(geoLatLong[0], geoLatLong[1]);\r\n    }\r\n\r\n    gp.setAttributes({\r\n      OBJECTID: param.objectID,\r\n      CONSTRUCT_ID: param.constructID,\r\n      APPLICATION_TYPE: param.applicationType,\r\n      APPLICANT_NAME: param.name,\r\n      APPLICATION_DATE: param.applicationDate,\r\n      PERMISSION_ID: param.permissionID,\r\n      HOUSE_NO: param.houseNo,\r\n      MOO: param.moo,\r\n      SOI: param.soi,\r\n      ROAD: param.road,\r\n      SUBDISTRICT_ID: param.subDistrictID,\r\n      DISTRICT_ID: param.districtID,\r\n      PROVINCE_ID: 10,\r\n      NUM_BLDG: param.numBLDG, // จำนวนอาคารที่ก่อสร้าง,\r\n      PMR1_ID: param.pmr1ID,\r\n      CONTRUCT_TYPE: param.constructType,\r\n      CHANODE_NO: param.chanodeNO, // หมายเลขโฉนด,\r\n      LAND_NO: param.landNo, // หมายเลขที่ดิน,\r\n      PERMISSION_DATE: param.permissionDate,\r\n      OWNER_NAME: param.ownerName, // ชื่อผู้ได้รับอนุญาต,\r\n      TROK: param.trok, // ตรอก,\r\n      APPLICANT_TELNO: param.applicantTelNo, // เบอร์โทรศัพท์ผู้ยื่นคำขอ,\r\n      USE_AREA: param.landuseArea,\r\n      UPDATER: param.userID,\r\n      UPDATED_DATE: param.updateDate,\r\n      REMARK: param.remark, // หมายเหตุ\r\n      H_XCOOR: geoUTM && geoUTM.utmZ47 && geoUTM.utmZ47.x,\r\n      H_YCOOR: geoUTM && geoUTM.utmZ47 && geoUTM.utmZ47.y,\r\n    });\r\n\r\n    const dataFeatures = JSON.stringify([\r\n      {\r\n        geometry: gp.geometry,\r\n        attributes: gp.attributes,\r\n      },\r\n    ]);\r\n\r\n    const formData = new FormData();\r\n    formData.append('Features', dataFeatures);\r\n    formData.append('rollbackOnFailure', true);\r\n    formData.append('f', 'json');\r\n\r\n    fetchMapService(`${window.CONFIG_URL_GIS.CONSTRUCT_PNT}/updateFeatures`, formData)\r\n      .then((res) => {\r\n        if (!res.ok) {\r\n          throw res.status;\r\n        }\r\n        return res.json();\r\n      })\r\n      .then((result) => {\r\n        if (result && result.updateResults && result.updateResults.length && result.updateResults[0].success) {\r\n          param.callback(param);\r\n        } else {\r\n          param.callback();\r\n        }\r\n      })\r\n      .catch((ex) => {\r\n        param.callback();\r\n        console.log('ex ', ex);\r\n      });\r\n  });\r\n};\r\n\r\nexport const addShapeTr900 = (mapParam, param) => {\r\n  EsriLoader.loadModules(['esri/layers/FeatureLayer', 'esri/graphic', 'esri/geometry/webMercatorUtils'], options).then(\r\n    async ([FeatureLayer, Graphic, webMercatorUtils]) => {\r\n      const {\r\n        districtid,\r\n        housetrid,\r\n        numberofhouse,\r\n        permissionid,\r\n        provinceid,\r\n        road,\r\n        soi,\r\n        subdistrictid,\r\n        tr31id,\r\n        moo,\r\n        regDate,\r\n        applicantName,\r\n        applicantTelNo,\r\n        ownerName,\r\n        houseType,\r\n        houseTypeDetail,\r\n        houseMaterial,\r\n        numFloor,\r\n        bldgArea,\r\n        remark,\r\n        chanodeNo,\r\n        landNo,\r\n      } = param.stepTwo;\r\n      const featureLayer = new FeatureLayer(param.url);\r\n\r\n      let geoUTM = null;\r\n\r\n      if (param.geometry) {\r\n        const geoLatLong = webMercatorUtils.xyToLngLat(param.geometry.x, param.geometry.y);\r\n        geoUTM = await MapUtils.getCoordinateConvertByLatLong(geoLatLong[0], geoLatLong[1]);\r\n      }\r\n\r\n      var gp = new Graphic();\r\n      gp.setGeometry(param.geometry);\r\n      gp.setAttributes({\r\n        CONSTRUCT_RNO: null,\r\n        TR31_ID: tr31id,\r\n        HOUSE_RNO: null,\r\n        HOUSE_TR_ID: housetrid,\r\n        PERMISSION_ID: permissionid,\r\n        NUM_HOUSE: numberofhouse,\r\n        SOI: soi,\r\n        ROAD: road,\r\n        SUBDISTRICT_ID: subdistrictid,\r\n        DISTRICT_ID: districtid,\r\n        PROVINCE_ID: provinceid,\r\n        MOO: moo,\r\n        CREATED_DATE: param.createDate,\r\n        CREATOR: param.userID,\r\n        UPDATER: param.userID,\r\n        UPDATED_DATE: param.createDate,\r\n        REG_DATE: regDate,\r\n        APPLICANT_NAME: applicantName,\r\n        APPLICANT_TELNO: applicantTelNo,\r\n        OWNER_NAME: ownerName,\r\n        HOUSE_TYPE: houseType,\r\n        HOUSE_TYPE_DETAIL: houseTypeDetail,\r\n        HOUSE_MATL: houseMaterial,\r\n        NUM_FLOOR: numFloor,\r\n        BLDG_AREA: bldgArea,\r\n        REMARK: remark,\r\n        CHANODE_NO: chanodeNo,\r\n        LAND_NO: landNo,\r\n        H_XCOOR: geoUTM && geoUTM.utmZ47 && geoUTM.utmZ47.x,\r\n        H_YCOOR: geoUTM && geoUTM.utmZ47 && geoUTM.utmZ47.y,\r\n      });\r\n\r\n      featureLayer.applyEdits(\r\n        [gp],\r\n        null,\r\n        null,\r\n        (evt) => {\r\n          if (evt) {\r\n            let callbackResult = { ...evt[0], ...param }; //merge object\r\n            param.callback(callbackResult);\r\n          }\r\n        },\r\n        (error) => {\r\n          console.log(error);\r\n        }\r\n      );\r\n      //    mapParam.map.addLayer(featureLayer)\r\n    }\r\n  );\r\n};\r\n\r\nexport const editShapeTr900 = (mapParam, param) => {\r\n  EsriLoader.loadModules(['esri/layers/FeatureLayer', 'esri/graphic', 'esri/geometry/webMercatorUtils'], options).then(\r\n    async ([FeatureLayer, Graphic, webMercatorUtils]) => {\r\n      const {\r\n        objectid,\r\n        districtid,\r\n        housetrid,\r\n        numberofhouse,\r\n        permissionid,\r\n        provinceid,\r\n        road,\r\n        soi,\r\n        subdistrictid,\r\n        tr31id,\r\n        moo,\r\n        regDate,\r\n        applicantName,\r\n        applicantTelNo,\r\n        ownerName,\r\n        houseType,\r\n        houseTypeDetail,\r\n        houseMaterial,\r\n        numFloor,\r\n        bldgArea,\r\n        remark,\r\n        chanodeNo,\r\n        landNo,\r\n      } = param.stepTwo;\r\n      // const featureLayer = new FeatureLayer(param.url);\r\n      let geoUTM = null;\r\n      if (param.geometry) {\r\n        const geoLatLong = webMercatorUtils.xyToLngLat(param.geometry.x, param.geometry.y);\r\n        geoUTM = await MapUtils.getCoordinateConvertByLatLong(geoLatLong[0], geoLatLong[1]);\r\n      }\r\n\r\n      // let event = null;\r\n      // let callbackResult = null;\r\n      var gp = new Graphic();\r\n      gp.setGeometry(param.geometry);\r\n      gp.setAttributes({\r\n        OBJECTID: objectid,\r\n        CONSTRUCT_RNO: null,\r\n        TR31_ID: tr31id,\r\n        HOUSE_RNO: objectid,\r\n        HOUSE_TR_ID: housetrid,\r\n        PERMISSION_ID: permissionid,\r\n        NUM_HOUSE: numberofhouse,\r\n        SOI: soi,\r\n        ROAD: road,\r\n        SUBDISTRICT_ID: subdistrictid,\r\n        DISTRICT_ID: districtid,\r\n        PROVINCE_ID: provinceid,\r\n        MOO: moo,\r\n        UPDATER: param.userID,\r\n        UPDATED_DATE: param.updateDate,\r\n        REG_DATE: regDate,\r\n        APPLICANT_NAME: applicantName,\r\n        APPLICANT_TELNO: applicantTelNo,\r\n        OWNER_NAME: ownerName,\r\n        HOUSE_TYPE: houseType && houseType,\r\n        HOUSE_TYPE_DETAIL: houseTypeDetail,\r\n        HOUSE_MATL: houseMaterial,\r\n        NUM_FLOOR: numFloor,\r\n        BLDG_AREA: bldgArea,\r\n        REMARK: remark,\r\n        CHANODE_NO: chanodeNo,\r\n        LAND_NO: landNo,\r\n        H_XCOOR: geoUTM && geoUTM.utmZ47 && geoUTM.utmZ47.x,\r\n        H_YCOOR: geoUTM && geoUTM.utmZ47 && geoUTM.utmZ47.y,\r\n      });\r\n\r\n      const dataFeatures = JSON.stringify([\r\n        {\r\n          geometry: gp.geometry,\r\n          attributes: gp.attributes,\r\n        },\r\n      ]);\r\n\r\n      const formData = new FormData();\r\n      formData.append('Features', dataFeatures);\r\n      formData.append('rollbackOnFailure', true);\r\n      formData.append('f', 'json');\r\n\r\n      fetchMapService(`${param.url}/updateFeatures`, formData)\r\n        .then((res) => {\r\n          if (!res.ok) {\r\n            throw res.status;\r\n          }\r\n          return res.json();\r\n        })\r\n        .then((result) => {\r\n          if (result && result.updateResults && result.updateResults.length && result.updateResults[0].success) {\r\n            param.callback({ ...result.updateResults[0], ...param });\r\n          } else {\r\n            param.callback();\r\n          }\r\n        })\r\n        .catch((ex) => {\r\n          param.callback();\r\n          console.log('ex ', ex);\r\n        });\r\n\r\n      // featureLayer.applyEdits(null, [gp], null, (evt) => {\r\n      // \tevent = evt\r\n      // \tif (evt) {\r\n      // \t\tcallbackResult = { ...evt[0], ...param };  //merge object\r\n      // \t\tparam.callback(callbackResult)\r\n      // \t}\r\n      // }, (error) => {\r\n      // \tcallbackResult = { ...event[0], ...param };\r\n      // \tparam.callback(callbackResult)\r\n      // });\r\n      // let event2 = { objectId: objectid, success: true };\r\n      // let callbackResult2 = { ...event2, ...param };\r\n      // param.callback(callbackResult2)\r\n    }\r\n  );\r\n};\r\n\r\nexport const drawGraphicSearchConstruct = (mapParam, params) => {\r\n  EsriLoader.loadModules(\r\n    [\r\n      'esri/symbols/SimpleMarkerSymbol',\r\n      'esri/graphic',\r\n      'esri/Color',\r\n      'esri/geometry/Point',\r\n      'esri/geometry/webMercatorUtils',\r\n      'esri/SpatialReference',\r\n    ],\r\n    options\r\n  ).then(([SimpleMarkerSymbol, Graphic, Color, Point, webMercatorUtils, SpatialReference]) => {\r\n    clearGraphic(mapParam, [Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CONSTRUCTION_DETAIL]);\r\n\r\n    const geoMercator = webMercatorUtils.lngLatToXY(params.longitude, params.latitude);\r\n    const point = new Point(geoMercator, new SpatialReference({ wkid: 102100, latestWkid: 3857 }));\r\n    const symbol = new SimpleMarkerSymbol({\r\n      // color: Color([25, 179, 25]),\r\n      color: Color([255, 153, 51]),\r\n      type: 'simplemarkersymbol',\r\n      style: 'STYLE_CIRCLE',\r\n      outline: {\r\n        color: Color([0, 0, 0]),\r\n        width: 1,\r\n      },\r\n    });\r\n    const graphic = new Graphic(point, symbol);\r\n\r\n    graphic.setAttributes({\r\n      CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CONSTRUCTION_DETAIL,\r\n    });\r\n    mapParam.map.graphics.add(graphic);\r\n    mapParam.map.centerAndZoom(point, 18);\r\n  });\r\n};\r\n\r\nexport const clearGraphicSearchConstruct = (mapParam, params) => {\r\n  clearGraphic(mapParam, [Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CONSTRUCTION_DETAIL]);\r\n};\r\n\r\n// add FeatureLayer เมื่อเปิดแต่ละ function\r\nexport const addFeatureLayer = (mapParam, { mapserviceURL, layerID }) => {\r\n  EsriLoader.loadModules(['esri/layers/FeatureLayer'], options).then(([FeatureLayer]) => {\r\n    if (mapParam.map.graphicsLayerIds.indexOf(layerID) === -1) {\r\n      const layer = new FeatureLayer(mapserviceURL, {\r\n        id: layerID,\r\n        visible: true,\r\n        outFields: ['*'],\r\n      });\r\n      mapParam.map.addLayer(layer);\r\n    }\r\n  });\r\n};\r\n\r\nexport const clearLayers = (mapParam, listLayer) => {\r\n  listLayer.forEach((layerID) => {\r\n    const layer = mapParam.map.getLayer(layerID);\r\n    if (layer) {\r\n      mapParam.map.removeLayer(layer);\r\n    }\r\n  });\r\n};\r\n\r\nexport const drawDraftLine = (mapParam, { callback, isActivateDraw = true }) => {\r\n  EsriLoader.loadModules(['esri/toolbars/draw', 'esri/geometry/geometryEngine'], options).then(([Draw, GeometryEngine]) => {\r\n    // if (evtDrawDraft) {\r\n    // \tevtDrawDraft.remove();\r\n    // }\r\n\r\n    if (isActivateDraw) {\r\n      // mapParam.drawMap.deactivate();\r\n      // mapParam.map.setMapCursor(\"crosshair\");\r\n      // evtDrawDraft = mapParam.drawMap.on(\"draw-complete\", evt => {\r\n      // \tconst distance = GeometryEngine.geodesicLength(evt.geometry, \"kilometers\");\r\n      // \tif (distance < 10) {\r\n      // \t\taddGraphicDraft(mapParam, { evt, callback, type: Draw.LINE })\r\n      // \t} else {\r\n      // \t\tcallback(null)\r\n      // \t}\r\n      // });\r\n      // mapParam.drawMap.activate(Draw.POLYLINE);\r\n\r\n      createEvtDrawMap(mapParam, {\r\n        activateType: Draw.POLYLINE,\r\n        callbackDrawComplete: () => (evt) => {\r\n          const distance = GeometryEngine.geodesicLength(evt.geometry, 'kilometers');\r\n          if (distance < 10) {\r\n            addGraphicDraft(mapParam, {\r\n              evt,\r\n              callback,\r\n              type: Draw.LINE,\r\n            });\r\n          } else {\r\n            callback(null);\r\n          }\r\n        },\r\n      });\r\n    } else {\r\n      // mapParam.drawMap.deactivate();\r\n      // mapParam.map.setMapCursor(\"default\");\r\n      clearEvtDrawMap(mapParam);\r\n    }\r\n  });\r\n};\r\n\r\nexport const drawDraftPolygon = (mapParam, { status = true, callback, alertFn }) => {\r\n  EsriLoader.loadModules(['esri/toolbars/draw', 'esri/geometry/geometryEngine'], options).then(([Draw, GeometryEngine]) => {\r\n    // if (evtDrawDraft) {\r\n    // \tevtDrawDraft.remove();\r\n    // }\r\n    if (gpMoveDraftPolygonLine) {\r\n      gpMoveDraftPolygonLine.remove();\r\n    }\r\n\r\n    if (!status) {\r\n      // mapParam.drawMap.deactivate();\r\n      // mapParam.map.setMapCursor(\"default\");\r\n      clearEvtDrawMap(mapParam);\r\n      return;\r\n    }\r\n    // mapParam.drawMap.deactivate();\r\n    // mapParam.map.setMapCursor(\"crosshair\");\r\n\r\n    // evtDrawDraft = mapParam.drawMap.on(\"draw-complete\", evt => {\r\n    // \tconst area = GeometryEngine.geodesicArea(evt.geometry, \"square-kilometers\");\r\n    // \tif (evt.geometry && area <= 10) {\r\n    // \t\taddGraphicDraft(mapParam, { evt, callback, type: Draw.POLYGON })\r\n    // \t} else {\r\n    // \t\talertFn && alertFn({ altMsg: \"กรุณากำหนดพื้นที่ไม่เกิน 10 ตร.กม.\" })\r\n    // \t}\r\n    // });\r\n    // mapParam.drawMap.activate(Draw.POLYGON);\r\n\r\n    createEvtDrawMap(mapParam, {\r\n      activateType: Draw.POLYGON,\r\n      callbackDrawComplete: () => (evt) => {\r\n        const area = GeometryEngine.geodesicArea(evt.geometry, 'square-kilometers');\r\n        if (evt.geometry && area <= 10) {\r\n          addGraphicDraft(mapParam, {\r\n            evt,\r\n            callback,\r\n            type: Draw.POLYGON,\r\n          });\r\n        } else {\r\n          alertFn &&\r\n            alertFn({\r\n              altMsg: 'กรุณากำหนดพื้นที่ไม่เกิน 10 ตร.กม.',\r\n            });\r\n        }\r\n      },\r\n    });\r\n  });\r\n};\r\n\r\nexport const drawDraftPnt = (mapParam, { callback }) => {\r\n  EsriLoader.loadModules(['esri/toolbars/draw'], options).then(([Draw]) => {\r\n    // if (evtDrawDraft) {\r\n    // \tevtDrawDraft.remove();\r\n    // }\r\n    // mapParam.drawMap.deactivate();\r\n    // mapParam.map.setMapCursor(\"crosshair\");\r\n    // evtDrawDraft = mapParam.drawMap.on(\"draw-complete\", evt => {\r\n    // \taddGraphicDraft(mapParam, { evt, callback, type: Draw.POINT })\r\n    // });\r\n    // mapParam.drawMap.activate(Draw.POINT);\r\n\r\n    createEvtDrawMap(mapParam, {\r\n      activateType: Draw.POINT,\r\n      callbackDrawComplete: () => (evt) => {\r\n        addGraphicDraft(mapParam, { evt, callback, type: Draw.POINT });\r\n      },\r\n    });\r\n  });\r\n};\r\n\r\nexport const deActivateDraftPnt = (mapParam) => {\r\n  // if (evtDrawDraft) {\r\n  // \tevtDrawDraft.remove();\r\n  // }\r\n  // mapParam.map.setMapCursor(\"default\");\r\n  // mapParam.drawMap.deactivate();\r\n  clearEvtDrawMap(mapParam);\r\n};\r\n\r\nexport const editGraphicDraftLine = (mapParam, { isActivateEdit = true, graphic, geometry, callback }) => {\r\n  EsriLoader.loadModules(['esri/toolbars/edit', 'esri/symbols/PictureMarkerSymbol', 'esri/geometry/geometryEngine', 'esri/graphic'], options).then(\r\n    ([Edit, PictureMarkerSymbol, GeometryEngine, Graphic]) => {\r\n      if (isActivateEdit) {\r\n        //เเป็นการช็คว่าจะเปิดหรือปิดการ edit\r\n        if (graphic) {\r\n          if (editDraftLine) {\r\n            editDraftLine.deactivate();\r\n            editDraftLine = null;\r\n          }\r\n\r\n          if (gpMoveDraftLine) {\r\n            gpMoveDraftLine.remove();\r\n          }\r\n\r\n          editDraftLine = new Edit(mapParam.map);\r\n          editDraftLine.activate(Edit.MOVE | Edit.ROTATE | Edit.EDIT_VERTICES | Edit.SCALE, graphic);\r\n\r\n          gpMoveDraftLine = editDraftLine.on('scale-stop', ({ graphic }) => {\r\n            // console.log(\"scale-stop>>\", graphic)\r\n            if (graphic && graphic.geometry) {\r\n              const distance = GeometryEngine.geodesicLength(graphic.geometry, 'kilometers');\r\n              // console.log(\"distance>>\", distance)\r\n              callback && callback(graphic.geometry, distance);\r\n            }\r\n          });\r\n\r\n          gpMoveDraftLine = editDraftLine.on('vertex-move-stop', ({ graphic }) => {\r\n            // console.log(\"vertex-move-stop>>\", graphic)\r\n            if (graphic && graphic.geometry) {\r\n              const distance = GeometryEngine.geodesicLength(graphic.geometry, 'kilometers');\r\n              // console.log(\"distance>>\", distance)\r\n              callback && callback(graphic.geometry, distance);\r\n            }\r\n          });\r\n\r\n          gpMoveDraftLine = editDraftLine.on('graphic-move-stop', ({ graphic }) => {\r\n            if (graphic && graphic.geometry) {\r\n              const distance = GeometryEngine.geodesicLength(graphic.geometry, 'kilometers');\r\n              callback && callback(graphic.geometry, distance);\r\n            }\r\n          });\r\n        } else {\r\n          callback && callback(null);\r\n        }\r\n      } else {\r\n        if (editDraftLine) {\r\n          editDraftLine.deactivate();\r\n          editDraftLine = null;\r\n        }\r\n\r\n        if (gpMoveDraftLine) {\r\n          gpMoveDraftLine.remove();\r\n        }\r\n        return;\r\n      }\r\n    }\r\n  );\r\n};\r\n\r\nexport const editGraphicDraftPolygonLine = (mapParam, { status = true, graphic, callback = null, alertFn }) => {\r\n  EsriLoader.loadModules(['esri/toolbars/edit', 'esri/symbols/PictureMarkerSymbol', 'esri/graphic', 'esri/geometry/geometryEngine'], options).then(\r\n    ([Edit, PictureMarkerSymbol, Graphic, GeometryEngine]) => {\r\n      if (!status) {\r\n        editDraftPnt && editDraftPnt.deactivate();\r\n        callback && callback(graphic.geometry, false);\r\n        return;\r\n      }\r\n      if (editDraftPnt) {\r\n        editDraftPnt.deactivate();\r\n        editDraftPnt = null;\r\n      }\r\n\r\n      if (gpMoveDraftPolygonLine) {\r\n        gpMoveDraftPolygonLine.remove();\r\n      }\r\n\r\n      editDraftPnt = new Edit(mapParam.map);\r\n      editDraftPnt.activate(Edit.MOVE | Edit.ROTATE | Edit.EDIT_VERTICES, graphic);\r\n\r\n      // gpMoveDraftPolygonLine = editDraftPnt.on(\"graphic-move-stop\", ({ graphic }) => {\r\n      // \tif (graphic && graphic.geometry) {\r\n\r\n      // \t\tconst area = GeometryEngine.geodesicArea(graphic.geometry, \"square-kilometers\");\r\n      // \t\tconsole.log(\"area\",area)\r\n      // \t\tcallback && callback(graphic.geometry, true)\r\n      // \t}\r\n      // })\r\n\r\n      gpMoveDraftPolygonLine = editDraftPnt.on('graphic-move-stop', ({ graphic }) => {\r\n        CalculateArea(graphic, callback, alertFn);\r\n      });\r\n      // gpMoveDraftPolygonVertex = editDraftPnt.on(\"vertex-move-stop\", ({ graphic }) => {\r\n      // \tCalculateArea(graphic, callback, alertFn)\r\n      // })\r\n      editDraftPnt.on('vertex-move-stop', ({ graphic }) => {\r\n        CalculateArea(graphic, callback, alertFn);\r\n      });\r\n    }\r\n  );\r\n};\r\nconst CalculateArea = (graphic, callback, alertFn) => {\r\n  EsriLoader.loadModules(['esri/geometry/geometryEngine'], options).then(([GeometryEngine]) => {\r\n    if (graphic && graphic.geometry) {\r\n      const area = GeometryEngine.geodesicArea(graphic.geometry, 'square-kilometers');\r\n      if (area <= 10) {\r\n        callback && callback(graphic.geometry, true);\r\n      } else {\r\n        alertFn &&\r\n          alertFn({\r\n            altMsg: 'กรุณากำหนดพื้นที่ไม่เกิน 10 ตร.กม.',\r\n          });\r\n      }\r\n    }\r\n  });\r\n};\r\nexport const editGraphicDraftPnt = (mapParam, { graphic, callback }) => {\r\n  EsriLoader.loadModules(['esri/toolbars/edit', 'esri/symbols/PictureMarkerSymbol', 'esri/graphic'], options).then(\r\n    async ([Edit, PictureMarkerSymbol, Graphic]) => {\r\n      // const pntGrapphicLayer = getLayerByID(mapParam.map, Constants.LISTGRAPHICLAYER.GRAPHICLAYER_DRAFT)\r\n      // const editGraphicLayer = getLayerByID(mapParam.map, Constants.LISTGRAPHICLAYER.GRAPHICLAYER_DRAFT_HIGHLIGHT);\r\n      const selectionSymbol = new PictureMarkerSymbol(Constants.IMG_HIGHLIGHT_POINT, 50, 50);\r\n      const graphicBorder = new Graphic(graphic.geometry, selectionSymbol, 50, 50);\r\n\r\n      if (editDraftPnt) {\r\n        editDraftPnt = null;\r\n      }\r\n\r\n      if (gpMoveDraftPnt) {\r\n        gpMoveDraftPnt.remove();\r\n      }\r\n\r\n      // สั่ง reorder จุดที่วาดและ highlight ให้อยู่เหนือ graphic spatial search\r\n      // await mapParam.map.reorderLayer(editGraphicLayer, mapParam.map.graphicsLayerIds.length - 1)\r\n      // await mapParam.map.reorderLayer(pntGraphicLayer, mapParam.map.graphicsLayerIds.length)\r\n\r\n      clearGraphic(mapParam, [Constants.LISTGRAPHICLAYER.GRAPHICLAYER_DRAFT_HIGHLIGHT]);\r\n      graphicBorder.setAttributes({\r\n        CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_DRAFT_HIGHLIGHT,\r\n      });\r\n      mapParam.map.graphics.add(graphicBorder);\r\n      editDraftPnt = new Edit(mapParam.map);\r\n      mapParam.map.graphics.remove(graphic);\r\n      mapParam.map.graphics.add(graphic);\r\n      editDraftPnt.activate(Edit.MOVE, graphic);\r\n      gpMoveDraftPnt = editDraftPnt.on('graphic-move-stop', ({ graphic }) => {\r\n        if (graphic && graphic.geometry) {\r\n          const graphicBorder = new Graphic(graphic.geometry, selectionSymbol, 50, 50);\r\n          // editGraphicLayer.clear();\r\n          clearGraphic(mapParam, [Constants.LISTGRAPHICLAYER.GRAPHICLAYER_DRAFT_HIGHLIGHT]);\r\n          graphicBorder.setAttributes({\r\n            CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_DRAFT_HIGHLIGHT,\r\n          });\r\n          mapParam.map.graphics.add(graphicBorder);\r\n          mapParam.map.graphics.remove(graphic);\r\n          mapParam.map.graphics.add(graphic);\r\n          editDraftPnt.activate(Edit.MOVE, graphic);\r\n          callback && callback(graphic.geometry);\r\n        }\r\n      });\r\n    }\r\n  );\r\n};\r\n\r\nexport const clearEditDraftPnt = (mapParam) => {\r\n  // const editGraphicLayer = getLayerByID(mapParam.map, Constants.LISTGRAPHICLAYER.GRAPHICLAYER_DRAFT_HIGHLIGHT);\r\n  // editGraphicLayer.clear();\r\n  clearGraphic(mapParam, [Constants.LISTGRAPHICLAYER.GRAPHICLAYER_DRAFT_HIGHLIGHT]);\r\n\r\n  if (gpMoveDraftPnt) {\r\n    gpMoveDraftPnt.remove();\r\n  }\r\n\r\n  if (editDraftPnt) {\r\n    editDraftPnt.deactivate();\r\n  }\r\n};\r\n\r\n// ทุก Draft และ แสดง detail draft จะใช้ function นี้ในการ add graphic\r\nexport const addGraphicDraft = (mapParam, { evt, callback, type }) => {\r\n  EsriLoader.loadModules(\r\n    [\r\n      'esri/symbols/SimpleMarkerSymbol',\r\n      'esri/symbols/SimpleFillSymbol',\r\n      'esri/symbols/SimpleLineSymbol',\r\n      'esri/graphic',\r\n      'esri/Color',\r\n      'esri/toolbars/draw',\r\n    ],\r\n    options\r\n  ).then(([SimpleMarkerSymbol, SimpleFillSymbol, SimpleLineSymbol, Graphic, Color, Draw]) => {\r\n    // const draftLayer = getLayerByID(mapParam.map, Constants.LISTGRAPHICLAYER.GRAPHICLAYER_DRAFT);\r\n    clearGraphicDrawDraft(mapParam);\r\n    let symbol = null;\r\n    switch (type) {\r\n      case Draw.POINT:\r\n        symbol = new SimpleMarkerSymbol({\r\n          color: Color([25, 179, 25]),\r\n          type: 'simplemarkersymbol',\r\n          style: 'STYLE_CIRCLE',\r\n          outline: {\r\n            color: Color([0, 0, 0]),\r\n            width: 1,\r\n          },\r\n        });\r\n        mapParam.map.centerAt(evt.geometry);\r\n        break;\r\n      case Draw.LINE:\r\n        mapParam.map.setExtent(evt.geometry.getExtent().expand(3), true); //extent\r\n        symbol = new SimpleLineSymbol();\r\n        symbol.setColor(new Color([230, 0, 0, 1]));\r\n        symbol.setWidth(3);\r\n\r\n        break;\r\n      case Draw.POLYGON:\r\n        mapParam.map.setExtent(evt.geometry.getExtent().expand(3), true); //extent\r\n        symbol = new SimpleFillSymbol(\r\n          SimpleFillSymbol.STYLE_SOLID,\r\n          new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color([255, 0, 0, 1]), 2),\r\n          new Color([0, 0, 0, 0.3])\r\n        );\r\n        break;\r\n      default:\r\n        break;\r\n    }\r\n\r\n    if (evt.geometry && symbol) {\r\n      const graphic = new Graphic(evt.geometry, symbol);\r\n      callback && callback(evt, graphic);\r\n      graphic.setAttributes({\r\n        CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_DRAFT,\r\n      });\r\n      mapParam.map.graphics.add(graphic);\r\n    }\r\n  });\r\n};\r\n\r\nexport const addGraphicDraftLineForDetail = (mapParam, { evt, callback, type }) => {\r\n  EsriLoader.loadModules(\r\n    [\r\n      'esri/symbols/SimpleMarkerSymbol',\r\n      'esri/symbols/SimpleFillSymbol',\r\n      'esri/symbols/SimpleLineSymbol',\r\n      'esri/symbols/PictureMarkerSymbol',\r\n      'esri/graphic',\r\n      'esri/Color',\r\n      'esri/toolbars/draw',\r\n    ],\r\n    options\r\n  ).then(([SimpleMarkerSymbol, SimpleFillSymbol, SimpleLineSymbol, PictureMarkerSymbol, Graphic, Color, Draw]) => {\r\n    clearGraphicDrawDraft(mapParam);\r\n    let symbol = null;\r\n    mapParam.map.setExtent(evt.geometry.getExtent().expand(3), true); //extent\r\n    symbol = new SimpleLineSymbol();\r\n    symbol.setWidth(8);\r\n    symbol.setColor(new Color([255, 0, 0, 0.6]));\r\n\r\n    if (evt.geometry && symbol) {\r\n      const graphic = new Graphic(evt.geometry, symbol);\r\n      callback && callback(evt, graphic);\r\n      graphic.setAttributes({\r\n        CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_DRAFT,\r\n      });\r\n      mapParam.map.graphics.add(graphic);\r\n    }\r\n  });\r\n};\r\n\r\nexport const applyEditShapeDraftPnt = (mapParam, param) => {\r\n  EsriLoader.loadModules(['esri/layers/FeatureLayer', 'esri/graphic'], options).then(([FeatureLayer, Graphic]) => {\r\n    const featureLayer = new FeatureLayer(window.CONFIG_URL_GIS.DRAFT_POINT);\r\n    const featureLayerToc = mapParam.map.getLayer(param.selectionLayerID); // hard code เอาไว้ refresh หลัง add หรือ edit เสร็จ\r\n    var gp = new Graphic();\r\n\r\n    switch (param.mode) {\r\n      case 'ADD':\r\n        gp.setGeometry(param.geometry);\r\n        gp.setAttributes({\r\n          NAME: param.name,\r\n          CREATOR: param.userID,\r\n          DESCRIPTION: param.description,\r\n          CREATION_DATE: DateTimeUtils.convertDatetimeToCallService(new Date()),\r\n          UPDATED_DATE: DateTimeUtils.convertDatetimeToCallService(new Date()),\r\n          UPDATER: param.userID,\r\n          TYPE: param.type,\r\n          SURVEY_DATE: DateTimeUtils.convertDatetimeToCallService(param.date),\r\n          DISTRICT_ID: param.districtID,\r\n          SUBDISTRICT_ID: param.subDistrictID,\r\n        });\r\n\r\n        featureLayer.applyEdits(\r\n          [gp],\r\n          null,\r\n          null,\r\n          (evt) => {\r\n            featureLayerToc && featureLayerToc.refresh();\r\n            if (evt) {\r\n              param.callback(evt[0]);\r\n            } else {\r\n              param.callback();\r\n            }\r\n          },\r\n          (ex) => {\r\n            param.callback();\r\n            featureLayerToc && featureLayerToc.refresh();\r\n          }\r\n        );\r\n        break;\r\n      case 'EDIT':\r\n        gp.setGeometry(param.geometry);\r\n        gp.setAttributes({\r\n          NAME: param.name,\r\n          UPDATER: param.userID,\r\n          OBJECTID: param.objectID,\r\n          DESCRIPTION: param.description,\r\n          TYPE: param.type,\r\n          SURVEY_DATE: DateTimeUtils.convertDatetimeToCallService(param.date),\r\n          UPDATED_DATE: DateTimeUtils.convertDatetimeToCallService(new Date()),\r\n          DISTRICT_ID: param.districtID,\r\n          SUBDISTRICT_ID: param.subDistrictID,\r\n        });\r\n\r\n        const dataFeatures = JSON.stringify([\r\n          {\r\n            geometry: gp.geometry,\r\n            attributes: gp.attributes,\r\n          },\r\n        ]);\r\n\r\n        const formData = new FormData();\r\n        formData.append('Features', dataFeatures);\r\n        formData.append('rollbackOnFailure', true);\r\n        formData.append('f', 'json');\r\n\r\n        fetchUpdateFeature({\r\n          url: window.CONFIG_URL_GIS.DRAFT_POINT,\r\n          formData,\r\n          callback: param.callback,\r\n        }).finally((ex) => {\r\n          featureLayerToc && featureLayerToc.refresh();\r\n        });\r\n\r\n        break;\r\n      default:\r\n        break;\r\n    }\r\n  });\r\n};\r\n\r\nexport const refreshMap = (mapParam, param) => {\r\n  const featureLayer = mapParam.map.getLayer(param.layerID); // hard code เอาไว้ refresh หลัง add หรือ edit เสร็จ\r\n  if (featureLayer) {\r\n    featureLayer.refresh();\r\n  }\r\n};\r\n\r\nexport const applyEditLandMark = (mapParam, param) => {\r\n  EsriLoader.loadModules(['esri/layers/FeatureLayer', 'esri/graphic'], options).then(([FeatureLayer, Graphic]) => {\r\n    const featureLayer = new FeatureLayer(window.CONFIG_URL_GIS.LANDMARK);\r\n    var gp = new Graphic();\r\n    // let gpAdd = null;\r\n    // let gpEdit = null;\r\n\r\n    switch (param.mode) {\r\n      case 'ADD':\r\n        gp.setGeometry(param.geometry);\r\n        gp.setAttributes({\r\n          LMRK_ID: param.id,\r\n          LMRK_CODE: param.type,\r\n          LMRK_NAME: param.name,\r\n          SUBDISTRICT_ID: param.subDistrict,\r\n          DISTRICT_ID: param.district,\r\n          UPDATE_YEAR: param.year,\r\n          SURVEY_DATE: DateTimeUtils.convertDatetimeToCallService(param.date),\r\n          CREATOR: param.user,\r\n          CREATION_DATE: DateTimeUtils.convertDatetimeToCallService(new Date()),\r\n          UPDATER: param.user,\r\n          UPDATED_DATE: DateTimeUtils.convertDatetimeToCallService(new Date()),\r\n        });\r\n\r\n        featureLayer.applyEdits(\r\n          [gp],\r\n          null,\r\n          null,\r\n          (evt) => {\r\n            if (evt) {\r\n              param.callback(evt[0]);\r\n            } else {\r\n              param.callback();\r\n            }\r\n          },\r\n          (ex) => {\r\n            param.callback();\r\n            console.log('ex Land Mark', ex);\r\n          }\r\n        );\r\n\r\n        break;\r\n      case 'EDIT':\r\n        gp.setGeometry(param.geometry);\r\n        gp.setAttributes({\r\n          OBJECTID: param.objectId,\r\n          LMRK_ID: param.id,\r\n          LMRK_CODE: param.type,\r\n          LMRK_NAME: param.name,\r\n          SUBDISTRICT_ID: param.subDistrict,\r\n          DISTRICT_ID: param.district,\r\n          UPDATE_YEAR: param.year,\r\n          SURVEY_DATE: DateTimeUtils.convertDatetimeToCallService(param.date),\r\n          UPDATER: param.user,\r\n          UPDATED_DATE: DateTimeUtils.convertDatetimeToCallService(new Date()),\r\n        });\r\n\r\n        const dataFeatures = JSON.stringify([\r\n          {\r\n            geometry: gp.geometry,\r\n            attributes: gp.attributes,\r\n          },\r\n        ]);\r\n\r\n        const formData = new FormData();\r\n        formData.append('Features', dataFeatures);\r\n        formData.append('rollbackOnFailure', true);\r\n        formData.append('f', 'json');\r\n\r\n        fetchUpdateFeature({\r\n          url: window.CONFIG_URL_GIS.LANDMARK,\r\n          formData,\r\n          callback: param.callback,\r\n        });\r\n\r\n        break;\r\n      default:\r\n        break;\r\n    }\r\n  });\r\n};\r\n\r\nexport const applyEditShapeDraftLine = (mapParam, param) => {\r\n  EsriLoader.loadModules(['esri/layers/FeatureLayer', 'esri/graphic'], options).then(([FeatureLayer, Graphic]) => {\r\n    const featureLayer = new FeatureLayer(window.CONFIG_URL_GIS.DRAFT_LINE);\r\n    const gp = new Graphic();\r\n\r\n    switch (param.mode) {\r\n      case 'ADD':\r\n        gp.setGeometry(param.geometry);\r\n        gp.setAttributes({\r\n          NAME: param.name,\r\n          CREATOR: param.userID,\r\n          DESCRIPTION: param.description,\r\n          CREATION_DATE: DateTimeUtils.convertDatetimeToCallService(new Date()),\r\n          TYPE: param.type,\r\n          SURVEY_DATE: DateTimeUtils.convertDatetimeToCallService(param.date),\r\n          DISTRICT_ID: param.districtID,\r\n          SUBDISTRICT_ID: param.subDistrictID,\r\n          UPDATED_DATE: DateTimeUtils.convertDatetimeToCallService(new Date()),\r\n          UPDATER: param.userID,\r\n        });\r\n\r\n        featureLayer.applyEdits(\r\n          [gp],\r\n          null,\r\n          null,\r\n          (evt) => {\r\n            reFreshSnapShotLayer(mapParam);\r\n            if (evt) {\r\n              param.callback(evt[0]);\r\n            } else {\r\n              param.callback();\r\n            }\r\n          },\r\n          (ex) => {\r\n            param.callback();\r\n            reFreshSnapShotLayer(mapParam);\r\n            console.log('ex addShapeDraftPnt', ex);\r\n          }\r\n        );\r\n        break;\r\n      case 'EDIT':\r\n        gp.setGeometry(param.geometry);\r\n        gp.setAttributes({\r\n          NAME: param.name,\r\n          UPDATER: param.userID,\r\n          OBJECTID: param.objectID,\r\n          DESCRIPTION: param.description,\r\n          TYPE: param.type,\r\n          SURVEY_DATE: DateTimeUtils.convertDatetimeToCallService(param.date),\r\n          UPDATED_DATE: DateTimeUtils.convertDatetimeToCallService(new Date()),\r\n          DISTRICT_ID: param.districtID,\r\n          SUBDISTRICT_ID: param.subDistrictID,\r\n        });\r\n        // gpEdit = [gp]\r\n\r\n        const dataFeatures = JSON.stringify([\r\n          {\r\n            geometry: gp.geometry,\r\n            attributes: gp.attributes,\r\n          },\r\n        ]);\r\n\r\n        const formData = new FormData();\r\n        formData.append('Features', dataFeatures);\r\n        formData.append('rollbackOnFailure', true);\r\n        formData.append('f', 'json');\r\n\r\n        fetchUpdateFeature({\r\n          url: window.CONFIG_URL_GIS.DRAFT_LINE,\r\n          formData,\r\n          callback: param.callback,\r\n        });\r\n\r\n        break;\r\n      default:\r\n        break;\r\n    }\r\n  });\r\n};\r\n\r\nexport const applyEditShapeDraftPolygon = (mapParam, param) => {\r\n  EsriLoader.loadModules(['esri/layers/FeatureLayer', 'esri/graphic'], options).then(([FeatureLayer, Graphic]) => {\r\n    const featureLayer = new FeatureLayer(window.CONFIG_URL_GIS.DRAFT_BDLG);\r\n    var gp = new Graphic();\r\n    param.data.BL_DATE = param.date.dateOne ? DateTimeUtils.convertDatetimeToCallService(param.date.dateOne) : null;\r\n    param.data.SURVEY_DATE = param.date.dateTwo ? DateTimeUtils.convertDatetimeToCallService(param.date.dateTwo) : null;\r\n    param.data.BL_OWNER = param.data.BL_OWNER ? param.data.BL_OWNER : null;\r\n\r\n    switch (param.mode) {\r\n      case 'ADD':\r\n        gp.setGeometry(param.geometry);\r\n        gp.setAttributes(param.data);\r\n        featureLayer.applyEdits(\r\n          [gp],\r\n          null,\r\n          null,\r\n          (evt) => {\r\n            reFreshSnapShotLayer(mapParam);\r\n            if (evt) {\r\n              param.callback(evt[0]);\r\n            } else {\r\n              param.callback();\r\n            }\r\n          },\r\n          (ex) => {\r\n            param.callback();\r\n            console.log('ex addShapeDraftPnt', ex);\r\n          }\r\n        );\r\n        break;\r\n      case 'EDIT':\r\n        gp.setGeometry(param.geometry);\r\n        gp.setAttributes(param.data);\r\n\r\n        const dataFeatures = JSON.stringify([\r\n          {\r\n            geometry: gp.geometry,\r\n            attributes: gp.attributes,\r\n          },\r\n        ]);\r\n\r\n        const formData = new FormData();\r\n        formData.append('Features', dataFeatures);\r\n        formData.append('rollbackOnFailure', true);\r\n        formData.append('f', 'json');\r\n\r\n        fetchUpdateFeature({\r\n          url: window.CONFIG_URL_GIS.DRAFT_BDLG,\r\n          formData,\r\n          callback: param.callback,\r\n        });\r\n        break;\r\n      default:\r\n        break;\r\n    }\r\n  });\r\n};\r\n\r\nexport const fetchUpdateFeature = ({ url, formData, callback }) => {\r\n  return fetchMapService(`${url}/updateFeatures`, formData)\r\n    .then((res) => {\r\n      if (!res.ok) {\r\n        throw res.status;\r\n      }\r\n      return res.json();\r\n    })\r\n    .then((result) => {\r\n      if (result && result.updateResults && result.updateResults.length && result.updateResults[0].success) {\r\n        callback && callback(result.updateResults[0]);\r\n      } else {\r\n        callback && callback();\r\n      }\r\n      return result;\r\n    })\r\n    .catch((ex) => {\r\n      callback && callback();\r\n      console.log('ex fetchUpdateFeature', ex);\r\n    });\r\n};\r\n\r\nexport const drawSpatialSearchPMRDeactive = ({ map, drawMap }) => {\r\n  drawMap.deactivate();\r\n  map.setMapCursor('default');\r\n};\r\n\r\nexport const drawSpatialSearchPMR = (mapParam, params) => {\r\n  const showLoading = () => {\r\n    if (params.loading && params.loading.show) params.loading.show();\r\n  };\r\n\r\n  const hideLoading = () => {\r\n    if (params.loading && params.loading.hide) params.loading.hide();\r\n  };\r\n\r\n  EsriLoader.loadModules(['esri/tasks/query', 'esri/geometry/geometryEngine', 'esri/toolbars/draw', 'esri/tasks/QueryTask'], options).then(\r\n    ([Query, geometryEngine, Draw, QueryTask]) => {\r\n      const qTask = new QueryTask(window.CONFIG_URL_GIS.PMR1);\r\n      let selectQuery = new Query();\r\n\r\n      createEvtDrawMap(mapParam, {\r\n        activateType: Draw.RECTANGLE,\r\n        callbackDrawComplete: () => (evt) => {\r\n          showLoading();\r\n          mapParam.drawMap.deactivate();\r\n          mapParam.map.setMapCursor('default');\r\n          selectQuery.geometry = evt.geometry;\r\n          selectQuery.returnGeometry = true;\r\n          selectQuery.outFields = ['*'];\r\n          qTask.execute(selectQuery, (response) => {\r\n            hideLoading();\r\n            if (response.features && response.features.length > 0) {\r\n              const districtLayer = getLayerByID(mapParam.map, Constants.LISTFEATURELAYER.FEATURELAYER_DISTRICT_BUFFER);\r\n              const districtGraphic = districtLayer ? districtLayer.graphics[0] : undefined;\r\n              if (districtGraphic) {\r\n                // กรณีมีขอบเขตพื้นที่การทำงาน\r\n                const featureCheckInterSects = response.features.map((feature) => {\r\n                  const isInterSectsDistrict = geometryEngine.intersects(districtGraphic.geometry, feature.geometry);\r\n                  feature.attributes.IS_INSIDE_DISTRICT = isInterSectsDistrict;\r\n                  return feature;\r\n                });\r\n                params.callback(featureCheckInterSects, evt.geometry);\r\n              } else {\r\n                params.callback(response.features, evt.geometry);\r\n              }\r\n            } else {\r\n              //no data\r\n              params.callback(null, evt.geometry);\r\n            }\r\n          });\r\n        },\r\n      });\r\n      // if (evtDrawSpatial) {\r\n      // \tevtDrawSpatial.remove();\r\n      // }\r\n\r\n      // mapParam.map.setMapCursor(\"crosshair\");\r\n      // mapParam.drawMap.activate(Draw.RECTANGLE);\r\n\r\n      // evtDrawSpatial = mapParam.drawMap.on(\"draw-complete\", evt => {\r\n      // \tshowLoading();\r\n      // \tmapParam.drawMap.deactivate();\r\n      // \tmapParam.map.setMapCursor(\"default\");\r\n      // \tselectQuery.geometry = evt.geometry;\r\n      // \tselectQuery.returnGeometry = true;\r\n      // \tselectQuery.outFields = [\"*\"];\r\n\r\n      // \t////// query task ////////////\r\n      // \tqTask.execute(selectQuery, response => {\r\n      // \t\thideLoading();\r\n      // \t\tif (response.features && response.features.length > 0) {\r\n      // \t\t\tconst districtLayer = getLayerByID(mapParam.map, Constants.LISTFEATURELAYER.FEATURELAYER_DISTRICT_BUFFER);\r\n      // \t\t\tconst districtGraphic = districtLayer ? districtLayer.graphics[0] : undefined;\r\n      // \t\t\tif (districtGraphic) { // กรณีมีขอบเขตพื้นที่การทำงาน\r\n      // \t\t\t\tconst featureCheckInterSects = response.features.map(feature => {\r\n      // \t\t\t\t\tconst isInterSectsDistrict = geometryEngine.intersects(districtGraphic.geometry, feature.geometry)\r\n      // \t\t\t\t\tfeature.attributes.IS_INSIDE_DISTRICT = isInterSectsDistrict;\r\n      // \t\t\t\t\treturn feature\r\n      // \t\t\t\t})\r\n      // \t\t\t\tparams.callback(featureCheckInterSects, evt.geometry);\r\n      // \t\t\t} else {\r\n      // \t\t\t\tparams.callback(response.features, evt.geometry);\r\n      // \t\t\t}\r\n      // \t\t} else {//no data\r\n      // \t\t\tparams.callback(null, evt.geometry);\r\n      // \t\t}\r\n      // \t\t// console.log('response ::: ', response);\r\n      // \t\t// let result = null;\r\n      // \t\t// params.callback(response.features, evt.geometry)\r\n\r\n      // \t});\r\n      // })\r\n    }\r\n  );\r\n};\r\n\r\n// ทุก Draft และ แสดง detail draft จะใช้ function นี้ในการ clear graphic\r\nexport const clearGraphicDrawDraft = (mapParam) => {\r\n  // mapParam.drawMap.deactivate();\r\n  // mapParam.map.setMapCursor(\"default\");\r\n\r\n  clearGraphic(mapParam, [Constants.LISTGRAPHICLAYER.GRAPHICLAYER_DRAFT, Constants.LISTGRAPHICLAYER.GRAPHICLAYER_DRAFT_HIGHLIGHT]);\r\n\r\n  // if (evtDrawDraft) {\r\n  // \tevtDrawDraft.remove();\r\n  // }\r\n\r\n  clearEvtDrawMap(mapParam);\r\n\r\n  if (editDraftPnt) {\r\n    editDraftPnt.deactivate();\r\n    editDraftPnt = null;\r\n  }\r\n  if (editDraftLine) {\r\n    editDraftLine.deactivate();\r\n    editDraftLine = null;\r\n  }\r\n};\r\n\r\n//ทุก spatial search draft จะใช้ตัวนี้หมด\r\nexport const drawSpatialSearchDraft = (mapParam, param) => {\r\n  // type = BLDG, LINE, PNT, LANDMARK\r\n  EsriLoader.loadModules(['esri/toolbars/draw', 'esri/geometry/geometryEngine'], options).then(([Draw, GeometryEngine]) => {\r\n    // if (evtDrawDraft) {\r\n    // \tevtDrawDraft.remove();\r\n    // }\r\n\r\n    // mapParam.map.setMapCursor(\"crosshair\");\r\n    // mapParam.drawMap.activate(Draw.RECTANGLE);\r\n\r\n    // evtDrawDraft = mapParam.drawMap.on(\"draw-complete\", evt => {\r\n    // \tconst area = GeometryEngine.geodesicArea(evt.geometry, \"square-kilometers\");\r\n    // \tif (param.type === 'LANDMARK' && area > 1) {\r\n    // \t\tparam.callback(['over'])\r\n    // \t} else {\r\n    // \t\tparam.showLoading && param.showLoading()\r\n    // \t\tclearGraphic(mapParam, [Constants.LISTGRAPHICLAYER.GRAPHICLAYER_SPATIAL_SEARCH_DRAFT]);\r\n    // \t\tmapParam.map.setMapCursor(\"default\");\r\n    // \t\tmapParam.drawMap.deactivate();\r\n    // \t\t// //วาด\r\n    // \t\tselectionDraft(mapParam, { ...param, geometry: evt.geometry })\r\n    // \t}\r\n    // })\r\n\r\n    createEvtDrawMap(mapParam, {\r\n      activateType: Draw.RECTANGLE,\r\n      callbackDrawComplete: () => (evt) => {\r\n        const area = GeometryEngine.geodesicArea(evt.geometry, 'square-kilometers');\r\n        if (param.type === 'LANDMARK' && area > 1) {\r\n          param.callback(['over']);\r\n        } else {\r\n          param.showLoading && param.showLoading();\r\n          clearGraphic(mapParam, [Constants.LISTGRAPHICLAYER.GRAPHICLAYER_SPATIAL_SEARCH_DRAFT]);\r\n          mapParam.map.setMapCursor('default');\r\n          mapParam.drawMap.deactivate();\r\n          selectionDraft(mapParam, {\r\n            ...param,\r\n            geometry: evt.geometry,\r\n          });\r\n        }\r\n      },\r\n    });\r\n  });\r\n};\r\n\r\nexport const reFreshSnapShotLayer = (mapParam) => {\r\n  window.LAYER_ID_SNAPSHOT.forEach((layerID) => {\r\n    const layerSnapShort = mapParam.map.getLayer(layerID.toString());\r\n    // console.log('layerSnapShort', layerSnapShort)\r\n    if (layerSnapShort) {\r\n      layerSnapShort.refresh();\r\n    }\r\n  });\r\n};\r\n\r\nexport const setZoomTo20 = ({ map }) => {\r\n  map.setZoom(20);\r\n};\r\n\r\n// OSS-\r\nexport const buildingGPOSS = (mapParam, param) => {\r\n  clearGraphic(mapParam, [Constants.LISTGRAPHICLAYER.GRAPHICLAYER_DRAFT]);\r\n\r\n  EsriLoader.loadModules(\r\n    [\r\n      'esri/layers/FeatureLayer',\r\n      'esri/graphic',\r\n      'esri/tasks/query',\r\n      'esri/layers/GraphicsLayer',\r\n      'esri/geometry/Polygon',\r\n      'esri/symbols/SimpleFillSymbol',\r\n      'esri/symbols/SimpleLineSymbol',\r\n      'esri/Color',\r\n      'esri/tasks/QueryTask',\r\n    ],\r\n    options\r\n  ).then(([FeatureLayer, Graphic, Query, GraphicsLayer, Polygon, SimpleFillSymbol, SimpleLineSymbol, Color, QueryTask]) => {\r\n    const qTask = new QueryTask(window.CPUDD_CAH_IMPORT_OSS_LAYER);\r\n    let selectQuery = new Query();\r\n\r\n    selectQuery.where = `PERMIT_NO = '${param.permitNo}'`;\r\n    selectQuery.outSpatialReference = { wkid: 102100 };\r\n    selectQuery.returnGeometry = true;\r\n    selectQuery.outFields = ['*'];\r\n    qTask.execute(selectQuery, (response) => {\r\n      response.features.forEach((itemResponse) => {\r\n        const graphic = new Graphic(\r\n          itemResponse.geometry,\r\n          new SimpleFillSymbol(SimpleFillSymbol.STYLE_SOLID, new SimpleLineSymbol('solid', new Color([255, 0, 0]), 2), new Color([0, 0, 0, 0.25]))\r\n        );\r\n        graphic.setAttributes({\r\n          CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_DRAFT,\r\n        });\r\n        mapParam.map.graphics.add(graphic);\r\n      });\r\n    });\r\n  });\r\n};\r\n\r\n// ทุก draft จะใช้ selectionDraft ตัวนี้หมด\r\nexport const selectionDraft = (mapParam, param) => {\r\n  EsriLoader.loadModules(['esri/tasks/query', 'esri/layers/FeatureLayer'], options).then(([Query, FeatureLayer]) => {\r\n    let selectQuery = new Query();\r\n    let featureLayer = null;\r\n\r\n    if (evtSelectionCompleteSp) {\r\n      evtSelectionCompleteSp.remove();\r\n    }\r\n\r\n    if (param.selectionLayerID) {\r\n      featureLayer = mapParam.map.getLayer(param.selectionLayerID.toString());\r\n    }\r\n\r\n    switch (param.type) {\r\n      case 'BLDG':\r\n        // featureLayer = mapParam.map.getLayer(\"20_defaultToc\"); //hardcode ชื่อ layer BMACPUDD.Draft_PNT ไว้ก่อน\r\n        if (param.condition) {\r\n          // กรณี search ด้วย form\r\n          selectQuery.where = param.condition;\r\n        } else {\r\n          // กรณี search ด้วย spatial search\r\n          selectQuery.geometry = param.geometry;\r\n        }\r\n        geometrySpDraft = {\r\n          // เก็บเอาไว้สำหรับ refresh\r\n          param: param,\r\n          mode: 'SPATIAL_SEARCH_DRAFT_BLDG',\r\n        };\r\n        break;\r\n      case 'LINE':\r\n        // featureLayer = mapParam.map.getLayer(\"19_defaultToc\"); //hardcode ชื่อ layer BMACPUDD.Draft_PNT ไว้ก่อน\r\n        if (param.condition) {\r\n          // กรณี search ด้วย form\r\n          selectQuery.where = param.condition;\r\n        } else {\r\n          // กรณี search ด้วย spatial search\r\n          selectQuery.geometry = param.geometry;\r\n        }\r\n        geometrySpDraft = {\r\n          // เก็บเอาไว้สำหรับ refresh\r\n          param: param,\r\n          mode: 'SPATIAL_SEARCH_DRAFT_LINE',\r\n        };\r\n        break;\r\n      case 'PNT':\r\n        // featureLayer = mapParam.map.getLayer(\"18_defaultToc\"); //hardcode ชื่อ layer BMACPUDD.Draft_PNT ไว้ก่อน\r\n        if (param.condition) {\r\n          // กรณี search ด้วย form\r\n          selectQuery.where = param.condition;\r\n        } else {\r\n          // กรณี search ด้วย spatial search\r\n          selectQuery.geometry = param.geometry;\r\n        }\r\n        geometrySpDraft = {\r\n          // เก็บเอาไว้สำหรับ refresh\r\n          param: param,\r\n          mode: 'SPATIAL_SEARCH_DRAFT_PNT',\r\n        };\r\n        break;\r\n      case 'LANDMARK':\r\n        // featureLayer = mapParam.map.getLayer(\"22_defaultToc\"); //hardcode ชื่อ layer BMACPUDD.Draft_PNT ไว้ก่อน\r\n        if (param.condition) {\r\n          // กรณี search ด้วย form\r\n          selectQuery.where = param.condition;\r\n        } else {\r\n          // กรณี search ด้วย spatial search\r\n          selectQuery.geometry = param.geometry;\r\n        }\r\n        geometrySpDraft = {\r\n          // เก็บเอาไว้สำหรับ refresh\r\n          param: param,\r\n          mode: 'SPATIAL_SEARCH_LANDMARK',\r\n        };\r\n        break;\r\n      default:\r\n        break;\r\n    }\r\n\r\n    if (featureLayer) {\r\n      try {\r\n        selectQuery.outFields = ['*'];\r\n        selectQuery.returnGeometry = true;\r\n        featureLayer.refresh();\r\n        featureLayer.selectFeatures(selectQuery, FeatureLayer.SELECTION_NEW);\r\n        evtSelectionCompleteSp = featureLayer.on('selection-complete', (evt) => {\r\n          // console.log('evt.features',evt.features)\r\n          if (evt.features) {\r\n            param.callback(evt.features);\r\n          } else {\r\n            param.callback([]);\r\n          }\r\n          featureLayer.clearSelection();\r\n        });\r\n      } catch (err) {\r\n        param.callback([]);\r\n      }\r\n    } else {\r\n      param.callback([]);\r\n    }\r\n  });\r\n};\r\n\r\nexport const reSearchDraft = (mapParam) => {\r\n  if (geometrySpDraft) {\r\n    switch (geometrySpDraft.mode) {\r\n      case 'SPATIAL_SEARCH_DRAFT_PNT': //redraw spatial search draft pnt\r\n        selectionDraft(mapParam, geometrySpDraft.param);\r\n        break;\r\n      case 'SPATIAL_SEARCH_LANDMARK':\r\n        selectionDraft(mapParam, geometrySpDraft.param);\r\n      case 'SPATIAL_SEARCH_DRAFT_LINE': //redraw spatial search draft LINE\r\n        selectionDraft(mapParam, geometrySpDraft.param);\r\n        break;\r\n      case 'SPATIAL_SEARCH_DRAFT_BLDG': //redraw spatial search draft LINE\r\n        selectionDraft(mapParam, geometrySpDraft.param);\r\n        break;\r\n      default:\r\n        break;\r\n    }\r\n  }\r\n};\r\n\r\nexport const cleardrawSpatialSearchDraft = (mapParam) => {\r\n  mapParam.drawMap.deactivate();\r\n  mapParam.map.setMapCursor('default');\r\n\r\n  clearGraphic(mapParam, [Constants.LISTGRAPHICLAYER.GRAPHICLAYER_SPATIAL_SEARCH_DRAFT]);\r\n\r\n  if (evtDrawDraft) {\r\n    evtDrawDraft.remove();\r\n  }\r\n};\r\n\r\nexport const clearImportShapeGraphic = ({ map }) => {\r\n  // const importShapeLayerID = Constants.LISTGRAPHICLAYER.GRAPHICLAYER_IMPORT_SHAPE;\r\n  // const importShapeLayer = getLayerByID(map, importShapeLayerID);\r\n  // if (importShapeLayer) {\r\n  // \timportShapeLayer.clear();\r\n  // }\r\n  clearGraphic({ map }, [Constants.LISTGRAPHICLAYER.GRAPHICLAYER_IMPORT_SHAPE]);\r\n};\r\n\r\nconst extentGraphicImportShape = (map, extentGeometry, { Extent, SpatialReference }) => {\r\n  var extentGEO = new Extent(\r\n    extentGeometry.xmin,\r\n    extentGeometry.ymin,\r\n    extentGeometry.xmax,\r\n    extentGeometry.ymax,\r\n    new SpatialReference({ wkid: map.spatialReference.wkid })\r\n  );\r\n  map.setExtent(extentGEO.getExtent().expand(2));\r\n  return extentGEO.getExtent();\r\n};\r\n\r\nexport const importShape = ({ map }, { filePath, refFormUpload, callback }) => {\r\n  const messageConfig = Constants.RESOURCEWORDS.IMPORT_SHAPE_TEXT;\r\n  // const importShapeLayerID = Constants.LISTGRAPHICLAYER.GRAPHICLAYER_IMPORT_SHAPE;\r\n\r\n  EsriLoader.loadModules(\r\n    [\r\n      'esri/request',\r\n      'esri/graphic',\r\n      'esri/geometry/Polygon',\r\n      'esri/geometry/Point',\r\n      'esri/geometry/Polyline',\r\n      'esri/SpatialReference',\r\n      'esri/symbols/SimpleMarkerSymbol',\r\n      'esri/symbols/SimpleFillSymbol',\r\n      'esri/symbols/SimpleLineSymbol',\r\n      'esri/Color',\r\n      'esri/geometry/Extent',\r\n      'esri/geometry/geometryEngine',\r\n    ],\r\n    options\r\n  ).then(\r\n    ([\r\n      request,\r\n      Graphic,\r\n      Polygon,\r\n      Point,\r\n      Polyline,\r\n      SpatialReference,\r\n      SimpleMarkerSymbol,\r\n      SimpleFillSymbol,\r\n      SimpleLineSymbol,\r\n      Color,\r\n      Extent,\r\n      GeometryEngine,\r\n    ]) => {\r\n      let layerExtentGEO = null; //ใช้สำหรับเก็บค่า Extent ของ layer เพื่อใช้ในการ pan map\r\n      let name = filePath.split('.');\r\n      name = name[0].replace('c:\\\\fakepath\\\\', '');\r\n\r\n      const params = {\r\n        name: name,\r\n        targetSR: map.spatialReference,\r\n        maxRecordCount: 4000, // point limit 4000,line and polygon limit 2000\r\n        enforceInputFileSizeLimit: true,\r\n        enforceOutputJsonSizeLimit: true,\r\n      };\r\n\r\n      const resolution = 1; //view.width;\r\n      params.maxAllowableOffset = resolution;\r\n      params.generalize = true; // true : need to reduce number of points in rings.\r\n      params.reducePrecision = true;\r\n      params.numberOfDigitsAfterDecimal = 0;\r\n\r\n      const myContent = {\r\n        filetype: 'shapefile',\r\n        publishParameters: JSON.stringify(params),\r\n        f: 'json',\r\n      };\r\n\r\n      const portalUrl = window.PORTAL_GENERATE_URL;\r\n      request({\r\n        url: portalUrl,\r\n        content: myContent,\r\n        form: refFormUpload,\r\n        handleAs: 'json',\r\n        load: (response) => {\r\n          // console.log('Import Shape Success :: ', response);\r\n          const returnData = {\r\n            geometryType: '',\r\n            isSupport: false,\r\n            message: '',\r\n          };\r\n          if (response && response.featureCollection && response.featureCollection.layers) {\r\n            const layers = response.featureCollection.layers;\r\n            if (layers.length === 1) {\r\n              //มี 1 ชั้นข้อมูล\r\n              const layer = layers[0];\r\n              const geometryType = layer.featureSet.geometryType;\r\n              // const importShapeLayer = getLayerByID(map, importShapeLayerID);\r\n              // if (importShapeLayer) {\r\n              // \timportShapeLayer.clear();\r\n              // }\r\n              // clearGraphic(map , [Constants.LISTGRAPHICLAYER.GRAPHICLAYER_IMPORT_SHAPE]);\r\n              clearGraphic({ map }, [Constants.LISTGRAPHICLAYER.GRAPHICLAYER_IMPORT_SHAPE]);\r\n              if (layer.featureSet.features.length > 0) {\r\n                if (geometryType === 'esriGeometryPolygon') {\r\n                  const symbolPolygon = new SimpleFillSymbol(\r\n                    SimpleFillSymbol.STYLE_SOLID,\r\n                    new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color([0, 0, 0, 1]), 2),\r\n                    new Color([238, 69, 0, 0.7])\r\n                  );\r\n                  layer.featureSet.features.forEach((featureITM) => {\r\n                    const polygon = new Polygon({\r\n                      rings: featureITM.geometry.rings,\r\n                      spatialReference: {\r\n                        wkid: map.spatialReference,\r\n                      },\r\n                    });\r\n                    const graphic = new Graphic(polygon, symbolPolygon, featureITM.attributes);\r\n                    // importShapeLayer.add(graphic);\r\n                    graphic.setAttributes({\r\n                      CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_IMPORT_SHAPE,\r\n                    });\r\n                    map.graphics.add(graphic);\r\n                  });\r\n\r\n                  returnData.geometryType = 'POLYGON';\r\n                  returnData.isSupport = true;\r\n\r\n                  layerExtentGEO = layer.layerDefinition.extent;\r\n                } else if (geometryType === 'esriGeometryPolyline') {\r\n                  const symbolLine = new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color([238, 69, 0, 1]), 3);\r\n\r\n                  layer.featureSet.features.forEach((featureITM) => {\r\n                    const polyline = new Polyline({\r\n                      paths: featureITM.geometry.paths,\r\n                      spatialReference: {\r\n                        wkid: map.spatialReference,\r\n                      },\r\n                    });\r\n                    const graphic = new Graphic(polyline, symbolLine, featureITM.attributes);\r\n                    // importShapeLayer.add(graphic);\r\n                    graphic.setAttributes({\r\n                      CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_IMPORT_SHAPE,\r\n                    });\r\n                    map.graphics.add(graphic);\r\n                  });\r\n\r\n                  returnData.geometryType = 'LINE';\r\n                  returnData.isSupport = true;\r\n\r\n                  layerExtentGEO = layer.layerDefinition.extent;\r\n                } else if (geometryType === 'esriGeometryPoint') {\r\n                  const symbolPoint = new SimpleMarkerSymbol({\r\n                    color: Color([238, 69, 0, 1]),\r\n                    size: 12,\r\n                    type: 'simplemarkersymbol',\r\n                    style: 'STYLE_CIRCLE',\r\n                    outline: {\r\n                      color: Color([0, 0, 0]),\r\n                      width: 1,\r\n                    },\r\n                  });\r\n                  layer.featureSet.features.forEach((featureITM) => {\r\n                    const point = new Point(\r\n                      [featureITM.geometry.x, featureITM.geometry.y],\r\n                      new SpatialReference({\r\n                        wkid: map.spatialReference,\r\n                      })\r\n                    );\r\n                    const graphic = new Graphic(point, symbolPoint, featureITM.attributes);\r\n                    graphic.setAttributes({\r\n                      CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_IMPORT_SHAPE,\r\n                    });\r\n                    map.graphics.add(graphic);\r\n                    // importShapeLayer.add(graphic);\r\n                  });\r\n\r\n                  returnData.geometryType = 'POINT';\r\n                  returnData.isSupport = true;\r\n\r\n                  layerExtentGEO = layer.layerDefinition.extent;\r\n                } else {\r\n                  returnData.message = messageConfig.INVALID_DATA;\r\n                }\r\n\r\n                if (layerExtentGEO) {\r\n                  //Extent ไปยังบริเวณที่มี Graphic\r\n                  returnData.extend = extentGraphicImportShape(map, layerExtentGEO, { Extent, SpatialReference });\r\n                }\r\n              } else {\r\n                //ไม่มี Feature\r\n                returnData.message = messageConfig.NO_FEATURES_IN_LAYER;\r\n              }\r\n            }\r\n          }\r\n          callback(returnData);\r\n        },\r\n        error: (err) => {\r\n          let messageError = messageConfig.CONNECT_FAIL;\r\n          console.log('err', err);\r\n          //ไม่สามารถ check file .prj ได้\r\n          //ไม่สามารถ check .shx .shp .bdf แยก error message ได้\r\n          if (err.message.includes('No shape file found')) {\r\n            messageError = messageConfig.MISSIONG_SHX_SHP_DBF;\r\n          } else {\r\n            messageError = messageConfig.ERROR_FILE;\r\n          }\r\n          callback({\r\n            graphic: [],\r\n            geometryType: '',\r\n            isSupport: false,\r\n            message: messageError,\r\n            error: err,\r\n          });\r\n        },\r\n      });\r\n    }\r\n  );\r\n};\r\n\r\nexport const extentToListImportShape = (mapParam, { extent }) => {\r\n  EsriLoader.loadModules(['esri/geometry/Extent', 'esri/SpatialReference'], options).then(([Extent, SpatialReference]) => {\r\n    var extentGEO = new Extent(extent.xmin, extent.ymin, extent.xmax, extent.ymax, new SpatialReference({ wkid: extent.spatialReference.wkid }));\r\n    mapParam.map.setExtent(extentGEO.getExtent().expand(2));\r\n  });\r\n};\r\n\r\nexport const drawGraphicSpatialSearch = (mapParam, params) => {\r\n  // console.log('=====================>drawGraphicSpatialSearch ::: ', params);\r\n  const showLoading = () => {\r\n    if (params.loading && params.loading.show) params.loading.show();\r\n  };\r\n\r\n  const hideLoading = () => {\r\n    if (params.loading && params.loading.hide) params.loading.hide();\r\n  };\r\n\r\n  if (evtDrawSpatial) {\r\n    evtDrawSpatial.remove();\r\n  }\r\n\r\n  EsriLoader.loadModules(['esri/tasks/query', 'esri/toolbars/draw', 'esri/tasks/QueryTask'], options).then(([Query, Draw, QueryTask]) => {\r\n    clearEvtDrawMap(mapParam);\r\n    let queryTaskUrl = null;\r\n    if (params.menu === 'OR1') {\r\n      queryTaskUrl = window.CONFIG_URL_GIS.CONSTRUCT_PNT;\r\n    } else if (params.menu === 'TR900') {\r\n      queryTaskUrl = window.CONFIG_URL_GIS.HOUSE_PNT;\r\n    }\r\n    const qTask = new QueryTask(queryTaskUrl);\r\n    let selectQuery = new Query();\r\n\r\n    // mapParam.map.setMapCursor(\"crosshair\");\r\n    // mapParam.drawMap.activate(Draw.RECTANGLE);\r\n    // evtDrawSpatial = mapParam.drawMap.on(\"draw-complete\", evt => {\r\n    // \tshowLoading();\r\n    // \tmapParam.map.setMapCursor(\"default\");\r\n    // \tmapParam.drawMap.deactivate();\r\n    // \tselectQuery.geometry = evt.geometry;\r\n    // \tselectQuery.returnGeometry = true;\r\n    // \tselectQuery.outFields = [\"*\"];\r\n    // \tqTask.execute(selectQuery, response => {\r\n    // \t\thideLoading();\r\n    // \t\tparams.callback(response.features, evt.geometry)\r\n    // \t});\r\n    // })\r\n\r\n    createEvtDrawMap(mapParam, {\r\n      ...params,\r\n      activateType: Draw.RECTANGLE,\r\n      callbackDrawComplete: () => (evt) => {\r\n        showLoading();\r\n        clearEvtDrawMap(mapParam);\r\n        selectQuery.geometry = evt.geometry;\r\n        selectQuery.returnGeometry = true;\r\n        selectQuery.outFields = ['*'];\r\n        qTask.execute(selectQuery, (response) => {\r\n          hideLoading();\r\n          params.callback(response.features, evt.geometry);\r\n        });\r\n      },\r\n    });\r\n  });\r\n};\r\n\r\nexport const cleardrawSpatialSearchOR1 = (mapParam, param = null) => {\r\n  mapParam.drawMap.deactivate();\r\n  mapParam.map.setMapCursor('default');\r\n\r\n  if (param && param.isClearSearchContructLayer) {\r\n    let searchContructLayer = mapParam.map.getLayer('SearchContructLayer');\r\n    if (searchContructLayer) {\r\n      mapParam.map.removeLayer(searchContructLayer);\r\n    }\r\n  }\r\n\r\n  clearGraphic(mapParam, [Constants.LISTGRAPHICLAYER.GRAPHICLAYER_DRAW_SPATIAL_SEARCH]);\r\n\r\n  if (evtDrawSpatial) {\r\n    evtDrawSpatial.remove();\r\n  }\r\n};\r\n\r\nexport const cleardrawSpatialSearchTR900 = (mapParam, param = null) => {\r\n  mapParam.drawMap.deactivate();\r\n  mapParam.map.setMapCursor('default');\r\n\r\n  if (param && param.isClearSearchHouseLayer) {\r\n    let SearchHouseLayer = mapParam.map.getLayer('SearchHouseLayer');\r\n    if (SearchHouseLayer) {\r\n      mapParam.map.removeLayer(SearchHouseLayer);\r\n    }\r\n  }\r\n\r\n  clearGraphic(mapParam, [Constants.LISTGRAPHICLAYER.GRAPHICLAYER_DRAW_SPATIAL_SEARCH]);\r\n\r\n  if (evtDrawSpatial) {\r\n    evtDrawSpatial.remove();\r\n  }\r\n};\r\n\r\nexport const clearDrawEventExportShape = ({ map, drawMap }) => {\r\n  map.setMapCursor('default');\r\n  drawMap.deactivate();\r\n};\r\n\r\nexport const clearExportShapeGraphic = ({ map, drawMap }) => {\r\n  // clearDrawEventExportShape({map, drawMap});\r\n  // const exportShapeLayerID = Constants.LISTGRAPHICLAYER.GRAPHICLAYER_DRAW_EXPORT_SHAPE;\r\n  // const exportShapeLayer = getLayerByID(map, exportShapeLayerID);\r\n  // if (exportShapeLayer) {\r\n  // \texportShapeLayer.clear();\r\n  // }\r\n  clearGraphic({ map }, [Constants.LISTGRAPHICLAYER.GRAPHICLAYER_DRAW_EXPORT_SHAPE]);\r\n};\r\n\r\nexport const createDrawAreaExportShape = (mapParam, { callbackFn, loadingFunction }) => {\r\n  EsriLoader.loadModules(['dojo/keys', 'esri/sniff'], options).then(([keys, has]) => {\r\n    const exportShapeLayer = getLayerByID(mapParam.map, Constants.LISTGRAPHICLAYER.GRAPHICLAYER_DRAW_EXPORT_SHAPE);\r\n    // exportShapeLayer.clear();\r\n    clearGraphic(mapParam, [Constants.LISTGRAPHICLAYER.GRAPHICLAYER_DRAW_EXPORT_SHAPE]);\r\n    clearEvtDrawMap(mapParam);\r\n    mapParam.map.setMapCursor('crosshair');\r\n    mapParam.map.enableSnapping({\r\n      snapKey: has('mac') ? keys.META : keys.CTRL,\r\n    });\r\n\r\n    if (evtDrawMap) {\r\n      evtDrawMap.remove();\r\n    }\r\n    mapParam.drawMap.activate('polygon');\r\n    evtDrawMap = mapParam.drawMap.on('draw-complete', drawExportShapeComplete(mapParam, exportShapeLayer, callbackFn, loadingFunction));\r\n  });\r\n};\r\n\r\n//หลังทำการวัดเสร็จ\r\nconst drawExportShapeComplete = ({ map, drawMap }, layer, callbackFn, loadingFunction) => (evt) => {\r\n  const showLoading = () => {\r\n    if (loadingFunction && loadingFunction.showLoading) {\r\n      loadingFunction.showLoading();\r\n    }\r\n  };\r\n  const hideLoading = () => {\r\n    if (loadingFunction && loadingFunction.hideLoading) {\r\n      loadingFunction.hideLoading();\r\n    }\r\n  };\r\n\r\n  EsriLoader.loadModules(\r\n    [\r\n      'esri/symbols/SimpleFillSymbol',\r\n      'esri/graphic',\r\n      'esri/symbols/SimpleLineSymbol',\r\n      'esri/Color',\r\n      'esri/geometry/geometryEngineAsync',\r\n      'esri/geometry/geometryEngine',\r\n      'esri/geometry/Polygon',\r\n    ],\r\n    options\r\n  ).then(async ([SimpleFillSymbol, Graphic, SimpleLineSymbol, Color, GeometryEngineAsync, GeometryEngine, Polygon]) => {\r\n    if (layer) {\r\n      layer.clear();\r\n    }\r\n\r\n    clearGraphic({ map }, [Constants.LISTGRAPHICLAYER.GRAPHICLAYER_DRAW_EXPORT_SHAPE]);\r\n\r\n    const returnData = {\r\n      geometry: null,\r\n      areaSQ_KM: null,\r\n      isSupportArea: false,\r\n    };\r\n    try {\r\n      showLoading();\r\n      const area = GeometryEngine.geodesicArea(evt.geometry, 'square-kilometers');\r\n\r\n      returnData.geometry = evt.geometry;\r\n      returnData.areaSQ_KM = area;\r\n\r\n      if (area > 0) {\r\n        if (area < 10) {\r\n          const symbol = new SimpleFillSymbol(\r\n            SimpleFillSymbol.STYLE_SOLID,\r\n            new SimpleLineSymbol('solid', new Color([255, 0, 0]), 2),\r\n            new Color([0, 0, 0, 0.25])\r\n          );\r\n          const displayGraphic = new Graphic(evt.geometry, symbol);\r\n          displayGraphic.setAttributes({\r\n            CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_DRAW_EXPORT_SHAPE,\r\n          });\r\n          map.graphics.add(displayGraphic);\r\n          returnData.isSupportArea = true;\r\n          hideLoading();\r\n          callbackFn(returnData);\r\n        } else {\r\n          hideLoading();\r\n          callbackFn(returnData);\r\n        }\r\n      } else {\r\n        hideLoading();\r\n        callbackFn(returnData);\r\n      }\r\n    } catch (err) {\r\n      console.log('err', err);\r\n      hideLoading();\r\n      callbackFn(returnData);\r\n    }\r\n  });\r\n};\r\n\r\nexport const saveExportShapeRequest = (geometry, params, callbackFn) => {\r\n  EsriLoader.loadModules(['esri/layers/FeatureLayer', 'esri/graphic'], options).then(([FeatureLayer, Graphic]) => {\r\n    const featureLayer = new FeatureLayer(window.SAVE_SURVEY_EXPORT_SHAPE_REQ);\r\n    var gp = new Graphic();\r\n    gp.setGeometry(geometry);\r\n    const exportDate = DateTimeUtils.convertDatetimeToCallService(new Date());\r\n    const attributeMatchTable = {\r\n      EXPORT_DATE: exportDate,\r\n      STATUS: 'W',\r\n    };\r\n    // console.log('params', params)\r\n    Object.keys(params).forEach((key) => {\r\n      if (key === 'userID') {\r\n        attributeMatchTable['USER_ID'] = params[key];\r\n      } else if (key === 'layerName') {\r\n        attributeMatchTable['LAYER_NAME'] = params[key];\r\n      } else if (key === 'surveyUserID') {\r\n        attributeMatchTable['SURVEY_USER_ID'] = params[key];\r\n      } else if (key === 'startDate') {\r\n        attributeMatchTable['START_DATE'] = DateTimeUtils.convertDatetimeToCallService(params[key]);\r\n      } else if (key === 'endDate') {\r\n        attributeMatchTable['END_DATE'] = DateTimeUtils.convertDatetimeToCallService(params[key]);\r\n      }\r\n    });\r\n    gp.setAttributes(attributeMatchTable);\r\n\r\n    const returnData = {\r\n      isSuccess: false,\r\n      message: 'บันทึกไม่สำเร็จ',\r\n    };\r\n    //add Export shape request to gis to DB\r\n    featureLayer.applyEdits(\r\n      [gp],\r\n      null,\r\n      null,\r\n      (response) => {\r\n        if (response && response.length > 0) {\r\n          if (response[0].success) {\r\n            returnData.isSuccess = true;\r\n            // returnData.message = 'บันทึกข้อมูลสำเร็จ'\r\n            returnData.message = 'กำลังจัดเตรียมข้อมูล';\r\n            returnData.objectID = response[0].objectId;\r\n          }\r\n        }\r\n        callbackFn(returnData);\r\n      },\r\n      (error) => {\r\n        returnData.isSuccess = false;\r\n        returnData.message = 'บันทึกไม่สำเร็จ';\r\n        callbackFn(returnData);\r\n      }\r\n    );\r\n  });\r\n};\r\n//draw graphic map tool\r\nexport const DrawGraphicByAttr = (mapParam, { geometry, layer, drawType, attr }) => {\r\n  EsriLoader.loadModules(\r\n    ['esri/graphic', 'esri/symbols/SimpleMarkerSymbol', 'esri/symbols/SimpleLineSymbol', 'esri/symbols/SimpleFillSymbol', 'esri/symbols/TextSymbol'],\r\n    options\r\n  ).then(([Graphic, SimpleMarkerSymbol, SimpleLineSymbol, SimpleFillSymbol, TextSymbol]) => {\r\n    // let gpLayer = mapParam.map.getLayer(layer);\r\n    let symbol = null;\r\n    let styleNormal = ['solid', 'null', 'vertical', 'horizontal', 'cross'];\r\n    switch (drawType) {\r\n      case Constants.DRAW_GRAPHIC_MODE.point:\r\n        const typePoint = Constants.TYPE_OF_STYLE_POINT.filter((item) => {\r\n          return item.id === attr.style;\r\n        });\r\n        const stylePoint = typePoint[0].name.toLowerCase();\r\n        symbol = new SimpleMarkerSymbol({\r\n          color: attr.color,\r\n          style: `esriSMS${stylePoint.charAt(0).toUpperCase() + stylePoint.slice(1)}`,\r\n          size: attr.size,\r\n          outline: {\r\n            color: attr.outlineColor,\r\n            width: 1,\r\n            type: 'esriSLS',\r\n            style: 'esriSLSSolid',\r\n          },\r\n        });\r\n        break;\r\n      case Constants.DRAW_GRAPHIC_MODE.line:\r\n        const typeLine = Constants.TYPE_OF_STYLE_LINE.filter((item) => {\r\n          return item.id === attr.style;\r\n        });\r\n\r\n        // console.log('typeLine',typeLine)\r\n        // const styleLine = typeLine[0].name.toLowerCase();\r\n        symbol = new SimpleLineSymbol({\r\n          color: attr.outlineColor,\r\n          style: `esriSLS${typeLine[0].esri}`,\r\n          width: attr.width,\r\n          type: 'esriSLS',\r\n        });\r\n        break;\r\n      case Constants.DRAW_GRAPHIC_MODE.polygon:\r\n        const typePolygon = Constants.TYPE_OF_STYLE_POLYGON_CIRCLE.filter((item) => {\r\n          return item.id === attr.style;\r\n        });\r\n        const stylePolygon = typePolygon[0].name.toLowerCase();\r\n        const notStylePolygonDiagonal = styleNormal.filter((item) => {\r\n          return stylePolygon === item;\r\n        });\r\n\r\n        symbol = new SimpleFillSymbol({\r\n          color: attr.color,\r\n          style:\r\n            notStylePolygonDiagonal.length > 0\r\n              ? `esriSFS${stylePolygon.charAt(0).toUpperCase() + stylePolygon.slice(1)}`\r\n              : `esriSFS${stylePolygon.charAt(0).toUpperCase() + stylePolygon.slice(1)}Diagonal`,\r\n          size: attr.size,\r\n          type: 'esriSFS',\r\n          outline: {\r\n            color: attr.outlineColor,\r\n            width: 1,\r\n            type: 'esriSLS',\r\n            style: 'esriSLSSolid',\r\n          },\r\n        });\r\n        break;\r\n      case Constants.DRAW_GRAPHIC_MODE.circle:\r\n        const typeCircle = Constants.TYPE_OF_STYLE_POLYGON_CIRCLE.filter((item) => {\r\n          return item.id === attr.style;\r\n        });\r\n        const styleCircle = typeCircle[0].name.toLowerCase();\r\n        const notStyleCircleDiagonal = styleNormal.filter((item) => {\r\n          return styleCircle === item;\r\n        });\r\n        // console.log(attr.color)\r\n        symbol = new SimpleFillSymbol({\r\n          color: attr.color,\r\n          style:\r\n            notStyleCircleDiagonal.length > 0\r\n              ? `esriSFS${styleCircle.charAt(0).toUpperCase() + styleCircle.slice(1)}`\r\n              : `esriSFS${styleCircle.charAt(0).toUpperCase() + styleCircle.slice(1)}Diagonal`,\r\n          size: attr.size,\r\n          type: 'esriSFS',\r\n          outline: {\r\n            color: attr.outlineColor,\r\n            width: 1,\r\n            type: 'esriSLS',\r\n            style: 'esriSLSSolid',\r\n          },\r\n        });\r\n        break;\r\n      case Constants.DRAW_GRAPHIC_MODE.text:\r\n        const font = Constants.TYPE_OF_FONT.filter((item) => {\r\n          return item.id === attr.font;\r\n        });\r\n        symbol = new TextSymbol({\r\n          color: attr.color,\r\n          text: attr.text,\r\n          type: 'esriTS',\r\n          font: {\r\n            size: attr.size,\r\n            style: 'normal',\r\n            weight: 'normal',\r\n            family: font[0].name,\r\n          },\r\n        });\r\n        break;\r\n      default:\r\n        break;\r\n    }\r\n\r\n    //??? graphic\r\n    const graphic = new Graphic(geometry, symbol);\r\n    graphic.setAttributes({ CUSTOM_KEY: layer });\r\n    mapParam.map.graphics.add(graphic);\r\n    //Pboy fix override\r\n    //gpLayer.add(graphic)\r\n  });\r\n};\r\n\r\n// export const drawHouseNoOfSearchMenu = (mapParam, { listPoint = [] } = {}) => {\r\n// \t// console.log('drawHouseNoOfSearchMenu', mapParam, listPoint)\r\n// \tEsriLoader.loadModules([\r\n// \t\t\"esri/graphic\",\r\n// \t\t\"esri/geometry/Polygon\",\r\n// \t\t\"esri/tasks/GeometryService\",\r\n// \t\t\"esri/symbols/SimpleFillSymbol\",\r\n// \t\t\"esri/Color\",\r\n// \t\t\"esri/SpatialReference\",\r\n// \t\t\"esri/tasks/ProjectParameters\",\r\n// \t\t\"esri/symbols/SimpleLineSymbol\"\r\n// \t])\r\n// \t\t.then(([\r\n// \t\t\tGraphic,\r\n// \t\t\tPolygon,\r\n// \t\t\tGeometryService,\r\n// \t\t\tSimpleFillSymbol,\r\n// \t\t\tColor,\r\n// \t\t\tSpatialReference,\r\n// \t\t\tProjectParameters,\r\n// \t\t\tSimpleLineSymbol\r\n// \t\t]) => {\r\n// \t\t\t// const locatorLayer = getLayerByID(mapParam.map, Constants.LISTGRAPHICLAYER.GRAPHICLAYER_LOCATOR);\r\n// \t\t\t// locatorLayer.clear();\r\n// \t\t\tclearGraphic(mapParam, [Constants.LISTGRAPHICLAYER.GRAPHICLAYER_DRAW_HOUSENO_SEARCH])\r\n\r\n// \t\t\tconst geometryService = new GeometryService(\"https://utility.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer\");\r\n// \t\t\tconst PrjParams = new ProjectParameters();\r\n\r\n// \t\t\tconst symbolPolygon = new SimpleFillSymbol(SimpleFillSymbol.STYLE_SOLID,\r\n// \t\t\t\tnew SimpleLineSymbol(SimpleLineSymbol.STYLE_DASHDOT,\r\n// \t\t\t\t\tnew Color([255, 0, 0]), 2), new Color([255, 255, 0, 0.25])\r\n// \t\t\t);\r\n// \t\t\tconst polygon = new Polygon({\r\n// \t\t\t\trings: [listPoint],\r\n// \t\t\t\tspatialReference: { wkid: 32647 }\r\n// \t\t\t})\r\n// \t\t\t// console.log('polygon', polygon)\r\n// \t\t\tPrjParams.geometries = [polygon];\r\n// \t\t\tPrjParams.outSR = new SpatialReference({ wkid: 4326 });\r\n\r\n// \t\t\tgeometryService.project(PrjParams, function (outputpoint) {\r\n// \t\t\t\t// console.log('outputpoint', outputpoint)\r\n// \t\t\t\tif (outputpoint.length !== 0) {\r\n// \t\t\t\t\tconst graphic = new Graphic(outputpoint[0], symbolPolygon);\r\n// \t\t\t\t\t// locatorLayer.add(graphic);\r\n// \t\t\t\t\tgraphic.setAttributes({ \"CUSTOM_KEY\": Constants.LISTGRAPHICLAYER.GRAPHICLAYER_DRAW_HOUSENO_SEARCH });\r\n// \t\t\t\t\tmapParam.map.graphics.add(graphic);\r\n// \t\t\t\t\t// mapParam.map.setExtent(outputpoint[0].getExtent().expand(1.5), true)\r\n\r\n// \t\t\t\t\t// let polygonZoom = new Polygon(new SpatialReference({ wkid: 3857 }));\r\n// \t\t\t\t\t// polygonZoom.addRing(val.rings);\r\n// \t\t\t\t}\r\n// \t\t\t});\r\n// \t\t})\r\n// }\r\n\r\nexport const drawMarkPointSTR = (mapParam, { callback, graphic }) => {\r\n  createEvtDrawMap(mapParam, {\r\n    callbackDrawComplete: addGraphicMarkPointSTR,\r\n    callback,\r\n    activateType: 'point',\r\n    graphics: graphic,\r\n  });\r\n};\r\n\r\nexport const addGraphicMarkPointSTR = (mapParam, { callback, graphics }) => (evt) => {\r\n  EsriLoader.loadModules(['esri/symbols/SimpleMarkerSymbol', 'esri/graphic', 'esri/Color'], options).then(([SimpleMarkerSymbol, Graphic, Color]) => {\r\n    // mapParam.map.graphics.removeAll();\r\n    // clearAllGraphic(mapParam);\r\n    mapParam.map.graphics.remove(graphics);\r\n    const symbol = new SimpleMarkerSymbol({\r\n      color: Color([25, 179, 25]),\r\n      type: 'simplemarkersymbol',\r\n      style: 'STYLE_CIRCLE',\r\n      outline: {\r\n        color: Color([0, 0, 0]),\r\n        width: 1,\r\n      },\r\n    });\r\n    const graphic = new Graphic(evt.geometry, symbol);\r\n    callback(evt, graphic);\r\n    // graphic.setAttributes({\r\n    //   CUSTOM_KEY: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CONSTRUCTION_LICENSE,\r\n    // });\r\n    mapParam.map.graphics.add(graphic);\r\n    clearEvtDrawMap(mapParam);\r\n  });\r\n};\r\n\r\nexport const addOldGraphicMarkPointSTR = (mapParam, { geometry, callback }) => {\r\n  EsriLoader.loadModules(['esri/symbols/SimpleMarkerSymbol', 'esri/graphic', 'esri/Color', 'esri/geometry/Point'], options).then(\r\n    ([SimpleMarkerSymbol, Graphic, Color, Point]) => {\r\n      clearAllGraphic(mapParam);\r\n      const symbol = new SimpleMarkerSymbol({\r\n        color: Color([25, 179, 25]),\r\n        type: 'simplemarkersymbol',\r\n        style: 'STYLE_CIRCLE',\r\n        outline: {\r\n          color: Color([0, 0, 0]),\r\n          width: 1,\r\n        },\r\n      });\r\n      const point = new Point(geometry.longitude, geometry.latitude);\r\n      mapParam.map.centerAndZoom(point, 20);\r\n      const graphic = new Graphic(point, symbol);\r\n      callback(graphic);\r\n      mapParam.map.graphics.add(graphic);\r\n    }\r\n  );\r\n};\r\n\r\nexport const applyEditMarkPointSTRSingle = (mapParam, params) => {\r\n  EsriLoader.loadModules(['esri/layers/FeatureLayer', 'esri/graphic'], options).then(([FeatureLayer, Graphic]) => {\r\n    const featureLayer = new FeatureLayer(`${window.CPUDD_CAH_TR_POINT_FEATURE}`);\r\n    const gp = new Graphic();\r\n    gp.setGeometry(params.geometry);\r\n    gp.setAttributes({\r\n      BL_PAGE_NO: params.permitNo,\r\n      BL_HOUSENUM: params.houseNo,\r\n      BL_HID: params.houseCode,\r\n      BL_REMARK: params.remark,\r\n      CREATED_DATE: params.createDate,\r\n      UPDATED_DATE: params.updateDate,\r\n      DISTRICT_CODE: params.districtID,\r\n      PROVINCE_CODE: params.provinceID,\r\n      SUB_DISTRICT_CODE: params.subDistrictID,\r\n      LATITUDE: params.latitude,\r\n      LONGITUDE: params.longitude,\r\n      BL_ID: params.BL_ID,\r\n    });\r\n    featureLayer.on('load', function() {\r\n      switch (params.mode) {\r\n        case 'single':\r\n          featureLayer.applyEdits(\r\n            [gp],\r\n            null,\r\n            null,\r\n            (res) => {\r\n              if (res[0].success) {\r\n                params.callback(res, params);\r\n              }\r\n            },\r\n            (ex) => {\r\n              console.log(ex);\r\n            }\r\n          );\r\n          break;\r\n        case 'multiple':\r\n          if (params.objectID) {\r\n            gp.setAttributes({\r\n              OBJECTID: params.objectID,\r\n              BL_PAGE_NO: params.permitNo,\r\n              BL_HOUSENUM: params.houseNo,\r\n              BL_HID: params.houseCode,\r\n              BL_REMARK: params.remark,\r\n              CREATED_DATE: params.createDate ? params.createDate : null,\r\n              UPDATED_DATE: params.updateDate,\r\n              DISTRICT_CODE: params.districtID,\r\n              PROVINCE_CODE: params.provinceID,\r\n              SUB_DISTRICT_CODE: params.subDistrictID,\r\n              LATITUDE: params.latitude,\r\n              LONGITUDE: params.longitude,\r\n              BL_ID: params.BL_ID,\r\n            });\r\n            featureLayer.applyEdits(\r\n              null,\r\n              [gp],\r\n              null,\r\n              (res1, res2) => {\r\n                if (res2[0].success) {\r\n                  params.callback(res2, params);\r\n                }\r\n              },\r\n              (ex) => {\r\n                console.log(ex);\r\n              }\r\n            );\r\n          } else {\r\n            gp.setAttributes({\r\n              BL_PAGE_NO: params.permitNo,\r\n              BL_HOUSENUM: params.houseNo,\r\n              BL_HID: params.houseCode,\r\n              BL_REMARK: params.remark,\r\n              CREATED_DATE: new Date().getTime(),\r\n              UPDATED_DATE: params.updateDate,\r\n              DISTRICT_CODE: params.districtID,\r\n              PROVINCE_CODE: params.provinceID,\r\n              SUB_DISTRICT_CODE: params.subDistrictID,\r\n              LATITUDE: params.latitude,\r\n              LONGITUDE: params.longitude,\r\n              BL_ID: params.BL_ID,\r\n            });\r\n            featureLayer.applyEdits(\r\n              [gp],\r\n              null,\r\n              null,\r\n              (res) => {\r\n                if (res[0].success) {\r\n                  params.callback(res, params);\r\n                }\r\n              },\r\n              (ex) => {\r\n                console.log(ex);\r\n              }\r\n            );\r\n          }\r\n          break;\r\n        case 'delete':\r\n          const param = [params.objectID];\r\n          gp.setAttributes({\r\n            OBJECTID: param,\r\n          });\r\n          featureLayer.applyEdits(\r\n            null,\r\n            null,\r\n            [gp],\r\n            (res1, res2, res3) => {\r\n              if (res3[0].success) {\r\n                params.callback(res3[0]);\r\n              }\r\n            },\r\n            (err) => {\r\n              console.log('applyEditMarkPointSTRSingle err:: ', err);\r\n            }\r\n          );\r\n      }\r\n    });\r\n  });\r\n};\r\n\r\nexport const getPolygonMarkPointSTR = (mapParam, { geometry, callbackFn }) => {\r\n  return EsriLoader.loadModules(['esri/tasks/query', 'esri/tasks/QueryTask'], options).then(([Query, QueryTask]) => {\r\n    return new Promise((resolv, reject) => {\r\n      const qParame = new Query();\r\n      qParame.geometry = geometry;\r\n      qParame.returnGeometry = false;\r\n      qParame.outFields = ['*'];\r\n      const qTask = new QueryTask(`${window.CONFIG_URL_GIS.STR_POLYGON}`);\r\n      qTask.execute(\r\n        qParame,\r\n        (response) => {\r\n          // console.log(response);\r\n          let result = null;\r\n          if (response.features.length > 0) {\r\n            result = response.features[0].attributes;\r\n            callbackFn(result, geometry);\r\n          } else {\r\n            callbackFn(null);\r\n          }\r\n          resolv(result);\r\n        },\r\n        (err) => {\r\n          // console.log('err', err)\r\n          callbackFn({ errMsg: err });\r\n        }\r\n      );\r\n    });\r\n  });\r\n};\r\n\r\nexport const getPolygonMarkPointSTROld = (mapParam, { geometry, callbackFn }) => {\r\n  return EsriLoader.loadModules(['esri/tasks/query', 'esri/tasks/QueryTask', 'esri/geometry/Point'], options).then(([Query, QueryTask, Point]) => {\r\n    return new Promise((resolv, reject) => {\r\n      const point = new Point({\r\n        longitude: geometry.longitude,\r\n        latitude: geometry.latitude,\r\n      });\r\n      // console.log(point);\r\n      const qParame = new Query();\r\n      qParame.geometry = point;\r\n      qParame.returnGeometry = false;\r\n      qParame.outFields = ['*'];\r\n      const qTask = new QueryTask(`${window.CONFIG_URL_GIS.STR_POLYGON}`);\r\n      qTask.execute(\r\n        qParame,\r\n        (response) => {\r\n          // console.log(response);\r\n          let result = null;\r\n          if (response.features.length > 0) {\r\n            result = response.features[0].attributes;\r\n            callbackFn(result, geometry);\r\n          } else {\r\n            callbackFn(null);\r\n          }\r\n          resolv(result);\r\n        },\r\n        (err) => {\r\n          // console.log('err', err)\r\n          callbackFn({ errMsg: err });\r\n        }\r\n      );\r\n    });\r\n  });\r\n};\r\n\r\nexport const applyEditMarkPointSTRPolygon = (mapParam, params) => {\r\n  EsriLoader.loadModules(['esri/layers/FeatureLayer', 'esri/graphic'], options).then(([FeatureLayer, Graphic]) => {\r\n    const featureLayer = new FeatureLayer(`${window.CONFIG_URL_GIS.STR_POLYGON}`);\r\n    const gp = new Graphic();\r\n    gp.setAttributes({\r\n      BL_HID: params.param.BL_HID,\r\n      BL_HOUSENUM: params.param.BL_HOUSENUM,\r\n      BL_ID: params.param.BL_ID,\r\n      BL_PAGE_NO: params.param.BL_PAGE_NO,\r\n      REMARK: params.param.REMARK,\r\n      OBJECTID: params.param.OBJECTID,\r\n      BLDG_ID: params.param.BLDG_ID,\r\n      BL_TYPE: params.param.BL_TYPE,\r\n      BL_FRONTAGE: params.param.BL_FRONTAGE,\r\n      BL_HEIGHT: params.param.BL_HEIGHT,\r\n      BL_DEPTH: params.param.BL_DEPTH,\r\n      BL_NSTOREY: params.param.BL_NSTOREY,\r\n      BL_NUNIT: params.param.BL_NUNIT,\r\n      BL_UNIT_F: params.param.BL_UNIT_F,\r\n      BL_NRESIDENT: params.param.BL_NRESIDENT,\r\n      BL_EMPLOY: params.param.BL_EMPLOY,\r\n      BL_OWNER: params.param.BL_OWNER,\r\n      BL_AREA: params.param.BL_AREA,\r\n      BL_AREA_FLAG: params.param.BL_AREA_FLAG,\r\n      BL_TAX_ID: params.param.BL_TAX_ID,\r\n      BL_USE: params.param.BL_USE,\r\n      BL_USE: params.param.BL_USE,\r\n      BL_MATL: params.param.BL_MATL,\r\n      BL_VILLNUM: params.param.BL_VILLNUM,\r\n      BL_VILLAGE: params.param.BL_VILLAGE,\r\n      BL_ROAD: params.param.BL_ROAD,\r\n      BL_SUBDISTRICT: params.param.BL_SUBDISTRICT,\r\n      BL_DISTRICT: params.param.BL_DISTRICT,\r\n      BL_CHANGWAT: params.param.BL_CHANGWAT,\r\n      BL_POSTCODE: params.param.BL_POSTCODE,\r\n      BL_ADDRESS: params.param.BL_ADDRESS,\r\n      PRJ_ID: params.param.PRJ_ID,\r\n      BL_NAME_T: params.param.BL_NAME_T,\r\n      BL_NAME_E: params.param.BL_NAME_E,\r\n      BL_ACT_MAJOR: params.param.BL_ACT_MAJOR,\r\n      BL_ACT_MINOR: params.param.BL_ACT_MINOR,\r\n      BL_ACT_OTHER: params.param.BL_ACT_OTHER,\r\n      UPDATE_DATA: params.param.UPDATE_DATA,\r\n      MATCHING: params.param.MATCHING,\r\n      X: params.param.X,\r\n      Y: params.param.Y,\r\n      LAT: params.param.LAT,\r\n      LON: params.param.LON,\r\n      STATUS: params.param.STATUS,\r\n      SOURCE: params.param.SOURCE,\r\n      S_DATE: params.param.S_DATE,\r\n      CREATED_USER: params.param.CREATED_USER,\r\n      CREATED_DATE: params.param.CREATED_DATE,\r\n      LAST_EDITED_USER: params.param.LAST_EDITED_USER,\r\n      LAST_EDITED_DATE: params.param.LAST_EDITED_DATE,\r\n    });\r\n    featureLayer.on('load', function() {\r\n      featureLayer.applyEdits(\r\n        null,\r\n        [gp],\r\n        null,\r\n        (res1, res2) => {\r\n          // console.log(res1, res2);\r\n        },\r\n        (err) => {\r\n          console.log('applyEditMarkPointSTRPolygon err:: ', err);\r\n        }\r\n      );\r\n    });\r\n  });\r\n};\r\n\r\nexport const applyEditMarkPointSTRPolygonDelete = (mapParam, params) => {\r\n  EsriLoader.loadModules(['esri/layers/FeatureLayer', 'esri/graphic'], options).then(([FeatureLayer, Graphic]) => {\r\n    const featureLayer = new FeatureLayer(`${window.CONFIG_URL_GIS.STR_POLYGON}`);\r\n    const gp = new Graphic();\r\n    gp.setAttributes({\r\n      BL_HID: params.param.BL_HID,\r\n      BL_HOUSENUM: params.param.BL_HOUSENUM,\r\n      BL_ID: params.param.BL_ID,\r\n      BL_PAGE_NO: params.param.BL_PAGE_NO,\r\n      REMARK: params.param.REMARK,\r\n      OBJECTID: params.param.OBJECTID,\r\n      BLDG_ID: params.param.BLDG_ID,\r\n      BL_TYPE: params.param.BL_TYPE,\r\n      BL_FRONTAGE: params.param.BL_FRONTAGE,\r\n      BL_HEIGHT: params.param.BL_HEIGHT,\r\n      BL_DEPTH: params.param.BL_DEPTH,\r\n      BL_NSTOREY: params.param.BL_NSTOREY,\r\n      BL_NUNIT: params.param.BL_NUNIT,\r\n      BL_UNIT_F: params.param.BL_UNIT_F,\r\n      BL_NRESIDENT: params.param.BL_NRESIDENT,\r\n      BL_EMPLOY: params.param.BL_EMPLOY,\r\n      BL_OWNER: params.param.BL_OWNER,\r\n      BL_AREA: params.param.BL_AREA,\r\n      BL_AREA_FLAG: params.param.BL_AREA_FLAG,\r\n      BL_TAX_ID: params.param.BL_TAX_ID,\r\n      BL_USE: params.param.BL_USE,\r\n      BL_USE: params.param.BL_USE,\r\n      BL_MATL: params.param.BL_MATL,\r\n      BL_VILLNUM: params.param.BL_VILLNUM,\r\n      BL_VILLAGE: params.param.BL_VILLAGE,\r\n      BL_ROAD: params.param.BL_ROAD,\r\n      BL_SUBDISTRICT: params.param.BL_SUBDISTRICT,\r\n      BL_DISTRICT: params.param.BL_DISTRICT,\r\n      BL_CHANGWAT: params.param.BL_CHANGWAT,\r\n      BL_POSTCODE: params.param.BL_POSTCODE,\r\n      BL_ADDRESS: params.param.BL_ADDRESS,\r\n      PRJ_ID: params.param.PRJ_ID,\r\n      BL_NAME_T: params.param.BL_NAME_T,\r\n      BL_NAME_E: params.param.BL_NAME_E,\r\n      BL_ACT_MAJOR: params.param.BL_ACT_MAJOR,\r\n      BL_ACT_MINOR: params.param.BL_ACT_MINOR,\r\n      BL_ACT_OTHER: params.param.BL_ACT_OTHER,\r\n      UPDATE_DATA: params.param.UPDATE_DATA,\r\n      MATCHING: params.param.MATCHING,\r\n      X: params.param.X,\r\n      Y: params.param.Y,\r\n      LAT: params.param.LAT,\r\n      LON: params.param.LON,\r\n      STATUS: params.param.STATUS,\r\n      SOURCE: params.param.SOURCE,\r\n      S_DATE: params.param.S_DATE,\r\n      CREATED_USER: params.param.CREATED_USER,\r\n      CREATED_DATE: params.param.CREATED_DATE,\r\n      LAST_EDITED_USER: params.param.LAST_EDITED_USER,\r\n      LAST_EDITED_DATE: params.param.LAST_EDITED_DATE,\r\n    });\r\n    featureLayer.on('load', function() {\r\n      featureLayer.applyEdits(\r\n        null,\r\n        [gp],\r\n        null,\r\n        (res1, res2) => {\r\n          // console.log(res1, res2);\r\n        },\r\n        (err) => {\r\n          console.log('applyEditMarkPointSTRPolygonDelete err:: ', err);\r\n        }\r\n      );\r\n    });\r\n  });\r\n};\r\n\r\nexport const clearEvtDrawMapSTR = (mapParam) => {\r\n  clearEvtDrawMap(mapParam);\r\n};\r\n\r\nexport const panToPointMarkPointSTR = (mapParam, params) => {\r\n  EsriLoader.loadModules(['esri/geometry/Point'], options).then(([Point]) => {\r\n    const point = new Point(params.longitude, params.latitude);\r\n    mapParam.map.centerAndZoom(point, 20);\r\n  });\r\n};\r\n\r\nexport const clearGraphicMarkPointSTR = (mapParam, params) => {\r\n  mapParam.map.graphics.remove(params.graphic);\r\n};\r\n\r\nexport const clearEditGraphic = (mapParam) => {\r\n  if (editSubmitPmr) {\r\n    editSubmitPmr.deactivate();\r\n    editSubmitPmr = null;\r\n    // gpMoveSubmitPmr = null\r\n    clearEditPmr(mapParam);\r\n  }\r\n\r\n  if (editConstruct) {\r\n    editConstruct.deactivate();\r\n    editConstruct = null;\r\n    clearEditConstruct(mapParam);\r\n  }\r\n\r\n  if (editDraftPnt) {\r\n    editDraftPnt.deactivate();\r\n    editDraftPnt = null;\r\n    clearEditDraftPnt(mapParam);\r\n  }\r\n\r\n  if (editDraftLine) {\r\n    editDraftLine.deactivate();\r\n    editDraftLine = null;\r\n  }\r\n};\r\n","import React, { Component } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { bindActionCreators } from 'redux';\r\nimport MenuUserView from '../../Presentationals/Web/MenuUserView';\r\nimport * as AuthenAction from '../../Actions/Authentications/AuthenAction';\r\nimport * as ApiPrivateRoute from '../../Config/AppRoute/ApiPrivateRoute';\r\nimport * as MapAction from '../../Actions/Web/Maps/MapAction';\r\nimport * as MapFunctions from '../../Map/MapFunctions';\r\nimport {\r\n    clearTokenLocalStore,\r\n    getTypeLocalStore,\r\n    getLoginHistoryLocalStore\r\n} from '../../Utilities/LocalStorageUtill';\r\nimport { HEADER, SYSTEM } from '../../Constants/Constants';\r\nimport RouteConfig from '../../Config/AppRoute/RouteConfig';\r\n\r\nexport class MenuUser extends Component {\r\n    constructor(props) {\r\n        super(props)\r\n        this.state = {\r\n            anchorEl: null,\r\n        }\r\n    }\r\n\r\n    createListMenu = () => {\r\n        const { autheRdc } = this.props;\r\n        const listMenu = [];\r\n        if (autheRdc && autheRdc.profile && autheRdc.profile.functions) {\r\n            const functions = autheRdc.profile.functions;\r\n            Object.keys(functions).forEach(key => {\r\n                if (functions[key] && functions[key].length > 0 && autheRdc.system !== key) {\r\n                    listMenu.push({\r\n                        id: key,\r\n                        name: HEADER[key].MENU_TITLE\r\n                    })\r\n                }\r\n            })\r\n        }\r\n\r\n        listMenu.push({\r\n            id: \"LOGOUT\",\r\n            name: \"ออกจากระบบ\"\r\n        })\r\n\r\n        return listMenu;\r\n    }\r\n\r\n    handleClick = event => {\r\n        this.setState({ anchorEl: event.currentTarget });\r\n    };\r\n\r\n    handleClose = () => {\r\n        this.setState({ anchorEl: null });\r\n    };\r\n\r\n    saveLogoutHistory = () => {\r\n        const loginHistoryID = getLoginHistoryLocalStore();\r\n        if (loginHistoryID) { // update logout\r\n            ApiPrivateRoute.saveLogoutHistory(loginHistoryID)\r\n        }\r\n    }\r\n\r\n    handleClickMenu = menu => async evt => {\r\n        const { authenAction,mapAction, history } = this.props;\r\n        authenAction.updateSystem(null)\r\n        await mapAction.bindMapCommand(MapFunctions.clearEvtDrawMap)\r\n        this.saveLogoutHistory();\r\n        switch (menu.id) {\r\n            case SYSTEM.CMP:\r\n                authenAction.clearReducer()\r\n                history.push(RouteConfig.CMPWebStaff)\r\n                break;\r\n            case SYSTEM.PMR1:\r\n                authenAction.clearReducer()\r\n                history.push(RouteConfig.PMRWeb)\r\n                break;\r\n            case SYSTEM.CAH:\r\n                authenAction.clearReducer()\r\n                history.push(RouteConfig.CAHWeb)\r\n                break;\r\n            case SYSTEM.UM:\r\n                authenAction.clearReducer()\r\n                history.push(RouteConfig.UMUser)\r\n                break;\r\n            case SYSTEM.Survey:\r\n                authenAction.clearReducer()\r\n                history.push(RouteConfig.SurveyWeb)\r\n                break;\r\n            case \"LOGOUT\": //ออกจากระบบ\r\n                const type = getTypeLocalStore()\r\n                const pathLogin = type === \"o\" ? RouteConfig.CMSLoginStaff : RouteConfig.CMSLogin;\r\n                clearTokenLocalStore()\r\n                authenAction.clearAllReducer();\r\n                history.push(pathLogin)\r\n                break;\r\n            default:\r\n                break;\r\n        }\r\n    }\r\n\r\n    render() {\r\n        const { anchorEl } = this.state;\r\n        const { autheRdc } = this.props;\r\n        const open = Boolean(anchorEl);\r\n        const listMenus = this.createListMenu()\r\n\r\n        return (\r\n            <MenuUserView\r\n                openMenu={open}\r\n                anchorElMenu={anchorEl}\r\n                profile={autheRdc.profile}\r\n                onClick={this.handleClick}\r\n                onClose={this.handleClose}\r\n                listMenus={listMenus}\r\n                onClickMenu={this.handleClickMenu}\r\n            />\r\n        )\r\n    }\r\n}\r\n\r\n\r\nconst mapStateToProps = state => ({\r\n    autheRdc: state.authen,\r\n});\r\n\r\nconst mapDispatchToProps = (dispatch) => ({\r\n    authenAction: bindActionCreators(AuthenAction, dispatch),\r\n    mapAction: bindActionCreators(MapAction,dispatch)\r\n})\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(MenuUser)\r\n","import React from 'react';\r\nimport { withStyles } from '@material-ui/core/styles'\r\nimport Grid from '@material-ui/core/Grid';\r\n\r\nconst renderBreadCrumbStart = ({ classes, label, index }) => (\r\n    <div className={`${classes.breadCrumbStart}`} key={`${label}-${index}`} >\r\n        <label>{label}</label>\r\n    </div>\r\n)\r\n\r\nconst renderBreadCrumbNext = ({ classes, label, index }) => (\r\n    <div className={`${classes.breadCrumbNext}`} key={`${label}-${index}`}>\r\n        <label>{label}</label>\r\n    </div>\r\n)\r\n\r\nconst BreadCrumbUmView = ({\r\n    classes,\r\n    listMenu\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root}>\r\n            {listMenu.map((menu, index) => index === 0 ? renderBreadCrumbStart({ classes, label: menu, index }) : renderBreadCrumbNext({ classes, label: menu, index }))}\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        width: '100%',\r\n        height: '100%',\r\n    },\r\n    breadCrumbStart: {\r\n        clipPath: \"polygon(0% 0%, 95% 0%, 100% 50%, 95% 100%, 0% 100%)\",\r\n        backgroundColor: '#E0F0E3',\r\n        minWidth: '150px',\r\n        display: \"flex\",\r\n        alignItems: \"center\",\r\n        justifyContent: \"center\",\r\n        padding: '0px 15px',\r\n        border: 'solid 1px #BCCDBF'\r\n    },\r\n    breadCrumbNext: {\r\n        clipPath: \"polygon(95% 1%, 100% 50%, 95% 100%, 0% 100%, 5% 50%, 0% 0%)\",\r\n        backgroundColor: '#E0F0E3',\r\n        minWidth: '150px',\r\n        display: \"flex\",\r\n        alignItems: \"center\",\r\n        justifyContent: \"center\",\r\n        padding: '0px 15px',\r\n        boxShadow: \"inset 50px 0px 45px -60px rgba(0,0,0,0.6)\",\r\n        marginLeft: '-9px',\r\n        border: 'solid 1px #BCCDBF'\r\n    }\r\n}))(BreadCrumbUmView);\r\n","import React, { Component } from 'react';\r\nimport BreadCrumbUmView from '../Presentationals/BreadCrumbUmView';\r\n\r\nexport default class BreadCrumbUm extends Component {\r\n    render() {\r\n        const { listMenu } = this.props;\r\n\r\n        return (\r\n            <BreadCrumbUmView\r\n                listMenu={listMenu}\r\n            />\r\n        )\r\n    }\r\n}\r\n","import React, { Fragment } from 'react';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport AppBar from '@material-ui/core/AppBar';\r\nimport IconButton from '@material-ui/core/IconButton';\r\nimport Hidden from '@material-ui/core/Hidden';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport IconMenu from '@material-ui/icons/Menu';\r\nimport Paper from '@material-ui/core/Paper';\r\n\r\nimport { HEADER } from '../../Constants/Constants';\r\nimport Menu from '../../Containers/UserManagements/Menu';\r\nimport MenuUser from '../../Containers/Web/MenuUser';\r\nimport BreadCrumb from '../../Controls/Containers/BreadCrumbUm';\r\n\r\nconst drawerWidth = 260;\r\nconst styles = theme => ({\r\n    root: {\r\n        flexGrow: 1,\r\n        zIndex: 1,\r\n        position: 'relative',\r\n        display: 'flex',\r\n        width: '100%',\r\n        height: '100%',\r\n        overflow: 'hidden'\r\n    },\r\n    icon: {\r\n        color: '#fff',\r\n        padding: '12px 12px 12px 12px',\r\n        marginTop: '10px'\r\n    },\r\n    appBar: {\r\n        position: 'absolute',\r\n        zIndex: theme.zIndex.drawer + 1,\r\n        marginLeft: drawerWidth,\r\n        height: \"70px\",\r\n        [theme.breakpoints.down('md')]: {\r\n            backgroundSize: 'auto 70%',\r\n            backgroundPosition: 'bottom right'\r\n        },\r\n        backgroundColor: theme.mainTheme.color1\r\n    },\r\n    prositionhead: {\r\n        display: 'flex',\r\n        alignItems: 'center',\r\n        justifyContent: 'space-between'\r\n    },\r\n    profileheard: {\r\n        position: 'absolute',\r\n        right: '70px'\r\n    },\r\n    menuUser: {\r\n        position: 'absolute',\r\n        right: '20px'\r\n    },\r\n    header: {\r\n        flexDirection: 'column',\r\n        alignItems: 'flex-start',\r\n    },\r\n    \r\n    typo: {\r\n        lineHeight: 1,\r\n        [theme.breakpoints.down('xs')]: {\r\n            fontSize: '18px',\r\n        }\r\n    },\r\n    menu: {\r\n        height: 32,\r\n        color: '#fff',\r\n        whiteSpace: 'normal',\r\n        lineHeight: 'unset',\r\n        fontSize: '14px'\r\n    },\r\n    scrollbars: {\r\n        backgroundColor: '#EFEFF1',\r\n    },\r\n    selected: {\r\n        backgroundColor: '#5B5B5F !important'\r\n    },\r\n    myJobMenu: {\r\n        backgroundColor: '#EFEFF1',\r\n        color: '#5B5B5F'\r\n    },\r\n    link: {\r\n        textDecoration: 'none'\r\n    },\r\n    listItemIcon: {\r\n        marginRight: 0,\r\n        color: theme.palette.common.white\r\n    },\r\n    menuFlex: {\r\n        display: 'flex',\r\n        justifyContent: 'space-between',\r\n        height: '90%',\r\n        flexDirection: 'column',\r\n        paddingTop: '60px'\r\n    },\r\n    toolbar: {\r\n        height: 64,\r\n        display: 'flex',\r\n        alignItems: 'center',\r\n        justifyContent: 'center',\r\n        backgroundColor: theme.palette.primary.main\r\n    },\r\n    content: {\r\n        flexGrow: 1,\r\n        height: 'calc( 100% - 70px )',\r\n        marginTop: '70px'\r\n    },\r\n    paperHeader: {\r\n        width: '100%',\r\n        height: '36px',\r\n        padding: '7px'\r\n    },\r\n    imgHeader: {\r\n        height: '60px',\r\n        marginLeft: '10px',\r\n        paddingTop: \"6px\"\r\n    },\r\n    divTitle: {\r\n        height: '100%',\r\n        zIndex: 4,\r\n        display: 'flex',\r\n        flexDirection: \"column\",\r\n        alignItems: \"flex-start\",\r\n        top: '10px',\r\n        marginLeft: \"10px\",\r\n        // display: 'flex',\r\n        justifyContent: 'center',\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            marginLeft: \"10px\",\r\n        }\r\n    },\r\n    title: {\r\n        color: theme.mainTheme.color2,\r\n        fontSize: '17px',\r\n        lineHeight: '25px',\r\n        [theme.breakpoints.down(\"xs\")]: {\r\n            fontSize: theme.textSize.normal,\r\n        }\r\n    },\r\n    // title: {\r\n    //     [theme.breakpoints.down('xs')]: {\r\n    //         fontSize: '20px',\r\n    //     },\r\n    //     color: '#FFFFFF'\r\n    // },\r\n    subTitle: {\r\n        color: theme.mainTheme.color2,\r\n        fontSize: theme.textSize.subtitleHeader,\r\n        [theme.breakpoints.down(\"xs\")]: {\r\n            fontSize: theme.textSize.mini,\r\n        }\r\n    },\r\n    txtGroupName: {\r\n        marginRight: '10px',\r\n        fontWeight: \"bold\"\r\n    },\r\n    profile: {\r\n        color: \"white\",\r\n        height:'70px'\r\n    },\r\n    contentMenu: {\r\n        width: 'calc(100% - 20px)',\r\n        height: 'calc(100% - 50px)',\r\n        marginTop: '5px',\r\n        padding: '10px',\r\n        backgroundColor: 'white'\r\n    },\r\n    textProfile: {\r\n        maxWidth: '330px',\r\n        overflow: 'hidden',\r\n        textOverflow: 'ellipsis',\r\n        whiteSpace:'nowrap',\r\n        fontSize:'15px'\r\n    },\r\n    containerLeft:{\r\n        width: '420px',\r\n        height: '70px',\r\n        [theme.breakpoints.down(\"xs\")]: {\r\n            width: '315px',\r\n        }\r\n    },\r\n    containerRight:{\r\n        width: 'calc(100% - 420px)',\r\n        [theme.breakpoints.down(\"xs\")]: {\r\n            width: 'calc(100% - 315px)',\r\n        }\r\n    }\r\n})\r\n\r\nconst LayoutView = ({\r\n    classes,\r\n    children,\r\n    menuFunctions,\r\n    handleDrawerToggle,\r\n    mobileOpen,\r\n    listMenuBreadcrumb,\r\n    history,\r\n    profile\r\n}) => {\r\n\r\n    return (\r\n        <div className={classes.root}>\r\n            {/* ##################### HEADER ##################### */}\r\n            <AppBar className={classes.appBar} color=\"inherit\">\r\n                <Grid container alignItems=\"center\" justify=\"space-between\">\r\n                    <Grid item className={classes.containerLeft}>\r\n                        <Grid container>\r\n                            <Grid item style={{ height: '70px' }}>\r\n                                <Hidden mdUp key=\"web\">\r\n                                    <IconButton className={classes.icon}\r\n                                        aria-label=\"Menu\"\r\n                                        onClick={handleDrawerToggle}\r\n                                    >\r\n                                        <IconMenu />\r\n                                    </IconButton>\r\n                                </Hidden>\r\n                            </Grid>\r\n                            <Grid item style={{ height: '70px' }}>\r\n                                <Hidden xsDown key=\"web\">\r\n                                    <input type='image' alt=\"img\" src={`${process.env.PUBLIC_URL}/img/layout/login_logo.png`} className={classes.imgHeader} />\r\n                                </Hidden>\r\n                            </Grid>\r\n                            <Grid item style={{ height: '70px' }}>\r\n                                <div className={classes.divTitle}>\r\n                                    <span className={classes.title}>{HEADER.UM.TITLE}</span>\r\n                                    <span className={classes.subTitle} >{HEADER.UM.SUB_TITLE}</span>\r\n                                </div>\r\n                            </Grid>\r\n                        </Grid>\r\n                    </Grid>\r\n\r\n                    <Grid container className={classes.containerRight} >\r\n                        <Grid item xs={12} >\r\n                            <Grid container justify=\"flex-end\" alignItems=\"center\" wrap=\"nowrap\"  className={classes.profile}>\r\n                                {profile && (\r\n                                    <Fragment>\r\n                                        <Hidden smDown key=\"webUser\">\r\n                                            <div className={classes.textProfile} >\r\n                                                <span className={classes.txtGroupName}>{`${profile.firstName ? profile.firstName : \"\"}  ${profile.lastName ? profile.lastName : \"\"} `}</span>\r\n                                            </div>\r\n                                            <div className={classes.textProfile} >\r\n                                                <span>{`${profile && profile.groupName ? profile.groupName : \"\"}`}</span>\r\n                                            </div>\r\n                                        </Hidden>\r\n                                    </Fragment>\r\n                                )}\r\n                                <MenuUser history={history} />\r\n                            </Grid>\r\n                        </Grid>\r\n                    </Grid>\r\n                </Grid>\r\n            </AppBar>\r\n\r\n            {/* ##################### MENU ##################### */}\r\n            {menuFunctions && <Menu\r\n                menuClass={classes.menu}\r\n                menuItemClass={classes.selected}\r\n                listItemIconClass={classes.listItemIcon}\r\n                mobileOpen={mobileOpen}\r\n                handleDrawerToggle={handleDrawerToggle}\r\n                linkClass={classes.link}\r\n                menuFlex={classes.menuFlex}\r\n            />}\r\n\r\n            {/* ##################### CONTENT ##################### */}\r\n            <main className={classes.content}>\r\n                <Paper classes={{ root: classes.paperHeader }} >\r\n                    <BreadCrumb listMenu={listMenuBreadcrumb} />\r\n                </Paper>\r\n                <div className={classes.contentMenu}>\r\n                    {children}\r\n                </div>\r\n            </main>\r\n        </div >\r\n    )\r\n}\r\n\r\nexport default withStyles(styles, { withTheme: true })(LayoutView)","import React, { Component } from 'react'\r\nimport PropTypes from 'prop-types'\r\nimport { bindActionCreators } from 'redux'\r\nimport { connect } from 'react-redux'\r\nimport withWidth from '@material-ui/core/withWidth';\r\n\r\nimport * as AuthenAction from '../../Actions/Authentications/AuthenAction';\r\nimport LayoutView from '../../Presentationals/UserManagements/LayoutView';\r\n\r\nclass Layout extends Component {\r\n    constructor() {\r\n        super()\r\n        this.state = {\r\n            menustatus: false\r\n        }\r\n    }\r\n\r\n    handleDrawerToggle = (res) => {\r\n        const { menustatus } = this.state\r\n        this.setState({\r\n            menustatus: !menustatus\r\n        })\r\n    }\r\n    \r\n    render() {\r\n        const {\r\n            autheRdc,\r\n            children,\r\n            layoutRdc,\r\n            history\r\n        } = this.props\r\n        const { menustatus } = this.state\r\n\r\n        return (\r\n            <LayoutView\r\n                menuFunctions={[]}\r\n                listMenuBreadcrumb={layoutRdc.listMenuBreadcrumb}\r\n                mobileOpen={menustatus}\r\n                handleDrawerToggle={this.handleDrawerToggle}\r\n                history={history}\r\n                profile={autheRdc.profile}\r\n            >\r\n                {children}\r\n            </LayoutView>\r\n        )\r\n    }\r\n}\r\n\r\nLayout.propTypes = {\r\n    autheRdc: PropTypes.object.isRequired,\r\n}\r\n\r\nconst mapStateToProps = state => ({\r\n    autheRdc: state.authen,\r\n    layoutRdc: state.layout\r\n});\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    authenAction: bindActionCreators(AuthenAction, dispatch)\r\n});\r\n\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(withWidth()(Layout))","import * as actionTypes from '../../Constants/ActionTypes';\r\n\r\nexport const openFormGotoLocation = () => {\r\n  return {\r\n    type: actionTypes.OPEN_MENU_GOTO_LOCATION,\r\n  };\r\n};\r\n\r\nexport const closeFormGotoLocation = () => {\r\n  return {\r\n    type: actionTypes.CLOSE_MENU_GOTO_LOCATION,\r\n  };\r\n};\r\n\r\nexport const openFormBasemapGallery = () => {\r\n  return {\r\n    type: actionTypes.OPEN_MENU_BASEMAP_GALLERY,\r\n  };\r\n};\r\n\r\nexport const closeFormBasemapGallery = () => {\r\n  return {\r\n    type: actionTypes.CLOSE_MENU_BASEMAP_GALLERY,\r\n  };\r\n};\r\n\r\nexport const openFormToc = () => {\r\n  return {\r\n    type: actionTypes.OPEN_MENU_TOC,\r\n  };\r\n};\r\n\r\nexport const closeFormToc = () => {\r\n  return {\r\n    type: actionTypes.CLOSE_MENU_TOC,\r\n  };\r\n};\r\n\r\nexport const openFormMeasurement = () => {\r\n  return {\r\n    type: actionTypes.OPEN_MENU_MEASUREMENT,\r\n  };\r\n};\r\n\r\nexport const closeFormMeasurement = () => {\r\n  return {\r\n    type: actionTypes.CLOSE_MENU_MEASUREMENT,\r\n  };\r\n};\r\n\r\nexport const openFormDrawGraphic = () => {\r\n  return {\r\n    type: actionTypes.OPEN_MENU_DRAWGRAPHIC,\r\n  };\r\n};\r\n\r\nexport const closeFormDrawGraphic = () => {\r\n  return {\r\n    type: actionTypes.CLOSE_MENU_DRAWGRAPHIC,\r\n  };\r\n};\r\n\r\nexport const openMenuPanel = () => {\r\n  return {\r\n    type: actionTypes.OPEN_MENU_PANEL,\r\n  };\r\n};\r\n\r\nexport const closeMenuPanel = () => {\r\n  return {\r\n    type: actionTypes.CLOSE_MENU_PANEL,\r\n  };\r\n};\r\n\r\nexport const openMenuMap = () => {\r\n  return {\r\n    type: actionTypes.OPEN_MENU_MAP,\r\n  };\r\n};\r\n\r\nexport const closeMenuMap = () => {\r\n  return {\r\n    type: actionTypes.CLOSE_MENU_MAP,\r\n  };\r\n};\r\n\r\nexport const openMenuSearch = () => {\r\n  return {\r\n    type: actionTypes.OPEN_MENU_SEARCH,\r\n  };\r\n};\r\n\r\nexport const closeMenuSearch = () => {\r\n  return {\r\n    type: actionTypes.CLOSE_MENU_SEARCH,\r\n  };\r\n};\r\n\r\nexport const openMenuPrintmap = () => {\r\n  return {\r\n    type: actionTypes.OPEN_MENU_PRINTMAP,\r\n  };\r\n};\r\n\r\nexport const closeMenuPrintmap = () => {\r\n  return {\r\n    type: actionTypes.CLOSE_MENU_PRINTMAP,\r\n  };\r\n};\r\n\r\nexport const openBtnPrintmap = () => {\r\n  return {\r\n    type: actionTypes.OPEN_BTN_PRINTMAP,\r\n  };\r\n};\r\n\r\nexport const closeBtnPrintmap = () => {\r\n  return {\r\n    type: actionTypes.CLOSE_BTN_PRINTMAP,\r\n  };\r\n};\r\n\r\nexport const openIdentify = () => {\r\n  return {\r\n    type: actionTypes.OPEN_IDENTIFY,\r\n  };\r\n};\r\n\r\nexport const closeIdentify = () => {\r\n  return {\r\n    type: actionTypes.CLOSE_IDENTIFY,\r\n  };\r\n};\r\n\r\nexport const openClearGraphic = () => {\r\n  return {\r\n    type: actionTypes.OPEN_CLEAR_GRAPHIC,\r\n  };\r\n};\r\n\r\nexport const closeClearGraphic = () => {\r\n  return {\r\n    type: actionTypes.CLOSE_CLEAR_GRAPHIC,\r\n  };\r\n};\r\n\r\nexport const openZoomToScale = () => {\r\n  return {\r\n    type: actionTypes.OPEN_ZOOM_TO_SCALE,\r\n  };\r\n};\r\n\r\nexport const closeZoomToScale = () => {\r\n  return {\r\n    type: actionTypes.CLOSE_ZOOM_TO_SCALE,\r\n  };\r\n};\r\n\r\nexport const activeFunction = (name) => {\r\n  return {\r\n    type: actionTypes.ACTIVE_FUNCTION,\r\n    name: name,\r\n  };\r\n};\r\n\r\nexport const closeMapTool = () => {\r\n  return {\r\n    type: actionTypes.CLOSE_MAP_TOOL,\r\n  };\r\n};\r\n\r\nexport const openMapTool = () => {\r\n  return {\r\n    type: actionTypes.OPEN_MAP_TOOL,\r\n  };\r\n};\r\n\r\nexport const activeMobileView = () => {\r\n  return {\r\n      type: actionTypes.SET_MOBILE_VIEW,\r\n  };\r\n};\r\n\r\nexport const activeShortcut = () => {\r\n  return {\r\n      type: actionTypes.SET_SHORTCUT,\r\n  };\r\n};","import * as actionTypes from \"../../../Constants/ActionTypes\";\r\n\r\n\r\nexport const callTocLayer = () => {\r\n\r\n};\r\n\r\nexport const saveTocLayer = (data) => {\r\n\treturn {\r\n\t\ttype: actionTypes.SAVE_TOC_LAYER,\r\n\t\tdata: data\r\n\t};\r\n};\r\n\r\nexport const saveNoParentToclayer = (data) => {\r\n\treturn {\r\n\t\ttype: actionTypes.SAVE_HAVE_NO_PARENT_TOC_LAYER,\r\n\t\tdata: data\r\n\t};\r\n};\r\nexport const saveParentToclayer = (data) => {\r\n\t\r\n\treturn {\r\n\t\ttype: actionTypes.SAVE_HAVE_PARENT_TOC_LAYER,\r\n\t\tdata: data\r\n\t};\r\n};\r\nexport const saveSublayerToc = (data) => {\r\n\t\r\n\treturn {\r\n\t\ttype: actionTypes.SAVE_SUB_LAYER_TOC,\r\n\t\tdata: data\r\n\t};\r\n};","export const CONFIG_MENU = {\r\n  MAP01: {\r\n    ID: 'MAP01',\r\n    NAME: 'ค้นหาตามเงื่อนไข',\r\n  },\r\n  MAP02: {\r\n    ID: 'MAP02',\r\n    NAME: 'identify',\r\n  },\r\n  MAP03: {\r\n    ID: 'MAP03',\r\n    NAME: 'go to xy',\r\n  },\r\n  MAP04: {\r\n    ID: 'MAP04',\r\n    NAME: 'TOC',\r\n  },\r\n  MAP05: {\r\n    ID: 'MAP05',\r\n    NAME: 'draw graphic',\r\n  },\r\n  MAP06: {\r\n    ID: 'MAP06',\r\n    NAME: 'print map',\r\n  },\r\n  MAP07: {\r\n    ID: 'MAP07',\r\n    NAME: 'go to scale',\r\n  },\r\n  FCN01: {\r\n    ID: 'FCN01',\r\n    NAME: 'ค้นหาข้อมูลที่ดิน',\r\n  },\r\n  FCN02: {\r\n    ID: 'FCN02',\r\n    NAME: 'สอบถามผังเมืองรวม กรุงเทพมหานคร',\r\n  },\r\n  FCN03: {\r\n    ID: 'FCN03',\r\n    NAME: 'ประเมินความพึà¸‡à¸žà¸­à¹ƒà¸ˆ',\r\n  },\r\n  FCN04: {\r\n    ID: 'FCN04',\r\n    NAME: 'ผลการประเมิน',\r\n  },\r\n  FCN05: {\r\n    ID: 'FCN05',\r\n    NAME: 'สถิติผู้เข้าใช้งาน',\r\n  },\r\n  FCN06: {\r\n    ID: 'FCN06',\r\n    NAME: 'แสดงสถิติการใช้งาน',\r\n  },\r\n  FCN07: {\r\n    ID: 'FCN07',\r\n    NAME: 'รายงานรับบริการ',\r\n  },\r\n  FCN08: {\r\n    ID: 'FCN08',\r\n    NAME: 'จัดเก็บกิจกรรม',\r\n  },\r\n  FCN09: {\r\n    ID: 'FCN09',\r\n    NAME: 'ลงทะเบียนประชาชน',\r\n  },\r\n  FCN10: {\r\n    ID: 'FCN10',\r\n    NAME: 'รายงาน',\r\n  },\r\n  FCN11: {\r\n    ID: 'FCN11',\r\n    NAME: 'ผมร.๑',\r\n  },\r\n  FCN12: {\r\n    ID: 'FCN12',\r\n    NAME: 'ยื่นแบบ ผมร.๑',\r\n  },\r\n  FCN13: {\r\n    ID: 'FCN13',\r\n    NAME: 'ค้นหา/แก้ไข/Export แบบ ผมร.๑ ตนเอง',\r\n  },\r\n  FCN14: {\r\n    ID: 'FCN14',\r\n    NAME: 'แก้ไข/Export แบบ ผมร.๑ ทั้งหมด',\r\n  },\r\n  FCN15: {\r\n    ID: 'FCN15',\r\n    NAME: 'ค้นหา ผมร.๑ ทั้งหมด',\r\n  },\r\n  FCN16: {\r\n    ID: 'FCN16',\r\n    NAME: 'export ผมร pdf',\r\n  },\r\n  FCN17: {\r\n    ID: 'FCN17',\r\n    NAME: 'รายงานสรุปการแจ้งรายเขต',\r\n  },\r\n  FCN18: {\r\n    ID: 'FCN18',\r\n    NAME: 'รายงานสรุปการแจ้งรายบริเวณ',\r\n  },\r\n  FCN20: {\r\n    ID: 'FCN20',\r\n    NAME: 'ตำแหน่งขออนุญาตก่อสร้าง',\r\n  },\r\n  FCN21: {\r\n    ID: 'FCN21',\r\n    NAME: 'กำหนดตำแหน่ง',\r\n  },\r\n  FCN22: {\r\n    ID: 'FCN22',\r\n    NAME: 'ค้นหา/แก้ไข/ลบ',\r\n  },\r\n  FCN23: {\r\n    ID: 'FCN23',\r\n    NAME: 'ตำแหน่งขอรหัสประจำบ้าน',\r\n  },\r\n  FCN24: {\r\n    ID: 'FCN24',\r\n    NAME: 'กำหนดตำแหน่ง',\r\n  },\r\n  FCN25: {\r\n    ID: 'FCN25',\r\n    NAME: 'ค้นหา/แก้ไข/ลบ',\r\n  },\r\n  FCN26: {\r\n    ID: 'FCN26',\r\n    NAME: 'ผลการกำหนดการออกเลขรหัสบ้าน',\r\n  },\r\n  FCN27: {\r\n    ID: 'FCN27',\r\n    NAME: 'ผลการกำหนดตำแหน่งขออนุญาตก่อสร้าง',\r\n  },\r\n  FCN28: {\r\n    ID: 'FCN28',\r\n    NAME: 'รายงานการใช้ประโยชน์ที่ดินตามกฎกระทรวง',\r\n  },\r\n  FCN29: {\r\n    ID: 'FCN29',\r\n    NAME: 'ค้นหา อ.1',\r\n  },\r\n  FCN30: {\r\n    ID: 'FCN30',\r\n    NAME: 'ค้นหา ทร.900',\r\n  },\r\n  FCN40: {\r\n    ID: 'FCN40',\r\n    NAME: 'ข้อมูลร่างชั้นข้อมูลตำแหน่ง',\r\n  },\r\n  FCN41: {\r\n    ID: 'FCN41',\r\n    NAME: 'เพิ่มข้อมูล',\r\n  },\r\n  FCN42: {\r\n    ID: 'FCN42',\r\n    NAME: 'ค้นหาและแก้ไข',\r\n  },\r\n  FCN43: {\r\n    ID: 'FCN43',\r\n    NAME: 'ข้อมูลร่างชั้นข้อมูลแนวเส้น',\r\n  },\r\n  FCN44: {\r\n    ID: 'FCN44',\r\n    NAME: 'เพิ่มข้อมูล',\r\n  },\r\n  FCN45: {\r\n    ID: 'FCN45',\r\n    NAME: 'ค้นหาและแก้ไข',\r\n  },\r\n  FCN46: {\r\n    ID: 'FCN46',\r\n    NAME: 'ข้อมูลร่างชั้นข้อมูลอาคาร',\r\n  },\r\n  FCN47: {\r\n    ID: 'FCN47',\r\n    NAME: 'เพิ่มข้อมูล',\r\n  },\r\n  FCN48: {\r\n    ID: 'FCN48',\r\n    NAME: 'ค้นหาและแก้ไข',\r\n  },\r\n  FCN49: {\r\n    ID: 'FCN49',\r\n    NAME: 'สถานที่สำคัญ',\r\n  },\r\n  FCN50: {\r\n    ID: 'FCN50',\r\n    NAME: 'เพิ่มข้อมูล',\r\n  },\r\n  FCN51: {\r\n    ID: 'FCN51',\r\n    NAME: 'ค้นหาและแก้ไข',\r\n  },\r\n  FCN52: {\r\n    ID: 'FCN52',\r\n    NAME: 'Import Shape File',\r\n  },\r\n  FCN53: {\r\n    ID: 'FCN53',\r\n    NAME: 'Export Shape File',\r\n  },\r\n  FCN54: {\r\n    ID: 'FCN54',\r\n    NAME: 'รายงานการสำรวจ',\r\n  },\r\n  FCN62: {\r\n    ID: 'FCN62',\r\n    NAME: 'ค้นหาเลขที่บ้าน',\r\n  },\r\n  FCN63: {\r\n    ID: 'FCN63',\r\n    NAME: 'Import ข้อมูลจาก OSS',\r\n  },\r\n  FCN64: {\r\n    ID: 'FCN64',\r\n    NAME: 'ค้นหาและดูข้อมูลจาก OSS',\r\n  },\r\n  FCN65: {\r\n    ID: 'FCN65',\r\n    NAME: 'Import ข้อมูลจากทะเบียนราษฎร์',\r\n  },\r\n  FCN66: {\r\n    ID: 'FCN66',\r\n    NAME: 'เพิ่มตำแหน่งเลขที่บ้านด้วยใบอนุญาต',\r\n  },\r\n  FCN67: {\r\n    ID: 'FCN67',\r\n    NAME: 'เพิ่มตำแหน่งเลขที่บ้านทีละจุด',\r\n  },\r\n  FCN68: {\r\n    ID: 'FCN68',\r\n    NAME: 'Export ข้อมูล',\r\n  },\r\n  FCN69: {\r\n    ID: 'FCN69',\r\n    NAME: 'Import ข้อมูลสทร.ของเขต',\r\n  },\r\n};\r\n\r\nexport const CONFIG_SUB_MENU = {\r\n  SUB_FUNC1: {\r\n    ID: 'SUB_FUNC1',\r\n    NAME: 'ผลการประเมิน',\r\n  },\r\n  SUB_FUNC2: {\r\n    ID: 'SUB_FUNC2',\r\n    NAME: 'สถิติผู้เข้าใช้งาน',\r\n  },\r\n  SUB_FUNC3: {\r\n    ID: 'SUB_FUNC3',\r\n    NAME: 'สรุปผลการแจ้ง ผมร.1 รายเขต',\r\n  },\r\n  SUB_FUNC4: {\r\n    ID: 'SUB_FUNC4',\r\n    NAME: 'สรุปผลการแจ้ง ผมร.1 รายบริเวณ',\r\n  },\r\n  SUB_FUNC5: {\r\n    ID: 'SUB_FUNC5',\r\n    NAME: 'ผลการประเมิน',\r\n  },\r\n  SUB_FUNC6: {\r\n    ID: 'SUB_FUNC6',\r\n    NAME: 'สถิติผู้เข้าใช้งาน',\r\n  },\r\n  SUB_FUNC7: {\r\n    ID: 'SUB_FUNC7',\r\n    NAME: 'สถิติการรับบริการตรวจสอบผังเมือง',\r\n  },\r\n  SUB_FUNC8: {\r\n    ID: 'SUB_FUNC8',\r\n    NAME: 'ผลการประเมิน',\r\n  },\r\n  SUB_FUNC9: {\r\n    ID: 'SUB_FUNC9',\r\n    NAME: 'สถิติผู้เข้าใช้งาน',\r\n  },\r\n  SUB_FUNC10: {\r\n    ID: 'SUB_FUNC10',\r\n    NAME: 'ผลการกำหนดตำแหน่งขออนุญาตก่อสร้าง',\r\n  },\r\n  SUB_FUNC11: {\r\n    ID: 'SUB_FUNC11',\r\n    NAME: 'ผลการกำหนดการออกเลขรหัสบ้าน',\r\n  },\r\n  SUB_FUNC12: {\r\n    ID: 'SUB_FUNC12',\r\n    NAME: 'ผลการใช้ประโยชน์ที่ดินตามกฎกระทรวง',\r\n  },\r\n  SUB_FUNC13: {\r\n    ID: 'SUB_FUNC13',\r\n    NAME: 'ยื่นแบบ',\r\n  },\r\n  SUB_FUNC14: {\r\n    ID: 'SUB_FUNC14',\r\n    NAME: 'แก้ไขแบบ',\r\n  },\r\n\r\n  SUB_FUNC15: {\r\n    // MOC_DATA อ.1\r\n    ID: 'SUB_FUNC15',\r\n    NAME: 'ยื่นแบบ',\r\n  },\r\n  SUB_FUNC16: {\r\n    // MOC_DATA อ.1\r\n    ID: 'SUB_FUNC16',\r\n    NAME: 'แก้ไขแบบ',\r\n  },\r\n  SUB_FUNC17: {\r\n    // MOC_DATA ทร.900\r\n    ID: 'SUB_FUNC17',\r\n    NAME: 'ยื่นแบบ',\r\n  },\r\n  SUB_FUNC18: {\r\n    // MOC_DATA ทร.900\r\n    ID: 'SUB_FUNC18',\r\n    NAME: 'แก้ไขแบบ',\r\n  },\r\n\r\n  SUB_FUNC20: {\r\n    // MOC_DATA Survey (Draft_point)\r\n    ID: 'SUB_FUNC20',\r\n    NAME: 'เพิ่มข้อมูล',\r\n  },\r\n  SUB_FUNC21: {\r\n    // MOC_DATA Survey (Draft_point)\r\n    ID: 'SUB_FUNC21',\r\n    NAME: 'ค้นหาและแก้ไขข้อมูล',\r\n  },\r\n\r\n  SUB_FUNC22: {\r\n    // MOC_DATA Survey (Draft_BLDG)\r\n    ID: 'SUB_FUNC22',\r\n    NAME: 'เพิ่มข้อมูล',\r\n  },\r\n  SUB_FUNC23: {\r\n    // MOC_DATA Survey (Draft_BLDG)\r\n    ID: 'SUB_FUNC23',\r\n    NAME: 'ค้นหาและแก้ไขข้อมูล',\r\n  },\r\n\r\n  SUB_FUNC24: {\r\n    // MOC_DATA Survey (Draft_Line)\r\n    ID: 'SUB_FUNC24',\r\n    NAME: 'เพิ่มข้อมูล',\r\n  },\r\n  SUB_FUNC25: {\r\n    // MOC_DATA Survey (Draft_Line)\r\n    ID: 'SUB_FUNC25',\r\n    NAME: 'ค้นหาและแก้ไขข้อมูล',\r\n  },\r\n\r\n  SUB_FUNC31: {\r\n    ID: 'SUB_FUNC31',\r\n    NAME: 'เพิ่มข้อมูล',\r\n  },\r\n  SUB_FUNC32: {\r\n    ID: 'SUB_FUNC32',\r\n    NAME: 'ค้นหาและแก้ไข',\r\n  },\r\n};\r\n\r\nexport const ASK_THE_CITY_PLAN = {\r\n  clickOnMapPoint: {\r\n    id: 'F01',\r\n    name: 'Click บนแผนที่ (Point)',\r\n  },\r\n  clickOnMapPolygon: {\r\n    id: 'F02',\r\n    name: 'Click บนแผนที่ (Polygon)',\r\n  },\r\n  currentLocation: {\r\n    id: 'F03',\r\n    name: 'ตำแหน่งปัจจุบัน',\r\n  },\r\n  specifyCoordinate: {\r\n    id: 'F04',\r\n    name: 'ระบุค่าพิกัด',\r\n  },\r\n  specifyLandArea: {\r\n    id: 'F05',\r\n    name: 'ระบุแปลงที่ดิน',\r\n  },\r\n};\r\n\r\nexport const MODE_DRAW = {\r\n  POINT: 'point',\r\n  POLYGON: 'polygon',\r\n};\r\n","import React from 'react'\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\nimport Tooltip from '@material-ui/core/Tooltip';\r\n\r\n//placement\r\n\t// top-start\r\n\t// top\r\n\t// top-end\r\n\t// right-start\r\n\t// right\r\n\t// right-end\r\n\t// bottom-start\r\n\t// bottom\r\n\t// bottom-end\r\n\t// left-start\r\n\t// left\r\n\t// left-end\r\n\r\nconst TooltipView = ({\r\n\tclasses,\r\n\tchildren,\r\n\ttitle,\r\n\tplacement\r\n}) => {\r\n\treturn (\r\n\t\t<Tooltip\r\n\t\t\ttitle={title}\r\n\t\t\tplacement={placement}\r\n\t\t\tclasses={{\r\n\t\t\t\ttooltip: classes.root\r\n\t\t\t}}\r\n\t\t>\r\n\t\t\t{children}\r\n\t\t</Tooltip>\r\n\t)\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n\troot: {\r\n\t\tfontSize: \"14px\"\r\n\t}\r\n}))(TooltipView);\r\n","import React, { Component } from 'react';\r\nimport TooltipView from '../Presentationals/TooltipView';\r\n\r\nexport default class Tooltip extends Component {\r\n    render() {\r\n        const {\r\n            children,\r\n            title,\r\n            placement = \"top-start\"\r\n        } = this.props;\r\n\r\n        return (\r\n            <TooltipView\r\n                children={children}\r\n                title={title}\r\n                placement={placement}\r\n            />\r\n        )\r\n    }\r\n}\r\n","import React from 'react';\r\nimport Button from '@material-ui/core/Button';\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\nimport Tooltip from '../../../../Controls/Containers/Tooltip';\r\n\r\nconst styles = theme => ({\r\n    zoom: {\r\n        zIndex: 1,\r\n        backgroundColor: theme.mainTheme.color4,\r\n        '&:hover': {\r\n            backgroundColor: theme.mainTheme.colorAH.colorHover,\r\n        },\r\n        width: '40px'\r\n    },\r\n    btnZoom: {\r\n        minWidth: \"40px !important\",\r\n        minHeight: \"40px !important\",\r\n        '&:active': {\r\n            opacity: \"1\",\r\n        }\r\n    },\r\n    btnZoomImage: {\r\n        display: \"inline-block\",\r\n        border: \"none\",\r\n        outline: \"none\",\r\n        cursor: \"pointer\",\r\n        height: \"20px\"\r\n    }\r\n});\r\n\r\nconst BtnZoomView = ({\r\n    classes,\r\n    zoomIn,\r\n    zoomOut\r\n}) => {\r\n    return (\r\n        <div >\r\n            <div className={classes.zoom}>\r\n                <Tooltip title=\"ขยายแผนที่\" placement=\"left\">\r\n                    <Button className={`${classes.btnZoom}`} onClick={zoomIn}>\r\n                        <input type='image' alt=\"img\" src={`${process.env.PUBLIC_URL}/img/layout/std_02zoomin.png`} className={classes.btnZoomImage} />\r\n                    </Button>\r\n                </Tooltip>\r\n            </div>\r\n            <div className={classes.zoom}>\r\n                <Tooltip title=\"ย่อแผนที่\" placement=\"left\">\r\n                    <Button className={`${classes.btnZoom}`} onClick={zoomOut}>\r\n                        <input type='image' alt=\"img\" src={`${process.env.PUBLIC_URL}/img/layout/std_03zoomout.png`} className={classes.btnZoomImage} />\r\n                    </Button>\r\n                </Tooltip>\r\n            </div>\r\n        </div>\r\n    );\r\n}\r\n\r\nexport default withStyles(styles)(BtnZoomView);\r\n\r\n","import React from \"react\";\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\nimport Button from \"@material-ui/core/Button\";\r\nimport Tooltip from '../../../../Controls/Containers/Tooltip';\r\n\r\nconst styles = theme => ({\r\n\tcurrentLocation: {\r\n\t\tzIndex: 1,\r\n\t\tbackgroundColor: theme.mainTheme.color4,\r\n\t\t'&:hover': {\r\n\t\t\tbackgroundColor: theme.mainTheme.colorAH.colorHover,\r\n\t\t},\r\n\t\twidth: '40px'\r\n\t},\r\n\tbtnCurrentLocation: {\r\n\t\tminWidth: \"40px !important\",\r\n\t\tminHeight: \"40px !important\",\r\n\t},\r\n\tbtnCurrentLocationImage: {\r\n\t\tdisplay: \"inline-block\",\r\n\t\tborder: \"none\",\r\n\t\toutline: \"none\",\r\n\t\tcursor: \"pointer\",\r\n\t\theight: \"20px\"\r\n\t}\r\n});\r\n\r\nconst BtnCurrentLocationView = ({\r\n\tclasses,\r\n\tclickCurrentLocation\r\n}) => {\r\n\r\n\treturn (\r\n\t\t<div className={classes.currentLocation}>\r\n\t\t\t<Tooltip title=\"ตำแหน่งปัจจุบัน\" placement=\"left\">\r\n\t\t\t\t<Button className={classes.btnCurrentLocation} onClick={clickCurrentLocation}>\r\n\t\t\t\t\t<input type='image' alt=\"img\" src={`${process.env.PUBLIC_URL}/img/layout/std_01current.png`} className={classes.btnCurrentLocationImage} />\r\n\t\t\t\t</Button>\r\n\t\t\t</Tooltip>\r\n\t\t</div>\r\n\t);\r\n\r\n}\r\n\r\nexport default withStyles(styles)(BtnCurrentLocationView);\r\n","import React from 'react';\r\nimport Button from '@material-ui/core/Button';\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\nimport classnames from 'classnames';\r\nimport Tooltip from '../../../../Controls/Containers/Tooltip';\r\n\r\nconst styles = theme => ({\r\n    measurement: {\r\n        zIndex: 1,\r\n        backgroundColor: theme.mainTheme.color4,\r\n        '&:hover': {\r\n            // opacity: \"0.8\",\r\n            backgroundColor: theme.mainTheme.colorAH.colorHover,\r\n        },\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            display: 'none'\r\n        },\r\n        width: '40px'\r\n    },\r\n    btnMeasurement: {\r\n        minWidth: \"40px !important\",\r\n        minHeight: \"40px !important\",\r\n    },\r\n    btnMeasurementImage: {\r\n        display: \"inline-block\",\r\n        border: \"none\",\r\n        outline: \"none\",\r\n        cursor: \"pointer\",\r\n        height: \"20px\"\r\n    },\r\n    btnActive: {\r\n        // backgroundColor: theme.mainTheme.color3,\r\n        backgroundColor: theme.mainTheme.colorAH.colorActive,\r\n    },\r\n});\r\n\r\nconst BtnMeasurementView = ({\r\n    classes,\r\n    isOpen,\r\n    openFormMeasurement\r\n}) => {\r\n    return (\r\n        <div className={classes.measurement}>\r\n            <Tooltip title=\"เครื่องมือวัด\" placement=\"left\">\r\n                <Button  className={classnames(classes.btnMeasurement, { [classes.btnActive]: isOpen })} onClick={openFormMeasurement}>\r\n                    <input type='image' alt=\"img\" src={`${process.env.PUBLIC_URL}/img/layout/map_std_01.png`} className={classes.btnMeasurementImage}\r\n                    />\r\n                </Button>\r\n            </Tooltip>\r\n        </div>\r\n    );\r\n}\r\n\r\nexport default withStyles(styles)(BtnMeasurementView);\r\n\r\n","import React from 'react';\r\nimport Button from '@material-ui/core/Button';\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\nimport classnames from 'classnames';\r\nimport Tooltip from '../../../../Controls/Containers/Tooltip';\r\n\r\nconst styles = theme => ({\r\n    goto: {\r\n        zIndex: 1,\r\n        backgroundColor: theme.mainTheme.color4,\r\n        '&:hover': {\r\n            // opacity: \"0.8\",\r\n            backgroundColor: theme.mainTheme.colorAH.colorHover,\r\n        },\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            // bottom: \"110px\",\r\n            display: 'none'\r\n        },\r\n        width: '40px'\r\n    },\r\n    btnGoto: {\r\n        minWidth: \"40px !important\",\r\n        minHeight: \"40px !important\",\r\n    },\r\n    btnGotoImage: {\r\n        display: \"inline-block\",\r\n        border: \"none\",\r\n        outline: \"none\",\r\n        cursor: \"pointer\",\r\n        height: \"20px\"\r\n    },\r\n    btnActive: {\r\n        backgroundColor: theme.mainTheme.colorAH.colorActive,\r\n    },\r\n});\r\n\r\nconst BtnGoToLocationView = ({\r\n    classes,\r\n    isOpen,\r\n    openFormGoToLocation\r\n}) => {\r\n    return (\r\n        <div className={classes.goto}>\r\n            <Tooltip title=\"ไปยังตำแหน่ง\" placement=\"left\">\r\n                <Button className={classnames(classes.btnGoto, { [classes.btnActive]: isOpen })} onClick={openFormGoToLocation}>\r\n                    <input type='image' alt=\"img\" src={`${process.env.PUBLIC_URL}/img/layout/std_icn_03.png`} className={classes.btnGotoImage} />\r\n                </Button>\r\n            </Tooltip>\r\n        </div>\r\n    );\r\n}\r\n\r\nexport default withStyles(styles)(BtnGoToLocationView);\r\n\r\n","import React from 'react';\r\nimport Button from '@material-ui/core/Button';\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\nimport classnames from 'classnames';\r\nimport Tooltip from '../../../../Controls/Containers/Tooltip';\r\n\r\nconst styles = theme => ({\r\n    basemapGalleryGraphics: {\r\n        zIndex: 1,\r\n        backgroundColor: theme.mainTheme.color4,\r\n        '&:hover': {\r\n            backgroundColor: theme.mainTheme.colorAH.colorHover,\r\n        },\r\n        // [theme.breakpoints.down(\"sm\")]: {\r\n        //     display: 'none'\r\n        // },\r\n        width: '40px'\r\n    },\r\n    btnBasemapGalleryGraphics: {\r\n        minWidth: \"40px !important\",\r\n        minHeight: \"40px !important\",\r\n    },\r\n    btnGraphicsImage: {\r\n        display: \"inline-block\",\r\n        border: \"none\",\r\n        outline: \"none\",\r\n        cursor: \"pointer\",\r\n        height: \"20px\",\r\n        color: 'white'\r\n    },\r\n    btnActive: {\r\n        backgroundColor: theme.mainTheme.colorAH.colorActive,\r\n    },\r\n});\r\n\r\nconst BtnBasemapGalleryView = ({\r\n    classes,\r\n    isOpen,\r\n    openFormBasemapGallery\r\n}) => {\r\n    return (\r\n        <div className={classes.basemapGalleryGraphics}>\r\n            <Tooltip title=\"แผนที่ฐาน\" placement=\"left\">\r\n                <Button className={classnames(classes.btnBasemapGalleryGraphics, { [classes.btnActive]: isOpen })} onClick={openFormBasemapGallery}>\r\n                    <input type='image' alt=\"img\" src={`${process.env.PUBLIC_URL}/img/maptools/map_std_02.png`}\r\n                        className={classes.btnGraphicsImage}\r\n                    />\r\n                </Button>\r\n            </Tooltip>\r\n        </div >\r\n    );\r\n}\r\n\r\nexport default withStyles(styles)(BtnBasemapGalleryView);\r\n\r\n","import React from 'react';\r\nimport Button from '@material-ui/core/Button';\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\nimport classnames from 'classnames';\r\nimport Tooltip from '../../../../Controls/Containers/Tooltip';\r\n\r\nconst styles = theme => ({\r\n    toc: {\r\n        zIndex: 1,\r\n        backgroundColor: theme.mainTheme.color4,\r\n        '&:hover': {\r\n            // opacity: \"0.8\",\r\n            backgroundColor: theme.mainTheme.colorAH.colorHover,\r\n        },\r\n        // [theme.breakpoints.down(\"sm\")]: {\r\n        //     display: 'none'\r\n        // },\r\n        width: '40px'\r\n    },\r\n    btnToc: {\r\n        minWidth: \"40px !important\",\r\n        minHeight: \"40px !important\",\r\n    },\r\n    btnTocImage: {\r\n        display: \"inline-block\",\r\n        border: \"none\",\r\n        outline: \"none\",\r\n        cursor: \"pointer\",\r\n        height: \"20px\"\r\n    },\r\n    btnActive: {\r\n        backgroundColor: theme.mainTheme.colorAH.colorActive,\r\n    },\r\n});\r\n\r\nconst BtnTocView = ({\r\n    classes,\r\n    isOpen,\r\n    openToc\r\n}) => {\r\n    return (\r\n        <div className={classes.toc}>\r\n            <Tooltip title=\"รายการชั้นข้อมูล\" placement=\"left\">\r\n                <Button className={classnames(classes.btnToc, { [classes.btnActive]: isOpen })} onClick={openToc}>\r\n                    <input type='image' alt=\"img\" src={`${process.env.PUBLIC_URL}/img/layout/icn_04toc.png`} className={classes.btnTocImage} />\r\n                </Button>\r\n            </Tooltip>\r\n        </div>\r\n    );\r\n}\r\n\r\nexport default withStyles(styles)(BtnTocView);\r\n\r\n","import React from 'react';\r\nimport Button from '@material-ui/core/Button';\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\nimport PrintIcon from \"@material-ui/icons/Print\";\r\nimport classnames from 'classnames';\r\nimport Tooltip from '../../../../Controls/Containers/Tooltip';\r\n\r\nconst styles = theme => ({\r\n    printmap: {\r\n        backgroundColor: theme.mainTheme.color4,\r\n        zIndex: 1,\r\n        '&:hover': {\r\n            // opacity: \"0.8\",\r\n            backgroundColor: theme.mainTheme.colorAH.colorHover,\r\n        },\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            display: 'none'\r\n        },\r\n        width: '40px'\r\n    },\r\n    btnPrintmap: {\r\n        minWidth: \"40px !important\",\r\n        minHeight: \"40px !important\",\r\n    },\r\n    btnPrintmapImg: {\r\n        display: \"inline-block\",\r\n        border: \"none\",\r\n        outline: \"none\",\r\n        cursor: \"pointer\",\r\n        height: \"20px\",\r\n        color: 'white'\r\n    },\r\n    btnActive: {\r\n        // backgroundColor: theme.mainTheme.color3,\r\n        backgroundColor: theme.mainTheme.colorAH.colorActive,\r\n    },\r\n});\r\n\r\nconst BtnPrintMapView = ({\r\n    classes,\r\n    isOpen,\r\n    openPrintmap\r\n}) => {\r\n    return (\r\n        <div className={classes.printmap}>\r\n            <Tooltip title=\"พิมพ์แผนที่\" placement=\"left\">\r\n                <Button className={classnames(classes.btnPrintmap, { [classes.btnActive]: isOpen })} onClick={openPrintmap}>\r\n                    <PrintIcon className={classes.btnPrintmapImg} />\r\n                </Button>\r\n            </Tooltip>\r\n        </div>\r\n    );\r\n}\r\n\r\nexport default withStyles(styles)(BtnPrintMapView);\r\n\r\n","import React, { Fragment } from 'react';\r\nimport Button from '@material-ui/core/Button';\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\nimport * as Constants from \"../../../../Constants/Constants\";\r\nimport classnames from \"classnames\";\r\n// import Create from '@material-ui/icons/Create';\r\nimport TooltipView from '../../../../Controls/Presentationals/TooltipView';\r\n\r\nconst BtnDrawGraphicsView = ({\r\n    classes,\r\n    menuActive,\r\n    // subMenuActive,\r\n    // drawGraphic,\r\n    isOpen,\r\n    openDrawGraphic\r\n}) => {\r\n    // const isMenuActive = menuActive === Constants.MAP_TOOLS.DRAW_GRAPHIC.NAME\r\n    // const { POINT, POLYGON, LINE, CIRCLE } = Constants.MAP_TOOLS.DRAW_GRAPHIC.SUB_MENU\r\n\r\n    return (\r\n        <Fragment>\r\n            <div className={classes.drawGraphics}>\r\n                <TooltipView title=\"วาดกราฟฟิค\" placement=\"left\">\r\n                    <Button\r\n                        className={classnames(classes.btnDrawGraphics, { [classes.btnDrawGraphicsActivate]: isOpen })}\r\n                        onClick={() => openDrawGraphic(Constants.MAP_TOOLS.DRAW_GRAPHIC.NAME)}\r\n                    >\r\n                        <input type='image' alt=\"img\" src={`${process.env.PUBLIC_URL}/img/layout/std_icn_01.png`} className={classes.btnDrawGraphicsImage} />\r\n                    </Button>\r\n                </TooltipView>\r\n            </div>\r\n\r\n            {/* <div className={classnames(classes.subDrawGraphics, { [classes.hide]: !isMenuActive })}>\r\n                <div className={classes.paddingBottom}>\r\n                    <TooltipView title=\"Draw point\" placement=\"left\">\r\n                        <Button\r\n                            className={classnames(classes.btnDrawGraphics, { [classes.btnDrawGraphicsActivate]: subMenuActive === POINT })}\r\n                            onClick={drawGraphic(Constants.LISTGRAPHICLAYER.GRAPHICLAYER_DRAW_POINT, POINT)}\r\n                        >\r\n                            <input type='image' src={`${process.env.PUBLIC_URL}/img/maptools/map_std_07@2x.png`} //src='https://png.pngtree.com/svg/20170517/map_140929.png' \r\n                                className={classes.btnDrawGraphicsImage}\r\n                            />\r\n                        </Button>\r\n                    </TooltipView>\r\n                </div>\r\n                <div className={classes.paddingBottom}>\r\n                    <TooltipView title=\"Draw polyline\" placement=\"left\">\r\n                        <Button\r\n                            className={classnames(classes.btnDrawGraphics, { [classes.btnDrawGraphicsActivate]: subMenuActive === LINE })}\r\n                            onClick={drawGraphic(Constants.LISTGRAPHICLAYER.GRAPHICLAYER_DRAW_POLYLINE, LINE)}\r\n                        >\r\n                            <input type='image' src={`${process.env.PUBLIC_URL}/img/maptools/map_std_05@2x.png`} //src='https://cdn.iconscout.com/icon/premium/png-256-thumb/polyline-5-581781.png' \r\n                                className={classes.btnDrawGraphicsImage}\r\n                            />\r\n                        </Button>\r\n                    </TooltipView>\r\n                </div>\r\n                <div className={classes.paddingBottom}>\r\n                    <TooltipView title=\"Draw polygon\" placement=\"left\">\r\n                        <Button\r\n                            className={classnames(classes.btnDrawGraphics, { [classes.btnDrawGraphicsActivate]: subMenuActive === POLYGON })}\r\n                            onClick={drawGraphic(Constants.LISTGRAPHICLAYER.GRAPHICLAYER_DRAW_POLYGON, POLYGON)}\r\n                        >\r\n                            <input type='image' src={`${process.env.PUBLIC_URL}/img/maptools/map_std_06@2x.png`} //src='https://cdn4.iconfinder.com/data/icons/line-icons-12/64/software_shape_polygon-512.png' \r\n                                className={classes.btnDrawGraphicsImage}\r\n                            />\r\n                        </Button>\r\n                    </TooltipView>\r\n                </div>\r\n                <div className={classes.paddingBottom}>\r\n                    <TooltipView title=\"Draw circle\" placement=\"left\">\r\n                        <Button\r\n                            className={classnames(classes.btnDrawGraphics, { [classes.btnDrawGraphicsActivate]: subMenuActive === CIRCLE })}\r\n                            onClick={drawGraphic(Constants.LISTGRAPHICLAYER.GRAPHICLAYER_DRAW_CIRCLE, CIRCLE)}\r\n                        >\r\n                            <input type='image' src={`${process.env.PUBLIC_URL}/img/maptools/map_std_04@2x.png`} //src='https://cdn2.iconfinder.com/data/icons/interface-elements-i/512/Circle-512.png' \r\n                                className={classes.btnDrawGraphicsImage}\r\n                            />\r\n                        </Button>\r\n                    </TooltipView>\r\n                </div> */}\r\n            {/* </div> */}\r\n        </Fragment>\r\n    );\r\n}\r\nexport default withStyles(theme => ({\r\n    drawGraphics: {\r\n        zIndex: 1,\r\n        backgroundColor: theme.mainTheme.color4,\r\n        '&:hover': {\r\n            // opacity: \"0.8\",\r\n            backgroundColor: theme.mainTheme.colorAH.colorHover,\r\n        },\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            display: 'none'\r\n        },\r\n        width: '40px'\r\n    },\r\n    subDrawGraphics: {\r\n        position: \"absolute\",\r\n        bottom: \"35px\",\r\n        right: \"70px\",\r\n        zIndex: 1,\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            display: 'none'\r\n        }\r\n    },\r\n    btnDrawGraphics: {\r\n        minWidth: \"40px !important\",\r\n        minHeight: \"40px !important\",\r\n    },\r\n    btnDrawGraphicsActivate: {\r\n        // backgroundColor: theme.mainTheme.color3,\r\n        backgroundColor: theme.mainTheme.colorAH.colorActive,\r\n    },\r\n    btnDrawGraphicsImage: {\r\n        display: \"inline-block\",\r\n        border: \"none\",\r\n        outline: \"none\",\r\n        cursor: \"pointer\",\r\n        height: \"20px\"\r\n    },\r\n    paddingBottom: {\r\n        paddingBottom: \"10px\"\r\n    },\r\n    hide: {\r\n        display: 'none'\r\n    },\r\n}))(BtnDrawGraphicsView);\r\n\r\n","import React from 'react';\r\nimport Button from '@material-ui/core/Button';\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\nimport classnames from 'classnames';\r\nimport Tooltip from '../../../../Controls/Containers/Tooltip';\r\nimport HowToVote from '@material-ui/icons/HowToVote';\r\n\r\nconst styles = theme => ({\r\n    root: {\r\n        zIndex: 1,\r\n        width: '40px',\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            display: 'none',\r\n        },\r\n    },\r\n    btnClearGraphic: {\r\n        minWidth: \"40px !important\",\r\n        minHeight: \"40px !important\",\r\n        backgroundColor: theme.mainTheme.color4,\r\n        '&:hover': {\r\n            backgroundColor: theme.mainTheme.colorAH.colorHover,\r\n        },\r\n        color: 'white',\r\n        borderRadius: '0px'\r\n    },\r\n    btnClearGraphicImg: {\r\n        display: \"inline-block\",\r\n        border: \"none\",\r\n        outline: \"none\",\r\n        cursor: \"pointer\",\r\n        height: \"20px\"\r\n    },\r\n    btnActive: {\r\n        backgroundColor: theme.mainTheme.colorAH.colorActive,\r\n    },\r\n    rootSubMenu: {\r\n        position: 'absolute',\r\n        right: '45px',\r\n        bottom: '200px',\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            bottom: '80px',\r\n        },\r\n    },\r\n    hideDisplay: {\r\n        display: 'none'\r\n    }\r\n});\r\n\r\nconst BtnClearGraphicView = ({\r\n    classes,\r\n    isOpen,\r\n    subMenuActive,\r\n    openClearGraphic,\r\n    onClickClearAll,\r\n    onClickClearSelect\r\n}) => {\r\n\r\n    return (\r\n        <div className={classes.root}>\r\n            <Tooltip title=\"ลบกราฟฟิค\" placement=\"left\">\r\n                <Button className={classnames(classes.btnClearGraphic, { [classes.btnActive]: isOpen })} onClick={openClearGraphic}>\r\n                    <HowToVote className={classes.btnClearGraphicImg} />\r\n                </Button>\r\n            </Tooltip>\r\n\r\n            <div className={classnames(classes.rootSubMenu, { [classes.hideDisplay]: !isOpen })}>\r\n                <Tooltip title=\"ลบทั้งหมด\" placement=\"left\">\r\n                    <Button className={classnames(classes.btnClearGraphic)} onClick={onClickClearAll}>\r\n                        <input type='image' alt=\"img\" src={`${process.env.PUBLIC_URL}/img/maptools/map_std_08.png`} className={classes.btnClearGraphicImg} />\r\n                    </Button>\r\n                </Tooltip>\r\n\r\n                <Tooltip title=\"เลือกลบทีละกราฟฟิค\" placement=\"left\">\r\n                    <Button className={classnames(classes.btnClearGraphic, { [classes.btnActive]: subMenuActive === \"CLEAR_SELECT\" })} onClick={onClickClearSelect}>\r\n                        <input type='image' alt=\"img\" src={`${process.env.PUBLIC_URL}/img/maptools/map_std_09.png`} className={classes.btnClearGraphicImg} />\r\n                    </Button>\r\n                </Tooltip>\r\n            </div>\r\n        </div>\r\n    );\r\n}\r\n\r\nexport default withStyles(styles)(BtnClearGraphicView);\r\n\r\n","import React from 'react';\r\nimport Button from '@material-ui/core/Button';\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\nimport classnames from 'classnames';\r\nimport Tooltip from '../../../../Controls/Containers/Tooltip';\r\nimport ZoomIn from '@material-ui/icons/ZoomIn';\r\n\r\n\r\nconst styles = theme => ({\r\n    root: {\r\n        zIndex: 1,\r\n        backgroundColor: theme.mainTheme.color4,\r\n        '&:hover': {\r\n            // opacity: \"0.8\",\r\n            backgroundColor: theme.mainTheme.colorAH.colorHover,\r\n        },\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            display: 'none'\r\n        },\r\n        width: '40px'\r\n    },\r\n    btn: {\r\n        minWidth: \"40px !important\",\r\n        minHeight: \"40px !important\",\r\n        backgroundColor: theme.mainTheme.color4,\r\n        '&:hover': {\r\n            backgroundColor: theme.mainTheme.colorAH.colorHover,\r\n        },\r\n        color: 'white',\r\n        borderRadius: '0px'\r\n    },\r\n    btnImage: {\r\n        display: \"inline-block\",\r\n        border: \"none\",\r\n        outline: \"none\",\r\n        cursor: \"pointer\",\r\n        height: \"20px\"\r\n    },\r\n    btnActive: {\r\n        backgroundColor: theme.mainTheme.colorAH.colorActive,\r\n    },\r\n});\r\n\r\nconst BtnZoomToScaleView = ({\r\n    classes,\r\n    isOpen,\r\n    openGotoScale\r\n}) => {\r\n    return (\r\n        <div className={classes.root}>\r\n            <Tooltip title=\"ไปยังมาตราส่วน\" placement=\"left\">\r\n                <Button className={classnames(classes.btn, { [classes.btnActive]: isOpen })} onClick={openGotoScale}>\r\n                    <ZoomIn className={classes.btnImage} />\r\n                </Button>\r\n            </Tooltip>\r\n        </div>\r\n    );\r\n}\r\n\r\nexport default withStyles(styles)(BtnZoomToScaleView);\r\n\r\n","import React,{Fragment} from 'react'\r\nimport { withStyles } from '@material-ui/core'\r\nimport FormHelperText from '@material-ui/core/FormHelperText'\r\nimport Select from '@material-ui/core/Select';\r\nimport MenuItem from \"@material-ui/core/MenuItem\";\r\nimport FormControl from '@material-ui/core/FormControl';\r\nimport OutlinedInput from \"@material-ui/core/OutlinedInput\";\r\nimport InputLabel from '@material-ui/core/InputLabel';\r\nimport classnames from 'classnames';\r\n// import { MuiThemeProvider, createMuiTheme } from \"@material-ui/core\";\r\n\r\nconst SelectFieldReduxView = ({\r\n    classes,\r\n    label,\r\n    onChangeValue,\r\n    data,\r\n    input,\r\n    meta: { touched, error, invalid },\r\n    keyData = { value: \"id\", label: \"name\" },\r\n    isDataArray = false,\r\n    required,\r\n    disabled,\r\n    dataProps,\r\n    // children\r\n}) => {\r\n    return (\r\n        // <MuiThemeProvider theme={theme}>\r\n        <Fragment>\r\n        <FormControl variant=\"outlined\" error={touched && invalid} className={classes.formControl}  >\r\n            {label && <span className={classnames(classes.labelStyle, { [classes.red]: touched && invalid })}>\r\n                {label}{required && <label className={classes.red}>*</label>}\r\n            </span>}\r\n            <InputLabel\r\n                htmlFor=\"outlined-simple\"\r\n                shrink={false}\r\n                disableAnimation={true}\r\n                disabled={true}\r\n                className={classnames(classes.inputLabel, {\r\n                    [classes.displayNone]: input.value || !required,\r\n                    [classes.inputLabelMargin]: label\r\n                })}>\r\n                กรุณาระบุ\r\n            </InputLabel>\r\n            <Select\r\n                {...input}\r\n                value={input.value ? input.value : \"\"}\r\n                onChange={onChangeValue}\r\n                displayEmpty\r\n                className={classes.select}\r\n                disabled={disabled}\r\n                classes={{\r\n                    selectMenu: classes.selectMenu,\r\n                    root: classes.selectMenuRoot,\r\n                }}\r\n                input={\r\n                    <OutlinedInput\r\n                        name=\"outlined\"\r\n                        id=\"outlined-simple\"\r\n                        labelWidth={0}\r\n                    />\r\n                }\r\n            >\r\n                {!required && (\r\n                    <MenuItem value={\"\"} key={-1}>\r\n                        ไม่ระบุ\r\n                    </MenuItem>\r\n                )}\r\n                {/* {data[0].props ? data:data.map((item, index) => { */}\r\n                {dataProps ? dataProps:\r\n                    data.map((item, index) => {\r\n                    const value = isDataArray ? item : item[keyData.value];\r\n                    const label = isDataArray ? item : item[keyData.label];\r\n                    return (\r\n                        <MenuItem value={value} key={index}>\r\n                            {label}\r\n                        </MenuItem>\r\n                    )\r\n                })}\r\n            </Select>\r\n            \r\n        </FormControl >\r\n         <FormHelperText className={classes.formHelper}>\r\n               {touched && invalid && error}\r\n         </FormHelperText>\r\n        </Fragment> \r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    formControl: {\r\n        minWidth: \"100%\",\r\n        // height:\"70px\"\r\n        minHeight:\"70px\"\r\n        // marginTop: theme.spacing.unit,\r\n        // marginBottom: theme.spacing.unit\r\n    },\r\n    labelStyle: {\r\n        marginBottom: '5px',\r\n        fontSize:\"16px\"\r\n    },\r\n    inputLabel: {\r\n        top: '-8px'\r\n    },\r\n    inputLabelMargin: {\r\n        top: '21px'\r\n    },\r\n    displayNone: {\r\n        display: 'none'\r\n    },\r\n    red: {\r\n        color: \"red\"\r\n    },\r\n    formHelper: {\r\n        color:\"red\",\r\n        marginTop: \"0px\",\r\n        marginLeft: 15,\r\n        fontFamily: \"prompt\"\r\n    },\r\n    select: {\r\n        width: '100%',\r\n        height: '40px',\r\n        backgroundColor: '#FFFFFF',\r\n        fontFamily: \"prompt\"\r\n        // [`& input`]: {\r\n        //     height: '40px',\r\n        //     padding: '0px 15px 0px 15px',\r\n        //     backgroundColor: 'white',\r\n        // }\r\n    },\r\n    selectMenu: {\r\n        // whiteSpace: \"normal\"\r\n        whiteSpace: \"nowrap\"\r\n    },\r\n    selectMenuRoot: {\r\n        position: \"absolute\"\r\n    }\r\n}))(SelectFieldReduxView)\r\n","import React, { Component } from 'react'\r\nimport PropTypes from 'prop-types'\r\nimport SlectFieldReduxView from '../Presentationals/SelectFieldReduxView'\r\n\r\nclass SelectFieldRedux extends Component {\r\n\r\n    handleChange = (value) => {\r\n        const { input, onChangeValue } = this.props;\r\n\r\n        if (input) { //redux form\r\n            input.onChange(value)\r\n        }\r\n\r\n        if (onChangeValue) { // props onChangeValue\r\n            onChangeValue(value)\r\n        }\r\n    }\r\n\r\n    render() {\r\n        const {\r\n            label,\r\n            data,\r\n            val,\r\n            input,\r\n            meta,\r\n            required,\r\n            keyData,\r\n            isDataArray, //ถ้า data เป็น array เพรียวๆ\r\n            disabled=false,\r\n            dataProps\r\n        } = this.props\r\n\r\n        return (\r\n            <SlectFieldReduxView\r\n                label={label}\r\n                data={data}\r\n                val={val}\r\n                input={input}\r\n                meta={meta}\r\n                keyData={keyData}\r\n                isDataArray={isDataArray}\r\n                onChangeValue={this.handleChange}\r\n                required={required}\r\n                disabled={disabled}\r\n                dataProps={dataProps}\r\n            />\r\n        )\r\n    }\r\n}\r\n\r\nSelectFieldRedux.propTypes = {\r\n    label: PropTypes.string,\r\n    required: PropTypes.bool\r\n}\r\n\r\nSelectFieldRedux.defaultProps = {\r\n    required: false\r\n}\r\n\r\nexport default SelectFieldRedux","import React, { Fragment } from 'react';\r\nimport { Field } from \"redux-form\";\r\nimport Button from '@material-ui/core/Button';\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\nimport Icon from '@material-ui/core/Icon';\r\nimport { unstable_useMediaQuery as useMediaQuery } from '@material-ui/core/useMediaQuery';\r\nimport TextFieldRedux from '../../../../Controls/Containers/TextFieldRedux';\r\nimport * as Constants from '../../../../Constants/Constants';\r\nimport SelectField from '../../../../Controls/Containers/SelectFieldRedux';\r\nimport { normalizePositiveFloat, normalizeLatLong } from '../../../../Utilities/Validate';\r\n\r\nconst styles = theme => ({\r\n    root: {\r\n        position: \"absolute\",\r\n        right: \"75px\",\r\n        // bottom: \"110px\",\r\n        top: 'calc(50% - 240px)',\r\n        zIndex: \"999\",\r\n        width: \"280px\",\r\n        // height: \"390px\",\r\n        backgroundColor: \"white\",\r\n        boxShadow: \"2px 2px 8px #888888\",\r\n        borderColor: 'black',\r\n        borderStyle: \"solid\",\r\n        borderWidth: \"2px\",\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            top: 'calc(50% - 200px)',\r\n            width: \"96%\",\r\n            left: \"2%\",\r\n            right: \"2%\",\r\n            zIndex: \"1\",\r\n        }\r\n    },\r\n    formControl: {\r\n        margin: theme.spacing.unit,\r\n        minWidth: 150,\r\n    },\r\n    selectEmpty: {\r\n        marginTop: theme.spacing.unit * 2,\r\n    },\r\n    header: {\r\n        padding: \"5px\",\r\n        backgroundColor: theme.mainTheme.color1,\r\n        fontWeight: \"bold\",\r\n        color: 'white'\r\n    },\r\n    textField: {\r\n        marginLeft: theme.spacing.unit,\r\n        marginRight: theme.spacing.unit,\r\n        width: 200,\r\n    },\r\n    formInput: {\r\n        padding: \"10px\"\r\n    },\r\n    icon: {\r\n        right: \"3px\",\r\n        position: \"absolute\",\r\n        top: \"3px\",\r\n        cursor: \"pointer\"\r\n    },\r\n    bottom: {\r\n        marginTop: '10px',\r\n        width: '100%',\r\n        display: 'flex',\r\n        flexDirection: 'row',\r\n        justifyContent: 'flex-end'\r\n    }\r\n});\r\n\r\nconst renderTextField = ({ projectionType }) => {\r\n    switch (projectionType) {\r\n        case 3:\r\n            return (\r\n                <Field\r\n                    name=\"gotoLatLong\"\r\n                    component={TextFieldRedux}\r\n                    maxLength={50}\r\n                    label={Constants.RESOURCEWORDS.GOTOLOCATION_LAT_LONG}\r\n                    normalize={normalizeLatLong}\r\n                    placeholder={'ตัวอย่าง: 13.0000,100.0000'}\r\n                    required\r\n                />\r\n            )\r\n        default:\r\n            return (\r\n                <Fragment>\r\n                    <Field\r\n                        name=\"gotoLongitude\"\r\n                        component={TextFieldRedux}\r\n                        normalize={normalizePositiveFloat}\r\n                        maxLength={50}\r\n                        label={Constants.RESOURCEWORDS.GOTOLOCATION_X}\r\n                        required\r\n                    />\r\n                    <Field\r\n                        name=\"gotoLatitude\"\r\n                        component={TextFieldRedux}\r\n                        normalize={normalizePositiveFloat}\r\n                        maxLength={50}\r\n                        label={Constants.RESOURCEWORDS.GOTOLOCATION_Y}\r\n                        required\r\n                    />\r\n                </Fragment>\r\n            )\r\n    }\r\n}\r\n\r\n\r\nconst GoToLocationFormView = ({\r\n    classes,\r\n    projectionType,\r\n    handleSubmit,\r\n    showHide,\r\n    onSubmit,\r\n    onProjectionChange,\r\n    onClickClose\r\n}) => {\r\n    const isMobileSize = useMediaQuery('(max-width:959px)');\r\n\r\n    return (\r\n        <div className={classes.root} style={{ display: showHide }}>\r\n            <div className={classes.header}>\r\n                {Constants.RESOURCEWORDS.GOTOLOCATION_HEADER}\r\n                <Icon  className=\"icon\" onClick={onClickClose}>close-circle</Icon>\r\n            </div>\r\n            <form onSubmit={handleSubmit(param => onSubmit(param, isMobileSize))} >\r\n\r\n                <div className={classes.formInput}>\r\n                    <Field\r\n                        label={Constants.RESOURCEWORDS.GOTOLOCATION_PROJECTION}\r\n                        name=\"gotoProjection\"\r\n                        component={SelectField}\r\n                        onChangeValue={onProjectionChange}\r\n                        data={Constants.TYPEOFPROJECTION}\r\n                        val={projectionType}\r\n                        defaultValue={1}\r\n                        required\r\n                    />\r\n                    {renderTextField({ projectionType })}\r\n                    <div className={classes.bottom}>\r\n                        <Button type=\"submit\" variant=\"contained\" color=\"primary\">\r\n                            {Constants.RESOURCEWORDS.GOTOLOCATION_GO}\r\n                        </Button>\r\n                    </div>\r\n                </div>\r\n            </form>\r\n        </div>\r\n    );\r\n}\r\n\r\nexport default withStyles(styles)(GoToLocationFormView);\r\n\r\n","import React, { Component, Fragment } from 'react';\r\nimport { connect } from \"react-redux\";\r\nimport { reduxForm } from \"redux-form\";\r\nimport { compose } from \"recompose\";\r\nimport GoToLocationFormView from '../../../../Presentationals/Web/Maps/GoToLocation/GoToLocationFormView';\r\nimport * as MapAction from \"../../../../Actions/Web/Maps/MapAction\";\r\nimport * as MenuAction from \"../../../../Actions/Web/MenuAction\";\r\nimport { bindActionCreators } from \"redux\";\r\nimport { gotoLocationValidate } from \"../../../../Utilities/Validate\";\r\nimport * as MapFunctions from \"../../../../Map/MapFunctions\";\r\nimport * as Constanst from '../../../../Constants/Constants';\r\nimport AlertMessageSuper from '../../../../Controls/Containers/AlertMessageSuper';\r\nimport WithAlertMessage from '../../../../HOC/WithAlertMessage';\r\n\r\nexport class GoToLocation extends Component {\r\n    state = {\r\n        projectionType: 1\r\n    }\r\n\r\n    handleSubmit = (values, isMobileSize) => {\r\n        const { MapAction, MenuAction, showAlert } = this.props;\r\n        let latitude = values.gotoLatitude;\r\n        let longitude = values.gotoLongitude;\r\n\r\n        if (values.gotoProjection === 3) {\r\n            const latLong = values.gotoLatLong.split(',');\r\n            latitude = parseFloat(latLong[0].trim());\r\n            longitude = parseFloat(latLong[1].trim());\r\n        }\r\n\r\n        MapAction.bindMapCommand(MapFunctions.gotoLocation, {\r\n            projection: values.gotoProjection ? values.gotoProjection : this.state.projectionType,\r\n            latitude: latitude,\r\n            longitude: longitude,\r\n            showAlert\r\n        });\r\n\r\n        if (isMobileSize) { //กรณีใน mobile เมื่อกด Go จะปิด panel Go To Location\r\n            MenuAction.closeFormGotoLocation();\r\n        }\r\n    }\r\n\r\n    handleProjectionChange = (evt) => {\r\n        const { change } = this.props;\r\n        change(\"gotoLongitude\", \"\");\r\n        change(\"gotoLatitude\", \"\");\r\n        this.setState({ projectionType: evt.target.value });\r\n    }\r\n\r\n    handleClickClose = () => {\r\n        const { MenuAction, MapAction } = this.props;\r\n        MenuAction.closeFormGotoLocation();\r\n        MapAction.bindClearMapCommand();\r\n        MapAction.bindMapCommand(MapFunctions.clearGraphic, [Constanst.LISTGRAPHICLAYER.GRAPHICLAYER_GOTO_LOCATION]);\r\n    }\r\n\r\n    componentWillReceiveProps = async (nextProps) =>{\r\n        const { MapAction, menu } = this.props;\r\n        if (menu.GoToLocationFormVisible && !nextProps.menu.GoToLocationFormVisible) {\r\n            await MapAction.bindClearMapCommand();\r\n            await MapAction.bindMapCommand(MapFunctions.clearGraphic, [Constanst.LISTGRAPHICLAYER.GRAPHICLAYER_GOTO_LOCATION]);\r\n        }\r\n    }\r\n\r\n    render() {\r\n        const { menu, handleSubmit } = this.props;\r\n        const showHide = menu.GoToLocationFormVisible ? \"block\" : \"none\";\r\n\r\n        return (\r\n            <Fragment>\r\n                <GoToLocationFormView\r\n                    showHide={showHide}\r\n                    projectionType={this.state.projectionType}\r\n                    handleSubmit={handleSubmit}\r\n                    onSubmit={this.handleSubmit}\r\n                    onProjectionChange={this.handleProjectionChange}\r\n                    onClickClose={this.handleClickClose}\r\n                />\r\n                <AlertMessageSuper {...this.props} />\r\n            </Fragment>\r\n        );\r\n    }\r\n}\r\n\r\nconst reduxFormParameter = {\r\n    form: \"gotoLocation\",\r\n    validate: gotoLocationValidate,\r\n    initialValues: {\r\n        gotoProjection: 1\r\n    }\r\n};\r\n\r\nexport const mapStateToProps = state => {\r\n    return {\r\n        menu: state.menu\r\n    };\r\n};\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    MapAction: bindActionCreators(MapAction, dispatch),\r\n    MenuAction: bindActionCreators(MenuAction, dispatch)\r\n});\r\n\r\nconst enhance = compose(\r\n    connect(\r\n        mapStateToProps,\r\n        mapDispatchToProps\r\n    ),\r\n    reduxForm(reduxFormParameter),\r\n    WithAlertMessage\r\n);\r\n\r\nexport default enhance(GoToLocation);","import React from 'react'\r\nimport { withStyles } from '@material-ui/core/styles';\r\n\r\nconst MapToolsView = ({\r\n    classes,\r\n    children\r\n}) => {\r\n    return (\r\n        <div style={{ top: `calc(50% - ${children.length * 20}px)` }} className={classes.root}>\r\n            {children.map(itm => itm)}\r\n        </div>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        position: 'absolute',\r\n        // top: 'calc(50% - 220px)',\r\n        right: '5px',\r\n        zIndex: 1,\r\n        width: '80px',\r\n        display: 'flex',\r\n        alignItems: 'flex-end',\r\n        flexDirection: 'column',\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            top: '60% !important',\r\n        }\r\n    }\r\n}))(MapToolsView)\r\n","import React from \"react\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport Divider from \"@material-ui/core/Divider\";\r\n// import CloseIcon from \"@material-ui/icons/Close\";\r\nimport Icon from \"@material-ui/core/Icon\";\r\nimport { withStyles } from \"@material-ui/core\";\r\nimport { RESOURCEWORDS } from \"../../../../Constants/Constants\"\r\nimport Tooltip from '../../../../Controls/Containers/Tooltip';\r\n\r\nconst MeasurementView = props => {\r\n    const {\r\n        classes,\r\n        children,\r\n        activeMode,\r\n        onDistanceModeClick,\r\n        onAreaModeClick,\r\n        onLocationModeClick,\r\n        onCloseClick\r\n    } = props;\r\n    return (\r\n        <div className={classes.root}>\r\n            <div className={classes.header}>\r\n                <div className={classes.divTextHDR}>\r\n                    <label>{RESOURCEWORDS.MEASUREMENT_HEADER}</label>\r\n                </div>\r\n                {/* <CloseIcon onClick={onCloseClick} className={classes.iconCloseHDR} /> */}\r\n                <Icon className=\"icon\" onClick={onCloseClick} style={{color:\"white\"}}>close-circle</Icon>\r\n            </div>\r\n            <Divider />\r\n            <div className={classes.divMode}>\r\n                <Tooltip title=\"พื้นที่\" placement=\"top\">\r\n                    <div\r\n                        className={`${classes.btnMeasureMentMode} \r\n                                    ${\r\n                            activeMode.area\r\n                                ? classes.btnAreaSelected\r\n                                : classes.btnAreaNormal\r\n                            }`}\r\n                        onClick={onAreaModeClick}\r\n                    />\r\n                </Tooltip>\r\n                <Tooltip title=\"ระยะทาง\" placement=\"top\">\r\n                    <div\r\n                        className={`${classes.btnMeasureMentMode} \r\n                                    ${\r\n                            activeMode.distance\r\n                                ? classes.btnDistanceSelected\r\n                                : classes.btnDistanceNormal\r\n                            }`}\r\n                        onClick={onDistanceModeClick}\r\n                    />\r\n                </Tooltip>\r\n                <Tooltip title=\"ตำแหน่ง\" placement=\"top\">\r\n                    <div\r\n                        className={`${classes.btnMeasureMentMode} \r\n                                    ${\r\n                            activeMode.location\r\n                                ? classes.btnLocationSelected\r\n                                : classes.btnLocationNormal\r\n                            }`}\r\n                        onClick={onLocationModeClick}\r\n                    />\r\n                </Tooltip>\r\n            </div>\r\n            {children}\r\n        </div>\r\n    );\r\n};\r\n\r\nMeasurementView.propTypes = {\r\n    classes: PropTypes.object.isRequired,\r\n    children: PropTypes.element,\r\n    isOpen: PropTypes.bool,\r\n    activeMode: PropTypes.shape({\r\n        area: PropTypes.bool,\r\n        distance: PropTypes.bool,\r\n        location: PropTypes.bool\r\n    }),\r\n    onDistanceModeClick: PropTypes.func,\r\n    onAreaModeClick: PropTypes.func,\r\n    onLocationModeClick: PropTypes.func,\r\n    onCloseClick: PropTypes.func\r\n};\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        right: \"75px\",\r\n        width: \"290px\",\r\n        height: \"340px\",\r\n        zIndex: 2,\r\n        position: \"absolute\",\r\n        // bottom: \"210px\",\r\n        top: 'calc(50% - 240px)',\r\n        overflowY: \"hidden\",\r\n        overflowX: \"hidden\",\r\n        backgroundColor: \"#FFFFFF\",\r\n        padding: \"0px\",\r\n        boxShadow: \"2px 2px 8px #888888\",\r\n        borderColor: 'black',\r\n        borderStyle: \"solid\",\r\n        borderWidth: \"2px\",\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            display: 'none'\r\n        }\r\n    },\r\n    header: {\r\n        width: \"100%\",\r\n        // height: \"45px\",\r\n        backgroundColor: theme.mainTheme.color1,\r\n    },\r\n    divMode: {\r\n        border: \"1px solid #C8C8C8\",\r\n        display: \"flex\",\r\n        justifyContent: \"center\",\r\n        margin: \"20px\"\r\n    },\r\n    btnMeasureMentMode: {\r\n        minWidth: \"40px\",\r\n        minHeight: \"40px\",\r\n        margin: \"10px\",\r\n        display: \"block\",\r\n        padding: 0,\r\n        backgroundSize: \"40px 40px\",\r\n        backgroundRepeat: \"no-repeat\",\r\n        backgroundPosition: \"center\"\r\n    },\r\n    btnAreaNormal: {\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/webmap_measurement_01_normal.png)`,\r\n        \"&:Hover\": {\r\n            backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/webmap_measurement_01_selected.png)`\r\n        },\r\n        cursor: 'pointer'\r\n    },\r\n    btnAreaSelected: {\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/webmap_measurement_01_selected.png)`,\r\n        cursor: 'pointer'\r\n    },\r\n    btnDistanceNormal: {\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/webmap_measurement_02_normal.png)`,\r\n        \"&:Hover\": {\r\n            backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/webmap_measurement_02_selected.png)`\r\n        },\r\n        cursor: 'pointer'\r\n    },\r\n    btnDistanceSelected: {\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/webmap_measurement_02_selected.png)`,\r\n        cursor: 'pointer'\r\n    },\r\n    btnLocationNormal: {\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/webmap_measurement_03_normal.png)`,\r\n        \"&:Hover\": {\r\n            backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/webmap_measurement_03_selected.png)`,\r\n        },\r\n        cursor: 'pointer'\r\n    },\r\n    btnLocationSelected: {\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/webmap_measurement_03_selected.png)`,\r\n        cursor: 'pointer'\r\n    },\r\n    divTextHDR: {\r\n        display: 'inline-block',\r\n        height: '100%',\r\n        width: '100%',\r\n        textAlign: 'left',\r\n        // lineHeight: '45px',\r\n        padding: '5px',\r\n        color: 'white',\r\n        fontWeight: 'bold',\r\n    },\r\n    iconCloseHDR: {\r\n        width: '28px',\r\n        height: '28px',\r\n        position: 'absolute',\r\n        right: '0px',\r\n        top: '0px',\r\n        color: 'white',\r\n        cursor: 'pointer'\r\n    },\r\n}))(MeasurementView);\r\n","import React from 'react'\r\nimport { withStyles } from '@material-ui/core'\r\nimport Select from '@material-ui/core/Select';\r\nimport FormControl from '@material-ui/core/FormControl';\r\nimport OutlinedInput from \"@material-ui/core/OutlinedInput\";\r\nimport MenuItem from \"@material-ui/core/MenuItem\";\r\nimport FormHelperText from '@material-ui/core/FormHelperText'\r\n\r\nconst SelectFieldView = ({\r\n    classes,\r\n    isError,\r\n    errMsg,\r\n    keyData = { value: \"\", label: \"\" },\r\n    dataItems,\r\n    value,\r\n    labelName,\r\n    inputProps,\r\n    onChange,\r\n    required\r\n}) => {\r\n    return (\r\n        <FormControl className={classes.formControl}>\r\n            <span style={{ marginBottom: '5px' }}>\r\n                {labelName}{required && <label className={classes.red}>*</label>}\r\n            </span>\r\n            <Select\r\n                value={value}\r\n                color=\"primary\"\r\n                className={classes.select}\r\n                inputProps={inputProps}\r\n                onChange={onChange}\r\n                input={\r\n                    <OutlinedInput\r\n                        name=\"age\"\r\n                        id=\"outlined-age-simple\"\r\n                        labelWidth={0}\r\n                    />\r\n                }\r\n            >\r\n                {dataItems.map((item) => (\r\n                    <MenuItem key={item[keyData.value]} value={item[keyData.value]}>\r\n                        {item[keyData.label]}\r\n                    </MenuItem>\r\n                ))}\r\n            </Select>\r\n            <FormHelperText className={classes.formHelper}>\r\n                {isError && errMsg}\r\n            </FormHelperText>\r\n        </FormControl>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    formControl: {\r\n        minWidth: \"100%\",\r\n        // marginTop: theme.spacing.unit,\r\n        // marginBottom: theme.spacing.unit\r\n    },\r\n    label: {\r\n        // lineHeight: 1.25,\r\n        display: \"flex\",\r\n        alignItems: \"center\",\r\n        justifyContent: \"center\",\r\n        fontSize: \"20\"\r\n    },\r\n    red: {\r\n        color: \"red\"\r\n    },\r\n    formHelper: {\r\n        marginTop: theme.spacing.unit / 3,\r\n        color: \"red\",\r\n        padding: '0px',\r\n    },\r\n    select: {\r\n        width: '100%',\r\n        height: '42px'\r\n    }\r\n}))(SelectFieldView)\r\n","import React, { Component } from 'react'\r\nimport PropTypes from 'prop-types'\r\nimport SlectFieldView from '../Presentationals/SelectFieldView'\r\n\r\nclass SelectField extends Component {\r\n    render() {\r\n        const {\r\n            isError,\r\n            errMsg,\r\n            keyData,\r\n            dataItems,\r\n            value,\r\n            labelName,\r\n            inputProps,\r\n            required,\r\n            onChange\r\n        } = this.props\r\n\r\n        return (\r\n            <SlectFieldView\r\n                isError={isError}\r\n                errMsg={errMsg}\r\n                keyData={keyData}\r\n                dataItems={dataItems}\r\n                value={value}\r\n                labelName={labelName}\r\n                inputProps={inputProps}\r\n                required={required}\r\n                onChange={onChange}\r\n            />\r\n        )\r\n    }\r\n}\r\n\r\nSelectField.propTypes = {\r\n    label: PropTypes.string,\r\n    required: PropTypes.bool\r\n}\r\n\r\nSelectField.defaultProps = {\r\n    keyData: { value: \"value\", label: \"label\" },\r\n    inputProps: {\r\n        name: \"selectField\",\r\n        id: \"selectField\"\r\n    },\r\n    labelName: \"select\",\r\n    required: false,\r\n    isError: false,\r\n    errMsg: \"error\"\r\n}\r\n\r\nexport default SelectField","import React from \"react\";\r\nimport PropTypes from \"prop-types\";\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\nimport SelectField from '../../../../Controls/Containers/SelectField'\r\nimport { MEASUREMENT_DRAW_MODE, MEASUREMENT_UNIT } from '../../../../Constants/Constants';\r\n\r\nconst inputProps = {\r\n    name: \"Unit\",\r\n    id: \"measurement-unit\"\r\n};\r\n\r\nconst MeasurementResultView = props => {\r\n    const {\r\n        classes,\r\n        datasource,\r\n        labelName,\r\n        result,\r\n        value,\r\n        mouseMoveResult,\r\n        drawModeActive,\r\n        unitActive,\r\n        onChange\r\n    } = props;\r\n\r\n    const renderResultLocation = () => (\r\n        <div className={classes.divResultLocation}>\r\n            <div className={classes.divRowResultLocation}>\r\n                <div style={{ width: '20%' }}></div>\r\n                <div className={classes.divCol}>{unitActive === MEASUREMENT_UNIT.location.longLat.value ? \"Latitude\" : \"X\"}</div>\r\n                <div className={classes.divCol}>{unitActive === MEASUREMENT_UNIT.location.longLat.value ? \"Longitude\" : \"Y\"}</div>\r\n            </div>\r\n\r\n            <div className={classes.divRowResultLocation}>\r\n                <div style={{ width: '20%' }}><img src={`${process.env.PUBLIC_URL}/img/maptools/mouse.png`} style={{ width: '10px' }} alt=\"img\" /></div>\r\n                <div className={classes.divCol}>{mouseMoveResult && mouseMoveResult[0] ? mouseMoveResult[0] : \"-\"}</div>\r\n                <div className={classes.divCol} >{mouseMoveResult && mouseMoveResult[1] ? mouseMoveResult[1] : \"-\"}</div>\r\n            </div>\r\n\r\n            <div className={classes.divRowResultLocation}>\r\n                <div style={{ width: '20%' }}><img src={`${process.env.PUBLIC_URL}/img/maptools/circle.png`} style={{ width: '10px' }} alt=\"img\" /></div>\r\n                <div className={classes.divCol}>{result && result[0] ? result[0] : \"-\"}</div>\r\n                <div className={classes.divCol}>{result && result[1] ? result[1] : \"-\"}</div>\r\n            </div>\r\n        </div>\r\n    )\r\n\r\n    const renderResult = () => (\r\n        <div className={classes.divResult}>\r\n            {result ? result : \"0.0\"}\r\n        </div>\r\n    )\r\n\r\n    return (\r\n        <div className={classes.root}>\r\n            <SelectField\r\n                keyData={{ value: \"value\", label: \"name\" }}\r\n                dataItems={datasource}\r\n                value={value}\r\n                labelName={labelName}\r\n                inputProps={inputProps}\r\n                onChange={onChange}\r\n            />\r\n            ผลลัพธ์\r\n            {drawModeActive === MEASUREMENT_DRAW_MODE.location ? renderResultLocation() : renderResult()}\r\n        </div>\r\n    );\r\n};\r\n\r\nMeasurementResultView.propTypes = {\r\n    classes: PropTypes.object.isRequired,\r\n    value: PropTypes.string,\r\n    labelName: PropTypes.string,\r\n    datasource: PropTypes.arrayOf(\r\n        PropTypes.shape({\r\n            name: PropTypes.string,\r\n            value: PropTypes.string\r\n        })\r\n    ),\r\n    onChange: PropTypes.func\r\n};\r\nMeasurementResultView.defaultProps = {\r\n    result: \"0.00\",\r\n    value: \"\",\r\n    labelName: \"หน่วย\",\r\n    datasource: []\r\n};\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        display: \"flex\",\r\n        flexWrap: \"wrap\",\r\n        margin: \"0px 20px 0px 20px\",\r\n        padding: \"0px\"\r\n    },\r\n    formControl: {\r\n        minWidth: 120,\r\n        width: \"100%\",\r\n        height: \"50px\"\r\n    },\r\n    selectEmpty: {\r\n        marginTop: theme.spacing.unit * 2\r\n    },\r\n    divResult: {\r\n        width: \"100%\",\r\n        color: theme.mainTheme.color1,\r\n        textAlign: \"center\",\r\n        fontSize: \"18px\",\r\n        whiteSpace: \"pre-wrap\",\r\n        paddingTop: \"10px\",\r\n    },\r\n    divResultLocation: {\r\n        marginTop: '5px',\r\n        fontSize: \"16px\",\r\n        display: 'flex',\r\n        flexDirection: 'column',\r\n        width: '100%',\r\n        color: theme.mainTheme.color1\r\n    },\r\n    divRowResultLocation: {\r\n        width: '100%',\r\n        display: 'flex',\r\n        flexDirection: 'row'\r\n    },\r\n    divCol: {\r\n        width: '40%'\r\n    }\r\n}))(MeasurementResultView);\r\n","import React, { Component } from \"react\";\r\nimport { bindActionCreators } from \"redux\";\r\nimport { connect } from \"react-redux\";\r\nimport EsriLoader from \"esri-loader\";\r\n\r\nimport MeasurementView from \"../../../../Presentationals/Web/Maps/Measurement/MeasurementView\";\r\nimport MeasurementResultView from \"../../../../Presentationals/Web/Maps/Measurement/MeasurementResultView\";\r\nimport * as Constants from \"../../../../Constants/Constants\";\r\nimport * as MapFunction from \"../../../../Map/MapFunctions\";\r\nimport * as MapAction from \"../../../../Actions/Web/Maps/MapAction\";\r\nimport { objectToArray } from \"../../../../Utilities/Utils\";\r\n\r\nconst INIT_SELECT_UNIT = {\r\n    area: Constants.MEASUREMENT_UNIT.area.squareKilometers.value,\r\n    distance: Constants.MEASUREMENT_UNIT.distance.kilometers.value,\r\n    location: Constants.MEASUREMENT_UNIT.location.longLat.value,\r\n};\r\n\r\nclass Measurement extends Component {\r\n    constructor() {\r\n        super();\r\n        this.state = {\r\n            selectValue: {\r\n                area: INIT_SELECT_UNIT.area,\r\n                distance: INIT_SELECT_UNIT.distance,\r\n                location: INIT_SELECT_UNIT.location,\r\n            },\r\n            result: null, //ผลลัพธ์จากการคำนวน\r\n            mouseMoveResult: null, //ผลลัพท์การแสดงตำแหน่งเมื่อเลื่อน mouse บนแผนที่\r\n            datasource: objectToArray(Constants.MEASUREMENT_UNIT.area), //กำหนดข้อมูลให้กับ Dropdown\r\n            drawModeActive: Constants.MEASUREMENT_DRAW_MODE.area, //ใช้สำหรับแสดงผล draw mode บน ui\r\n        };\r\n        this.geometry = [];\r\n    }\r\n\r\n    componentDidMount = async () => {\r\n        const { mapAction } = this.props;\r\n\r\n        await mapAction.bindMapCommand(MapFunction.drawGraphicToolbar, {\r\n            drawMode: \"close\",\r\n        });\r\n        await mapAction.bindMapCommand(MapFunction.clearEditGraphic);\r\n        await mapAction.bindMapCommand(MapFunction.createDrawMeasurement, {\r\n            callback: this.handleMeasurementDrawComplete,\r\n            type: Constants.MEASUREMENT_TYPE_DRAW.polygon,\r\n        });\r\n\r\n        await mapAction.bindEvtClickMap(this.handleClickMap);\r\n        await mapAction.bindEvtMouseMove(this.handleMouseMove);\r\n    };\r\n\r\n    handleClickMap = (evt) => {\r\n        EsriLoader.loadModules(\r\n            [\"esri/geometry/Polygon\", \"esri/geometry/Polyline\"],\r\n            window.MAP_OPTION\r\n        ).then(([Polygon, Polyline]) => {\r\n            const { drawModeActive } = this.state;\r\n            this.geometry.push([\r\n                evt.mapClickObject.mapPoint.x,\r\n                evt.mapClickObject.mapPoint.y,\r\n            ]);\r\n\r\n            if (\r\n                drawModeActive === Constants.MEASUREMENT_DRAW_MODE.area &&\r\n                this.geometry.length > 2\r\n            ) {\r\n                const geoPolygon = new Polygon({\r\n                    rings: [this.geometry],\r\n                    spatialReference: { wkid: 102100 },\r\n                });\r\n\r\n                MapFunction.calArea(geoPolygon).then((result) => {\r\n                    this.setState({\r\n                        result: result,\r\n                    });\r\n                });\r\n            } else if (\r\n                drawModeActive === Constants.MEASUREMENT_DRAW_MODE.distance &&\r\n                this.geometry.length > 1\r\n            ) {\r\n                const geoPolyline = new Polyline({\r\n                    paths: [this.geometry],\r\n                    spatialReference: { wkid: 102100 },\r\n                });\r\n\r\n                MapFunction.calDistance(geoPolyline).then((result) => {\r\n                    this.setState({\r\n                        result: result,\r\n                    });\r\n                });\r\n            }\r\n        });\r\n    };\r\n\r\n    handleMouseMove = (evt) => {\r\n        const { drawModeActive } = this.state;\r\n\r\n        if (drawModeActive === Constants.MEASUREMENT_DRAW_MODE.location) {\r\n            EsriLoader.loadModules(\r\n                [\"esri/geometry/Point\"],\r\n                window.MAP_OPTION\r\n            ).then(([Point]) => {\r\n                const geoPoint = new Point(evt.mapMouseMoveObject.mapPoint);\r\n                MapFunction.calLocation(geoPoint).then((result) => {\r\n                    this.setState({\r\n                        mouseMoveResult: result,\r\n                    });\r\n                });\r\n            });\r\n        }\r\n    };\r\n\r\n    handleMeasurementDrawComplete = (result) => {\r\n        this.geometry = [];\r\n\r\n        this.setState({\r\n            result: result,\r\n        });\r\n    };\r\n\r\n    handleDistanceModeClick = () => {\r\n        const { mapAction } = this.props;\r\n        const { drawModeActive } = this.state;\r\n\r\n        if (drawModeActive !== Constants.MEASUREMENT_DRAW_MODE.distance) {\r\n            mapAction.bindMapCommand(MapFunction.createDrawMeasurement, {\r\n                callback: this.handleMeasurementDrawComplete,\r\n                type: Constants.MEASUREMENT_TYPE_DRAW.polyline,\r\n            });\r\n\r\n            this.setState({\r\n                datasource: objectToArray(Constants.MEASUREMENT_UNIT.distance),\r\n                drawModeActive: Constants.MEASUREMENT_DRAW_MODE.distance,\r\n                result: null,\r\n                mouseMoveResult: null,\r\n            });\r\n\r\n            this.geometry = []; //clear geometry\r\n        }\r\n    };\r\n\r\n    handleAreaModeClick = () => {\r\n        const { mapAction } = this.props;\r\n        const { drawModeActive } = this.state;\r\n        this.geometry = []; //clear geometry\r\n\r\n        if (drawModeActive !== Constants.MEASUREMENT_DRAW_MODE.area) {\r\n            mapAction.bindMapCommand(MapFunction.createDrawMeasurement, {\r\n                callback: this.handleMeasurementDrawComplete,\r\n                type: Constants.MEASUREMENT_TYPE_DRAW.polygon,\r\n            });\r\n\r\n            this.setState({\r\n                datasource: objectToArray(Constants.MEASUREMENT_UNIT.area),\r\n                drawModeActive: Constants.MEASUREMENT_DRAW_MODE.area,\r\n                result: null,\r\n                mouseMoveResult: null,\r\n            });\r\n\r\n            this.geometry = []; //clear geometry\r\n        }\r\n    };\r\n\r\n    handleLocationModeClick = () => {\r\n        const { mapAction } = this.props;\r\n        const { drawModeActive } = this.state;\r\n        this.geometry = []; //clear geometry\r\n\r\n        if (drawModeActive !== Constants.MEASUREMENT_DRAW_MODE.location) {\r\n            mapAction.bindMapCommand(MapFunction.createDrawMeasurement, {\r\n                callback: this.handleMeasurementDrawComplete,\r\n                type: Constants.MEASUREMENT_TYPE_DRAW.point,\r\n            });\r\n\r\n            this.setState({\r\n                datasource: objectToArray(Constants.MEASUREMENT_UNIT.location),\r\n                drawModeActive: Constants.MEASUREMENT_DRAW_MODE.location,\r\n                result: null,\r\n                mouseMoveResult: null,\r\n            });\r\n\r\n            this.geometry = []; //clear geometry\r\n        }\r\n    };\r\n\r\n    handleChangeUnit = (evt) => {\r\n        //เมื่อมีการเปลี่ยนหน่วย\r\n        const unit = evt.target.value;\r\n        this.setState((prevState) => ({\r\n            selectValue: {\r\n                ...prevState.selectValue,\r\n                [prevState.drawModeActive]: unit,\r\n            },\r\n        }));\r\n    };\r\n\r\n    handleCloseClick = (evt) => {\r\n        evt.stopPropagation();\r\n        const { closeMeasureMesurement, mapAction } = this.props;\r\n\r\n        mapAction.bindMapCommand(MapFunction.clearDrawMesurement);\r\n        if (closeMeasureMesurement) {\r\n            closeMeasureMesurement();\r\n        }\r\n    };\r\n\r\n    componentWillUnmount = () => {\r\n        const { mapAction } = this.props;\r\n        mapAction.bindMapCommand(MapFunction.clearDrawMesurement);\r\n    };\r\n\r\n    render() {\r\n        const {\r\n            drawModeActive,\r\n            selectValue,\r\n            result,\r\n            datasource,\r\n            mouseMoveResult,\r\n        } = this.state;\r\n        const unitActive = selectValue[drawModeActive];\r\n\r\n        return (\r\n            <MeasurementView\r\n                activeMode={{\r\n                    area:\r\n                        drawModeActive === Constants.MEASUREMENT_DRAW_MODE.area,\r\n                    distance:\r\n                        drawModeActive ===\r\n                        Constants.MEASUREMENT_DRAW_MODE.distance,\r\n                    location:\r\n                        drawModeActive ===\r\n                        Constants.MEASUREMENT_DRAW_MODE.location,\r\n                }}\r\n                onDistanceModeClick={this.handleDistanceModeClick}\r\n                onAreaModeClick={this.handleAreaModeClick}\r\n                onLocationModeClick={this.handleLocationModeClick}\r\n                onCloseClick={this.handleCloseClick}>\r\n                <MeasurementResultView\r\n                    value={selectValue[drawModeActive]}\r\n                    result={\r\n                        result && result[unitActive] ? result[unitActive] : null\r\n                    }\r\n                    mouseMoveResult={\r\n                        mouseMoveResult && mouseMoveResult[unitActive]\r\n                            ? mouseMoveResult[unitActive]\r\n                            : null\r\n                    }\r\n                    datasource={datasource}\r\n                    drawModeActive={drawModeActive}\r\n                    unitActive={unitActive}\r\n                    onChange={this.handleChangeUnit}\r\n                />\r\n            </MeasurementView>\r\n        );\r\n    }\r\n}\r\n\r\nconst mapDispatchToProps = (dispatch) => ({\r\n    mapAction: bindActionCreators(MapAction, dispatch),\r\n});\r\n\r\nexport default connect(\r\n    null,\r\n    mapDispatchToProps\r\n)(Measurement);\r\n","import * as ActionTypes from \"../../../Constants/ActionTypes\";\r\nimport { TOC_SUFFIX_ID } from \"../../../Constants/Constants\";\r\nimport { fetchGet_ } from '../../../Utilities/ServiceUtils';\r\n\r\nexport const getListDefaultLayer = (systemID, groupID) => dispatch => {\r\n    return fetchGet_(`${process.env.REACT_APP_GET_TOC}?systemid=${systemID}&groupid=${groupID}`)\r\n        .then(res => {\r\n            if (!res.ok) {\r\n                throw res.status\r\n            }\r\n            return res.json();\r\n        })\r\n        .then(result => {\r\n            if (result && result.layers) {\r\n                const listDefaultLayer = result.layers = result.layers.filter(itm => !itm.subLayerID) // filter เอา parent ออก\r\n                dispatch({\r\n                    type: ActionTypes.GET_LIST_DEFAULT_LAYER,\r\n                    listDefaultLayer: listDefaultLayer\r\n                })\r\n\r\n                return listDefaultLayer\r\n            }\r\n        })\r\n        .catch(ex => {\r\n            console.log('ex getListDefaultLayer', ex)\r\n        })\r\n\r\n}\r\n\r\n//คิดว่าเป็นการบังคับให้คนที่ใช้ TOC ต้องสร้าง Object ตาม function นี้\r\nexport const generateFormatTOCData = (objData, {\r\n    id,\r\n    idTOC,\r\n    mapserviceURL,\r\n    mapserviceID,\r\n    name,\r\n    tableName,\r\n    listLegend = [],\r\n    listSubLayer = []\r\n} = {}) => {// generateFormatTOCData(objData, matchKeyObj)\r\n    return {\r\n        id: objData[id],\r\n        idTOC: objData[idTOC],\r\n        mapserviceURL: objData[mapserviceURL],\r\n        mapserviceID: objData[mapserviceID],\r\n        name: objData[name],\r\n        listLegend: objData[listLegend],\r\n        listSubLayer: objData[listSubLayer],\r\n        tableName: objData[tableName]\r\n    }\r\n}\r\n\r\n//เพิ่ม layer แสดงผล UI ข้างบนเสมอ\r\nexport const addTOCLayer = (listLayer = []) => { //working layer\r\n    return {\r\n        type: ActionTypes.ADD_NEW_TOC_LAYER,\r\n        listLayer\r\n    }\r\n}\r\n\r\nexport const addTOCBgLayer = (listBgLayer = []) => { //background layer\r\n    return {\r\n        type: ActionTypes.ADD_NEW_TOC_BG_LAYER,\r\n        listBgLayer\r\n    }\r\n}\r\n\r\nexport const setListCreateMinorTopicLayer = (listLayer = []) => {\r\n    return {\r\n        type: ActionTypes.ADD_NEW_TOC_MINORTOPIC_LAYER,\r\n        listLayer\r\n    }\r\n}\r\n\r\nexport const initializeLayerMinorTopic = (listLayer = [], majorID = null, minorID = null) => {\r\n    return {\r\n        type: ActionTypes.INITIALIZE_TOC_FROM_MINOR_TOPIC,\r\n        listLayer,\r\n        majorID,\r\n        minorID\r\n    }\r\n}\r\n\r\nconst getLegendTopicLayer = async urlMapservice => {\r\n    let listLayerLegend = [];\r\n    try {\r\n        const response = await fetch(`${urlMapservice}legend?f=pjson&token=${localStorage.getItem('arcToken')}`);\r\n        const result = await response.json();\r\n        listLayerLegend = result.layers;\r\n    }\r\n    catch (err) {\r\n        listLayerLegend = [];\r\n    }\r\n    return listLayerLegend;\r\n}\r\n\r\nexport const saveToListCreateMinorTopicListLayerByTopic = (listLayer = [], majorTopicID, minorTopicID) => async dispatch => {\r\n    if (listLayer && listLayer.length !== 0) {\r\n        const listLayerLegend = await getLegendTopicLayer(listLayer[0].mapServiceDisplayURL);\r\n        const listLayerTOC = listLayer.map(itm => {\r\n            let listLegendOfLayerITM = [];\r\n            //หา Legend ของแต่ละ Layer\r\n            if (listLayerLegend) {\r\n                listLayerLegend.every(layer => {\r\n                    if (itm.mapServiceID === layer.layerId) {\r\n                        listLegendOfLayerITM = layer.legend;\r\n                        return false;//break;\r\n                    }\r\n                    return true; //continune\r\n                })\r\n            }\r\n            return generateFormatTOCData(\r\n                //object souce\r\n                {\r\n                    id: itm.ID,\r\n                    idTOC: `${majorTopicID}_${minorTopicID}_${itm.ID}${TOC_SUFFIX_ID.TOPIC_LAYER}`,\r\n                    mapserviceURL: itm.mapServiceDisplayURL,\r\n                    mapserviceID: itm.mapServiceID,\r\n                    name: itm.name,\r\n                    listLegend: listLegendOfLayerITM,\r\n                    listSubLayer: [],\r\n                    tableName: itm.tableName //เพิ่มเพื่อใช้สำหรับ export csv\r\n                },\r\n                //object match key\r\n                {\r\n                    id: 'id',\r\n                    idTOC: 'idTOC',\r\n                    mapserviceURL: 'mapserviceURL',\r\n                    mapserviceID: 'mapserviceID',\r\n                    name: 'name',\r\n                    listLegend: 'listLegend',\r\n                    listSubLayer: 'listSubLayer',\r\n                    tableName: 'tableName'\r\n                }\r\n            )\r\n        });\r\n\r\n        dispatch(initializeLayerMinorTopic(listLayerTOC, majorTopicID, minorTopicID))\r\n    }\r\n}\r\n\r\nexport const setCurrentParentExpandedPanel = id => {\r\n    return {\r\n        type: ActionTypes.SET_CURRENT_TOC_PARENT_EXPANDED_PANEL,\r\n        id\r\n    }\r\n}\r\n\r\nexport const checkParentLayer = idTOC => { //working layer\r\n    return {\r\n        type: ActionTypes.CHK_PARENT_OPEN_TOC_LAYER_ITM,\r\n        idTOC\r\n    }\r\n}\r\n\r\nexport const checkParentBgLayer = idTOC => { //background layer\r\n    return {\r\n        type: ActionTypes.CHK_PARENT_OPEN_TOC_BG_LAYER_ITM,\r\n        idTOC\r\n    }\r\n}\r\n\r\nexport const removeAllTOCTopicLayer = () => {\r\n    return {\r\n        type: ActionTypes.REMOVE_TOC_TOPIC_LAYER\r\n    }\r\n}\r\n\r\nexport const disableLayer = (listIdTOC = []) => {\r\n    return {\r\n        type: ActionTypes.SET_DISABLE_LIST_TOC_LAYER,\r\n        listIdTOC\r\n    }\r\n}\r\n\r\nexport const setListChecked = (listChecked = []) => {\r\n    return {\r\n        type: ActionTypes.SET_TOC_LIST_CHECKED,\r\n        listChecked\r\n    }\r\n}\r\n\r\nexport const setListUnChecked = (listUnCheck = []) => {\r\n    return {\r\n        type: ActionTypes.SET_TOC_LIST_UNCHECKED,\r\n        listUnCheck\r\n    }\r\n}\r\n\r\nexport const removeTOCLayerItem = (idTOC) => { //working layer\r\n    return {\r\n        type: ActionTypes.REMOVE_TOC_LAYER_ITEM,\r\n        idTOC\r\n    }\r\n}\r\n\r\nexport const removeTOCBgLayerItem = (idTOC) => { //background layer\r\n    return {\r\n        type: ActionTypes.REMOVE_TOC_BG_LAYER_ITEM,\r\n        idTOC\r\n    }\r\n}\r\n\r\nexport const setListLayer = (listLayer) => { //working layer\r\n    return {\r\n        type: ActionTypes.SET_TOC_LIST_LAYER,\r\n        listLayer\r\n    }\r\n}\r\n\r\nexport const setListBgLayer = (listBgLayer) => {  //background layer\r\n    return {\r\n        type: ActionTypes.SET_TOC_LIST_BG_LAYER,\r\n        listBgLayer\r\n    }\r\n}\r\n\r\nexport const clearTOCReducer = () => {\r\n    return {\r\n        type: ActionTypes.CLEAR_TOC_REDUCER\r\n    }\r\n}","import React from 'react';\r\nimport classnames from 'classnames'\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Fab from \"@material-ui/core/Fab\";\r\nimport Grid from '@material-ui/core/Grid'\r\nimport Icon from '@material-ui/core/Icon';\r\nimport AddIcon from \"@material-ui/icons/Add\";\r\nimport Scrollbar from 'react-custom-scrollbars';\r\nimport Tooltip from '../../../../Controls/Containers/Tooltip';\r\n\r\nconst TOCPanelView = ({\r\n    classes,\r\n    isHide = false,\r\n    children,\r\n    onCloseClick,\r\n    onOpenAddLayer\r\n}) => {\r\n    return (\r\n        <Grid container className={classnames(classes.root, { [classes.root_hide]: isHide })}>\r\n            <Grid container className={classes.header}>\r\n                <Grid item xs={12} className={classes.header_text}>\r\n                    <label>รายการชั้นข้อมูล</label>\r\n                </Grid>\r\n                <Icon onClick={onCloseClick} className=\"icon\" style={{ color: \"white\" }} >close-circle</Icon>\r\n                {/* <CloseIcon onClick={onCloseClick} className={classes.iconCloseHDR} /> */}\r\n            </Grid>\r\n            <Grid container className={classes.title}>\r\n                <Grid item xs={12} className={classes.title_text}>\r\n                    {/* <label>รายการชั้นข้อมูล</label> */}\r\n                </Grid>\r\n                <Tooltip title=\"เพิ่มชั้นข้อมูล\" placement=\"left\" >\r\n                    <Fab\r\n                        color=\"primary\"\r\n                        size=\"small\"\r\n                        aria-label=\"Add\"\r\n                        classes={{ root: classes.button }}\r\n                        onClick={onOpenAddLayer}\r\n                    >\r\n                        <AddIcon />\r\n                    </Fab>\r\n                </Tooltip>\r\n            </Grid>\r\n            <Grid container style={{ height: 'calc(100% - 85px)' }}>\r\n                <Scrollbar autoHide={false}>\r\n                    <Grid container style={{ width: 'calc(100% - 5px)', paddingLeft: '5px', }}>\r\n                        {children}\r\n                    </Grid>\r\n                </Scrollbar>\r\n            </Grid>\r\n        </Grid>);\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        right: \"75px\",\r\n        width: \"450px\",\r\n        height: \"calc(100% - 10px)\",\r\n        zIndex: 2,\r\n        position: \"absolute\",\r\n        bottom: \"5px\",\r\n        boxShadow: \"2px 2px 8px #888888\",\r\n        backgroundColor: \"#FFFFFF\",\r\n        padding: \"0px\",\r\n        borderColor: 'black',\r\n        borderStyle: \"solid\",\r\n        borderWidth: \"2px\",\r\n        [theme.breakpoints.down('sm')]: {\r\n            width: '100%',\r\n            right: \"unset\",\r\n            height: \"100%\",\r\n            bottom: \"unset\"\r\n        }\r\n    },\r\n    root_hide: {\r\n        display: 'none'\r\n    },\r\n    header: {\r\n        height: \"35px\",\r\n        backgroundColor: theme.mainTheme.color1,\r\n    },\r\n    header_text: {\r\n        textAlign: 'left',\r\n        padding: '5px',\r\n        color: 'white',\r\n        fontWeight: 'bold'\r\n    },\r\n    iconCloseHDR: {\r\n        width: '28px',\r\n        height: '28px',\r\n        position: 'absolute',\r\n        right: '0px',\r\n        top: '0px',\r\n        color: 'white',\r\n        cursor: 'pointer'\r\n    },\r\n    title: {\r\n        height: \"50px\",\r\n        lineHeight: '50px',\r\n        // backgroundColor: theme.mainTheme.color1,\r\n        // backgroundColor: '#999999'\r\n    },\r\n    title_text: {\r\n        textAlign: 'center',\r\n        // color: 'white',\r\n        color: 'black',\r\n    },\r\n    button: {\r\n        position: 'absolute',\r\n        right: '0px',\r\n        top: '34px',\r\n        backgroundColor: \"#5fa855\",\r\n        margin: '5px'\r\n    },\r\n}))(TOCPanelView);","import React, {Fragment} from 'react';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Grid from '@material-ui/core/Grid'\r\nimport MuiExpansionPanel from '@material-ui/core/ExpansionPanel';\r\nimport MuiExpansionPanelSummary from '@material-ui/core/ExpansionPanelSummary';\r\nimport MuiExpansionPanelDetails from '@material-ui/core/ExpansionPanelDetails';\r\nimport ListItem from '@material-ui/core/ListItem';\r\nimport ListItemText from '@material-ui/core/ListItemText';\r\nimport ListItemAvatar from '@material-ui/core/ListItemAvatar';\r\nimport Avatar from '@material-ui/core/Avatar';\r\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\r\nimport Checkbox from \"@material-ui/core/Checkbox\";\r\nimport RemoveCircleBtn from '@material-ui/icons/DeleteForever';\r\nimport IconButton from '@material-ui/core/IconButton';\r\nimport Tooltip from '@material-ui/core/Tooltip';\r\nimport { DragHandle , SwapVert} from '@material-ui/icons'\r\nimport {\r\n    SortableContainer,\r\n    SortableElement,\r\n    SortableHandle,\r\n    arrayMove,\r\n} from 'react-sortable-hoc';\r\nimport { shortcutText } from '../../../../Utilities/Utils'\r\n// import { TOC_SUFFIX_ID } from '../../../../Constants/Constants';\r\n\r\nconst screenWidth = window.screen.width\r\n\r\nconst ExpansionPanel = withStyles({\r\n    root: {\r\n        border: '1px solid rgba(0,0,0,.125)',\r\n        boxShadow: 'none',\r\n        '&:not(:last-child)': {\r\n            borderBottom: 0,\r\n        },\r\n        '&:before': {\r\n            display: 'none',\r\n        },\r\n    },\r\n    expanded: {\r\n        margin: 'auto',\r\n    },\r\n})(MuiExpansionPanel);\r\n  \r\nconst ExpansionPanelSummary = withStyles({\r\n    root: {\r\n        backgroundColor: 'rgba(0,0,0,.03)',\r\n        borderBottom: '1px solid rgba(0,0,0,.125)',\r\n        marginBottom: -1,\r\n        minHeight: 56,\r\n        '&$expanded': {\r\n            minHeight: 56,\r\n        },\r\n    },\r\n    content: {\r\n        '&$expanded': {\r\n            margin: '12px 0',\r\n        },\r\n    },\r\n    expanded: {},\r\n})(props => <MuiExpansionPanelSummary {...props} />); \r\nExpansionPanelSummary.muiName = 'ExpansionPanelSummary';\r\n  \r\nconst ExpansionPanelDetails = withStyles(theme => ({\r\n    root: {\r\n        // padding: theme.spacing.unit * 2,\r\n        padding: '5px 16px',\r\n    },\r\n}))(MuiExpansionPanelDetails);\r\n\r\nconst ListItemCustom = withStyles(theme => ({\r\n    root: {\r\n        zIndex: 9,\r\n        '&:hover': {\r\n            textDecoration: 'none',\r\n             backgroundColor: 'rgba(0, 0, 0, 0.08)'\r\n            }\r\n    },\r\n    grid_root: {\r\n        flexGrow: 1,\r\n    },\r\n    grid_root_free: {\r\n        cursor: 'grab'\r\n    },\r\n    grid_root_freeGrab: {\r\n        cursor: 'grabbing' //ns-resize\r\n    },\r\n    avatar: {\r\n        margin: 0,\r\n        borderRadius: 0,\r\n        height: '25px',\r\n        width: '25px'\r\n    },\r\n    btnRemoveTOCList: {\r\n        position: 'absolute',\r\n        right: '50px',\r\n        top: '-6px'\r\n    },\r\n    rootExpandPanel: {\r\n        minHeight: '35px  !important',\r\n        height: '35px !important',\r\n        lineHeight: '35px !important',\r\n        paddingLeft: \"10px\",\r\n        paddingRight: \"0px\",\r\n        width: \"100%\"\r\n    },\r\n    rootExpandPanel_expanded: {\r\n        minHeight: '35px !important',\r\n        height: '35px !important',\r\n        lineHeight: '35px  !important',\r\n    },\r\n    expandIconStyle: {\r\n        padding: '3px',\r\n    },\r\n    layerNameDiv:{\r\n        \r\n        width: \"320px\",\r\n        whiteSpace: \"nowrap\",\r\n        overflow: \"hidden\",\r\n        textOverflow: \"ellipsis\",\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            // width:\"78%\",\r\n            width:'calc( 100% - 115px )'\r\n        },\r\n        \r\n        \r\n    }\r\n\r\n}))(({\r\n    classes,\r\n    layer,//Layer Item\r\n    listCheckedLayer=[],\r\n    listDisable=[],\r\n    parentExpanded=null,\r\n    onParentExpandChange,\r\n    onParentCheckChange,\r\n    onRemoveTOCListClick\r\n}) => {\r\n    const handleParentCheckChange = layer => (evt, checked) =>{\r\n        evt.stopPropagation()\r\n        if(onParentCheckChange){\r\n            onParentCheckChange(layer, checked)\r\n        }\r\n        \r\n    }\r\n    const handleParentExpandChange = layer => (evt, expanded) =>{\r\n        evt.stopPropagation()\r\n        if(onParentExpandChange){\r\n            onParentExpandChange(layer, expanded)\r\n        }\r\n\r\n    }\r\n    const handleRemoveTOCListClick = layer => evt => {\r\n        evt.stopPropagation()\r\n        if(onRemoveTOCListClick){\r\n            onRemoveTOCListClick(layer)\r\n        }\r\n    }\r\n    const onCheckClick = evt => {\r\n        evt.stopPropagation()\r\n    }\r\n\r\n    const generateLegend = (listLegend=[]) => {\r\n        return listLegend.map((legend, index) => {\r\n            return (\r\n            <Grid key={index} item xs={12} style={{paddingLeft:'25px'}}>\r\n                <ListItem alignItems=\"flex-start\">\r\n                    \r\n                    <ListItemAvatar>\r\n                        <Avatar className={classes.avatar} alt=\"Legend\" src={`data:${legend.contentType};base64,${legend.imageData}`} />\r\n                    </ListItemAvatar>\r\n                    <ListItemText primary={legend.label}/>\r\n                \r\n                </ListItem>\r\n            </Grid>)\r\n        });\r\n    }\r\n\r\n    return (\r\n    <Grid container className={classes.root}>\r\n        <Grid item xs={12} >\r\n            <ExpansionPanel\r\n            key={layer.idTOC}\r\n            square\r\n            // expanded={parentExpanded === layer.idTOC} //เปิดทีละอัน\r\n            expanded={layer.listLegend.length !== 0 ? null : false}//เปิดหลายอันพร้อมกันได้\r\n            onChange={handleParentExpandChange(layer)}\r\n            >\r\n                \r\n                <ExpansionPanelSummary\r\n                classes={{\r\n                    root:  classes.rootExpandPanel,\r\n                    expanded: classes.rootExpandPanel_expanded,\r\n                    //expandIcon: classes.expandIconStyle\r\n                }}\r\n                expandIcon={layer.listLegend.length !== 0 ? <ExpandMoreIcon key={layer.idTOC}/> : null}>\r\n                    {(listCheckedLayer.indexOf(layer.idTOC) === -1) ? <Tooltip style={{width:\"100%\"}} title=\"Drag เพื่อสลับการแสดงผล\" placement=\"bottom\">\r\n                        {/* <Typography>{layer.name}</Typography> */}\r\n                        <Grid container className={classes.grid_root_free}>                 \r\n                         {(screenWidth < 960) ? <DragHandleItem /> : null } {/* mobile */}\r\n                            <Grid item xs={1} >\r\n                                <Checkbox\r\n                                    style={{padding: 0}}\r\n                                    checked={listCheckedLayer.indexOf(layer.idTOC) !== -1}\r\n                                    onClick={onCheckClick}\r\n                                    onChange={handleParentCheckChange(layer)}\r\n                                    color={\"primary\"}\r\n                                    disabled={listDisable.indexOf(layer.idTOC) > -1}\r\n                                />\r\n                            </Grid>\r\n                            {/* {layer.idTOC.indexOf(TOC_SUFFIX_ID.DEFAULT_LAYER) < 0 && */}\r\n                            {!layer.isDefaultLayer &&\r\n                                <IconButton \r\n                                className={classes.btnRemoveTOCList} \r\n                                onClick={handleRemoveTOCListClick(layer)}\r\n                                >\r\n                                    <RemoveCircleBtn /> \r\n                                </IconButton>\r\n                            }\r\n                          \r\n                            <Grid item xs={'auto'} className={classes.layerNameDiv} > \r\n                                {layer.name}\r\n                          \r\n                        \r\n                            </Grid>\r\n                        </Grid>\r\n                    </Tooltip>:\r\n                        <Grid container className={classes.grid_root}>\r\n                            {(screenWidth < 960) ? <DragHandleItem /> : null } {/* mobile */}\r\n                            <Grid item xs={1} >\r\n                                <Checkbox\r\n                                    style={{padding: 0}}\r\n                                    checked={listCheckedLayer.indexOf(layer.idTOC) !== -1}\r\n                                    onClick={onCheckClick}\r\n                                    onChange={handleParentCheckChange(layer)}\r\n                                    color={\"primary\"}\r\n                                    disabled={listDisable.indexOf(layer.idTOC) > -1}\r\n                                />\r\n                            </Grid>\r\n                            {/* {layer.idTOC.indexOf(TOC_SUFFIX_ID.DEFAULT_LAYER) < 0 && */}\r\n                            {!layer.isDefaultLayer &&\r\n                                <IconButton \r\n                                className={classes.btnRemoveTOCList} \r\n                                onClick={handleRemoveTOCListClick(layer)}\r\n                                >\r\n                                    <RemoveCircleBtn /> \r\n                                </IconButton>\r\n                            }\r\n                            <Grid item xs={'auto'} className={classes.layerNameDiv}>\r\n                                { layer.name }\r\n                            </Grid>\r\n                        </Grid>\r\n                    }\r\n                </ExpansionPanelSummary>\r\n                \r\n                <ExpansionPanelDetails>\r\n                    <Grid container>\r\n                        {layer.listLegend.length !== 0 ? generateLegend(layer.listLegend): 'ไม่มี Legend'}\r\n                    </Grid>\r\n                </ExpansionPanelDetails>\r\n            </ExpansionPanel>\r\n           \r\n        </Grid>\r\n    </Grid>)\r\n})\r\n\r\nconst DragHandleItem = SortableHandle(() => <DragHandle style={{paddingRight:\"10px\" , color:\"grey\",paddingTop: '5px'}} />);\r\nconst SortableItem = SortableElement(({ \r\n    listCheckedLayer=[],\r\n    layer=[],\r\n    listDisable=[],\r\n    parentExpanded=null,\r\n    onParentExpandChange,\r\n    onParentCheckChange,\r\n    onRemoveTOCListClick\r\n}) => {\r\n    return  <ListItemCustom\r\n        layer={layer}\r\n        listCheckedLayer={listCheckedLayer}\r\n        listDisable={listDisable}\r\n        parentExpanded={parentExpanded}\r\n        onParentExpandChange={onParentExpandChange}\r\n        onParentCheckChange={onParentCheckChange}\r\n        onRemoveTOCListClick={onRemoveTOCListClick}\r\n    />\r\n        \r\n});\r\n\r\nconst SortableList = SortableContainer(({ \r\n    listCheckedLayer=[],\r\n    listLayer=[],\r\n    listDisable=[],\r\n    parentExpanded=null,\r\n    onParentExpandChange,\r\n    onParentCheckChange,\r\n    onRemoveTOCListClick\r\n}) => {\r\n    return (\r\n        <Grid container >\r\n            {listLayer.map((layer, index) => (\r\n                <SortableItem \r\n                key={index} \r\n                index={index}//required\r\n                layer={layer}\r\n                listCheckedLayer={listCheckedLayer}\r\n                listDisable={listDisable}\r\n                parentExpanded={parentExpanded}\r\n                onParentExpandChange={onParentExpandChange}\r\n                onParentCheckChange={onParentCheckChange}\r\n                onRemoveTOCListClick={onRemoveTOCListClick}\r\n                />\r\n            ))}\r\n        </Grid>\r\n    );\r\n});\r\n\r\nconst TOCListView = ({\r\n    classes,\r\n    title,\r\n    listCheckedLayer=[],\r\n    listLayer=[],\r\n    listDisable=[],\r\n    parentExpanded=null,\r\n    onParentExpandChange,\r\n    onParentCheckChange,\r\n    onRemoveTOCListClick,\r\n    onSortEnd\r\n}) => {\r\n    const filterDisplayList = () => {\r\n        return listLayer.filter(layer => listDisable.indexOf(layer.idTOC) < 0);\r\n    }\r\n\r\n    const filterHideList = () => {\r\n        return listLayer.filter(layer => listDisable.indexOf(layer.idTOC) > -1);\r\n    }\r\n\r\n    const handleSortEnd = ({ oldIndex, newIndex }) => {\r\n        if(onSortEnd){\r\n            const dispalyList = filterDisplayList()\r\n            const sourceLayer = dispalyList[oldIndex];\r\n            const destinationLayer = dispalyList[newIndex];\r\n            const newDisplayList = arrayMove(dispalyList, oldIndex, newIndex);\r\n            const newListLayer = [...filterHideList(),...newDisplayList]\r\n            onSortEnd(newListLayer, { sourceLayer, destinationLayer})\r\n        }\r\n    };\r\n\r\n    const displayTopLayer = () => {\r\n        const list = filterHideList();\r\n        return (list.length !== 0) && <ListItemCustom\r\n        layer={list[0]}\r\n        listCheckedLayer={listCheckedLayer}\r\n        listDisable={listDisable}\r\n        parentExpanded={parentExpanded}\r\n        onParentExpandChange={onParentExpandChange}\r\n        onParentCheckChange={onParentCheckChange}\r\n        onRemoveTOCListClick={onRemoveTOCListClick}/>\r\n    }\r\n\r\n    return (\r\n        <Fragment>\r\n            {listLayer.length > 0 && <div className={classes.title}>{title}</div>}\r\n            {displayTopLayer()}\r\n            <SortableList \r\n                distance={2}\r\n                listCheckedLayer={listCheckedLayer}\r\n                listLayer={filterDisplayList()}\r\n                listDisable={listDisable}\r\n                parentExpanded={parentExpanded}\r\n                onParentExpandChange={onParentExpandChange}\r\n                onParentCheckChange={onParentCheckChange}\r\n                onRemoveTOCListClick={onRemoveTOCListClick}\r\n                onSortEnd={handleSortEnd}\r\n                useDragHandle={(screenWidth < 960) ? true : false}\r\n                />\r\n        </Fragment>\r\n    );\r\n}\r\n\r\nexport default withStyles(theme =>({\r\n    title:{\r\n        height:'20px',\r\n        width:'100%',\r\n        backgroundColor:'#666666',\r\n        color:'white',\r\n        textAlign:'center',\r\n        lineHeight:'20px'\r\n    }\r\n}))(TOCListView);","import React, { Fragment } from 'react';\r\nimport { bindActionCreators } from 'redux';\r\nimport { connect } from 'react-redux';\r\nimport TOCListView from '../../../../Presentationals/Web/Maps/NewTOC/TOCListView';\r\n\r\nimport * as MapFunction from '../../../../Map/MapFunctions';\r\nimport * as NewTOCAction from '../../../../Actions/Web/Maps/NewTOCAction';\r\nimport * as MapAction from '../../../../Actions/Web/Maps/MapAction';\r\n\r\nconst TOCList = ({\r\n    //TOC\r\n    newTOCData,\r\n    newTOCAction,\r\n\r\n    //Map\r\n    mapAction\r\n}) => {\r\n    const handleParentExpandChange = (layer, expanded) => { //working layer\r\n        const expandedPanel = expanded ? layer.idTOC : null;\r\n        newTOCAction.setCurrentParentExpandedPanel(expandedPanel)\r\n    }\r\n\r\n    const handleParentBgExpandChange = (layer, expanded) => { //background layer\r\n\r\n    }\r\n\r\n    const handleCheckParentLayer = (layer, checked) => {\r\n        newTOCAction.checkParentLayer(layer.idTOC);\r\n        mapAction.bindMapCommand(MapFunction.setTOCVisibleLayer, {\r\n            layerID: layer.idTOC,\r\n            isVisible: checked\r\n        })\r\n        //check ว่าเป็นการ Check หรือ uncheck\r\n    }\r\n\r\n    const handleCheckParentBgLayer = (layer, checked) => {\r\n        newTOCAction.checkParentBgLayer(layer.idTOC);\r\n        mapAction.bindMapCommand(MapFunction.setTOCVisibleLayer, {\r\n            layerID: layer.idTOC,\r\n            isVisible: checked\r\n        })\r\n    }\r\n\r\n    const handleRemoveTOCListClick = (layer) => {\r\n        mapAction.bindMapCommand(MapFunction.removeTOCLayerItem, layer.idTOC)\r\n        newTOCAction.removeTOCLayerItem(layer.idTOC);\r\n    }\r\n\r\n    const handleRemoveTOCBgListClick = (layer) => {\r\n        mapAction.bindMapCommand(MapFunction.removeTOCLayerItem, layer.idTOC)\r\n        newTOCAction.removeTOCBgLayerItem(layer.idTOC);\r\n    }\r\n\r\n    const handleOnSortEnd = (listLayer, { sourceLayer, destinationLayer }) => {\r\n        newTOCAction.setListLayer(listLayer);\r\n        mapAction.bindMapCommand(MapFunction.reorderTOC, {\r\n            sourceLayer,\r\n            destinationLayer\r\n        })\r\n    }\r\n\r\n    const handleOnSortBgEnd = (listLayer, { sourceLayer, destinationLayer }) => {\r\n        newTOCAction.setListBgLayer(listLayer);\r\n        mapAction.bindMapCommand(MapFunction.reorderBgTOC, {\r\n            sourceLayer,\r\n            destinationLayer\r\n        })\r\n    }\r\n    \r\n    return <Fragment>\r\n        <TOCListView\r\n            title=\"Working layer\"\r\n            parentExpanded={newTOCData.currentParentExpandPanel}\r\n            listCheckedLayer={newTOCData.listCheckedLayer}\r\n            listLayer={(newTOCData ? newTOCData.listLayer : [])}\r\n            listDisable={newTOCData.listDisableTOC}\r\n            onParentExpandChange={handleParentExpandChange}\r\n            onParentCheckChange={handleCheckParentLayer}\r\n            onRemoveTOCListClick={handleRemoveTOCListClick}\r\n            onSortEnd={handleOnSortEnd}\r\n        />\r\n        <TOCListView\r\n            title=\"Background layer\"\r\n            listCheckedLayer={newTOCData.listCheckedBgLayer}\r\n            listLayer={(newTOCData ? newTOCData.listBgLayer : [])}\r\n            listDisable={[]} //background layer จะไม่มีตัวที่ disable\r\n            onParentExpandChange={handleParentBgExpandChange}\r\n            onParentCheckChange={handleCheckParentBgLayer}\r\n            onRemoveTOCListClick={handleRemoveTOCBgListClick}\r\n            onSortEnd={handleOnSortBgEnd}\r\n        />\r\n    </Fragment>\r\n}\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    newTOCAction: bindActionCreators(NewTOCAction, dispatch),\r\n    mapAction: bindActionCreators(MapAction, dispatch)\r\n});\r\nconst mapStateToProps = state => ({\r\n    newTOCData: state.newTOCData\r\n})\r\n\r\nexport default connect(mapStateToProps, mapDispatchToProps)(TOCList);","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport FormLabel from '@material-ui/core/FormLabel';\r\nimport FormControl from '@material-ui/core/FormControl';\r\nimport FormGroup from '@material-ui/core/FormGroup';\r\nimport FormHelperText from '@material-ui/core/FormHelperText';\r\nimport Checkbox from '@material-ui/core/Checkbox';\r\nimport classnames from 'classnames'\r\n\r\nconst styles = theme => ({\r\n    root: {\r\n        display: 'flex',\r\n        width: '100%'\r\n    },\r\n    formControl: {\r\n        margin: '10px',\r\n    },\r\n    labelName: {\r\n        cursor: 'pointer'\r\n    },\r\n    labelRequire: {\r\n        color: 'red'\r\n    },\r\n    formHelper: {\r\n        marginTop: theme.spacing.unit / 2,\r\n        marginLeft: 20,\r\n        color: 'red'\r\n    },\r\n    errorText: {\r\n        color: 'red'\r\n    },\r\n    subLabel: {\r\n        marginLeft: '20px',\r\n        marginTop: '10px',\r\n        color: ' rgba(0, 0, 0, 0.54)'\r\n    }\r\n});\r\n\r\nconst CheckboxesGroup = ({\r\n    classes,\r\n    label,\r\n    subLabel,\r\n    required,\r\n    name,\r\n    options,//[{id,name}]\r\n    input,\r\n    className,\r\n    meta: { touched, invalid, error },\r\n    isModeSelectAll = false //กรณีเป็น true จะเพิ่ม option เลือกทั้งหมดมาตอนนำค่าไปใช้อย่าลืม filter เอาค่า -1 ออกด้วย\r\n}) => {\r\n\r\n    return (\r\n        <div className={`${classes.root} ${className}`}>\r\n            <FormControl component=\"fieldset\" className={classnames({ [classes.formControl]: label })}>\r\n                {label && <FormLabel className={classnames({ [classes.errorText]: touched && invalid && error })} component=\"legend\">{label} {required && <label className={classes.labelRequire}>*</label>}</FormLabel>}\r\n                <FormGroup>\r\n\r\n                    {/* เพิ่ม option เลือกทั้งหมด */}\r\n                    {isModeSelectAll && options.length > 0 && <div className=\"checkbox\" key={-1}>\r\n                        <label className={classes.labelName}>\r\n                            <Checkbox\r\n                                color=\"primary\"\r\n                                checked={input.value.indexOf(-1) !== -1}\r\n                                name={`${name}[${-1}]`}\r\n                                onChange={event => {\r\n                                    const newValue = event.target.checked ? [-1, ...options.map(itm => itm.id)] : [];\r\n                                    return input.onChange(newValue);\r\n                                }}\r\n                            />\r\n                            {\"เลือกทั้งหมด\"}\r\n                        </label>\r\n                    </div>}\r\n\r\n                    {/* สร้าง option */}\r\n                    {options.map((option, index) => (\r\n                        <div className=\"checkbox\" key={index}>\r\n                            <label className={classes.labelName}>\r\n                                <Checkbox\r\n                                    color=\"primary\"\r\n                                    checked={input.value.indexOf(option.id) !== -1}\r\n                                    name={`${name}[${index}]`}\r\n                                    onChange={event => {\r\n                                        const newValue = [...input.value];\r\n                                        if (event.target.checked) {\r\n                                            newValue.push(option.id);\r\n                                        } else {\r\n                                            newValue.splice(newValue.indexOf(option.id), 1);\r\n                                        }\r\n\r\n                                        if (isModeSelectAll && newValue.filter(itm => itm !== -1).length === options.length) {\r\n                                            newValue.push(-1);\r\n                                        } else if (isModeSelectAll && input.value.indexOf(-1) !== -1) {\r\n                                            newValue.splice(newValue.indexOf(-1), 1);\r\n                                        }\r\n\r\n                                        return input.onChange(newValue);\r\n                                    }}\r\n\r\n                                />\r\n                                {option.name}\r\n                            </label>\r\n                        </div>\r\n                    ))}\r\n\r\n                    {options.length < 1 && <div className={classes.subLabel}>{subLabel}</div>}\r\n\r\n                </FormGroup>\r\n                <FormHelperText className={classes.formHelper}>{touched && invalid && error}</FormHelperText>\r\n            </FormControl>\r\n        </div>\r\n    );\r\n}\r\n\r\nCheckboxesGroup.propTypes = {\r\n    classes: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default withStyles(styles)(CheckboxesGroup);","import React, { Component } from 'react';\r\nimport CheckboxGroupReduxView from '../Presentationals/CheckboxGroupReduxView';\r\n\r\nclass CheckboxGroupRedux extends Component {\r\n    render() {\r\n        const {\r\n            label,\r\n            subLabel,\r\n            required,\r\n            name,\r\n            options,//[{id,name}]\r\n            input,\r\n            className,\r\n            meta,\r\n            isModeSelectAll\r\n        } = this.props;\r\n\r\n        return (\r\n            <CheckboxGroupReduxView\r\n                label={label}\r\n                subLabel={subLabel}\r\n                required={required}\r\n                name={name}\r\n                options={options}\r\n                input={input}\r\n                className={className}\r\n                meta={meta}\r\n                isModeSelectAll={isModeSelectAll}\r\n            />\r\n        )\r\n    }\r\n}\r\n\r\nexport default CheckboxGroupRedux\r\n","import React from 'react'\r\nimport { Field } from 'redux-form';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { withStyles } from '@material-ui/core';\r\nimport TextField from '../../../../../Controls/Containers/TextFieldRedux';\r\nimport Button from '../../../../../Controls/Containers/Button';\r\nimport CheckboxGroup from '../../../../../Controls/Containers/CheckboxGroupRedux';\r\n\r\nconst AddWMSView = ({\r\n\tclasses,\r\n\tlookWMSLayer,\r\n\tonClickShowLayer,\r\n\tonChangeSelectLayer\r\n}) => {\r\n\treturn (\r\n\t\t<Grid container>\r\n\t\t\t<Grid item xs={12}>\r\n\t\t\t\t<Field\r\n\t\t\t\t\tname=\"wmsName\"\r\n\t\t\t\t\tcomponent={TextField}\r\n\t\t\t\t\tlabel=\"ชื่อ\"\r\n\t\t\t\t\trequired\r\n\t\t\t\t/>\r\n\t\t\t</Grid>\r\n\r\n\t\t\t<Grid item xs={12} container>\r\n\t\t\t\t<Grid item xs>\r\n\t\t\t\t\t<Field\r\n\t\t\t\t\t\tname=\"urlWms\"\r\n\t\t\t\t\t\tcomponent={TextField}\r\n\t\t\t\t\t\tlabel=\"url\"\r\n\t\t\t\t\t\trequired\r\n\t\t\t\t\t/>\r\n\t\t\t\t</Grid>\r\n\t\t\t\t<Grid item>\r\n\t\t\t\t\t<Button label=\"แสดงชั้นข้อมูล\" className={classes.btnShowLayer} onClick={onClickShowLayer} />\r\n\t\t\t\t</Grid>\r\n\t\t\t</Grid>\r\n\r\n\t\t\t<Grid item xs={12} container>\r\n\t\t\t\t<Field\r\n\t\t\t\t\tname={`layer`}\r\n\t\t\t\t\tcomponent={CheckboxGroup}\r\n\t\t\t\t\tsubLabel=\"รายการชั้นข้อมูล\"\r\n\t\t\t\t\toptions={lookWMSLayer}\r\n\t\t\t\t\tlabel=\"layer\"\r\n\t\t\t\t\tonChange={onChangeSelectLayer}\r\n\t\t\t\t\tisModeSelectAll={true}\r\n\t\t\t\t\trequired\r\n\t\t\t\t/>\r\n\t\t\t</Grid>\r\n\t\t</Grid>\r\n\t)\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n\tbtnShowLayer: {\r\n\t\tmarginTop: '30px',\r\n\t\tmarginLeft: '20px'\r\n\t}\r\n}))(AddWMSView)\r\n","import React, { Component } from 'react'\r\nimport AddWMSView from '../../../../../Presentationals/Web/Maps/NewTOC/AddToc/AddWMSView';\r\nimport { xml2json } from '../../../../../Utilities/Utils';\r\n\r\n// const MOC_LUP_LAYER = [\r\n//     { id: 1, name: \"zoo\" },\r\n//     { id: 2, name: \"youth\" },\r\n//     { id: 3, name: \"tourism_kios\" },\r\n//     { id: 4, name: \"sport\" },\r\n//     { id: 5, name: \"quantity_waste\" },\r\n//     { id: 6, name: \"punpunbike\" },\r\n//     { id: 7, name: \"pump_sta\" },\r\n// ]\r\n\r\nexport default class AddWMSLayer extends Component {\r\n    constructor() {\r\n        super();\r\n\r\n        this.state = {\r\n            lookWMSLayer: []\r\n        }\r\n    }\r\n\r\n    fetchLayer = (url) => {\r\n        // เรียกใช้ WMS layer ต้อง\r\n        let proxyPage = window.GlobalConfig.PROXY_URL;//\"../ProxyPage/proxy.ashx?\";\r\n        return fetch(`${proxyPage}?${url}?request=GetCapabilities&service=WMS`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n\r\n                return res.text()\r\n            })\r\n            .then(result => {\r\n                const parserXML = new DOMParser();\r\n                const resultXML = parserXML.parseFromString(result, \"application/xml\");\r\n                const LayerXML = resultXML.querySelector('Layer');\r\n                let layers = []\r\n\r\n                if (LayerXML) {\r\n                    const LayerJson = xml2json(LayerXML).Layer.reverse();\r\n                    layers = LayerJson.map((itm, idx) => ({\r\n                        id: itm.Name, name: itm.Title\r\n                    }))\r\n                }\r\n                return layers\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex : ', ex)\r\n            })\r\n    }\r\n\r\n\r\n    handleShowLayer = () => {\r\n        const { change, formRdc, hideLoading, showLoading } = this.props;\r\n        change(\"layer\", null)\r\n        showLoading();\r\n        this.fetchLayer(formRdc.urlWms).then(result => {\r\n            // this.fetchLayer(localProxy+formRdc.urlWms).then(result => {\r\n            if (result && result.length !== 0) {\r\n                this.setState({\r\n                    lookWMSLayer: result\r\n                })\r\n            } else {\r\n                change(\"urlWms\", null)\r\n                this.setState({\r\n                    lookWMSLayer: []\r\n                })\r\n                // alert(\"ไม่พบข้อมูล กรุณาตรวจสอบ URL และ port ที่เรียกใช้\")\r\n                this.props.showAlert({ altMsg: \"ไม่พบข้อมูล กรุณาตรวจสอบ URL และ port ที่เรียกใช้\" })\r\n            }\r\n            hideLoading();\r\n        })\r\n    }\r\n\r\n    render() {\r\n        const { lookWMSLayer } = this.state;\r\n\r\n        return (\r\n            <AddWMSView\r\n                lookWMSLayer={lookWMSLayer}\r\n                onClickShowLayer={this.handleShowLayer}\r\n            />\r\n        )\r\n    }\r\n}\r\n","import React from 'react'\r\nimport { Field } from 'redux-form';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { withStyles } from '@material-ui/core';\r\nimport TextField from '../../../../../Controls/Containers/TextFieldRedux';\r\nimport Button from '../../../../../Controls/Containers/Button';\r\nimport SelectField from '../../../../../Controls/Containers/SelectFieldRedux';\r\n\r\nconst AddWFSView = ({\r\n    classes,\r\n    lookWFSFeatureType,\r\n    onClickShowLayer\r\n}) => {\r\n    return (\r\n        <Grid container>\r\n            <Grid item xs={12}>\r\n                <Field\r\n                    name=\"wfsName\"\r\n                    component={TextField}\r\n                    label=\"ชื่อ\"\r\n                    required\r\n                />\r\n            </Grid>\r\n\r\n            <Grid item xs={12} container>\r\n                <Grid item xs>\r\n                    <Field\r\n                        name=\"urlWfs\"\r\n                        component={TextField}\r\n                        label=\"url\"\r\n                        required\r\n                    />\r\n                </Grid>\r\n                <Grid item>\r\n                    <Button label=\"แสดงชั้นข้อมูล\" className={classes.btnShowLayer} onClick={onClickShowLayer} />\r\n                </Grid>\r\n            </Grid>\r\n\r\n            <Grid item xs={12} container wrap=\"nowrap\" className={classes.rowLayer}>\r\n                <Field\r\n                    name=\"wfsLayer\"\r\n                    component={SelectField}\r\n                    label=\"layer\"\r\n                    data={lookWFSFeatureType}\r\n                    required\r\n                />\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    btnShowLayer: {\r\n        marginTop: '30px',\r\n        marginLeft: '20px'\r\n    },\r\n    rowLayer: {\r\n        marginTop: '10px'\r\n    }\r\n}))(AddWFSView)\r\n","import React, { Component } from 'react'\r\nimport AddWFSView from '../../../../../Presentationals/Web/Maps/NewTOC/AddToc/AddWFSView';\r\nimport { xml2json } from '../../../../../Utilities/Utils';\r\n\r\nexport default class AddWFSLayer extends Component {\r\n    constructor() {\r\n        super();\r\n\r\n        this.state = {\r\n            lookWFSFeatureType: []\r\n        }\r\n    }\r\n\r\n    fetchLayer = (url) => {\r\n        let proxyPage = window.GlobalConfig.PROXY_URL;//\"../ProxyPage/proxy.ashx?\";\r\n        return fetch(`${proxyPage}?${url}?service=wfs&request=GetCapabilities`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n\r\n                return res.text()\r\n            })\r\n            .then(result => {\r\n                const parserXML = new DOMParser();\r\n                const resultXML = parserXML.parseFromString(result, \"application/xml\");\r\n                const featureTypeListXML = resultXML.querySelector('FeatureTypeList');\r\n                let featureType = []\r\n\r\n                if (featureTypeListXML) {\r\n                    // const featureTypeJson = this.xml2json(featureTypeListXML).Layer.reverse();\r\n                    const featureTypeJson = xml2json(featureTypeListXML).FeatureType.reverse();\r\n                    featureType = featureTypeJson.map((itm, idx) => ({\r\n                        id: itm.Name, name: itm.Title\r\n                    }))\r\n                }\r\n                return featureType\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex : ', ex)\r\n            })\r\n    }\r\n\r\n    handleShowLayer = () => {\r\n        const { formRdc, change, hideLoading, showLoading } = this.props;\r\n\r\n        showLoading();\r\n        this.fetchLayer(formRdc.urlWfs).then(result => {\r\n            if (result && result.length !== 0) {\r\n                this.setState({\r\n                    lookWFSFeatureType: result\r\n                })\r\n            } else {\r\n                change(\"urlWms\", null)\r\n                this.setState({\r\n                    lookWFSFeatureType: []\r\n                })\r\n                // alert(\"ไม่พบข้อมูล กรุณาตรวจสอบ URL และ port ที่เรียกใช้\")\r\n                this.props.showAlert({altMsg:\"ไม่พบข้อมูล กรุณาตรวจสอบ URL และ port ที่เรียกใช้\"})\r\n            }\r\n            hideLoading();\r\n        })\r\n\r\n    }\r\n\r\n    render() {\r\n        const { lookWFSFeatureType } = this.state;\r\n\r\n        return (\r\n            <AddWFSView\r\n                lookWFSFeatureType={lookWFSFeatureType}\r\n                onClickShowLayer={this.handleShowLayer}\r\n            />\r\n        )\r\n    }\r\n}\r\n","import React, { Fragment } from 'react'\r\nimport { Field } from 'redux-form';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { withStyles } from '@material-ui/core';\r\nimport TextField from '../../../../../Controls/Containers/TextFieldRedux';\r\nimport CheckboxGroup from '../../../../../Controls/Containers/CheckboxGroupRedux';\r\nimport Button from '../../../../../Controls/Containers/Button';\r\n\r\nconst renderFormSecure = ({ classes }) => {\r\n    return (\r\n        <Fragment>\r\n            <Grid item xs={12}>\r\n                <Field\r\n                    name=\"usernameRest\"\r\n                    component={TextField}\r\n                    label=\"username\"\r\n                    required\r\n                />\r\n            </Grid>\r\n\r\n            <Grid item xs={12}>\r\n                <Field\r\n                    name=\"passwordRest\"\r\n                    component={TextField}\r\n                    type=\"password\"\r\n                    label=\"password\"\r\n                    required\r\n                />\r\n            </Grid>\r\n\r\n            <Grid item xs={12} className={classes.hidden}> {/* สร้างหลอกเอาไว้เก็บ token */}\r\n                <Field\r\n                    name=\"tokenRest\"\r\n                    component={TextField}\r\n                    required\r\n                />\r\n            </Grid>\r\n\r\n        </Fragment>\r\n    )\r\n}\r\n\r\nconst AddRestServiceLayerView = ({\r\n    classes,\r\n    isOpenFormSecure,\r\n    lookRestLayer,\r\n    onClickShowLayer\r\n}) => {\r\n    return (\r\n        <Grid container>\r\n            <Grid item xs={12}>\r\n                <Field\r\n                    name=\"restName\"\r\n                    component={TextField}\r\n                    label=\"ชื่อ\"\r\n                    required\r\n                />\r\n            </Grid>\r\n\r\n            <Grid item xs={12}>\r\n                <Field\r\n                    name=\"urlRest\"\r\n                    component={TextField}\r\n                    label=\"url\"\r\n                    required\r\n                />\r\n            </Grid>\r\n\r\n            <Grid item xs={12}>\r\n                <Field\r\n                    name={`secureRest`}\r\n                    component={CheckboxGroup}\r\n                    options={[{ id: \"secureRest\", name: \"secure\" }]}\r\n                    className={classes.chkSecure}\r\n                    required\r\n                />\r\n            </Grid>\r\n\r\n            {isOpenFormSecure && renderFormSecure({ classes })}\r\n\r\n            <Grid item xs={12} container justify=\"flex-end\">\r\n                <Grid item>\r\n                    <Button label=\"แสดงชั้นข้อมูล\" onClick={onClickShowLayer} />\r\n                </Grid>\r\n            </Grid>\r\n\r\n\r\n            <Grid item xs={12} container>\r\n                <Field\r\n                    name={`layerRest`}\r\n                    component={CheckboxGroup}\r\n                    subLabel=\"รายการชั้นข้อมูล\"\r\n                    options={lookRestLayer}\r\n                    label=\"layer\"\r\n                    isModeSelectAll={true}\r\n                    required\r\n                />\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    chkSecure: {\r\n        marginBottom: '-15px'\r\n    },\r\n    hidden: {\r\n        display: 'none'\r\n    }\r\n}))(AddRestServiceLayerView)\r\n","import React, { Component } from 'react';\r\nimport AddRestServiceLayerView from '../../../../../Presentationals/Web/Maps/NewTOC/AddToc/AddRestServiceLayerView';\r\n\r\nexport default class AddRestServiceLayer extends Component {\r\n    constructor() {\r\n        super();\r\n        this.state = {\r\n            lookRestLayer: []\r\n        }\r\n    }\r\n\r\n    fetchInfoMapService = (url) => {\r\n        const urlSplitRest = url.split(\"rest\");\r\n        let urlMapService = null;\r\n\r\n        if (urlSplitRest.length > 1) {\r\n            urlMapService = `${urlSplitRest[0]}rest/info?f=pjson`;\r\n        }\r\n\r\n        return fetch(urlMapService)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex fetchLayer', ex)\r\n            })\r\n    }\r\n\r\n    fetchToken = ({ url, username, password }) => {\r\n        // const proxyPage = window.GlobalConfig.PROXY_URL;\r\n        const details = {\r\n            username: username,\r\n            password: password,\r\n            f: \"json\",\r\n            expiration: \"1440\",\r\n            client: \"referer\",\r\n            referer: window.location.hostname\r\n        };\r\n\r\n        let formBody = [];\r\n        for (const property in details) {\r\n            const encodedKey = encodeURIComponent(property);\r\n            const encodedValue = encodeURIComponent(details[property]);\r\n            formBody.push(encodedKey + \"=\" + encodedValue);\r\n        }\r\n        formBody = formBody.join(\"&\");\r\n\r\n        // return fetch(`${proxyPage}?${url}?f=json`, {\r\n        return fetch(`${url}?f=json`, {\r\n            method: 'POST',\r\n            headers: {\r\n                'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'\r\n            },\r\n            body: formBody\r\n        })\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex fetchToken', ex)\r\n            })\r\n    }\r\n\r\n    fetchLayer = (url, token) => {\r\n        url = `${url}?f=pjson`\r\n\r\n        if (token) {\r\n            url = `${url}&token=${token}`\r\n        }\r\n\r\n        return fetch(url)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex fetchLayer', ex)\r\n            })\r\n\r\n    }\r\n\r\n    getLayerMapService = () => {\r\n        const { formRdc, showLoading, hideLoading } = this.props;\r\n        showLoading();\r\n        this.fetchLayer(formRdc.urlRest).then(result => {  //fetch layer\r\n            hideLoading();\r\n            if (result && result.singleFusedMapCache) { // เช็คว่าเป็น map cache หรือไม่\r\n                // alert(\"ระบบไม่รองรับ Rest Service ArcGIS ที่เป็น Map Cache (Tiled)\")\r\n                this.props.showAlert({ altMsg: \"ระบบไม่รองรับ Rest Service ArcGIS ที่เป็น Map Cache (Tiled)\" })\r\n            } else if (result && result.layers) {\r\n                const layers = result.layers.filter(itm => itm.subLayerIds === null) //filter เอาตัวที่เป็น parent ออก\r\n\r\n                this.setState({\r\n                    lookRestLayer: layers\r\n                })\r\n            } else {\r\n                // alert(\"ไม่พบชั้นข้อมูล กรุณาลองใหม่อีกครั้ง\")\r\n                this.props.showAlert({ altMsg: \"ไม่พบชั้นข้อมูล กรุณาลองใหม่อีกครั้ง\" })\r\n            }\r\n        })\r\n    }\r\n\r\n    getLayerSecureMapService = () => {\r\n        const { formRdc, change, showLoading, hideLoading } = this.props;\r\n\r\n        showLoading();\r\n        this.fetchInfoMapService(formRdc.urlRest).then(info => { //fetch info ของ map service เพื่อหา url token\r\n            if (info) {\r\n                if (info.authInfo && info.authInfo.tokenServicesUrl) {\r\n                    this.fetchToken({\r\n                        url: info.authInfo.tokenServicesUrl,\r\n                        username: formRdc.usernameRest,\r\n                        password: formRdc.passwordRest\r\n                    }).then(result => { //fetch เพื่อเอา token\r\n                        if (result && result.token) {\r\n                            this.fetchLayer(formRdc.urlRest, result.token).then(objLayer => { //fetch layer\r\n                                if (objLayer && info.singleFusedMapCache) { // เช็คว่าเป็น map cache หรือไม่\r\n                                    // alert(\"ระบบไม่รองรับ Rest Service ArcGIS ที่เป็น Map Cache (Tiled)\")\r\n                                    this.props.showAlert({ altMsg: \"ระบบไม่รองรับ Rest Service ArcGIS ที่เป็น Map Cache (Tiled)\" })\r\n                                } else if (objLayer && objLayer.layers) {\r\n                                    change(\"tokenRest\", result.token)\r\n                                    const layers = objLayer.layers.filter(itm => itm.subLayerIds === null) //filter เอาตัวที่เป็น parent ออก\r\n\r\n                                    this.setState({\r\n                                        lookRestLayer: layers\r\n                                    })\r\n                                }\r\n                                hideLoading();\r\n                            })\r\n                        } else {\r\n                            hideLoading();\r\n                            // alert(\"สร้าง token ไม่สำเร็จ กรุณาตรวจสอบ username/password\")\r\n                            this.props.showAlert({ altMsg: \"สร้าง token ไม่สำเร็จ กรุณาตรวจสอบ username/password\" })\r\n                        }\r\n                    })\r\n                } else {\r\n                    hideLoading();\r\n                    // alert(\"ไม่พบ url ที่ใช้สำหรับสร้าง token\")\r\n                    this.props.showAlert({ altMsg: \"ไม่พบ url ที่ใช้สำหรับสร้าง token\" })\r\n                }\r\n            } else {\r\n                hideLoading();\r\n                // alert(\"ไม่พบข้อมูลของ Rest Mapservice ArcGIS นี้ กรุณาลองใหม่อีกครั้ง\")\r\n                this.props.showAlert({ altMsg: \"ไม่พบข้อมูลของ Rest Mapservice ArcGIS นี้ กรุณาลองใหม่อีกครั้ง\" })\r\n            }\r\n        })\r\n    }\r\n\r\n    handleShowLayer = () => {\r\n        const { formRdc, change, touch } = this.props;\r\n\r\n        change(\"layerRest\", [])\r\n        change(\"tokenRest\", \"\")\r\n        this.setState({ //clear \r\n            lookRestLayer: []\r\n        })\r\n\r\n        if (!formRdc.urlRest) {\r\n            touch(\"urlRest\")\r\n        } else if (formRdc.urlRest.search(\"MapServer\") !== -1) { //เช็คว่าเป็น MapServer\r\n            if (formRdc.secureRest && formRdc.secureRest.length > 0) { //กรณีเป็น secure map service\r\n                if (!formRdc.usernameRest || !formRdc.passwordRest) { //ไม่กรอก username หรือ password\r\n                    touch(\"usernameRest\")\r\n                    touch(\"passwordRest\")\r\n                } else {\r\n                    this.getLayerSecureMapService();\r\n                }\r\n            } else {//กรณีไม่ใช่ secure map service\r\n                this.getLayerMapService();\r\n            }\r\n        } else {\r\n            // alert(\"รองรับ Rest Service ArcGIS ที่เป็น MapServer เท่านั้น\")\r\n            this.props.showAlert({ altMsg: \"รองรับ Rest Service ArcGIS ที่เป็น MapServer เท่านั้น\" })\r\n        }\r\n    }\r\n\r\n    render() {\r\n        const { formRdc } = this.props;\r\n        const { lookRestLayer } = this.state;\r\n        const isOpenFormSecure = (formRdc.secureRest && formRdc.secureRest.length > 0);\r\n\r\n        return (\r\n\r\n            <AddRestServiceLayerView\r\n                isOpenFormSecure={isOpenFormSecure}\r\n                lookRestLayer={lookRestLayer}\r\n                onClickShowLayer={this.handleShowLayer}\r\n            />\r\n        )\r\n    }\r\n}\r\n","import React from 'react'\r\nimport { withStyles } from '@material-ui/core/styles'\r\nimport Radio from '@material-ui/core/Radio';\r\nimport RadioGroup from '@material-ui/core/RadioGroup';\r\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\r\nimport FormControl from '@material-ui/core/FormControl';\r\nimport FormLabel from '@material-ui/core/FormLabel';\r\nimport FormHelperText from '@material-ui/core/FormHelperText';\r\nimport classnames from 'classnames'\r\n\r\nconst RadioButtonGroup = ({\r\n    classes,\r\n    input,\r\n    label,\r\n    meta: { touched, error, invalid },\r\n    required,\r\n    children,\r\n    disabled,\r\n    direction = \"column\", //row, column\r\n    options, //[{id,name}] *** id เป็น String เท่านั้น\r\n}) => {\r\n    return (\r\n        <FormControl component=\"fieldset\" className={classes.formControl}>\r\n            <FormLabel component=\"legend\">\r\n                {label}{required && <label className={classes.error}>*</label>}\r\n            </FormLabel>\r\n            <RadioGroup\r\n                className={classnames(classes.group, { [classes.row]: direction === \"row\" })}\r\n                value={input.value}\r\n                onChange={input.onChange}\r\n                style={{ display: 'flex' }}\r\n            >\r\n                {options.map((itm, idx) => (\r\n                    <FormControlLabel\r\n                        key={`${itm.id}-${idx}`}\r\n                        value={itm.id}\r\n                        className={classes.formControlLabel}\r\n                        control={<Radio color=\"primary\" />}\r\n                        label={itm.name}\r\n                    />)\r\n                )}\r\n                {children}\r\n            </RadioGroup>\r\n            <FormHelperText className={classes.formHelper}>\r\n                {touched && invalid && error}\r\n            </FormHelperText>\r\n        </FormControl >\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    formControl: {\r\n        width: '100%',\r\n        padding: '10px'\r\n    },\r\n    error: {\r\n        color: 'red'\r\n    },\r\n    group: {\r\n        display: 'flex !important',\r\n        flexDirection: 'column'\r\n    },\r\n    row: {\r\n        flexDirection: 'row'\r\n    },\r\n    formControlLabel: {\r\n        width: 'auto'\r\n        // width: '100px'\r\n    },\r\n    formHelper: {\r\n        marginTop: '-5px',\r\n        paddingLeft: '10px',\r\n        color: 'red'\r\n    },\r\n}))(RadioButtonGroup)\r\n","import React, { Component } from 'react';\r\nimport RadioButtonGroupReduxView from '../Presentationals/RadioButtonGroupReduxView';\r\n\r\nclass RadioButtonGroupRedux extends Component {\r\n    render() {\r\n        const {\r\n            input,\r\n            label,\r\n            meta,\r\n            required,\r\n            children,\r\n            disabled,\r\n            direction,\r\n            options, //[{id,name}] *** id เป็น String เท่านั้น\r\n        } = this.props;\r\n\r\n        return (\r\n            <RadioButtonGroupReduxView\r\n                input={input}\r\n                label={label}\r\n                meta={meta}\r\n                required={required}\r\n                children={children}\r\n                disabled={disabled}\r\n                direction={direction}\r\n                options={options}\r\n            />\r\n        )\r\n    }\r\n}\r\n\r\nexport default RadioButtonGroupRedux","import React, { Fragment } from 'react'\r\nimport { Field } from 'redux-form';\r\nimport { withStyles } from '@material-ui/core/styles'\r\nimport CloudUpload from '@material-ui/icons/CloudUpload';\r\nimport TextField from '../../../../../Controls/Containers/TextFieldRedux';\r\nimport RadioButtonGroup from '../../../../../Controls/Containers/RadioButtonGroupRedux';\r\nimport { OPTION_IMPORT_KML } from '../../../../../Constants/Constants';\r\n\r\nconst listOptionImport = Object.keys(OPTION_IMPORT_KML).map(key => ({ id: OPTION_IMPORT_KML[key], name: OPTION_IMPORT_KML[key] }))\r\n\r\nconst AddKMLView = ({\r\n\tclasses,\r\n\tinputUploadKMLRef,\r\n\timportType,\r\n\tonImportFileKML,\r\n\tonOpenUpload\r\n}) => {\r\n\r\n\treturn (\r\n\t\t<Fragment>\r\n\t\t\t<input\r\n\t\t\t\tid=\"inFile\"\r\n\t\t\t\ttype=\"file\"\r\n\t\t\t\tname=\"file\"\r\n\t\t\t\tref={inputUploadKMLRef}\r\n\t\t\t\tonChange={onImportFileKML}\r\n\t\t\t\thidden\r\n\t\t\t/>\r\n\t\t\t<Field\r\n\t\t\t\tname=\"kmlName\"\r\n\t\t\t\tcomponent={TextField}\r\n\t\t\t\tlabel=\"ชื่อ\"\r\n\t\t\t\trequired\r\n\t\t\t/>\r\n\t\t\t<Field\r\n\t\t\t\tname=\"importType\"\r\n\t\t\t\tcomponent={RadioButtonGroup}\r\n\t\t\t\tlabel=\"รูปแบบการนำเข้าข้อมูล\"\r\n\t\t\t\toptions={listOptionImport}\r\n\t\t\t\tdirection=\"row\"\r\n\t\t\t\trequired\r\n\t\t\t/>\r\n\r\n\t\t\t{importType === OPTION_IMPORT_KML.URL ? (\r\n\t\t\t\t<Field\r\n\t\t\t\t\tname=\"urlKmlFile\"\r\n\t\t\t\t\tcomponent={TextField}\r\n\t\t\t\t\tlabel=\"url\"\r\n\t\t\t\t\trequired\r\n\t\t\t\t/>\r\n\t\t\t) : (<Field\r\n\t\t\t\tname=\"fileKML\"\r\n\t\t\t\tlabel=\"Upload KML, KMZ\"\r\n\t\t\t\tcomponent={TextField}\r\n\t\t\t\ticon={<CloudUpload />}\r\n\t\t\t\tonClick={onOpenUpload}\r\n\t\t\t\treadOnly\r\n\t\t\t\trequired\r\n\t\t\t/>\r\n\t\t\t\t)}\r\n\r\n\t\t</Fragment>\r\n\t)\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n\ttextFieldUpload: {\r\n\t\tcursor: 'pointer'\r\n\t}\r\n}))(AddKMLView)\r\n","import React from 'react'\r\nimport { Field } from 'redux-form';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Dialog from '@material-ui/core/Dialog';\r\nimport DialogContent from '@material-ui/core/DialogContent';\r\nimport DialogTitle from '@material-ui/core/DialogTitle';\r\nimport DialogActions from '@material-ui/core/DialogActions';\r\nimport Grid from '@material-ui/core/Grid';\r\n\r\nimport { ADD_LAYER_TOC_MODE } from '../../../../../Constants/Constants';\r\nimport SelectField from '../../../../../Controls/Containers/SelectFieldRedux';\r\nimport Button from '../../../../../Controls/Containers/Button';\r\nimport Loading from '../../../../../Controls/Containers/Loading';\r\n\r\nconst ListAddTocMode = Object.keys(ADD_LAYER_TOC_MODE).map(key => ({ id: ADD_LAYER_TOC_MODE[key], name: ADD_LAYER_TOC_MODE[key] }))\r\n\r\nconst AddLayerView = ({\r\n    classes,\r\n    children,\r\n    isOpen = true,\r\n    isShowLoading,\r\n    onCancel,\r\n    onSubmit,\r\n    handleSubmit,\r\n}) => {\r\n    return (\r\n        <Dialog\r\n            open={isOpen}\r\n            // onClose={onCancel}\r\n            classes={{ paperWidthSm: classes.paperWidthSm, root: classes.rootDialog }}\r\n        >\r\n            <Loading isShowLoading={isShowLoading} />\r\n            <DialogTitle>{\"เพิ่มชั้นข้อมูล\"}</DialogTitle>\r\n            <form onSubmit={handleSubmit(onSubmit)}>\r\n                <DialogContent classes={{ root: classes.rootDialogContent }}>\r\n                    <Grid item xs={12} className={classes.rowMode}>\r\n                        <Field\r\n                            name=\"mode\"\r\n                            component={SelectField}\r\n                            label=\"รูปแบบ\"\r\n                            data={ListAddTocMode}\r\n                            required\r\n                        />\r\n                    </Grid>\r\n                    {children}\r\n                </DialogContent>\r\n                <DialogActions>\r\n                    <Grid container justify=\"flex-end\" spacing={16}>\r\n                        <Grid item>\r\n                            <Button\r\n                                onClick={onCancel}\r\n                                label=\"ยกเลิก\"\r\n                            />\r\n                        </Grid>\r\n                        <Grid item>\r\n                            <Button\r\n                                type=\"submit\"\r\n                                label=\"ตกลง\"\r\n                            />\r\n                        </Grid>\r\n                    </Grid>\r\n                </DialogActions>\r\n            </form>\r\n        </Dialog >\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    paperWidthSm: {\r\n        width: '100%',\r\n        maxWidth: '700px',\r\n    },\r\n    rootDialogContent: {\r\n        // padding: \"0px 10px 0px 10px\"\r\n    },\r\n    rootDialog: {\r\n        // zIndex: 2\r\n    },\r\n    rowMode: {\r\n        marginBottom: '10px'\r\n    }\r\n}))(AddLayerView)\r\n","import React, { Component, Fragment } from 'react'\r\nimport { reduxForm, formValueSelector } from 'redux-form';\r\nimport { addLayerTocValidate } from '../../../../../Utilities/Validate';\r\nimport { connect } from \"react-redux\";\r\nimport { bindActionCreators } from 'redux'\r\nimport { compose } from \"recompose\";\r\nimport { ADD_LAYER_TOC_MODE, OPTION_IMPORT_KML } from '../../../../../Constants/Constants';\r\n// import { getUniqueKey } from '../../../../../Utilities/Utils';\r\n\r\nimport * as mapFunctions from '../../../../../Map/MapFunctions';\r\nimport * as MapAction from '../../../../../Actions/Web/Maps/MapAction';\r\nimport * as NewTOCAction from '../../../../../Actions/Web/Maps/NewTOCAction';\r\nimport * as Constants from '../../../../../Constants/Constants'\r\n\r\nimport AddWMSLayer from './AddWMSLayer';\r\nimport AddWFSLayer from './AddWFSLayer';\r\nimport AddRestServiceLayer from './AddRestServiceLayer';\r\nimport AlertMessageContainer from '../../../../../Controls/Containers/AlertMessage';\r\nimport AddKMLView from '../../../../../Presentationals/Web/Maps/NewTOC/AddToc/AddKMLView';\r\nimport AddLayerView from '../../../../../Presentationals/Web/Maps/NewTOC/AddToc/AddLayerView';\r\n\r\nimport WithLoading from '../../../../../HOC/WithLoading';\r\nimport WithAlertMessage from '../../../../../HOC/WithAlertMessage';\r\n\r\nclass AddLayer extends Component {\r\n    constructor() {\r\n        super();\r\n        this.state = {\r\n            urlKml: \"\",\r\n        }\r\n        this.inputUploadKMLRef = null;\r\n    }\r\n\r\n    //###############################################################\r\n\r\n    //---------------------------------------------------- bma layer\r\n    // checkDuplicateLayer = (layerData) => {\r\n    //     const { listLayer } = this.props.newTOCData;\r\n    //     const layerIDs = listLayer.map(itm => itm.id)\r\n\r\n    //     return layerData.filter(item => layerIDs.indexOf(item.layerID) === -1)\r\n    // }\r\n\r\n    // callServiceGetBMALayer = () => {\r\n    //     const { roleID, userID } = this.props.authenRdc.profile;\r\n    //     return fetchGet_(`${process.env.REACT_APP_GET_TOC_LAYER_BY_USERID}?userid=${userID}&roleid=${roleID}`) //รอเปลื่ยน service\r\n    //         .then(res => {\r\n    //             if (!res.ok) {\r\n    //                 throw res.status\r\n    //             }\r\n    //             return res.json();\r\n    //         })\r\n    //         .catch(ex => {\r\n    //             console.log('ex callServiceGetBMALayer', ex)\r\n    //         })\r\n    // }\r\n\r\n    // getDataBMALayerByID = (BMALayers) => { //เอา ID BMALayers มาดึงค่าใน lookupBMALayer\r\n    //     const { lookupBMALayer } = this.state;\r\n    //     const BMALayerData = BMALayers.slice(0); //clone array\r\n\r\n    //     lookupBMALayer.forEach(itm => {\r\n    //         const index = BMALayers.indexOf(itm.layerID)\r\n\r\n    //         if (index !== -1) {\r\n    //             BMALayerData[index] = itm\r\n    //         }\r\n    //     })\r\n    //     return BMALayerData;\r\n    // }\r\n\r\n    // getLegendLayer = async (urlMapservice, mapServiceID) => {\r\n    //     let listLegend = [];\r\n    //     try {\r\n    //         const response = await fetch(`${urlMapservice}legend?f=pjson&token=${localStorage.getItem('arcToken')}`);\r\n    //         const result = await response.json();\r\n    //         const layer = result.layers.filter(itm => itm.layerId === mapServiceID)[0];\r\n    //         listLegend = layer.legend;\r\n    //     }\r\n    //     catch (err) {\r\n    //         listLegend = [];\r\n    //     }\r\n\r\n    //     return listLegend;\r\n    // }\r\n\r\n    //######################## REST SERVICE ########################\r\n\r\n    getLegendLayerRestService = async (urlMapservice, mapServiceIDs, token) => {\r\n        urlMapservice = `${urlMapservice}legend?f=pjson`;\r\n\r\n        if (token) {\r\n            urlMapservice = `${urlMapservice}&token=${token}`;\r\n        }\r\n\r\n        return fetch(urlMapservice)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status;\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(result => {\r\n                const legend = []\r\n\r\n                if (result && result.layers) {\r\n                    result.layers.forEach(layer => {\r\n                        if (mapServiceIDs.indexOf(layer.layerId) !== -1 && layer.legend) {\r\n                            legend.push(layer.legend)\r\n                        }\r\n                    })\r\n                }\r\n                return legend;\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex getLegendLayerRestService', ex)\r\n                return []\r\n            })\r\n    }\r\n\r\n    //######################## upload kml ########################\r\n    handleImportFileKML = evt => {\r\n        const filePath = evt.target.value.toLowerCase();\r\n        const file = evt.target.files[0];\r\n        if (filePath.indexOf(\".kml\") !== -1 || filePath.indexOf(\".kmz\") !== -1) {\r\n            const { change, formRdc } = this.props;\r\n            this.uploadFile(file).then(({ url, statusCode }) => {\r\n                if (statusCode === 1) {\r\n                    // MapAction.bindMapCommand(MapFunctions.importKMLFile, { url })\r\n                    if (!formRdc.kmlName) {\r\n                        change(\"kmlName\", file.name.split(\".\")[0])\r\n                    }\r\n                    change(\"fileKML\", file.name)\r\n                    this.setState({\r\n                        urlKml: url\r\n                    })\r\n                } else {\r\n                    this.props.showAlert({ altMsg: \"เกิดข้อผิดพลาดในการอัพโหลดไฟล์ กรุณาลองใหม่อีกครั้ง\" })\r\n                }\r\n            })\r\n        } else {\r\n            this.props.showAlert({ altMsg: \"เฉพาะ .kml หรือ .kmz เท่านั่น\" })\r\n        }\r\n    }\r\n\r\n    uploadFile = file => {\r\n        let formData = new FormData();\r\n        formData.append(\"\", file);\r\n\r\n        return fetch(process.env.REACT_APP_IMPORT_KML, {\r\n            method: \"POST\",\r\n            body: formData,\r\n        })\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(result => {\r\n                return result\r\n            })\r\n            .catch(ex => {\r\n                this.props.showAlert({ altMsg: \"เกิดข้อผิดพลาดในการ upload file กรุณาลองใหม่อีกครั้ง\" })\r\n                console.log(\"ex uploadFile\", ex);\r\n            });\r\n    };\r\n\r\n    handleRefInputUploadKML = node => {\r\n        this.inputUploadKMLRef = node;\r\n    }\r\n\r\n    handleOpenUpload = () => {\r\n        if (this.inputUploadKMLRef) {\r\n            this.inputUploadKMLRef.value = \"\";\r\n            this.inputUploadKMLRef.click();\r\n        }\r\n    }\r\n\r\n    //########################################################################\r\n\r\n    renderForm = () => {\r\n        const { formRdc, change, showLoading, hideLoading, touch, showAlert } = this.props;\r\n\r\n        switch (formRdc.mode) {\r\n            case ADD_LAYER_TOC_MODE.KML:\r\n                return <AddKMLView\r\n                    inputUploadKMLRef={this.handleRefInputUploadKML}\r\n                    importType={formRdc.importType}\r\n                    onImportFileKML={this.handleImportFileKML}\r\n                    onOpenUpload={this.handleOpenUpload}\r\n                />\r\n            case ADD_LAYER_TOC_MODE.WMS:\r\n                return <AddWMSLayer\r\n                    showLoading={showLoading}\r\n                    hideLoading={hideLoading}\r\n                    change={change}\r\n                    formRdc={formRdc}\r\n                    showAlert={showAlert}\r\n                />\r\n            case ADD_LAYER_TOC_MODE.WFS:\r\n                return <AddWFSLayer\r\n                    showLoading={showLoading}\r\n                    hideLoading={hideLoading}\r\n                    change={change}\r\n                    formRdc={formRdc}\r\n                    showAlert={showAlert}\r\n                />\r\n            case ADD_LAYER_TOC_MODE.RESTService:\r\n                return <AddRestServiceLayer\r\n                    formRdc={formRdc}\r\n                    change={change}\r\n                    touch={touch}\r\n                    showLoading={showLoading}\r\n                    hideLoading={hideLoading}\r\n                    showAlert={showAlert}\r\n                />\r\n            default:\r\n                break;\r\n        }\r\n    }\r\n\r\n    handleSubmit = async (values) => {\r\n        const { mapAction, newTOCData, showLoading, showAlert } = this.props;\r\n        const { urlKml } = this.state;\r\n        const lastTocLayerID = newTOCData.listLayer && newTOCData.listLayer.length > 0 && newTOCData.listLayer[0].idTOC\r\n\r\n        switch (values.mode) {\r\n\r\n            case ADD_LAYER_TOC_MODE.KML: //add by kml\r\n                showLoading();\r\n                const layerKmlID = `${values.kmlName}${Constants.TOC_SUFFIX_ID.BMA_LAYER}`;\r\n                const url = values.importType === OPTION_IMPORT_KML.URL ? values.urlKmlFile : urlKml;\r\n                mapAction.bindMapCommand(mapFunctions.addKmlLayer, {\r\n                    id: layerKmlID,\r\n                    urlKml: url,\r\n                    kmlName: values.kmlName,\r\n                    callback: this.callBackAddKmlLayer,\r\n                    listDisableTOC: newTOCData.listDisableTOC,\r\n                    showAlert,\r\n                    lastTocLayerID\r\n                })\r\n                break;\r\n\r\n            case ADD_LAYER_TOC_MODE.WMS: // add by wms\r\n                showLoading();\r\n                const layerWmsID = `${values.wmsName}${Constants.TOC_SUFFIX_ID.BMA_LAYER}`;\r\n                mapAction.bindMapCommand(mapFunctions.addWMSLayer, {\r\n                    id: layerWmsID,\r\n                    urlWms: values.urlWms,\r\n                    wmsName: values.wmsName,\r\n                    layerID: values.layer && values.layer.filter(itm => itm !== -1),\r\n                    callback: this.callBackAddWmsLayer,\r\n                    showAlert\r\n                })\r\n                break;\r\n\r\n            case ADD_LAYER_TOC_MODE.WFS: // add by wfs\r\n                showLoading();\r\n                const layerWfsID = `${values.wfsName}${Constants.TOC_SUFFIX_ID.BMA_LAYER}`;\r\n                mapAction.bindMapCommand(mapFunctions.addWFSLayer, {\r\n                    id: layerWfsID,\r\n                    urlWfs: values.urlWfs,\r\n                    wfsName: values.wfsName,\r\n                    layerName: values.wfsLayer,\r\n                    callback: this.callBackAddWfsLayer,\r\n                    listDisableTOC: newTOCData.listDisableTOC,\r\n                    lastTocLayerID\r\n                })\r\n                break;\r\n            case ADD_LAYER_TOC_MODE.RESTService: //add by rest service\r\n                showLoading();\r\n                if (values.urlRest[values.urlRest.length - 1] !== \"/\") { //กรณีผู้ใช้ใส่ url แต่ไม่ได้ใส่ / ปิดท้าย\r\n                    values.urlRest = values.urlRest + \"/\"\r\n                }\r\n                values.layerRest = values.layerRest.filter(itm => itm !== -1)\r\n                this.getLegendLayerRestService(values.urlRest, values.layerRest, values.tokenRest).then(results => {\r\n                    let listLegend = [];\r\n\r\n                    if (results && results.length > 0) {\r\n                        listLegend = results.flat(1);\r\n                    }\r\n\r\n                    if (values.tokenRest) {\r\n                        values.urlRest = `${values.urlRest}?token=${values.tokenRest}`\r\n                    }\r\n\r\n                    const layerRestID = `${values.restName}${Constants.TOC_SUFFIX_ID.BMA_LAYER}`;\r\n                    mapAction.bindMapCommand(mapFunctions.addRestLayer, {\r\n                        id: layerRestID,\r\n                        url: values.urlRest,\r\n                        layerRest: values.layerRest,\r\n                        restName: values.restName,\r\n                        listLegend: listLegend,\r\n                        callback: this.callBackAddResLayer,\r\n                        showAlert\r\n                    })\r\n                })\r\n\r\n                break;\r\n            default:\r\n                break;\r\n        }\r\n    }\r\n\r\n    callBackAddKmlLayer = (values = []) => {\r\n        const { hideLoading, mapAction } = this.props;\r\n        hideLoading();\r\n        mapAction.bindClearMapCommand();\r\n        if (values.length > 0) {\r\n            const tocLayers = values.reverse().map(value => ({\r\n                id: value.id,\r\n                idTOC: value.id,\r\n                mapserviceURL: \"\",\r\n                mapserviceID: \"\",\r\n                name: value.kmlName,\r\n                listLegend: [],\r\n                listSubLayer: []\r\n            }))\r\n\r\n            this.handleAddTocLayer(tocLayers)\r\n        }\r\n    }\r\n\r\n    callBackAddWmsLayer = (value) => {\r\n        const { hideLoading,mapAction } = this.props;\r\n        hideLoading();\r\n        mapAction.bindClearMapCommand();\r\n        if (value) {\r\n            this.handleAddTocBgLayer([{\r\n                id: value.id,\r\n                idTOC: value.id,\r\n                mapserviceURL: \"\",\r\n                mapserviceID: \"\",\r\n                name: value.wmsName,\r\n                listLegend: [],\r\n                listSubLayer: []\r\n            }])\r\n        }\r\n    }\r\n\r\n    callBackAddWfsLayer = (value) => {\r\n        const { hideLoading,mapAction } = this.props;\r\n        hideLoading();\r\n        mapAction.bindClearMapCommand();\r\n        if (value) {\r\n            this.handleAddTocLayer([{\r\n                id: value.id,\r\n                idTOC: value.id,\r\n                mapserviceURL: \"\",\r\n                mapserviceID: \"\",\r\n                name: value.wfsName,\r\n                listLegend: [],\r\n                listSubLayer: []\r\n            }])\r\n        }\r\n    }\r\n\r\n    callBackAddResLayer = (value) => {\r\n        const { hideLoading,mapAction } = this.props;\r\n        hideLoading();\r\n        mapAction.bindClearMapCommand();\r\n        if (value) {\r\n            this.handleAddTocBgLayer([{\r\n                id: value.id,\r\n                idTOC: value.id,\r\n                mapserviceURL: \"\",\r\n                mapserviceID: \"\",\r\n                name: value.restName,\r\n                listLegend: value.listLegend,\r\n                listSubLayer: []\r\n            }])\r\n        }\r\n    }\r\n\r\n    handleAddTocLayer = (listTOC) => {\r\n        const { onClose, newTOCAction } = this.props;\r\n\r\n        if (listTOC.length > 0) {\r\n            newTOCAction.addTOCLayer(listTOC);\r\n            onClose();\r\n        }\r\n    }\r\n\r\n    handleAddTocBgLayer = (listTOC) => {\r\n        const { onClose, newTOCAction } = this.props;\r\n\r\n        if (listTOC.length > 0) {\r\n            newTOCAction.addTOCBgLayer(listTOC);\r\n            onClose();\r\n        }\r\n    }\r\n\r\n    render() {\r\n        const {\r\n            isOpen,\r\n            isShowLoading,\r\n            handleSubmit,\r\n            onClose,\r\n\r\n            altMsg,\r\n            altTitle,\r\n            altType,\r\n            isShowAlt,\r\n            callbackClose,\r\n            callbackConfirm\r\n        } = this.props;\r\n\r\n        return (\r\n            <Fragment>\r\n                <AddLayerView\r\n                    isOpen={isOpen}\r\n                    handleSubmit={handleSubmit}\r\n                    isShowLoading={isShowLoading}\r\n                    onSubmit={this.handleSubmit}\r\n                    onCancel={onClose}\r\n                >\r\n                    {this.renderForm()}\r\n                </AddLayerView>\r\n\r\n                <AlertMessageContainer\r\n                    showAlert={isShowAlt}\r\n                    title={altTitle}\r\n                    text={altMsg}\r\n                    type={altType} // 1 = alert, 2 = confirm\r\n                    onCancel={callbackClose}\r\n                    onSubmit={callbackConfirm}\r\n                />\r\n            </Fragment>\r\n        )\r\n    }\r\n}\r\n\r\n\r\nconst reduxFormParameter = {\r\n    form: \"addlayertoc\",\r\n    validate: addLayerTocValidate\r\n};\r\n\r\nconst selector = formValueSelector(\"addlayertoc\");\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    mapAction: bindActionCreators(MapAction, dispatch),\r\n    newTOCAction: bindActionCreators(NewTOCAction, dispatch)\r\n});\r\n\r\nconst mapStateToProps = state => ({\r\n    formRdc: selector(\r\n        state,\r\n        \"mode\",\r\n        \"name\",\r\n        \"layer\",\r\n        \"urlWms\",\r\n        \"urlWfs\",\r\n        \"importType\",\r\n        \"kmlName\",\r\n        \"secureRest\",\r\n        \"urlRest\",\r\n        \"usernameRest\",\r\n        \"passwordRest\"\r\n    ),\r\n    initialValues: {\r\n        mode: ADD_LAYER_TOC_MODE.KML,\r\n        importType: OPTION_IMPORT_KML.URL,\r\n        secureRest: [\"secureRest\"]\r\n    },\r\n    authenRdc: state.authen,\r\n    newTOCData: state.newTOCData\r\n});\r\n\r\nconst enhance = compose(\r\n    connect(\r\n        mapStateToProps,\r\n        mapDispatchToProps\r\n    ),\r\n    reduxForm(reduxFormParameter)\r\n);\r\n\r\n\r\nexport default WithAlertMessage(WithLoading(enhance(AddLayer)));\r\n","import React, { useState, Fragment, useEffect } from 'react';\r\nimport { bindActionCreators } from 'redux';\r\nimport { connect } from 'react-redux';\r\n\r\n//import Action\r\nimport * as MenuAction from '../../../../Actions/Web/MenuAction';\r\nimport * as NewTOCAction from '../../../../Actions/Web/Maps/NewTOCAction';\r\nimport * as MapAction from '../../../../Actions/Web/Maps/MapAction';\r\nimport * as MapFunctions from '../../../../Map/MapFunctions';\r\nimport { SYSTEM_ID } from '../../../../Constants/Constants';\r\n\r\nimport TOCPanelView from \"../../../../Presentationals/Web/Maps/NewTOC/TOCPanelView\";\r\nimport TOCList from './TOCList';\r\nimport AddLayer from './AddToc/AddLayer';\r\n\r\nconst TOCPanel = ({\r\n    isHide = false,\r\n    menuAction,\r\n    newTOCAction,\r\n    mapAction,\r\n    authenRdc,\r\n    callBackAddTocComplete\r\n}) => {\r\n    const [isOpenFormAddLayer, setOpenFormAddLayer] = useState(false)\r\n    const [isSetDefaultComplete, setDefaultComplete] = useState(false)\r\n\r\n    useEffect(() => {\r\n        return () => {//componentWillUnmount\r\n            resetTOC();\r\n        }\r\n    }, [])\r\n\r\n    useEffect(() => { //componentDidMount\r\n        setDefaultLayer();\r\n    }, [])\r\n\r\n    // ######################## DEFAULT LAYER ########################\r\n\r\n    const setDefaultLayer = async () => {\r\n        if (authenRdc && authenRdc.profile) {\r\n            const systemID = SYSTEM_ID[authenRdc.system];\r\n            const groupID = authenRdc.profile.groupID\r\n            const userID = (authenRdc.profile.userID)?authenRdc.profile.userID:null\r\n\r\n            const listLayer = await newTOCAction.getListDefaultLayer(systemID, groupID)\r\n            if (listLayer) {\r\n                const listLayerToc = await createDataForToc(listLayer)\r\n                mapAction.bindMapCommand(MapFunctions.addDefaultLayer, {\r\n                    defaultLayer: listLayerToc,\r\n                    callback: callBackAddDefaultLayer,\r\n                    userID: userID,\r\n                    groupID\r\n                })\r\n            }else{\r\n                callBackAddDefaultLayer();\r\n            }\r\n            setDefaultComplete(true)\r\n        }\r\n    }\r\n\r\n    const createDataForToc = async (listLayers = []) => {\r\n        let listLayersToc = []\r\n        const urlMapServices = listLayers.map(itm => itm.mapServiceURL);\r\n        const urlFilterDuplicate = [...new Set([...urlMapServices])]\r\n\r\n        if (urlFilterDuplicate.length === 1) { //กรณีทั้งชุดใช้ map service เดียวกันทั้งหมด จะยิงเอา legend เพียงครั้งเดียว\r\n            const legends = await getLegendLayer(urlFilterDuplicate[0]);\r\n            listLayersToc = await listLayers.map(layer => {\r\n                const legendLayer = legends.filter(legend => legend.layerId === layer.mapServiceID)\r\n                return {\r\n                    id: layer.layerID,\r\n                    idTOC: layer.layerID.toString(),\r\n                    // idTOC: layer.layerID + TOC_SUFFIX_ID.DEFAULT_LAYER,\r\n                    mapserviceURL: `${urlFilterDuplicate[0]}`,\r\n                    mapserviceID: layer.mapServiceID,\r\n                    name: layer.layerName,\r\n                    listLegend: legendLayer.length > 0 ? legendLayer[0].legend : [],\r\n                    listSubLayer: [],\r\n                    isDefaultLayer: true\r\n                }\r\n            })\r\n        } else {\r\n            listLayersToc = await listLayers.map(async layer => { //กรณีทั้งชุดใช้ map service ต่างกัน\r\n                const legends = await getLegendLayer(layer.mapServiceURL);\r\n                const legendLayer = legends.filter(legend => legend.layerId === layer.mapServiceID)\r\n                return {\r\n                    id: layer.layerID,\r\n                    // idTOC: layer.layerID + TOC_SUFFIX_ID.DEFAULT_LAYER,\r\n                    //idTOC: layer.layerID.toString(),\r\n                    idTOC:  layer.layerName,\r\n                    mapserviceURL: `${layer.mapServiceURL}`,\r\n                    mapserviceID: layer.mapServiceID,\r\n                    name: layer.layerName,\r\n                    listLegend: legendLayer.length > 0 ? legendLayer[0].legend : [],\r\n                    listSubLayer: [],\r\n                    isDefaultLayer: true\r\n                }\r\n            })\r\n        }\r\n\r\n        return Promise.all(listLayersToc).then(result => {\r\n            return result\r\n        })\r\n    }\r\n    const callBackAddDefaultLayer = (listToc) => {\r\n        if (listToc && listToc.length > 0) {\r\n            newTOCAction.addTOCLayer(listToc);\r\n        }\r\n        mapAction.bindClearMapCommand();\r\n        callBackAddTocComplete()\r\n    }\r\n\r\n    const getLegendLayer = async urlMapservice => {\r\n        let listLayerLegend = [];\r\n        try {\r\n            const response = await fetch(`${urlMapservice}/legend?f=pjson`);\r\n            const result = await response.json();\r\n            listLayerLegend = result.layers ? result.layers : [];\r\n        }\r\n        catch (err) {\r\n            listLayerLegend = [];\r\n        }\r\n        return listLayerLegend;\r\n    }\r\n\r\n    // ###############################################################\r\n\r\n    const resetTOC = async () => {\r\n        newTOCAction.clearTOCReducer()\r\n    }\r\n\r\n    const handleClosePanel =async () => {\r\n        await mapAction.bindClearMapCommand()\r\n        await menuAction.closeFormToc();\r\n    }\r\n\r\n    const handleOpenAddLayer = () => {\r\n        setOpenFormAddLayer(!isOpenFormAddLayer)\r\n    }\r\n\r\n    return (\r\n        <Fragment>\r\n            {isSetDefaultComplete && <TOCPanelView\r\n                isHide={isHide}\r\n                onCloseClick={handleClosePanel}\r\n                onOpenAddLayer={handleOpenAddLayer}\r\n            >\r\n                <TOCList />\r\n            </TOCPanelView>}\r\n            {isOpenFormAddLayer && <AddLayer onClose={handleOpenAddLayer} />}\r\n        </Fragment>\r\n    );\r\n}\r\n\r\nconst mapActionToProps = dispatch => ({\r\n    newTOCAction: bindActionCreators(NewTOCAction, dispatch),\r\n    mapAction: bindActionCreators(MapAction, dispatch),\r\n    menuAction: bindActionCreators(MenuAction, dispatch)\r\n})\r\n\r\nconst mapStateToProps = state => ({\r\n    authenRdc: state.authen\r\n})\r\n\r\nexport default connect(mapStateToProps, mapActionToProps)(TOCPanel);","import React from \"react\";\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\nimport Dialog from \"@material-ui/core/Dialog\";\r\nimport DialogContent from \"@material-ui/core/DialogContent\";\r\n// import LinearProgress from \"@material-ui/core/LinearProgress\";\r\nimport Zoom from \"@material-ui/core/Zoom\";\r\n\r\nfunction Transition(props) {\r\n    return <Zoom {...props} />;\r\n}\r\n\r\nconst styles = theme => ({\r\n    navigateIcon: {\r\n        color: theme.mainTheme.color4,\r\n        cursor: \"pointer\",\r\n        fontSize: \"2em\"\r\n    },\r\n    paperWidthSm: {\r\n        maxWidth: '900px'\r\n    }\r\n});\r\nconst ImageGalleryView = ({\r\n    classes,\r\n    isOpen,\r\n    urlImage,\r\n    onClose,\r\n}) => {\r\n    return (\r\n        <Dialog\r\n            fullWidth\r\n            open={isOpen}\r\n            onClose={onClose}\r\n            TransitionComponent={Transition}\r\n            classes={{ paperWidthSm: classes.paperWidthSm }}\r\n        >\r\n            <DialogContent>\r\n                <img\r\n                    style={{ width: '100%' }}\r\n                    src={urlImage}\r\n                    alt=\"\"\r\n                />\r\n            </DialogContent>\r\n        </Dialog>\r\n    );\r\n};\r\n\r\nexport default withStyles(styles)(ImageGalleryView);\r\n","import React, { Component, Fragment } from \"react\";\r\nimport PropTypes from \"prop-types\";\r\nimport ImageGalleryView from \"../Presentationals/ImageGalleryView\";\r\n\r\nexport class ImageGallery extends Component {\r\n\r\n    render() {\r\n        const { isOpen, onClose, urlImage } = this.props;\r\n\r\n        return (\r\n            <Fragment>\r\n                <ImageGalleryView\r\n                    isOpen={isOpen}\r\n                    onClose={onClose}\r\n                    urlImage={urlImage}\r\n                />\r\n            </Fragment>\r\n        );\r\n    }\r\n}\r\n\r\nImageGallery.propTypes = {\r\n    open: PropTypes.bool,\r\n    onClose: PropTypes.func,\r\n    urlImage: PropTypes.string\r\n};\r\n\r\nexport default ImageGallery;\r\n","import React, { Component } from \"react\";\r\nimport { Field } from \"redux-form\";\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\nimport Icon from \"@material-ui/core/Icon\";\r\nimport Button from '../../../../Controls/Containers/Button';\r\n// import Visibility from \"@material-ui/icons/Visibility\"\r\n// import VisibilityOff from \"@material-ui/icons/VisibilityOff\"\r\nimport SelectFieldRedux from \"../../../../Controls/Containers/SelectFieldRedux\";\r\nimport TextFieldRedux from '../../../../Controls/Containers/TextFieldRedux';\r\nimport Grid from '@material-ui/core/Grid';\r\n\r\nconst styles = theme => ({\r\n    root: {\r\n        position: \"absolute\",\r\n        right: \"75px\",\r\n        // bottom: \"110px\",\r\n        top: 'calc(50% - 240px)',\r\n        zIndex: \"999\",\r\n        width: \"350px\",\r\n        backgroundColor: \"white\",\r\n        boxShadow: \"2px 2px 8px #888888\",\r\n        borderColor: 'black',\r\n        borderStyle: \"solid\",\r\n        borderWidth: \"2px\",\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            top: 'calc(50% - 200px)',\r\n            width: \"96%\",\r\n            left: \"2%\",\r\n            right: \"2%\",\r\n            zIndex: \"1\",\r\n        }\r\n    },\r\n    formControl: {\r\n        margin: theme.spacing.unit,\r\n        minWidth: 150,\r\n    },\r\n    selectEmpty: {\r\n        marginTop: theme.spacing.unit * 2,\r\n    },\r\n    header: {\r\n        padding: \"5px\",\r\n        backgroundColor: theme.mainTheme.color1,\r\n        fontWeight: \"bold\",\r\n        color: 'white'\r\n    },\r\n    textField: {\r\n        marginLeft: theme.spacing.unit,\r\n        marginRight: theme.spacing.unit,\r\n        width: 200,\r\n    },\r\n    formInput: {\r\n        padding: \"10px\"\r\n    },\r\n    icon: {\r\n        right: \"3px\",\r\n        position: \"absolute\",\r\n        top: \"3px\",\r\n        cursor: \"pointer\"\r\n    },\r\n    bottom: {\r\n        marginTop: '10px',\r\n        width: '100%',\r\n        display: 'flex',\r\n        flexDirection: 'row',\r\n        justifyContent: 'flex-end'\r\n    },\r\n    iconPreview: {\r\n        fontSize: '30px',\r\n        cursor: 'pointer'\r\n    },\r\n    iconPreviewOff: {\r\n        fontSize: '30px',\r\n        cursor: 'no-drop'\r\n    }\r\n\r\n});\r\n\r\nexport class PrintmapView extends Component {\r\n    render() {\r\n        let {\r\n            classes,\r\n            templateChoiceList,\r\n            formatChoiceList,\r\n            onCloseClick,\r\n            onClickSubmit,\r\n            handleSubmit,\r\n            // onPreviewClick,\r\n            // templateURL,\r\n            onChangePaperSize\r\n        } = this.props;\r\n        return (\r\n\r\n            <div className={classes.root} >\r\n                <form onSubmit={handleSubmit(onClickSubmit)} >\r\n\r\n                    <div className={classes.header}>\r\n                        พิมพ์แผนที่{/* {Constants.RESOURCEWORDS.GOTOLOCATION_HEADER} */}\r\n                        <Icon className=\"icon\" onClick={onCloseClick}>close-circle</Icon>\r\n                    </div>\r\n\r\n                    <div className={classes.formInput}>\r\n                        {/* <div style={{ display: \"flex\", justifyContent: \"space-between\", width: \"100%\" }}>\r\n                        <div style={{ display: \"flex\", width: \"285px\" }}>\r\n                            <Field\r\n                                label={\"เทมเพลต\"}\r\n                                name=\"paperSize\"\r\n                                component={SelectFieldRedux}\r\n                                onChange={onChangePaperSize}\r\n                                data={templateChoiceList}\r\n                                isDataArray={true}\r\n                                required\r\n                            />\r\n                        </div>\r\n                        <div style={{ lineHeight: \"130px\", height: \"90px\" }}>\r\n                            {(templateURL) ? <Visibility className={classes.iconPreview} onClick={onPreviewClick} /> :\r\n                                <VisibilityOff className={classes.iconPreviewOff} />}\r\n                        </div>\r\n                    </div> */}\r\n\r\n                        <Field\r\n                            label={\"เทมเพลต\"}\r\n                            name=\"paperSize\"\r\n                            component={SelectFieldRedux}\r\n                            onChange={onChangePaperSize}\r\n                            data={templateChoiceList}\r\n                            keyData={{ value: \"value\", label: \"name\" }}\r\n                            // isDataArray={true}\r\n                            required\r\n                        />\r\n\r\n                        <Field\r\n                            name=\"mapName\"\r\n                            component={TextFieldRedux}\r\n                            maxLength={100}\r\n                            label={\"ชื่อแผนที่\"}\r\n                            required\r\n                        />\r\n                        <Field\r\n                            name=\"mapDescription\"\r\n                            component={TextFieldRedux}\r\n                            // maxLength={100}\r\n                            label={\"คำอธิบายแผนที่\"}\r\n                            multiline\r\n                            rows={2}\r\n                        // required\r\n                        />\r\n                        <Field\r\n                            label={\"รูปแบบผลลัพธ์\"}\r\n                            name=\"format\"\r\n                            component={SelectFieldRedux}\r\n                            data={formatChoiceList}\r\n                            isDataArray={true}\r\n                            required\r\n                        />\r\n\r\n                        <Grid container justify='center'>\r\n                            <Grid item>\r\n                                <Button\r\n                                    label='ตกลง'\r\n                                    type=\"submit\"\r\n                                    // onClick={handleSubmit(onClickSubmit)}\r\n                                />\r\n                            </Grid>\r\n                        </Grid>\r\n                    </div>\r\n                </form>\r\n            </div>\r\n        )\r\n    }\r\n}\r\n\r\nexport default withStyles(styles)(PrintmapView);\r\n","import React, { Component, Fragment } from 'react'\r\nimport { bindActionCreators } from \"redux\";\r\nimport { connect } from \"react-redux\";\r\nimport { reduxForm, formValueSelector } from \"redux-form\";\r\nimport { compose } from \"recompose\";\r\n\r\n// import { checkFileOnServer } from '../../../../Utilities/Utils';\r\nimport { printmapValidate } from '../../../../Utilities/Validate';\r\n\r\nimport * as MapAction from \"../../../../Actions/Web/Maps/MapAction\";\r\nimport * as MapFunctions from \"../../../../Map/MapFunctions\";\r\n\r\nimport WithLoading from '../../../../HOC/WithLoading';\r\nimport Loading from '../../../../Controls/Containers/Loading';\r\nimport ImageGallery from '../../../../Controls/Containers/ImageGallery';\r\nimport PrintmapView from \"../../../../Presentationals/Web/Maps/Printmap/PrintmapView\";\r\nconst DefaultTypeResult = 'PDF';\r\n\r\nconst TEMPLATE_PRINTMAP = [\r\n\t{name : \"พิมพ์ภาพแนวนอน\" , value : \"CPUDD_Map_A4_Landscape\"},\r\n\t{name : \"พิมพ์ภาพแนวตั้ง\" , value : \"CPUDD_Map_A4_Portrait\"},\r\n\t{name : \"พิมพ์ภาพแผนที่อย่างเดียว\" , value : \"MAP_ONLY\"},\t\r\n]\r\n\r\nexport class Printmap extends Component {\r\n\tconstructor(props) {\r\n\t\tsuper(props)\r\n\t\tthis.state = {\r\n\t\t\tisOpenForm: true,\r\n\t\t\t// templateChoiceList: [],\r\n\t\t\tformatChoiceList: [\"PDF\", \"PNG32\", \"PNG8\", \"JPG\"],\r\n\t\t\tisOpenTemplatePreview: false,\r\n\t\t\ttemplateURL: null\r\n\t\t}\r\n\t}\r\n\tcomponentDidMount() {\r\n\t\tthis.props.initialize({\r\n\t\t\tformat: DefaultTypeResult\r\n\t\t})\r\n\r\n\t\t// this.setState({\r\n\t\t// \ttemplateChoiceList: [\"CPUDD_Map_A4_Landscape\", \"CPUDD_Map_A4_Portrait\", \"MAP_ONLY\"],\r\n\t\t// \tformatChoiceList: [\"PDF\", \"PNG32\", \"PNG8\", \"JPG\"]\r\n\t\t// });\r\n\t}\r\n\thandleClickSubmit = (value) => {\r\n\t\tconst { mapAction, showLoading } = this.props;\r\n\t\tshowLoading()\r\n\t\tmapAction.bindMapCommand(MapFunctions.printMapForMapTool, {\r\n\t\t\tcallback: this.handleCallbackPrintMap,\r\n\t\t\tparam: value,\r\n\t\t})\r\n\t}\r\n\r\n\thandleCallbackPrintMap = () => {\r\n\t\tthis.props.mapAction.bindClearMapCommand()\r\n\t\tthis.props.hideLoading()\r\n\r\n\t}\r\n\r\n\thandleCloseDialog = () => {\r\n\t\tconst { isPrintmapClick } = this.props\r\n\r\n\t\tisPrintmapClick()\r\n\t}\r\n\r\n\thandlePreviewClick = () => {\r\n\t\tconst { PrintmapForm } = this.props\r\n\t\tif (PrintmapForm.paperSize && PrintmapForm.paperSize !== undefined) {\r\n\t\t\tlet previewURL = `${window.TEMPLATE_PREVIEW_URL}${PrintmapForm.paperSize}.png`\r\n\t\t\tthis.setState({\r\n\t\t\t\tisOpenTemplatePreview: true,\r\n\t\t\t\ttemplateURL: previewURL\r\n\t\t\t})\r\n\t\t} else {\r\n\t\t\talert(\"กรุณาระบุเทมเพลต\")\r\n\t\t}\r\n\r\n\t}\r\n\thandlePreviewClose = () => {\r\n\t\tthis.setState({\r\n\t\t\tisOpenTemplatePreview: false,\r\n\t\t\t// templateURL:null\r\n\t\t})\r\n\t}\r\n\thandleChangePaperSize = (value) => {\r\n\t\t// let previewURL = `${window.TEMPLATE_PREVIEW_URL}${value.target.value}.png`\r\n\r\n\t\t// checkFileOnServer(previewURL).then(res => {\r\n\t\t// \tif (!res) {\r\n\t\t// \t\tpreviewURL = null\r\n\t\t// \t}\r\n\r\n\t\t// \tthis.setState({\r\n\t\t// \t\ttemplateURL: previewURL,\r\n\t\t// \t\tisOpenTemplatePreview: false\r\n\t\t// \t})\r\n\t\t// })\r\n\t}\r\n\r\n\trender() {\r\n\t\tconst { handleSubmit, isShowLoading, onClosePrintmap } = this.props\r\n\t\tconst { formatChoiceList } = this.state\r\n\r\n\t\treturn (\r\n\t\t\t<Fragment>\r\n\t\t\t\t<PrintmapView handleSubmit={handleSubmit}\r\n\t\t\t\t\tisOpenDialog={this.props.isOpen}\r\n\t\t\t\t\ttemplateChoiceList={TEMPLATE_PRINTMAP}\r\n\t\t\t\t\tformatChoiceList={formatChoiceList}\r\n\t\t\t\t\ttemplateURL={this.state.templateURL}\r\n\t\t\t\t\tonClickSubmit={this.handleClickSubmit}\r\n\t\t\t\t\tonClickLayerCheckbox={this.handleClickLayerCheckbox}\r\n\t\t\t\t\tonClose={this.handleCloseDialog}\r\n\t\t\t\t\tonPreviewClick={this.handlePreviewClick}\r\n\t\t\t\t\tonCloseClick={onClosePrintmap}\r\n\t\t\t\t\tonChangePaperSize={this.handleChangePaperSize}\r\n\t\t\t\t/>\r\n\t\t\t\t<Loading\r\n\t\t\t\t\tisShowLoading={isShowLoading}\r\n\t\t\t\t/>\r\n\r\n\t\t\t\t<ImageGallery isOpen={this.state.isOpenTemplatePreview}\r\n\t\t\t\t\turlImage={this.state.templateURL}\r\n\t\t\t\t\tonClose={this.handlePreviewClose}\r\n\t\t\t\t/>\r\n\t\t\t</Fragment>\r\n\t\t)\r\n\t}\r\n}\r\n\r\n\r\nconst reduxFormParameter = {\r\n\tform: \"PrintmapForm\",\r\n\tvalidate: printmapValidate\r\n};\r\n\r\nconst selector = formValueSelector('PrintmapForm')\r\n\r\nconst mapStateToProps = state => ({\r\n\t// submitPmrRdc: state.submitPmr,\r\n\tPrintmapForm: {\r\n\t\tpaperSize: selector(state, \"paperSize\"),\r\n\t},\r\n\taskTheCityPlanRdc: state.AskTheCityPlanData\r\n})\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n\t// submitPmrAction: bindActionCreators(SubmitPmrAction, dispatch)\r\n\tmapAction: bindActionCreators(MapAction, dispatch)\r\n});\r\n\r\nconst PrintmapLoadding = WithLoading(Printmap)\r\n\r\nconst enhance = compose(\r\n\tconnect(\r\n\t\tmapStateToProps,\r\n\t\tmapDispatchToProps\r\n\t),\r\n\treduxForm(reduxFormParameter)\r\n);\r\n\r\n\r\n\r\nexport default enhance(PrintmapLoadding);\r\n\r\n","import React from 'react';\r\nimport classnames from 'classnames'\r\nimport Button from '@material-ui/core/Button';\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\nimport Tooltip from '../../../../Controls/Containers/Tooltip';\r\n\r\nconst styles = theme => ({\r\n    identify: {\r\n        zIndex: 1,\r\n        backgroundColor: theme.mainTheme.color4,\r\n        '&:hover': {\r\n            // opacity: \"0.8\",\r\n            backgroundColor: theme.mainTheme.colorAH.colorHover,\r\n        },\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            display: 'none'\r\n        },\r\n        width: '40px'\r\n    },\r\n    identifyActive: {\r\n        backgroundColor: theme.mainTheme.colorAH.colorActive,\r\n    },\r\n    btnIdentify: {\r\n        minWidth: \"40px !important\",\r\n        minHeight: \"40px !important\",\r\n    },\r\n    btnIdentifyImage: {\r\n        display: \"inline-block\",\r\n        border: \"none\",\r\n        outline: \"none\",\r\n        cursor: \"pointer\",\r\n        height: \"20px\"\r\n    }\r\n});\r\n\r\nconst BtnIdentifyView = ({\r\n    classes,\r\n    isOpen = false,\r\n    open\r\n}) => {\r\n    return (\r\n        <div className={classnames(classes.identify, { [classes.identifyActive]: isOpen })}>\r\n            <Tooltip title=\"แสดงรายละเอียดข้อมูล\" placement=\"left\">\r\n                <Button className={classes.btnIdentify} onClick={open}>\r\n                    <input\r\n                        type='image' alt=\"img\"\r\n                        src={`${process.env.PUBLIC_URL}/img/maptools/map_std_identified.png`}\r\n                        className={classes.btnIdentifyImage} />\r\n                </Button>\r\n            </Tooltip>\r\n        </div>\r\n    );\r\n}\r\n\r\nexport default withStyles(styles)(BtnIdentifyView);\r\n\r\n","import React from 'react';\r\nimport { bindActionCreators } from 'redux';\r\nimport { connect } from 'react-redux'\r\n\r\nimport * as MapFunction from '../../../../Map/MapFunctions';\r\nimport * as MapAction from '../../../../Actions/Web/Maps/MapAction';\r\nimport BtnIdentifyView from '../../../../Presentationals/Web/Maps/MapTools/BtnIdentifyView';\r\nconst Identify = ({\r\n    isOpen = false,\r\n    open,\r\n\r\n    //Action\r\n    mapAction\r\n}) => {\r\n\r\n    const clickMapIdentify = ({ map, event }) => {\r\n        MapFunction.IdentifyMapTool(map, event.mapPoint);\r\n    }\r\n\r\n    const handleOpen = async() => {\r\n        if (open) {\r\n            open();\r\n        }\r\n\r\n        if (!isOpen) {//bind event Identify\r\n            await mapAction.bindMapCommand(MapFunction.clearEvtDrawMap)\r\n            await mapAction.bindMapCommand(MapFunction.clearEditGraphic)\r\n            await mapAction.bindClearMapCommand()\r\n            mapAction.bindEvtClickMapIdentify(clickMapIdentify)\r\n        }\r\n    }\r\n    return <BtnIdentifyView isOpen={isOpen} open={handleOpen} />\r\n}\r\n\r\nconst mapActionToProps = dispatch => ({\r\n    mapAction: bindActionCreators(MapAction, dispatch)\r\n});\r\n\r\nexport default connect(null, mapActionToProps)(Identify);","import React from \"react\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport Divider from \"@material-ui/core/Divider\";\r\n// import CloseIcon from \"@material-ui/icons/Close\"\r\nimport Icon from '@material-ui/core/Icon';\r\nimport { withStyles } from \"@material-ui/core\";\r\nimport { RESOURCEWORDS } from '../../../../Constants/Constants';\r\nimport * as Constants from '../../../../Constants/Constants'\r\nimport Tooltip from '../../../../Controls/Containers/Tooltip'\r\n\r\nconst DrawGraphicView = props => {\r\n    const {\r\n        classes,\r\n        onCloseClick,\r\n        onPointModeClick,\r\n        onLineModeClick,\r\n        onPolygonModeClick,\r\n        onCircleModeClick,\r\n        onTextModeClick,\r\n        children,\r\n        drawModeActive\r\n    } = props;\r\n    return (\r\n        <div className={classes.root}>\r\n            <div className={classes.header}>\r\n                <div className={classes.divTextHDR}>\r\n                    <label>{RESOURCEWORDS.DRAW_GRAPHIC_HEADER}</label>\r\n                </div>\r\n                <Icon onClick={onCloseClick} className=\"icon\" style={{color:\"white\"}} >close-circle</Icon>\r\n            </div>\r\n            <Divider />\r\n            <div className={classes.divMode}>\r\n                <Tooltip title=\"ตำแหน่ง\" placement=\"top\">\r\n                    <div\r\n                        className={`${classes.btnDrawGraphicMode} \r\n                            ${drawModeActive ===  Constants.DRAW_GRAPHIC_MODE.point\r\n                                ? classes.btnPointSelected\r\n                                : classes.btnPointNormal\r\n                            }`}\r\n                        onClick={onPointModeClick}\r\n                    />\r\n                </Tooltip>\r\n                <Tooltip title=\"เส้น\" placement=\"top\">\r\n                    <div\r\n                        className={`${classes.btnDrawGraphicMode} \r\n                            ${drawModeActive ===  Constants.DRAW_GRAPHIC_MODE.line\r\n                                ? classes.btnLineSelected\r\n                                : classes.btnLineNormal\r\n                            }`}\r\n                        onClick={onLineModeClick}\r\n                    />\r\n                </Tooltip>\r\n                <Tooltip title=\"รูปหลายเหลี่ยม\" placement=\"top\">\r\n                    <div\r\n                        className={`${classes.btnDrawGraphicMode} \r\n                            ${drawModeActive ===  Constants.DRAW_GRAPHIC_MODE.polygon\r\n                                ? classes.btnPolygonSelected\r\n                                : classes.btnPolygonNormal\r\n                            }`}\r\n                        onClick={onPolygonModeClick}\r\n                    />\r\n                </Tooltip>\r\n                <Tooltip title=\"วงกลม\" placement=\"top\">\r\n                    <div\r\n                        className={`${classes.btnDrawGraphicMode} \r\n                            ${drawModeActive ===  Constants.DRAW_GRAPHIC_MODE.circle\r\n                                ? classes.btnCircleSelected\r\n                                : classes.btnCircleNormal\r\n                            }`}\r\n                        onClick={onCircleModeClick}\r\n                    />\r\n                </Tooltip>\r\n                <Tooltip title=\"ข้อความ\" placement=\"top\">\r\n                    <div\r\n                        className={`${classes.btnDrawGraphicMode} \r\n                            ${drawModeActive ===  Constants.DRAW_GRAPHIC_MODE.text\r\n                                ? classes.btnTextSelected\r\n                                : classes.btnTextNormal\r\n                            }`}\r\n                        onClick={onTextModeClick}\r\n                    />\r\n                </Tooltip>\r\n            </div>\r\n            <Divider />\r\n            {children}\r\n        </div>\r\n    );\r\n};\r\n\r\nDrawGraphicView.propTypes = {\r\n    classes: PropTypes.object.isRequired,\r\n    children: PropTypes.element,\r\n    onCloseClick: PropTypes.func,\r\n    onPointModeClick: PropTypes.func,\r\n    onLineModeClick: PropTypes.func,\r\n    onPolygonModeClick: PropTypes.func,\r\n    onCircleModeClick: PropTypes.func,\r\n    onTextModeClick: PropTypes.func,\r\n};\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        right: \"75px\",\r\n        width: \"290px\",\r\n        height: \"calc(100% - 250px)\",\r\n        zIndex: 2,\r\n        position: \"absolute\",\r\n        // top: \"180px\",\r\n        top: 'calc(50% - 240px)',\r\n        overflowY: \"hidden\",\r\n        overflowX: \"hidden\",\r\n        boxShadow: \"2px 2px 8px #888888\",\r\n        backgroundColor: \"#FFFFFF\",\r\n        padding: \"0px\",\r\n        borderColor: 'black',\r\n        borderStyle: \"solid\",\r\n        borderWidth: \"2px\",\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            display: 'none'\r\n        }\r\n    },\r\n    header: {\r\n        width: \"100%\",\r\n        // height: \"45px\",\r\n        backgroundColor: theme.mainTheme.color1,\r\n    },\r\n    divMode: {\r\n        border: \"1px solid #C8C8C8\",\r\n        borderRadius: '10px',\r\n        display: \"flex\",\r\n        justifyContent: \"center\",\r\n        margin: \"10px\",\r\n        backgroundColor: '#3c403c'\r\n    },\r\n    btnDrawGraphicMode: {\r\n        minWidth: \"40px\",\r\n        minHeight: \"40px\",\r\n        margin: \"5px\",\r\n        display: \"block\",\r\n        padding: 0,\r\n        backgroundSize: \"40px 40px\",\r\n        backgroundRepeat: \"no-repeat\",\r\n        backgroundPosition: \"center\"\r\n    },\r\n    btnPointNormal: {\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_std_07@2x.png)`,\r\n        \"&:Hover\": {\r\n            backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_std_07@2x.png)`,\r\n            border: \"1px solid #FFFFFF\",\r\n            boxSizing: 'border-box'\r\n        },\r\n        cursor: 'pointer'\r\n    },\r\n    btnPointSelected: {\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_std_07@2x.png)`,\r\n        cursor: 'pointer',\r\n        border: \"1px solid #FFFFFF\",\r\n        boxSizing: 'border-box'\r\n    },\r\n    btnLineNormal: {\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_std_05@2x.png)`,\r\n        \"&:Hover\": {\r\n            backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_std_05@2x.png)`,\r\n            border: \"1px solid #FFFFFF\",\r\n            boxSizing: 'border-box'\r\n        },\r\n        cursor: 'pointer'\r\n    },\r\n    btnLineSelected: {\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_std_05@2x.png)`,\r\n        cursor: 'pointer',\r\n        border: \"1px solid #FFFFFF\",\r\n        boxSizing: 'border-box'\r\n    },\r\n    btnPolygonNormal: {\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_std_06@2x.png)`,\r\n        \"&:Hover\": {\r\n            backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_std_06@2x.png)`,\r\n            border: \"1px solid #FFFFFF\",\r\n            boxSizing: 'border-box'\r\n        },\r\n        cursor: 'pointer'\r\n    },\r\n    btnPolygonSelected: {\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_std_06@2x.png)`,\r\n        border: \"1px solid #FFFFFF\",\r\n        cursor: 'pointer',\r\n        boxSizing: 'border-box'\r\n    },\r\n    btnCircleNormal: {\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_std_04@2x.png)`,\r\n        \"&:Hover\": {\r\n            backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_std_04@2x.png)`,\r\n            border: \"1px solid #FFFFFF\",\r\n            boxSizing: 'border-box'\r\n        },\r\n        cursor: 'pointer'\r\n    },\r\n    btnCircleSelected: {\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_std_04@2x.png)`,\r\n        cursor: 'pointer',\r\n        border: \"1px solid #FFFFFF\",\r\n        boxSizing: 'border-box'\r\n    },\r\n    btnTextNormal: {\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_std_11@2x.png)`,\r\n        \"&:Hover\": {\r\n            backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_std_11@2x.png)`,\r\n            border: \"1px solid #FFFFFF\",\r\n            boxSizing: 'border-box'\r\n        },\r\n        cursor: 'pointer'\r\n    },\r\n    btnTextSelected: {\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_std_11@2x.png)`,\r\n        cursor: 'pointer',\r\n        border: \"1px solid #FFFFFF\",\r\n        boxSizing: 'border-box'\r\n    },\r\n    divTextHDR: {\r\n        display: 'inline-block',\r\n        height: '100%',\r\n        width: '100%',\r\n        textAlign: 'left',\r\n        // lineHeight: '45px',\r\n        padding: '5px',\r\n        color: 'white',\r\n        fontWeight: 'bold'\r\n    },\r\n    iconCloseHDR: {\r\n        width: '28px',\r\n        height: '28px',\r\n        position: 'absolute',\r\n        right: '0px',\r\n        top: '0px',\r\n        color: 'white',\r\n        cursor: 'pointer'\r\n    },\r\n}))(DrawGraphicView);\r\n","import React, { Component } from 'react'\r\nimport { SketchPicker } from 'react-color'\r\n\r\nexport default class ColorPicker extends Component {\r\n\r\n    render() {\r\n        const { color, onChangeColor } = this.props;\r\n        return (\r\n            <div>\r\n                <SketchPicker \r\n                    color = { color }\r\n                    onChangeComplete = { onChangeColor }\r\n                />\r\n            </div>\r\n        )\r\n    }\r\n}\r\n","import React from \"react\";\r\nimport {Field} from 'redux-form';\r\nimport Scrollbar from 'react-custom-scrollbars';\r\n// import PropTypes from \"prop-types\";\r\n\r\n//import material ui\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\nimport Grid from '@material-ui/core/Grid';\r\nimport ExpansionPanel from '@material-ui/core/ExpansionPanel';\r\nimport ExpansionPanelDetails from '@material-ui/core/ExpansionPanelDetails';\r\nimport ExpansionPanelSummary from '@material-ui/core/ExpansionPanelSummary';\r\n// import Typography from '@material-ui/core/Typography';\r\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\r\n\r\n//import Control\r\nimport ColorPicker from '../../../../Controls/Containers/ColorPicker'\r\nimport TextField from '../../../../Controls/Containers/TextFieldRedux';\r\nimport SelectField from '../../../../Controls/Containers/SelectFieldRedux'\r\n// import SelectField from '../../../../../Controls/Containers/SelectField'\r\n\r\nconst DrawGraphicPointView = props => {\r\n    const {\r\n        classes,\r\n        datasource,\r\n        onChangeOutlineColor,       //when change color in outline color expansion\r\n        outlineColor,               //color outline for back to color picker (rgba)\r\n        outlineColorDisplay,        //color show on expasion ouline color\r\n        onChangeFillColor,          //when change color in color expansion\r\n        fillColor,                  //color fill for back to color picker (rgba)\r\n        fillColorDisplay,           //color show on expansion color\r\n    } = props;\r\n    return (\r\n        <div className={classes.root}>\r\n            <div className={classes.rootResult}>\r\n                <Scrollbar \r\n                    autoHeight\r\n                    autoHeightMin={10}\r\n                    autoHeightMax={window.innerHeight - 450}\r\n                    autoHide={true}\r\n                >\r\n                    <div className={classes.divSpace} />\r\n                    <Field \r\n                        name=\"style\"\r\n                        component={SelectField}\r\n                        label=\"Style\"\r\n                        dataProps={datasource}\r\n                        required\r\n                    />\r\n                        {/* {datasource} */}\r\n                    {/* </Field> */}\r\n                    <Field \r\n                        name='size'\r\n                        component={TextField}\r\n                        label=\"Size\"\r\n                        type=\"number\"\r\n                    />\r\n                    <Grid container justify=\"center\">\r\n                        <ExpansionPanel classes={{ root: classes.rootExpansionPanel }}>\r\n                            <ExpansionPanelSummary expandIcon={<ExpandMoreIcon style={{color: '#FFFFFF'}}/>} \r\n                                // className={ classes.expansionPanelSummary }\r\n                                style={{backgroundColor: `${outlineColorDisplay}`}}\r\n                                classes={{\r\n                                    root: classes.rootExpandPanel,\r\n                                    expanded: classes.rootExpandPanel_expanded,\r\n                                }}\r\n                            >\r\n                                <div className={classes.divTitleText}>\r\n                                    สีเส้นขอบ\r\n                                </div>\r\n                            </ExpansionPanelSummary>\r\n                            <ExpansionPanelDetails classes={{\r\n                                // root: classes.rootExpansionPanelDetails\r\n                            }}>\r\n                                <ColorPicker onChangeColor = { onChangeOutlineColor } color = { outlineColor } />\r\n                            </ExpansionPanelDetails>\r\n                        </ExpansionPanel>\r\n\r\n                        <div className={classes.divSpace} />\r\n\r\n                        <ExpansionPanel classes={{ root: classes.rootExpansionPanel }}>\r\n                            <ExpansionPanelSummary expandIcon={<ExpandMoreIcon style={{color: '#FFFFFF'}}/>} \r\n                                // className={ classes.expansionPanelSummary }\r\n                                style={{backgroundColor: `${fillColorDisplay}`}}\r\n                                classes={{\r\n                                    root: classes.rootExpandPanel,\r\n                                    expanded: classes.rootExpandPanel_expanded,\r\n                                }}\r\n                            >\r\n                                <div className={classes.divTitleText}>\r\n                                    สีกราฟฟิค\r\n                                </div>\r\n                            </ExpansionPanelSummary>\r\n                            <ExpansionPanelDetails classes={{\r\n                                // root: classes.rootExpansionPanelDetails\r\n                            }}>\r\n                                <ColorPicker onChangeColor = { onChangeFillColor } color = { fillColor } />\r\n                            </ExpansionPanelDetails>\r\n                        </ExpansionPanel>\r\n                    </Grid>\r\n                    \r\n                    <div className={classes.divSpace} />\r\n                </Scrollbar>\r\n            </div>\r\n        </div>\r\n    );\r\n};\r\n\r\nDrawGraphicPointView.propTypes = {\r\n    // classes: PropTypes.object.isRequired,\r\n    // value: PropTypes.string,\r\n    // labelName: PropTypes.string,\r\n    // datasource: PropTypes.arrayOf(\r\n    //     PropTypes.shape({\r\n    //         name: PropTypes.string,\r\n    //         value: PropTypes.string\r\n    //     })\r\n    // ),\r\n    // onChange: PropTypes.func\r\n};\r\nDrawGraphicPointView.defaultProps = {\r\n    // result: \"0.00\",\r\n    // value: \"\",\r\n    // labelName: \"หน่วย\",\r\n    // datasource: []\r\n};\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        display: \"flex\",\r\n        flexWrap: \"wrap\",\r\n        margin: \"0px 20px 0px 20px\",\r\n        padding: \"0px\"\r\n    },\r\n    divTitleText: {\r\n        height: '45px',\r\n        color: '#FFFFFF'\r\n    },\r\n    rootExpansionPanel: {\r\n        width: '100%',\r\n        boxShadow: 'unset !important',\r\n        marginBottom: 0,\r\n        marginTop: 0 \r\n    },\r\n    rootResult: {\r\n        marginTop: '15px',\r\n        width:'100%'\r\n    },\r\n    rootExpandPanel: {\r\n        minHeight: '45px  !important',\r\n        height: '45px !important',\r\n        lineHeight: '45px !important',\r\n    },\r\n    rootExpandPanel_expanded: {\r\n        minHeight: '45px !important',\r\n        height: '45px !important',\r\n        lineHeight: '45px  !important'\r\n    },\r\n    divSpace: {\r\n        width: '50px',\r\n        height: '20px'\r\n    },\r\n    expansionPanel: {\r\n        width: '100%'\r\n    },\r\n    expansionPanelSummary: {\r\n        borderRadius: '50px'\r\n    },\r\n    rootExpansionPanelDetails: {\r\n        padding: '0px',\r\n        margin: '15px'\r\n    },\r\n}))(DrawGraphicPointView);\r\n","import React from \"react\";\r\nimport {Field} from 'redux-form';\r\n// import PropTypes from \"prop-types\";\r\nimport Scrollbar from 'react-custom-scrollbars';\r\n\r\n//import material ui\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\nimport Grid from '@material-ui/core/Grid';\r\nimport ExpansionPanel from '@material-ui/core/ExpansionPanel';\r\nimport ExpansionPanelDetails from '@material-ui/core/ExpansionPanelDetails';\r\nimport ExpansionPanelSummary from '@material-ui/core/ExpansionPanelSummary';\r\n// import Typography from '@material-ui/core/Typography';\r\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\r\n\r\n//import Control\r\nimport ColorPicker from '../../../../Controls/Containers/ColorPicker'\r\nimport TextField from '../../../../Controls/Containers/TextFieldRedux';\r\nimport SelectField from '../../../../Controls/Containers/SelectFieldRedux'\r\n\r\nconst DrawGraphicLineView = props => {\r\n    const {\r\n        classes,\r\n        datasource,\r\n        onChangeOutlineColor,       //when change color in outline color expansion\r\n        outlineColor,               //color outline for back to color picker (rgba)\r\n        outlineColorDisplay,        //color show on expasion ouline color\r\n        // onChangeFillColor,          //when change color in color expansion\r\n        // fillColor,                  //color fill for back to color picker (rgba)\r\n        // fillColorDisplay,           //color show on expansion color\r\n    } = props;\r\n\r\n    return (\r\n        <div className={classes.root}>\r\n            <div className={classes.rootResult}>\r\n                <Scrollbar \r\n                    autoHeight\r\n                    autoHeightMin={10}\r\n                    autoHeightMax={window.innerHeight - 450}\r\n                    autoHide={true}\r\n                >\r\n                    <div className={classes.divSpace} />\r\n                    <Grid container justify=\"center\">\r\n                        <Field \r\n                            name=\"style\"\r\n                            component={SelectField}\r\n                            label=\"Style\"\r\n                            dataProps={datasource}\r\n                            required\r\n                        >\r\n                            {/* {datasource} */}\r\n                        </Field>\r\n                        <Field \r\n                            name='width'\r\n                            component={TextField}\r\n                            label=\"Width\"\r\n                            type=\"number\"\r\n                        />\r\n                        <Grid container justify=\"center\">\r\n                            <ExpansionPanel classes={{ root: classes.rootExpansionPanel }}>\r\n                                <ExpansionPanelSummary expandIcon={<ExpandMoreIcon style={{color: '#FFFFFF'}}/>} \r\n                                    // className={ classes.expansionPanelSummary }\r\n                                    style={{backgroundColor: `${outlineColorDisplay}`}}\r\n                                    classes={{\r\n                                        root: classes.rootExpandPanel,\r\n                                        expanded: classes.rootExpandPanel_expanded,\r\n                                    }}\r\n                                >\r\n                                    <div className={classes.divTitleText}>\r\n                                        สีเส้นขอบ\r\n                                    </div>\r\n                                </ExpansionPanelSummary>\r\n                                <ExpansionPanelDetails classes={{\r\n                                    // root: classes.rootExpansionPanelDetails\r\n                                }}>\r\n                                    <ColorPicker onChangeColor = { onChangeOutlineColor } color = { outlineColor } />\r\n                                </ExpansionPanelDetails>\r\n                            </ExpansionPanel>\r\n                        </Grid>\r\n                    </Grid>\r\n                    <div className={classes.divSpace} />\r\n                </Scrollbar>\r\n            </div>\r\n        </div>\r\n    );\r\n};\r\n\r\nDrawGraphicLineView.propTypes = {\r\n    // classes: PropTypes.object.isRequired,\r\n    // value: PropTypes.string,\r\n    // labelName: PropTypes.string,\r\n    // datasource: PropTypes.arrayOf(\r\n    //     PropTypes.shape({\r\n    //         name: PropTypes.string,\r\n    //         value: PropTypes.string\r\n    //     })\r\n    // ),\r\n    // onChange: PropTypes.func\r\n};\r\nDrawGraphicLineView.defaultProps = {\r\n    // result: \"0.00\",\r\n    // value: \"\",\r\n    // labelName: \"หน่วย\",\r\n    // datasource: []\r\n};\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        display: \"flex\",\r\n        flexWrap: \"wrap\",\r\n        margin: \"0px 20px 0px 20px\",\r\n        padding: \"0px\"\r\n    },\r\n    divTitleText: {\r\n        height: '45px',\r\n        color: '#FFFFFF'\r\n    },\r\n    rootExpansionPanel: {\r\n        width: '100%',\r\n        boxShadow: 'unset !important',\r\n        marginBottom: 0,\r\n        marginTop: 0 \r\n    },\r\n    rootResult: {\r\n        marginTop: '15px',\r\n        width:'100%'\r\n    },\r\n    rootExpandPanel: {\r\n        minHeight: '45px  !important',\r\n        height: '45px !important',\r\n        lineHeight: '45px !important',\r\n    },\r\n    rootExpandPanel_expanded: {\r\n        minHeight: '45px !important',\r\n        height: '45px !important',\r\n        lineHeight: '45px  !important'\r\n    },\r\n    divSpace: {\r\n        width: '50px',\r\n        height: '20px'\r\n    },\r\n    expansionPanel: {\r\n        width: '100%'\r\n    },\r\n    expansionPanelSummary: {\r\n        borderRadius: '50px'\r\n    },\r\n    rootExpansionPanelDetails: {\r\n        padding: '0px',\r\n        margin: '15px'\r\n    },\r\n}))(DrawGraphicLineView);\r\n","import React, { Fragment } from \"react\";\r\nimport {Field} from 'redux-form';\r\n// import PropTypes from \"prop-types\";\r\nimport Scrollbar from 'react-custom-scrollbars';\r\n\r\n\r\n//import material ui\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\nimport Grid from '@material-ui/core/Grid';\r\nimport ExpansionPanel from '@material-ui/core/ExpansionPanel';\r\nimport ExpansionPanelDetails from '@material-ui/core/ExpansionPanelDetails';\r\nimport ExpansionPanelSummary from '@material-ui/core/ExpansionPanelSummary';\r\n// import Typography from '@material-ui/core/Typography';\r\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\r\n\r\n//import Control\r\nimport ColorPicker from '../../../../Controls/Containers/ColorPicker'\r\n// import TextField from '../../../../Controls/Containers/TextFieldRedux';\r\nimport SelectField from '../../../../Controls/Containers/SelectFieldRedux'\r\n\r\nconst DrawGraphicPolygonView = props => {\r\n    const {\r\n        classes,\r\n        datasource,\r\n        onChangeOutlineColor,       //when change color in outline color expansion\r\n        outlineColor,               //color outline for back to color picker (rgba)\r\n        outlineColorDisplay,        //color show on expasion ouline color\r\n        onChangeFillColor,          //when change color in color expansion\r\n        fillColor,                  //color fill for back to color picker (rgba)\r\n        fillColorDisplay,           //color show on expansion color\r\n        style\r\n    } = props;\r\n    \r\n    return (\r\n        <div className={classes.root}>\r\n            <div className={classes.rootResult}>\r\n                <Scrollbar \r\n                    autoHeight\r\n                    autoHeightMin={10}\r\n                    autoHeightMax={window.innerHeight - 450}\r\n                    autoHide={true}\r\n                >\r\n                    <div className={classes.divSpace} />\r\n                    <Grid container justify=\"center\">\r\n                        <Field \r\n                            name=\"style\"\r\n                            component={SelectField}\r\n                            label=\"Style\"\r\n                            dataProps={datasource}\r\n                            required\r\n                        >\r\n                            {/* {datasource} */}\r\n                        </Field>\r\n                        <Grid container justify=\"center\">\r\n                            <ExpansionPanel classes={{ root: classes.rootExpansionPanel }}>\r\n                                <ExpansionPanelSummary expandIcon={<ExpandMoreIcon style={{color: '#FFFFFF'}}/>} \r\n                                    // className={ classes.expansionPanelSummary }\r\n                                    style={{backgroundColor: `${outlineColorDisplay}`}}\r\n                                    classes={{\r\n                                        root: classes.rootExpandPanel,\r\n                                        expanded: classes.rootExpandPanel_expanded,\r\n                                    }}\r\n                                >\r\n                                    <div className={classes.divTitleText}>\r\n                                        สีเส้นขอบ\r\n                                    </div>\r\n                                </ExpansionPanelSummary>\r\n                                <ExpansionPanelDetails classes={{\r\n                                    // root: classes.rootExpansionPanelDetails\r\n                                }}>\r\n                                    <ColorPicker onChangeColor = { onChangeOutlineColor } color = { outlineColor } />\r\n                                </ExpansionPanelDetails>\r\n                            </ExpansionPanel>\r\n\r\n                           {style === 1 && \r\n                           <Fragment>\r\n                           <div className={classes.divSpace} />\r\n\r\n                            <ExpansionPanel classes={{ root: classes.rootExpansionPanel }}>\r\n                                <ExpansionPanelSummary expandIcon={<ExpandMoreIcon style={{color: '#FFFFFF'}}/>} \r\n                                    // className={ classes.expansionPanelSummary }\r\n                                    style={{backgroundColor: `${fillColorDisplay}`}}\r\n                                    classes={{\r\n                                        root: classes.rootExpandPanel,\r\n                                        expanded: classes.rootExpandPanel_expanded,\r\n                                    }}\r\n                                >\r\n                                    <div className={classes.divTitleText}>\r\n                                        สีกราฟฟิค\r\n                                    </div>\r\n                                </ExpansionPanelSummary>\r\n                                <ExpansionPanelDetails classes={{\r\n                                    // root: classes.rootExpansionPanelDetails\r\n                                }}>\r\n                                    <ColorPicker onChangeColor = { onChangeFillColor } color = { fillColor } />\r\n                                </ExpansionPanelDetails>\r\n                            </ExpansionPanel>\r\n                            </Fragment>}\r\n                        </Grid>\r\n                    </Grid>\r\n                    <div className={classes.divSpace} />\r\n                </Scrollbar>\r\n            </div>\r\n        </div>\r\n    );\r\n};\r\n\r\nDrawGraphicPolygonView.propTypes = {\r\n    // classes: PropTypes.object.isRequired,\r\n    // value: PropTypes.string,\r\n    // labelName: PropTypes.string,\r\n    // datasource: PropTypes.arrayOf(\r\n    //     PropTypes.shape({\r\n    //         name: PropTypes.string,\r\n    //         value: PropTypes.string\r\n    //     })\r\n    // ),\r\n    // onChange: PropTypes.func\r\n};\r\nDrawGraphicPolygonView.defaultProps = {\r\n    // result: \"0.00\",\r\n    // value: \"\",\r\n    // labelName: \"หน่วย\",\r\n    // datasource: []\r\n};\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        display: \"flex\",\r\n        flexWrap: \"wrap\",\r\n        margin: \"0px 20px 0px 20px\",\r\n        padding: \"0px\"\r\n    },\r\n    divTitleText: {\r\n        height: '45px',\r\n        color: '#FFFFFF'\r\n    },\r\n    rootExpansionPanel: {\r\n        width: '100%',\r\n        boxShadow: 'unset !important',\r\n        marginBottom: 0,\r\n        marginTop: 0 \r\n    },\r\n    rootResult: {\r\n        marginTop: '15px',\r\n        width:'100%'\r\n    },\r\n    rootExpandPanel: {\r\n        minHeight: '45px  !important',\r\n        height: '45px !important',\r\n        lineHeight: '45px !important',\r\n    },\r\n    rootExpandPanel_expanded: {\r\n        minHeight: '45px !important',\r\n        height: '45px !important',\r\n        lineHeight: '45px  !important'\r\n    },\r\n    divSpace: {\r\n        width: '50px',\r\n        height: '20px'\r\n    },\r\n    expansionPanel: {\r\n        width: '100%'\r\n    },\r\n    expansionPanelSummary: {\r\n        borderRadius: '50px'\r\n    },\r\n    rootExpansionPanelDetails: {\r\n        padding: '0px',\r\n        margin: '15px'\r\n    },\r\n}))(DrawGraphicPolygonView);\r\n","import React, {Fragment} from \"react\";\r\nimport {Field} from 'redux-form';\r\n// import PropTypes from \"prop-types\";\r\nimport Scrollbar from 'react-custom-scrollbars';\r\n\r\n//import material ui\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\nimport Grid from '@material-ui/core/Grid';\r\nimport ExpansionPanel from '@material-ui/core/ExpansionPanel';\r\nimport ExpansionPanelDetails from '@material-ui/core/ExpansionPanelDetails';\r\nimport ExpansionPanelSummary from '@material-ui/core/ExpansionPanelSummary';\r\n// import Typography from '@material-ui/core/Typography';\r\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\r\n\r\n//import Control\r\nimport ColorPicker from '../../../../Controls/Containers/ColorPicker'\r\n// import TextField from '../../../../Controls/Containers/TextFieldRedux';\r\nimport SelectField from '../../../../Controls/Containers/SelectFieldRedux'\r\n\r\nconst DrawGraphicCircleView = props => {\r\n    const {\r\n        classes,\r\n        datasource,\r\n        onChangeOutlineColor,       //when change color in outline color expansion\r\n        outlineColor,               //color outline for back to color picker (rgba)\r\n        outlineColorDisplay,        //color show on expasion ouline color\r\n        onChangeFillColor,          //when change color in color expansion\r\n        fillColor,                  //color fill for back to color picker (rgba)\r\n        fillColorDisplay,           //color show on expansion color\r\n        style\r\n    } = props;\r\n\r\n    return (\r\n        <div className={classes.root}>\r\n            <div className={classes.rootResult}>\r\n                <Scrollbar \r\n                    autoHeight\r\n                    autoHeightMin={10}\r\n                    autoHeightMax={window.innerHeight - 450}\r\n                    autoHide={true}\r\n                >\r\n                    <div className={classes.divSpace} />\r\n                    <Grid container justify=\"center\">\r\n                        <Field \r\n                            name=\"style\"\r\n                            component={SelectField}\r\n                            label=\"Style\"\r\n                            dataProps={datasource}\r\n                            required\r\n                        >\r\n                            {/* {datasource} */}\r\n                        </Field>\r\n                        <Grid container justify=\"center\">\r\n                            <ExpansionPanel classes={{ root: classes.rootExpansionPanel }}>\r\n                                <ExpansionPanelSummary expandIcon={<ExpandMoreIcon style={{color: '#FFFFFF'}}/>} \r\n                                    // className={ classes.expansionPanelSummary }\r\n                                    style={{backgroundColor: `${outlineColorDisplay}`}}\r\n                                    classes={{\r\n                                        root: classes.rootExpandPanel,\r\n                                        expanded: classes.rootExpandPanel_expanded,\r\n                                    }}\r\n                                >\r\n                                    <div className={classes.divTitleText}>\r\n                                        สีเส้นขอบ\r\n                                    </div>\r\n                                </ExpansionPanelSummary>\r\n                                <ExpansionPanelDetails classes={{\r\n                                    // root: classes.rootExpansionPanelDetails\r\n                                }}>\r\n                                    <ColorPicker onChangeColor = { onChangeOutlineColor } color = { outlineColor } />\r\n                                </ExpansionPanelDetails>\r\n                            </ExpansionPanel>\r\n\r\n                           {style === 1 && \r\n                           <Fragment>\r\n                           <div className={classes.divSpace} />\r\n\r\n                            <ExpansionPanel classes={{ root: classes.rootExpansionPanel }}>\r\n                                <ExpansionPanelSummary expandIcon={<ExpandMoreIcon style={{color: '#FFFFFF'}}/>} \r\n                                    // className={ classes.expansionPanelSummary }\r\n                                    style={{backgroundColor: `${fillColorDisplay}`}}\r\n                                    classes={{\r\n                                        root: classes.rootExpandPanel,\r\n                                        expanded: classes.rootExpandPanel_expanded,\r\n                                    }}\r\n                                >\r\n                                    <div className={classes.divTitleText}>\r\n                                        สีกราฟฟิค\r\n                                    </div>\r\n                                </ExpansionPanelSummary>\r\n                                <ExpansionPanelDetails classes={{\r\n                                    // root: classes.rootExpansionPanelDetails\r\n                                }}>\r\n                                    <ColorPicker onChangeColor = { onChangeFillColor } color = { fillColor } />\r\n                                </ExpansionPanelDetails>\r\n                            </ExpansionPanel>\r\n                            </Fragment>}\r\n                        </Grid>\r\n                    </Grid>\r\n                    <div className={classes.divSpace} />\r\n                </Scrollbar>\r\n            </div>\r\n        </div>\r\n    );\r\n};\r\n\r\nDrawGraphicCircleView.propTypes = {\r\n    // classes: PropTypes.object.isRequired,\r\n    // value: PropTypes.string,\r\n    // labelName: PropTypes.string,\r\n    // datasource: PropTypes.arrayOf(\r\n    //     PropTypes.shape({\r\n    //         name: PropTypes.string,\r\n    //         value: PropTypes.string\r\n    //     })\r\n    // ),\r\n    // onChange: PropTypes.func\r\n};\r\nDrawGraphicCircleView.defaultProps = {\r\n    // result: \"0.00\",\r\n    // value: \"\",\r\n    // labelName: \"หน่วย\",\r\n    // datasource: []\r\n};\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        display: \"flex\",\r\n        flexWrap: \"wrap\",\r\n        margin: \"0px 20px 0px 20px\",\r\n        padding: \"0px\"\r\n    },\r\n    divTitleText: {\r\n        height: '45px',\r\n        color: '#FFFFFF'\r\n    },\r\n    rootExpansionPanel: {\r\n        width: '100%',\r\n        boxShadow: 'unset !important',\r\n        marginBottom: 0,\r\n        marginTop: 0 \r\n    },\r\n    rootResult: {\r\n        marginTop: '15px',\r\n        width:'100%'\r\n    },\r\n    rootExpandPanel: {\r\n        minHeight: '45px  !important',\r\n        height: '45px !important',\r\n        lineHeight: '45px !important',\r\n    },\r\n    rootExpandPanel_expanded: {\r\n        minHeight: '45px !important',\r\n        height: '45px !important',\r\n        lineHeight: '45px  !important'\r\n    },\r\n    divSpace: {\r\n        width: '50px',\r\n        height: '20px'\r\n    },\r\n    expansionPanel: {\r\n        width: '100%'\r\n    },\r\n    expansionPanelSummary: {\r\n        borderRadius: '50px'\r\n    },\r\n    rootExpansionPanelDetails: {\r\n        padding: '0px',\r\n        margin: '15px'\r\n    },\r\n}))(DrawGraphicCircleView);\r\n","import React from \"react\";\r\nimport {Field} from 'redux-form';\r\n// import PropTypes from \"prop-types\";\r\nimport Scrollbar from 'react-custom-scrollbars';\r\n\r\n//import material ui\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\nimport Grid from '@material-ui/core/Grid';\r\nimport ExpansionPanel from '@material-ui/core/ExpansionPanel';\r\nimport ExpansionPanelDetails from '@material-ui/core/ExpansionPanelDetails';\r\nimport ExpansionPanelSummary from '@material-ui/core/ExpansionPanelSummary';\r\n// import Typography from '@material-ui/core/Typography';\r\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\r\n\r\n//import Control\r\nimport ColorPicker from '../../../../Controls/Containers/ColorPicker'\r\nimport TextField from '../../../../Controls/Containers/TextFieldRedux';\r\nimport SelectField from '../../../../Controls/Containers/SelectFieldRedux'\r\n\r\nconst DrawGraphicTextView = props => {\r\n    const {\r\n        datasource,\r\n        classes,\r\n        onChangeFillColor,          //when change color in color expansion\r\n        fillColor,                  //color fill for back to color picker (rgba)\r\n        fillColorDisplay,           //color show on expansion color\r\n    } = props;\r\n\r\n    return (\r\n        <div className={classes.root}>\r\n            <div className={classes.rootResult}>\r\n                <Scrollbar \r\n                    autoHeight\r\n                    autoHeightMin={10}\r\n                    autoHeightMax={window.innerHeight - 450}\r\n                    autoHide={true}\r\n                >\r\n                    <div className={classes.divSpace} />\r\n                    <Grid container justify=\"center\">\r\n                        <Field \r\n                            name='text'\r\n                            component={TextField}\r\n                            label=\"Text\"\r\n                        />\r\n                        <Field \r\n                            name=\"font\"\r\n                            component={SelectField}\r\n                            label=\"Font\"\r\n                            dataProps={datasource}\r\n                            required\r\n                        >\r\n                            {/* {datasource} */}\r\n                        </Field>\r\n                         <Field \r\n                            name='size'\r\n                            component={TextField}\r\n                            label=\"Size\"\r\n                            type=\"number\"\r\n                        />\r\n                        <Grid container justify=\"center\">\r\n                            <ExpansionPanel classes={{ root: classes.rootExpansionPanel }}>\r\n                                <ExpansionPanelSummary expandIcon={<ExpandMoreIcon style={{color: '#FFFFFF'}}/>} \r\n                                    // className={ classes.expansionPanelSummary }\r\n                                    style={{backgroundColor: `${fillColorDisplay}`}}\r\n                                    classes={{\r\n                                        root: classes.rootExpandPanel,\r\n                                        expanded: classes.rootExpandPanel_expanded,\r\n                                    }}\r\n                                >\r\n                                    <div className={classes.divTitleText}>\r\n                                        สีตัวอักษร\r\n                                    </div>\r\n                                </ExpansionPanelSummary>\r\n                                <ExpansionPanelDetails classes={{\r\n                                    // root: classes.rootExpansionPanelDetails\r\n                                }}>\r\n                                    <ColorPicker onChangeColor = { onChangeFillColor } color = { fillColor } />\r\n                                </ExpansionPanelDetails>\r\n                            </ExpansionPanel>\r\n                        </Grid>\r\n                    </Grid>\r\n                    <div className={classes.divSpace} />\r\n                </Scrollbar>\r\n            </div>\r\n        </div>\r\n    );\r\n};\r\n\r\nDrawGraphicTextView.propTypes = {\r\n    // classes: PropTypes.object.isRequired,\r\n    // value: PropTypes.string,\r\n    // labelName: PropTypes.string,\r\n    // datasource: PropTypes.arrayOf(\r\n    //     PropTypes.shape({\r\n    //         name: PropTypes.string,\r\n    //         value: PropTypes.string\r\n    //     })\r\n    // ),\r\n    // onChange: PropTypes.func\r\n};\r\nDrawGraphicTextView.defaultProps = {\r\n    // result: \"0.00\",\r\n    // value: \"\",\r\n    // labelName: \"หน่วย\",\r\n    // datasource: []\r\n};\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        display: \"flex\",\r\n        flexWrap: \"wrap\",\r\n        margin: \"0px 20px 0px 20px\",\r\n        padding: \"0px\"\r\n    },\r\n    divTitleText: {\r\n        height: '45px',\r\n        color: '#FFFFFF'\r\n    },\r\n    rootExpansionPanel: {\r\n        width: '100%',\r\n        boxShadow: 'unset !important',\r\n        marginBottom: 0,\r\n        marginTop: 0 \r\n    },\r\n    rootResult: {\r\n        marginTop: '15px',\r\n        width:'100%'\r\n    },\r\n    rootExpandPanel: {\r\n        minHeight: '45px  !important',\r\n        height: '45px !important',\r\n        lineHeight: '45px !important',\r\n    },\r\n    rootExpandPanel_expanded: {\r\n        minHeight: '45px !important',\r\n        height: '45px !important',\r\n        lineHeight: '45px  !important'\r\n    },\r\n    divSpace: {\r\n        width: '50px',\r\n        height: '20px'\r\n    },\r\n    expansionPanel: {\r\n        width: '100%'\r\n    },\r\n    expansionPanelSummary: {\r\n        borderRadius: '50px'\r\n    },\r\n    rootExpansionPanelDetails: {\r\n        padding: '0px',\r\n        margin: '15px'\r\n    },\r\n}))(DrawGraphicTextView);\r\n","import React, { Fragment } from 'react'\r\nimport { withStyles } from \"@material-ui/core\";\r\nimport Grid from '@material-ui/core/Grid';\r\n\r\nconst DrawGraphicNotSelectModeView = (props) => {\r\n    const {\r\n        classes\r\n    } = props;\r\n\r\n    return (\r\n        <Fragment>\r\n            <Grid container justify='center' className={classes.selectMode}>\r\n                <Grid item>\r\n                    กรุณาเลือกโหมดการใช้งาน\r\n                </Grid>\r\n            </Grid>\r\n        </Fragment>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    selectMode: {\r\n        fontSize: '18px'\r\n    }\r\n}))(DrawGraphicNotSelectModeView)","import React, { Component, Fragment } from 'react'\r\nimport { reduxForm, formValueSelector } from 'redux-form'\r\nimport { compose } from \"recompose\"\r\nimport { connect } from \"react-redux\";\r\nimport { bindActionCreators } from \"redux\";\r\n\r\n//import Action\r\nimport * as MapAction from '../../../../Actions/Web/Maps/MapAction'\r\nimport * as MapFunctions from '../../../../Map/MapFunctions';\r\n\r\n//import Constants\r\nimport * as Constants from '../../../../Constants/Constants'\r\n\r\n//import View\r\nimport DrawGraphicView from '../../../../Presentationals/Web/Maps/DrawGraphic/DrawGraphicView'\r\nimport DrawGraphicPointView from '../../../../Presentationals/Web/Maps/DrawGraphic/DrawGraphicPointView'\r\nimport DrawGraphicLineView from '../../../../Presentationals/Web/Maps/DrawGraphic/DrawGraphicLineView'\r\nimport DrawGraphicPolygonView from '../../../../Presentationals/Web/Maps/DrawGraphic/DrawGraphicPolygonView'\r\nimport DrawGraphicCircleView from '../../../../Presentationals/Web/Maps/DrawGraphic/DrawGraphicCircleView'\r\nimport DrawGraphicTextView from '../../../../Presentationals/Web/Maps/DrawGraphic/DrawGraphicTextView'\r\nimport DrawGraphicNotSelectModeView from '../../../../Presentationals/Web/Maps/DrawGraphic/DrawGraphicNotSelectModeView'\r\nimport * as MenuAction from \"../../../../Actions/Web/MenuAction\";\r\n\r\n//import Material UI\r\nimport MenuItem from '@material-ui/core/MenuItem';\r\n\r\nconst mode = Constants.DRAW_GRAPHIC_MODE;\r\n\r\nconst initialColor = { // initial color graphic\r\n    rgb: { r: 255, g: 0, b: 0, a: 1 },\r\n    hex: '#FF0000'\r\n}\r\n\r\nconst makeDatasource = (data, type) => {\r\n    let listData = [];\r\n    data.forEach(itm => {\r\n        listData.push(\r\n            <MenuItem key={itm.id} value={itm.id}\r\n                style={{\r\n                    backgroundImage: `url(${process.env.PUBLIC_URL}/img/styleDrawGraphic/${type}/${itm.name}.PNG`,\r\n                    backgroundSize: 'contain',\r\n                    backgroundRepeat: 'no-repeat',\r\n                    backgroundPosition: 'left'\r\n                }}>\r\n                {itm.name}\r\n                {/* <p style={{right: '15px', position: 'absolute', bottom: '-5px'}}>{itm.name}</p> */}\r\n                {/* <img src={`url(${process.env.PUBLIC_URL}/img/styleDrawGraphic/${type}/${itm.name}.PNG`} alt={'tile'} /> */}\r\n            </MenuItem>\r\n        )\r\n    })\r\n\r\n    return listData;\r\n}\r\n\r\nconst makeDataFont = (data) => {\r\n    let listData = [];\r\n    data.forEach(itm => {\r\n        listData.push(\r\n            <MenuItem key={itm.id} value={itm.id} style={{ fontFamily: `${itm.name}` }}>\r\n                {itm.name}\r\n            </MenuItem>\r\n        )\r\n    })\r\n\r\n    return listData\r\n}\r\n\r\nexport class DrawGraphic extends Component {\r\n\r\n    constructor() {\r\n        super();\r\n\r\n        this.state = {\r\n            drawModeActive: null, // initial draw graphic\r\n            outlineColor: initialColor, // initial graphic color\r\n            color: initialColor\r\n        }\r\n    }\r\n\r\n    componentDidMount = async () => {\r\n        const { change, MapAction } = this.props;\r\n        await MapAction.bindMapCommand(MapFunctions.clearEditGraphic)\r\n        await MapAction.bindMapCommand(MapFunctions.clearEvtDrawMap)\r\n        change('style', 1)\r\n        change('size', 15)\r\n    }\r\n\r\n    componentWillUnmount = () => {\r\n        // const { closeFormDrawGraphic } = this.props;\r\n        // closeFormDrawGraphic();\r\n        this.handleDrawGraphic('close')\r\n    }\r\n\r\n    handleCloseClick = async (evt) => {\r\n        evt.stopPropagation();\r\n        const { closeFormDrawGraphic } = this.props;\r\n        // this.handleDrawGraphic('close')\r\n\r\n        if (closeFormDrawGraphic) {\r\n            closeFormDrawGraphic();\r\n        }\r\n    }\r\n\r\n    handlePointModeClick = () => {\r\n        const { drawModeActive } = this.state;\r\n        const { change } = this.props;\r\n        this.handleDrawGraphic(mode.point);\r\n\r\n        if (drawModeActive !== mode.point) {\r\n            change('style', 1)\r\n            change('size', 7)\r\n            this.setState({\r\n                drawModeActive: mode.point\r\n            })\r\n        }\r\n    }\r\n\r\n    handleLineModeClick = () => {\r\n        const { drawModeActive } = this.state;\r\n        const { change } = this.props;\r\n        this.handleDrawGraphic(mode.line);\r\n\r\n        if (drawModeActive !== mode.line) {\r\n            change('style', 1)\r\n            change('width', 3)\r\n            this.setState({\r\n                drawModeActive: mode.line\r\n            })\r\n        }\r\n    }\r\n\r\n    handlePolygonModeClick = () => {\r\n        const { drawModeActive } = this.state;\r\n        const { change } = this.props;\r\n        this.handleDrawGraphic(mode.polygon);\r\n\r\n        if (drawModeActive !== mode.polygon) {\r\n            change('style', 1)\r\n            this.setState({\r\n                drawModeActive: mode.polygon\r\n            })\r\n        }\r\n    }\r\n\r\n    handleCircleModeClick = () => {\r\n        const { drawModeActive } = this.state;\r\n        const { change } = this.props;\r\n        this.handleDrawGraphic(mode.circle);\r\n\r\n        if (drawModeActive !== mode.circle) {\r\n            change('style', 1)\r\n            this.setState({\r\n                drawModeActive: mode.circle\r\n            })\r\n        }\r\n    }\r\n\r\n    handleTextModeClick = () => {\r\n        const { drawModeActive } = this.state;\r\n        const { change } = this.props;\r\n        this.handleDrawGraphic(mode.text)\r\n\r\n        if (drawModeActive !== mode.text) {\r\n            change('text', \"\")\r\n            change('font', 1)\r\n            change('size', 20)\r\n            this.setState({\r\n                drawModeActive: mode.text\r\n            })\r\n        }\r\n    }\r\n\r\n    handleDrawGraphic = async (type) => {\r\n        const { MapAction } = this.props;\r\n        await MapAction.bindClearMapCommand();\r\n        await MapAction.bindEvtEnableDrawGraphic();\r\n        await MapAction.bindMapCommand(MapFunctions.drawGraphicToolbar, {\r\n            drawMode: type,\r\n            layer: Constants.LISTGRAPHICLAYER[\"GRAPHICLAYER_DRAW_\" + type.toString().toUpperCase()],//Constants.LISTGRAPHICLAYER.GRAPHICLAYER_DRAW_GRAPHIC_TOOL,\r\n            featureLayerID: `${new Date()}`,\r\n            callback: this.handleCallbackDrawMap\r\n        });\r\n    }\r\n\r\n    handleCallbackDrawMap = async (geometry) => {\r\n        const { drawModeActive, color, outlineColor } = this.state;\r\n        const { MapAction, formDrawGraphicData } = this.props;\r\n\r\n        if (drawModeActive === Constants.DRAW_GRAPHIC_MODE.text && !formDrawGraphicData.text) { //ดักกรณีโหมด text แล้วไม่ได้ระบุตัวอักษร จะไม่ทำการวาด\r\n            return null;\r\n        }\r\n        MapAction.bindMapCommand(MapFunctions.DrawGraphicByAttr, {\r\n            geometry,\r\n            layer: Constants.LISTGRAPHICLAYER[\"GRAPHICLAYER_DRAW_\" + drawModeActive.toString().toUpperCase()],//Constants.LISTGRAPHICLAYER.GRAPHICLAYER_DRAW_GRAPHIC_TOOL,\r\n            drawType: drawModeActive,\r\n            attr: {\r\n                color: color.rgb,\r\n                outlineColor: outlineColor.rgb,\r\n                size: formDrawGraphicData.size,\r\n                style: formDrawGraphicData.style,\r\n                width: formDrawGraphicData.width ? formDrawGraphicData.width : 1,\r\n                text: formDrawGraphicData.text ? formDrawGraphicData.text : '',\r\n                font: formDrawGraphicData.font ? formDrawGraphicData.font : ''\r\n            }\r\n        });\r\n    }\r\n\r\n    onChangeOutlineColor = (evt) => {\r\n        this.setState({\r\n            outlineColor: {\r\n                rgb: evt.rgb,\r\n                hex: evt.hex\r\n            }\r\n        })\r\n    }\r\n\r\n    onChangeFillColor = (evt) => {\r\n        this.setState({\r\n            color: {\r\n                rgb: evt.rgb,\r\n                hex: evt.hex\r\n            }\r\n        })\r\n    }\r\n\r\n    renderDrawMode = () => {\r\n        const { drawModeActive, outlineColor, color } = this.state;\r\n        const { formDrawGraphicData } = this.props;\r\n        return (\r\n            <Fragment>\r\n                {drawModeActive === mode.point &&\r\n                    <DrawGraphicPointView\r\n                        datasource={makeDatasource(Constants.TYPE_OF_STYLE_POINT, 'point')}\r\n                        onOpenColorPanel={this.handleOpenColorPanel}\r\n                        onChangeOutlineColor={this.onChangeOutlineColor}\r\n                        outlineColor={outlineColor.rgb}\r\n                        outlineColorDisplay={outlineColor.hex}\r\n                        onChangeFillColor={this.onChangeFillColor}\r\n                        fillColor={color.rgb}\r\n                        fillColorDisplay={color.hex}\r\n                    />}\r\n                {drawModeActive === mode.line &&\r\n                    <DrawGraphicLineView\r\n                        datasource={makeDatasource(Constants.TYPE_OF_STYLE_LINE, 'line')}\r\n                        onOpenColorPanel={this.handleOpenColorPanel}\r\n                        onChangeOutlineColor={this.onChangeOutlineColor}\r\n                        outlineColor={outlineColor.rgb}\r\n                        outlineColorDisplay={outlineColor.hex}\r\n                    />}\r\n                {drawModeActive === mode.polygon &&\r\n                    <DrawGraphicPolygonView\r\n                        datasource={makeDatasource(Constants.TYPE_OF_STYLE_POLYGON_CIRCLE, 'polygon')}\r\n                        onOpenColorPanel={this.handleOpenColorPanel}\r\n                        onChangeOutlineColor={this.onChangeOutlineColor}\r\n                        outlineColor={outlineColor.rgb}\r\n                        outlineColorDisplay={outlineColor.hex}\r\n                        onChangeFillColor={this.onChangeFillColor}\r\n                        fillColor={color.rgb}\r\n                        fillColorDisplay={color.hex}\r\n                        style={formDrawGraphicData.style}\r\n                    />}\r\n                {drawModeActive === mode.circle &&\r\n                    <DrawGraphicCircleView\r\n                        datasource={makeDatasource(Constants.TYPE_OF_STYLE_POLYGON_CIRCLE, 'polygon')}\r\n                        onOpenColorPanel={this.handleOpenColorPanel}\r\n                        onChangeOutlineColor={this.onChangeOutlineColor}\r\n                        outlineColor={outlineColor.rgb}\r\n                        outlineColorDisplay={outlineColor.hex}\r\n                        onChangeFillColor={this.onChangeFillColor}\r\n                        fillColor={color.rgb}\r\n                        fillColorDisplay={color.hex}\r\n                        style={formDrawGraphicData.style}\r\n                    />}\r\n                {drawModeActive === mode.text &&\r\n                    <DrawGraphicTextView\r\n                        datasource={makeDataFont(Constants.TYPE_OF_FONT)}\r\n                        onOpenColorPanel={this.handleOpenColorPanel}\r\n                        onChangeFillColor={this.onChangeFillColor}\r\n                        fillColor={color.rgb}\r\n                        fillColorDisplay={color.hex}\r\n                    />}\r\n            </Fragment>\r\n        )\r\n    }\r\n\r\n    render() {\r\n        const { drawModeActive } = this.state\r\n        return (\r\n            <div>\r\n                <DrawGraphicView\r\n                    onPointModeClick={this.handlePointModeClick}\r\n                    onLineModeClick={this.handleLineModeClick}\r\n                    onPolygonModeClick={this.handlePolygonModeClick}\r\n                    onCircleModeClick={this.handleCircleModeClick}\r\n                    onTextModeClick={this.handleTextModeClick}\r\n                    onCloseClick={this.handleCloseClick}\r\n                    drawModeActive={drawModeActive}\r\n                >\r\n                    {drawModeActive ?\r\n                        this.renderDrawMode() :\r\n                        <DrawGraphicNotSelectModeView />\r\n                    }\r\n                </DrawGraphicView>\r\n            </div>\r\n        )\r\n    }\r\n}\r\nconst selector = formValueSelector('DrawGraphic')\r\nconst reduxFormParameter = {\r\n    form: \"DrawGraphic\"\r\n};\r\n\r\nconst mapStateToProps = state => {\r\n    return {\r\n        sidebarRdc: state.sidebar,\r\n        formDrawGraphicData: selector(state, 'style', 'size', 'width', 'text', 'font'),\r\n    };\r\n};\r\n\r\nconst mapDispatchToProps = dispatch => {\r\n    return {\r\n        MapAction: bindActionCreators(MapAction, dispatch),\r\n        MenuAction: bindActionCreators(MenuAction, dispatch),\r\n    };\r\n};\r\n\r\nexport default compose(\r\n    connect(\r\n        mapStateToProps,\r\n        mapDispatchToProps\r\n    ),\r\n    reduxForm(reduxFormParameter)\r\n)(DrawGraphic);\r\n","import React from 'react';\r\nimport { withStyles } from '@material-ui/core';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport Icon from \"@material-ui/core/Icon\";\r\n\r\nimport { normalizePositiveInteger } from '../../../../Utilities/Validate';\r\nimport { Field } from \"redux-form\";\r\nimport TextFieldRedux from '../../../../Controls/Containers/TextFieldRedux';\r\nimport Button from '../../../../Controls/Containers/Button';\r\n\r\nconst ZoomToScaleView = ({\r\n    classes,\r\n    onCloseClick,\r\n    handleSubmit,\r\n    onSubmit\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root}>\r\n            <form onSubmit={handleSubmit(onSubmit)}>\r\n                <Grid item xs={12} className={classes.header}>\r\n                    ไปยังมาตราส่วน\r\n                <Icon className=\"icon\" onClick={onCloseClick}>close-circle</Icon>\r\n                </Grid>\r\n                <Grid item xs={12} className={classes.rootBody}>\r\n                    <Grid container >\r\n                        <Grid item xs={1}>\r\n                            <div style={{ marginTop: '10px' }}>1 : </div>\r\n                        </Grid>\r\n                        <Grid item xs={11}>\r\n                            <Field\r\n                                name=\"scale\"\r\n                                component={TextFieldRedux}\r\n                                normalize={normalizePositiveInteger}\r\n                                className={classes.textField}\r\n                            />\r\n                        </Grid>\r\n                    </Grid>\r\n                    <Grid container justify='flex-end'>\r\n                        <Grid item style={{ marginTop: '10px' }}>\r\n                            <Button\r\n                                label='ไปยังมาตราส่วน'\r\n                                type=\"submit\"\r\n                                // onClick={handleSubmit(onSubmit)}\r\n                            />\r\n                        </Grid>\r\n                    </Grid>\r\n                </Grid>\r\n            </form>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        position: \"absolute\",\r\n        right: \"75px\",\r\n        top: 'calc(50% - 240px)',\r\n        zIndex: \"999\",\r\n        width: \"280px\",\r\n        backgroundColor: \"white\",\r\n        boxShadow: \"2px 2px 8px #888888\",\r\n        borderColor: 'black',\r\n        borderStyle: \"solid\",\r\n        borderWidth: \"2px\",\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            top: 'calc(50% - 200px)',\r\n            width: \"96%\",\r\n            left: \"2%\",\r\n            right: \"2%\",\r\n            zIndex: \"1\",\r\n        }\r\n    },\r\n    textField: {\r\n        minHeight: '50px'\r\n    },\r\n    rootBody: {\r\n        padding: '10px'\r\n    },\r\n    header: {\r\n        padding: \"5px\",\r\n        backgroundColor: theme.mainTheme.color1,\r\n        fontWeight: \"bold\",\r\n        color: 'white'\r\n    },\r\n    bottom: {\r\n        marginTop: '10px',\r\n        width: '100%',\r\n        display: 'flex',\r\n        flexDirection: 'row',\r\n        justifyContent: 'flex-end'\r\n    },\r\n}))(ZoomToScaleView)\r\n","import React, { Component } from 'react';\r\nimport { reduxForm } from 'redux-form';\r\nimport { bindActionCreators } from 'redux';\r\nimport { connect } from 'react-redux';\r\nimport { compose } from 'recompose';\r\n\r\nimport ZoomToScaleView from '../../../../Presentationals/Web/Maps/ZoomToScale/ZoomToScaleView';\r\nimport { zoomToScaleValidate } from '../../../../Utilities/Validate';\r\nimport * as MapAction from '../../../../Actions/Web/Maps/MapAction';\r\nimport * as MapFunctions from '../../../../Map/MapFunctions';\r\n\r\nclass ZoomToScale extends Component {\r\n\r\n    handleSubmit =async values => {\r\n        const { mapAction } = this.props;\r\n        await mapAction.bindMapCommand(MapFunctions.zoomToScale, { scale: values.scale })\r\n        mapAction.bindClearMapCommand();\r\n    }\r\n\r\n    render() {\r\n        const { handleSubmit, closeZoomToScale } = this.props;\r\n\r\n        return (\r\n            <ZoomToScaleView\r\n                handleSubmit={handleSubmit}\r\n                onSubmit={this.handleSubmit}\r\n                onCloseClick={closeZoomToScale}\r\n            />\r\n        )\r\n    }\r\n}\r\n\r\nconst mapStateToProps = dispatch => ({\r\n    mapAction: bindActionCreators(MapAction, dispatch)\r\n})\r\n\r\nconst reduxFormParameter = {\r\n    form: \"ZoomToScaleForm\",\r\n    validate: zoomToScaleValidate\r\n};\r\n\r\nexport default compose(\r\n    reduxForm(reduxFormParameter),\r\n    connect(null, mapStateToProps)\r\n)(ZoomToScale)\r\n","import React, { Component, Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport PropTypes from 'prop-types';\r\nimport { bindActionCreators } from 'redux';\r\n\r\nimport * as MapFunctions from '../../../../Map/MapFunctions';\r\nimport * as MapAction from '../../../../Actions/Web/Maps/MapAction';\r\nimport * as MenuAction from '../../../../Actions/Web/MenuAction';\r\nimport * as Constants from '../../../../Constants/Constants';\r\nimport { CONFIG_MENU } from '../../../../Constants/MenuConstants';\r\n\r\nimport BtnZoomView from '../../../../Presentationals/Web/Maps/MapTools/BtnZoomView';\r\nimport BtnCurrentLocationView from '../../../../Presentationals/Web/Maps/MapTools/BtnCurrentLocationView';\r\nimport BtnMeasurementView from '../../../../Presentationals/Web/Maps/MapTools/BtnMeasurementView';\r\nimport BtnGoToLocationView from '../../../../Presentationals/Web/Maps/MapTools/BtnGoToLocationView';\r\nimport BtnBasemapGalleryView from '../../../../Presentationals/Web/Maps/MapTools/BtnBasemapGalleryView';\r\nimport BtnTocView from '../../../../Presentationals/Web/Maps/MapTools/BtnTocView';\r\nimport BtnPrintmap from '../../../../Presentationals/Web/Maps/MapTools/BtnPrintmapView';\r\nimport BtnDrawGraphicsView from '../../../../Presentationals/Web/Maps/MapTools/BtnDrawGraphicsView';\r\nimport BtnClearGraphic from '../../../../Presentationals/Web/Maps/MapTools/BtnClearGraphicView';\r\nimport BtnZoomToScaleView from '../../../../Presentationals/Web/Maps/MapTools/BtnZoomToScaleView';\r\n\r\nimport GoToLocation from '../GoToLocation/GoToLocation';\r\nimport MapToolsView from '../../../../Presentationals/Web/Maps/MapTools/MapToolsView';\r\nimport Measurement from '../Measurement/Measurement';\r\nimport Toc from '../NewTOC/TOCPanel';\r\nimport Printmap from '../Printmap/Printmap';\r\nimport Identify from './Identify';\r\nimport DrawGraphic from '../DrawGraphic/DrawGraphic';\r\nimport ZoomToScale from '../ZoomToScale/ZoomToScale';\r\n\r\nexport class MapTools extends Component {\r\n  constructor(props) {\r\n    super();\r\n    const { profile, system } = props.authenRdc;\r\n    this.state = {\r\n      subMenuActive: null,\r\n      listMapTools: profile.functions[system].filter((itm) => itm.MenuType === Constants.FUNCTION_CONTROL.MAP).map((itm) => itm.ID),\r\n    };\r\n  }\r\n\r\n  handleZoomIn = async () => {\r\n    const { MapAction } = this.props;\r\n    await MapAction.bindMapCommand(MapFunctions.zoomIn);\r\n    await MapAction.bindEvtZoomIn();\r\n    MapAction.bindClearMapCommand();\r\n  };\r\n\r\n  handleZoomOut = async () => {\r\n    const { MapAction } = this.props;\r\n    await MapAction.bindMapCommand(MapFunctions.zoomOut);\r\n    await MapAction.bindEvtZoomOut();\r\n    MapAction.bindClearMapCommand();\r\n  };\r\n\r\n  handleOpenFormGoToLocation = () => {\r\n    const { MenuAction } = this.props;\r\n    MenuAction.openFormGotoLocation();\r\n    MapAction.bindClearMapCommand();\r\n    this.clearEvtDrawMap();\r\n  };\r\n\r\n  handleOpenZoomToScale = () => {\r\n    const { MenuAction, menuRdc } = this.props;\r\n    if (menuRdc.ZoomToScaleVisible) {\r\n      MenuAction.closeZoomToScale();\r\n    } else {\r\n      MenuAction.openZoomToScale();\r\n      this.clearEvtDrawMap();\r\n    }\r\n  };\r\n\r\n  handleOpenFormBasemapGallery = () => {\r\n    const { MenuAction, MapAction } = this.props;\r\n    MenuAction.openFormBasemapGallery();\r\n    MapAction.bindClearMapCommand();\r\n  };\r\n\r\n  handleOpenFormToc = () => {\r\n    const { MenuAction } = this.props;\r\n    MenuAction.openFormToc();\r\n    MapAction.bindClearMapCommand();\r\n    this.clearEvtDrawMap();\r\n  };\r\n\r\n  handleCloseToc = () => {\r\n    const { MenuAction } = this.props;\r\n    MenuAction.closeFormToc();\r\n  };\r\n\r\n  handleOpenFormMeasurement = () => {\r\n    const { MenuAction } = this.props;\r\n    MenuAction.openFormMeasurement();\r\n    MapAction.bindClearMapCommand();\r\n  };\r\n\r\n  handleOpenFormDrawGraphicPanel = async () => {\r\n    const { MenuAction, MapAction } = this.props;\r\n    await MapAction.bindClearMapCommand();\r\n    await MenuAction.openFormDrawGraphic();\r\n  };\r\n\r\n  handleCloseDrawGraphic = () => {\r\n    const { MenuAction } = this.props;\r\n    MenuAction.closeFormDrawGraphic();\r\n  };\r\n\r\n  handleCloseMeasurement = () => {\r\n    const { MenuAction } = this.props;\r\n    MenuAction.closeFormMeasurement();\r\n  };\r\n\r\n  handleOpenIdentify = () => {\r\n    const { MenuAction, menuRdc } = this.props;\r\n    if (menuRdc.Identify) {\r\n      MenuAction.closeIdentify();\r\n    } else {\r\n      MenuAction.openIdentify();\r\n    }\r\n  };\r\n\r\n  handleOpenPrintmap = () => {\r\n    const { MenuAction } = this.props;\r\n    MenuAction.openMenuPrintmap();\r\n    MapAction.bindClearMapCommand();\r\n    this.clearEvtDrawMap();\r\n  };\r\n\r\n  handleClosePrintmap = () => {\r\n    const { MenuAction } = this.props;\r\n    MenuAction.closeMenuPrintmap();\r\n  };\r\n\r\n  handleOpenClearGraphic = () => {\r\n    const { MenuAction, menuRdc } = this.props;\r\n    if (menuRdc.CearGraphicVisible) {\r\n      MenuAction.closeClearGraphic();\r\n    } else {\r\n      MenuAction.openClearGraphic();\r\n      this.clearEvtDrawMap();\r\n    }\r\n  };\r\n\r\n  handleClearAllGraphics = async () => {\r\n    const { MapAction } = this.props;\r\n    await MapAction.bindMapCommand(MapFunctions.clearAllGraphic);\r\n\r\n    if (this.state.subMenuActive === 'CLEAR_SELECT') {\r\n      await MapAction.bindEvtDisableClearSelectGraphic();\r\n      // MapAction.bindMapCommand(MapFunctions.deactiveDrawToolbar, false);\r\n      this.setState({ subMenuActive: null });\r\n    }\r\n  };\r\n\r\n  handleClearSelectGraphic = () => {\r\n    const { MapAction } = this.props;\r\n\r\n    if (this.state.subMenuActive === 'CLEAR_SELECT') {\r\n      MapAction.bindEvtDisableClearSelectGraphic();\r\n      // MapAction.bindMapCommand(MapFunctions.deactiveDrawToolbar, false);\r\n    } else {\r\n      MapAction.bindEvtEnableClearSelectGraphic();\r\n      // MapAction.bindMapCommand(MapFunctions.deactiveDrawToolbar);\r\n    }\r\n\r\n    this.setState((prevState) => ({\r\n      subMenuActive: prevState.subMenuActive === 'CLEAR_SELECT' ? null : 'CLEAR_SELECT',\r\n    }));\r\n  };\r\n\r\n  handleClearAllGraphicMapTools = () => {\r\n    const { MapAction } = this.props;\r\n    MapAction.bindMapCommand(MapFunctions.clearAllGraphicMapTools);\r\n  };\r\n\r\n  handleClearGraphicGotoLacation = () => {\r\n    const { MapAction } = this.props;\r\n    MapAction.bindMapCommand(MapFunctions.clearOnlyGraphicGoToLocation);\r\n  };\r\n\r\n  componentWillReceiveProps(nextProps) {\r\n    const { Identify, CearGraphicVisible } = this.props.menuRdc;\r\n    const { MapAction } = this.props;\r\n    const { subMenuActive } = this.state;\r\n\r\n    if (Identify && !nextProps.menuRdc.Identify) {\r\n      // เมื่อ iden ถูกปิด\r\n      MapAction.bindEvtClickMapIdentify(null);\r\n    }\r\n\r\n    if (CearGraphicVisible && !nextProps.menuRdc.CearGraphicVisible && subMenuActive === 'CLEAR_SELECT') {\r\n      //กรณี clear select ถูกปิดโดยฟังก์ชันอื่นๆ\r\n      MapAction.bindEvtDisableClearSelectGraphic();\r\n      // MapAction.bindMapCommand(MapFunctions.deactiveDrawToolbar, false);\r\n      this.setState({\r\n        subMenuActive: null,\r\n      });\r\n    }\r\n  }\r\n\r\n  clearEvtDrawMap = () => {\r\n    const { MapAction, menuRdc } = this.props;\r\n\r\n    if (menuRdc.MeasurementVisible) {\r\n      MapAction.bindMapCommand(MapFunctions.clearEvtDrawMap);\r\n    }\r\n  };\r\n\r\n  renderBtnMapTools = () => {\r\n    const { listMapTools } = this.state;\r\n    const { menuRdc } = this.props;\r\n    const btnMapTools = [\r\n      {\r\n        ID: CONFIG_MENU.MAP02.ID,\r\n        ELEMENT: <Identify key='BtnIdentify' isOpen={menuRdc.Identify} open={this.handleOpenIdentify} />,\r\n      },\r\n      {\r\n        ID: CONFIG_MENU.MAP03.ID,\r\n        ELEMENT: (\r\n          <BtnGoToLocationView\r\n            key='BtnGoToLocationView'\r\n            isOpen={menuRdc.GoToLocationFormVisible}\r\n            openFormGoToLocation={this.handleOpenFormGoToLocation}\r\n          />\r\n        ),\r\n      },\r\n      {\r\n        ID: CONFIG_MENU.MAP07.ID,\r\n        ELEMENT: <BtnZoomToScaleView key='BtnZoomToScale' isOpen={menuRdc.ZoomToScaleVisible} openGotoScale={this.handleOpenZoomToScale} />,\r\n      },\r\n      {\r\n        ID: CONFIG_MENU.MAP04.ID,\r\n        ELEMENT: <BtnTocView key='BtnTocView' isOpen={menuRdc.TocVisible} openToc={this.handleOpenFormToc} />,\r\n      },\r\n\r\n      {\r\n        ID: CONFIG_MENU.MAP05.ID,\r\n        ELEMENT: (\r\n          <BtnDrawGraphicsView key='BtnDrawGraphicsView' isOpen={menuRdc.DrawGraphicVisible} openDrawGraphic={this.handleOpenFormDrawGraphicPanel} />\r\n        ),\r\n      },\r\n    ];\r\n    return btnMapTools.map((itm) => (listMapTools.indexOf(itm.ID) !== -1 || itm.ID === CONFIG_MENU.MAP07.ID ? itm.ELEMENT : null));\r\n  };\r\n\r\n  renderBtnMapToolsDefault = () => {\r\n    const { getCurrentLoc, menuRdc } = this.props;\r\n    return [\r\n      <BtnClearGraphic\r\n        key='BtnClearGraphic'\r\n        isOpen={menuRdc.CearGraphicVisible}\r\n        subMenuActive={this.state.subMenuActive}\r\n        openClearGraphic={this.handleOpenClearGraphic}\r\n        onClickClearAll={this.handleClearAllGraphics}\r\n        onClickClearSelect={this.handleClearSelectGraphic}\r\n      />,\r\n      <BtnPrintmap key='BtnPrintmap' isOpen={menuRdc.Printmap} openPrintmap={this.handleOpenPrintmap} />,\r\n      <BtnBasemapGalleryView\r\n        key='BtnBasemapGalleryView'\r\n        isOpen={menuRdc.BasemapGalleryVisible}\r\n        openFormBasemapGallery={this.handleOpenFormBasemapGallery}\r\n      />,\r\n      <BtnMeasurementView key='BtnMeasurementView' isOpen={menuRdc.MeasurementVisible} openFormMeasurement={this.handleOpenFormMeasurement} />,\r\n      <BtnZoomView key='BtnZoomView' zoomIn={this.handleZoomIn} zoomOut={this.handleZoomOut} />,\r\n      <BtnCurrentLocationView key='BtnCurrentLocationView' clickCurrentLocation={getCurrentLoc} />,\r\n    ];\r\n  };\r\n\r\n  render() {\r\n    const { menuRdc, callBackAddTocComplete } = this.props;\r\n\r\n    return (\r\n      <Fragment>\r\n        {menuRdc.MapToolVisible ? <MapToolsView>{[...this.renderBtnMapTools(), ...this.renderBtnMapToolsDefault()]}</MapToolsView> : null}\r\n        <GoToLocation />\r\n        <Toc callBackAddTocComplete={callBackAddTocComplete} isHide={!menuRdc.TocVisible} />\r\n        {menuRdc.DrawGraphicVisible && <DrawGraphic closeFormDrawGraphic={this.handleCloseDrawGraphic} />}\r\n        {menuRdc.MeasurementVisible && <Measurement closeMeasureMesurement={this.handleCloseMeasurement} />}\r\n        {menuRdc.Printmap && <Printmap onClosePrintmap={this.handleClosePrintmap} />}\r\n        {menuRdc.ZoomToScaleVisible && <ZoomToScale closeZoomToScale={this.handleOpenZoomToScale} />}\r\n      </Fragment>\r\n    );\r\n  }\r\n}\r\n\r\nMapTools.propTypes = {\r\n  MapAction: PropTypes.object.isRequired,\r\n};\r\n\r\nconst mapStateToProps = (state) => ({\r\n  mapRdc: state.map,\r\n  menuRdc: state.menu,\r\n  authenRdc: state.authen,\r\n});\r\n\r\nconst mapDispatchToProps = (dispatch) => ({\r\n  MapAction: bindActionCreators(MapAction, dispatch),\r\n  MenuAction: bindActionCreators(MenuAction, dispatch),\r\n});\r\n\r\nexport default connect(\r\n  mapStateToProps,\r\n  mapDispatchToProps\r\n)(MapTools);\r\n","import * as actionTypes from \"../../../Constants/ActionTypes\";\r\n\r\nexport const updateSatisfactionStatus = (status) => {\r\n\treturn {\r\n\t\ttype: actionTypes.UPDATE_SATISFACTION_STATUS,\r\n\t\tstatus: status\r\n\t}\r\n};\r\n\r\nexport const updateStatisticStatus = (status) => {\r\n\treturn {\r\n\t\ttype: actionTypes.UPDATE_STATISTIC_STATUS,\r\n\t\tstatus: status\r\n\t}\r\n};\r\n\r\nexport const saveSessionId = (sessionId) => {//default is main menu\r\n\treturn {\r\n\t\ttype: actionTypes.SAVE_SESSION_ID,\r\n\t\tsessionId: sessionId\r\n\t}\r\n}","export const makeLocatorRings = (str) => {\r\n    let tmpString = str;\r\n    let listPoint = [];\r\n    let stringType = str.split(\" \")\r\n\t// if(str.indexOf('POINT') > -1){\r\n    if(stringType[0] === \"POINT\" ){\r\n        tmpString = tmpString.replace(\"POINT ( \", \"\").replace(\")\", \"\");\r\n        const listXYString = tmpString.trim().split(' ');\r\n        //console.log('listXYString  : ', listXYString);\r\n        const x = parseFloat(listXYString[0]);\r\n        const y = parseFloat(listXYString[1]);\r\n        listPoint = [x, y];\r\n    }\r\n    // else if(str.indexOf('POLYGON')  > -1){\r\n    else if(stringType[0] === \"POLYGON\"){\r\n        tmpString = tmpString.replace(\"POLYGON (( \", \"\").replace(\"))\", \"\");\r\n        const listPointString = tmpString.split(',');\r\n        listPoint = listPointString.map(item => {\r\n            const listXY = item.trim().split(' ');\r\n            const x = parseFloat(listXY[0]);\r\n            const y = parseFloat(listXY[1]);\r\n            return [x, y];\r\n        })\r\n        listPoint = [listPoint]\r\n    }\r\n    // else if(str.indexOf('LINESTRING') > -1){\r\n    else if(stringType[0] === \"LINESTRING\"){\r\n        tmpString = tmpString.replace(\"LINESTRING ( \", \"\").replace(\")\", \"\");\r\n        const listPointString = tmpString.split(',');\r\n        listPoint = listPointString.map(item => {\r\n            const listXY = item.trim().split(' ');\r\n            const x = parseFloat(listXY[0]);\r\n            const y = parseFloat(listXY[1]);\r\n            return [x, y];\r\n        });\r\n        listPoint = [listPoint]\r\n    }\r\n    // else if(str.indexOf('MULTIPOLYGON') > -1){\r\n    else if(stringType[0] === \"MULTIPOLYGON\"){\r\n        tmpString = tmpString.replace(\"MULTIPOLYGON (\", \"\").replace(/(\\)\\)\\))/g, \"))\");\r\n        tmpString = tmpString.replace(/(\\(\\( )/g, \"(\").replace(/(\\)\\))/g, \")\");\r\n        tmpString = tmpString.replace(/\\),\\(/g, \"|\").replace(/\\(/g, \"\").replace(/\\)/g, \"\");\r\n\r\n                /// ส่งออกไปทีละ POLYGON\r\n        var listData = tmpString.split(\"|\")\r\n        var listPointreturn = []\r\n                for(let index in listData){\r\n                const listPointString = listData[index].split(',');\r\n                    listPoint = listPointString.map((item,index) => {\r\n                        const listXY = item.trim().split(' ');  \r\n                        const x = parseFloat(listXY[0]);\r\n                        const y = parseFloat(listXY[1]);\r\n                        return [x, y];\r\n                    });\r\n                    listPointreturn.push(listPoint)\r\n\r\n                }\r\n                listPoint = listPointreturn\r\n            \r\n    }else if(stringType[0] === \"MULTILINESTRING\"){\r\n        tmpString = tmpString.replace(\"MULTILINESTRING (\", \"\").replace(/(\\)\\)\\))/g, \"))\");\r\n        tmpString = tmpString.replace(/(\\(\\( )/g, \"(\").replace(/(\\)\\))/g, \")\");\r\n        tmpString = tmpString.replace(/\\),\\(/g, \"|\").replace(/\\(/g, \"\").replace(/\\)/g, \"\");\r\n\r\n                /// ส่งออกไปทีละ LINESTRING\r\n        var listData = tmpString.split(\"|\")\r\n        var listPointreturn = []\r\n                for(let index in listData){\r\n                const listPointString = listData[index].split(',');\r\n                    listPoint = listPointString.map((item,index) => {\r\n                        const listXY = item.trim().split(' ');  \r\n                        const x = parseFloat(listXY[0]);\r\n                        const y = parseFloat(listXY[1]);\r\n                        return [x, y];\r\n                    });\r\n                    listPointreturn.push(listPoint)\r\n\r\n                }\r\n                listPoint = listPointreturn\r\n            \r\n            }\r\n            return listPoint\r\n}","import React, { Component } from \"react\";\r\n\r\n//import Material-ui\r\nimport FormControl from \"@material-ui/core/FormControl\";\r\nimport Select from \"@material-ui/core/Select\";\r\nimport MenuItem from \"@material-ui/core/MenuItem\";\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\n\r\nconst styles = theme => ({\r\n    root: {\r\n      width: 300,\r\n      position: \"absolute\",\r\n      left: 310,\r\n      bottom: 15,\r\n      zIndex: 1,\r\n      color: \"#FFFFFF\",\r\n      [theme.breakpoints.down(\"sm\")]: {\r\n        display: \"none\"\r\n    }\r\n    },\r\n    formControl_expan: {\r\n      color: \"#FFFFFF\",\r\n      position: \"absolute\",\r\n      bottom: -15,\r\n      width: \"100%\",\r\n      height: \"50px\",\r\n      left: '55px'\r\n    },\r\n    formControl_close: {\r\n      color: \"#FFFFFF\",\r\n      position: \"absolute\",\r\n      bottom: -15,\r\n      width: \"100%\",\r\n      height: \"50px\",\r\n      left: '-300px'\r\n    },\r\n    inputSelect: {\r\n        fontSize: '12px',\r\n        color: '#FFFFFF',\r\n        backgroundColor: '#000000 !important',\r\n        opacity: '0.5',\r\n        paddingLeft: 17\r\n    }\r\n});\r\n\r\nclass CoordinateView extends Component {\r\n\r\n  render() {\r\n    const { classes, geoPoint, type, datasource, onChange, active } = this.props;\r\n    \r\n    return (\r\n      <div className={classes.root}>\r\n        {geoPoint && \r\n            <FormControl className={active ? classes.formControl_expan:classes.formControl_close} variant=\"filled\" >\r\n                <Select\r\n                  value={geoPoint}\r\n                  onChange={onChange}\r\n                  renderValue={() => `${type.name}: ${geoPoint[0]}, ${geoPoint[1]}`}\r\n                  classes={{\r\n                    selectMenu: classes.inputSelect\r\n                  }}\r\n                  disableUnderline={true}\r\n                >\r\n                    {datasource.map(item => {\r\n                        return (\r\n                            <MenuItem  key={item.id} value={item.id}>\r\n                                {item.name}\r\n                            </MenuItem >\r\n                        )\r\n                    })}\r\n                </Select>\r\n            </FormControl>\r\n        }\r\n      </div>\r\n    );\r\n  }\r\n}\r\n\r\nCoordinateView.propTypes = {};\r\n\r\nCoordinateView.defaultProps = {};\r\n\r\nexport default withStyles(styles, { withTheme: true })(CoordinateView);\r\n","import React, { Component } from 'react'\r\nimport { bindActionCreators } from \"redux\";\r\nimport { connect } from \"react-redux\";\r\nimport EsriLoader from \"esri-loader\";\r\n\r\n// import Component\r\nimport CoordinateView from '../../../Presentationals/Web/Coordinate/CoordinateView'\r\n\r\n//import Action\r\nimport * as MapAction from '../../../Actions/Web/Maps/MapAction'\r\n\r\n//import Constants\r\nimport * as Constants from \"../../../Constants/Constants\";\r\nimport { objectToArray } from \"../../../Utilities/Utils\";\r\n\r\n//import Function\r\nimport * as MapFunction from \"../../../Map/MapFunctions\";\r\n\r\n//constants\r\nconst typeOfCoordinate = Constants.MEASUREMENT_UNIT.location;\r\nconst typeOfCoWithDatasource = {\r\n    1: typeOfCoordinate.utmZ47,\r\n    2: typeOfCoordinate.mercator,\r\n    3: typeOfCoordinate.longLat\r\n}\r\n\r\nexport class Coordinate extends Component {\r\n\r\n    constructor() {\r\n        super();\r\n\r\n        this.state = {\r\n            mouseMoveResult: null,\r\n            type: typeOfCoWithDatasource[3],\r\n            datasource: objectToArray(Constants.TYPEOFPROJECTION),\r\n            geoPoint: null\r\n        }\r\n    }\r\n\r\n    componentDidMount = async () => {\r\n        const { mapAction } = this.props;\r\n        await mapAction.bindEvtMouseMoveCoordinate(this.handleMouseMove)\r\n    }\r\n\r\n    handleMouseMove = (evt) => {\r\n        const { type } = this.state\r\n        EsriLoader.loadModules([\r\n            \"esri/geometry/Point\"\r\n        ], window.MAP_OPTION).then(([\r\n            Point\r\n        ]) => {\r\n            const geoPoint = new Point(evt.mapMouseMoveObject.mapPoint)\r\n            MapFunction.calLocation(geoPoint,type.value).then(result => {\r\n                this.setState({\r\n                    mouseMoveResult: result\r\n                })\r\n            })\r\n        })\r\n    }\r\n\r\n    handleChange = (evt) => {\r\n        const { value } = evt.target;\r\n        this.setState({\r\n            type: typeOfCoWithDatasource[value]\r\n        })\r\n    }\r\n\r\n    render() {\r\n        const { mouseMoveResult, type, datasource } = this.state;\r\n        const { active } = this.props;\r\n        return (\r\n            <div>\r\n                <CoordinateView \r\n                    geoPoint = { mouseMoveResult }\r\n                    type = { type }\r\n                    datasource = { datasource }\r\n                    onChange = { this.handleChange }\r\n                    active = {active}\r\n                />\r\n            </div>\r\n        )\r\n    }\r\n}\r\n\r\n// const mapStateToProps = dispatch => ({\r\n\r\n// })\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    mapAction: bindActionCreators(MapAction, dispatch)\r\n});\r\n\r\nexport default connect(\r\n    null,\r\n    mapDispatchToProps\r\n)(Coordinate);\r\n","import RouteConfig from '../Config/AppRoute/RouteConfig';\r\nimport { SYSTEM } from '../Constants/Constants';\r\n\r\nexport const checkPermission = (allFunction = [], functionID) => {\r\n    /*  allFunction คือรายการฟังก์ชันทั้งหมดในระบบนั้น (เอามาจาก profile reducer)\r\n        functionID คือ id ของฟังก์ชันที่ต้องการตรวจสอบ\r\n        return true คือ มีสิทธิ์, return false คือ ไมม่มีสิทธิ์ */\r\n    if(allFunction === null){\r\n        allFunction = []\r\n    }\r\n    let isPermission = false;\r\n    allFunction.map(item => {\r\n        if (item.ID === functionID) {\r\n            isPermission = true\r\n        } else {\r\n            if (item.SubMenu) {\r\n                item.SubMenu.map(itemFilter => {\r\n                    if (itemFilter.ID === functionID) {\r\n                        isPermission = true\r\n                    }\r\n                    return true\r\n                })\r\n            }\r\n        }\r\n\r\n        return true\r\n    })\r\n\r\n    return isPermission\r\n}\r\n\r\nexport const checkGotoDefaultSystem = (defaultSystemID, paramType) => {\r\n    switch (defaultSystemID) {\r\n        case SYSTEM.CMP:\r\n            return (paramType === \"o\") ? RouteConfig.CMPWebStaff : RouteConfig.CMPWeb;\r\n        case SYSTEM.PMR1:\r\n            return RouteConfig.PMRWeb\r\n        case SYSTEM.CAH:\r\n            return RouteConfig.CAHWeb\r\n        case SYSTEM.Survey:\r\n            return RouteConfig.SurveyWeb;\r\n        case SYSTEM.UM:\r\n            return RouteConfig.UMUser;\r\n        default:\r\n            return (paramType === \"o\") ? RouteConfig.CMSLoginStaff : RouteConfig.CMSLogin;\r\n    }\r\n}","import * as actionTypes from \"../../../Constants/ActionTypes\";\r\n\r\nexport const setCurrentPage = (functionID = null) => {//default is main menu\r\n\treturn {\r\n\t\ttype: actionTypes.SET_CURRENT_PANEL_PAGE,\r\n\t\tfunctionID: functionID\r\n\t}\r\n}\r\n\r\nexport const setPmrID = (pmrID = null) => {//default is main menu\r\n\treturn {\r\n\t\ttype: actionTypes.SET_PMR1_ID,\r\n\t\tpmrID: pmrID\r\n\t}\r\n}","import React, { PureComponent } from 'react';\r\nimport * as PanelContentAction from '../../Actions/Web/Panel/PanelContentAction';\r\nimport * as MenuAction from '../../Actions/Web/MenuAction';\r\nimport * as NewTOCAction from '../../Actions/Web/Maps/NewTOCAction';\r\nimport { connect } from 'react-redux';\r\nimport { bindActionCreators } from 'redux';\r\n\r\nconst WithPanelContentReducer = Wrapcomponent => {\r\n\r\n    const PanelContentReducer = class extends PureComponent {\r\n        render() {\r\n            const { panelContentData, menuRdc, panelContentAction, menuAction, authenRdc, newTOCAction } = this.props;\r\n            return <Wrapcomponent\r\n                panelContentReducer={{\r\n                    state: panelContentData,\r\n                    action: panelContentAction\r\n                }}\r\n                menuReducer={{\r\n                    state: menuRdc,\r\n                    action: menuAction\r\n                }}\r\n                authenReducer={{\r\n                    state: authenRdc\r\n                }}\r\n                newTOCReducer={{\r\n                    action: newTOCAction\r\n                }}\r\n                {... this.props} />\r\n        }\r\n    }\r\n    const mapStateToProp = state => {\r\n        return {\r\n            panelContentData: state.PanelContentData,\r\n            menuRdc: state.menu,\r\n            authenRdc: state.authen\r\n        }\r\n    }\r\n\r\n    const mapDispatchToProp = dispatch => {\r\n        return {\r\n            panelContentAction: bindActionCreators(PanelContentAction, dispatch),\r\n            menuAction: bindActionCreators(MenuAction, dispatch),\r\n            newTOCAction: bindActionCreators(NewTOCAction, dispatch)\r\n        }\r\n    }\r\n    return connect(mapStateToProp, mapDispatchToProp)(PanelContentReducer)\r\n}\r\n\r\nexport default WithPanelContentReducer;","import * as actionTypes from \"../../../Constants/ActionTypes\";\r\n\r\nexport const saveDatatAskTheCityPlan = (data) => {\r\n    return {\r\n        type: actionTypes.SAVE_DATA_ASKTHECITYPLAN,\r\n        data: data\r\n    }\r\n};\r\n\r\nexport const clearDataAskTheCityPlan = () => {\r\n    return {\r\n        type: actionTypes.CLEAR_DATA_ASKTHECITYPLAN,\r\n    }\r\n};","import React, { PureComponent } from 'react';\r\nimport * as MapAction from '../../Actions/Web/Maps/MapAction';\r\nimport * as AskTheCityPlanAction from '../../Actions/Web/Panel/AskTheCityPlanAction';\r\n\r\nimport { connect } from 'react-redux';\r\nimport { bindActionCreators } from 'redux';\r\n\r\nconst WithAskTheCityPlanReducer = Wrapcomponent => {\r\n\r\n    const AskTheCityPlanReducer = class extends PureComponent {\r\n        render() {\r\n            const { AskTheCityPlanData, mapAction, askTheCityPlanAction } = this.props;\r\n            return <Wrapcomponent AskTheCityPlanReducer={{\r\n                state: AskTheCityPlanData,\r\n                mapAction: mapAction,\r\n                askTheCityPlanAction: askTheCityPlanAction\r\n            }} {...this.props}/>\r\n        }\r\n    }\r\n    const mapStateToProp = state => {\r\n        return {\r\n            AskTheCityPlanData: state.AskTheCityPlanData\r\n        }\r\n    }\r\n\r\n    const mapDispatchToProp = dispatch => {\r\n        return {\r\n            mapAction: bindActionCreators(MapAction, dispatch),\r\n            askTheCityPlanAction: bindActionCreators(AskTheCityPlanAction, dispatch)\r\n        }\r\n    }\r\n    return connect(mapStateToProp, mapDispatchToProp)(AskTheCityPlanReducer)\r\n}\r\n\r\nexport default WithAskTheCityPlanReducer;","import React from \"react\";\r\nimport Paper from \"@material-ui/core/Paper\";\r\nimport ArrowLeft from \"@material-ui/icons/KeyboardArrowLeft\";\r\nimport ArrowRight from \"@material-ui/icons/KeyboardArrowRight\";\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\nimport { numberWithCommas } from \"../../../Utilities/Utils\";\r\nimport classnames from \"classnames\";\r\n\r\nconst PanelLayoutView = ({\r\n    classes,\r\n    open,\r\n    children,\r\n    onClose,\r\n    statis,\r\n    isShowStatis,\r\n    shortcut,\r\n}) => {\r\n    const getArrow = () => {\r\n        return (\r\n            (open && <ArrowLeft className={classes.arrowIcon} />) || (\r\n                <ArrowRight className={classes.arrowIcon} />\r\n            )\r\n        );\r\n    };\r\n\r\n    return (\r\n        <Paper\r\n            className={\r\n                // shortcut\r\n                //     ? `${classes.rootMobile} ${(!open && classes.root_hide) ||\r\n                //           \"\"}`\r\n                // :\r\n                `${classes.root} ${(!open && classes.root_hide) || \"\"}`\r\n            }\r\n            // style={shortcut ? { height: \"calc(100% - 70px)\" } : \"inherit\"}\r\n        >\r\n            <div className={classes.btn_close} onClick={onClose}>\r\n                {getArrow()}\r\n            </div>\r\n            <div\r\n                className={classnames(classes.root_children, {\r\n                    [classes.root_children_showStatis]: isShowStatis,\r\n                })}>\r\n                {children}\r\n            </div>\r\n            {isShowStatis && (\r\n                <div className={classes.div_statis}>\r\n                    สถิติผู้เข้าใช้งาน : {numberWithCommas(statis, 3)}\r\n                </div>\r\n            )}\r\n        </Paper>\r\n    );\r\n};\r\n\r\nexport default withStyles((theme) => ({\r\n    root: {\r\n        position: \"absolute\",\r\n        boxShadow: \"2px 0px 22px -5px rgba(0, 0, 0, 1)\",\r\n        width: \"350px\",\r\n        height: \"calc(100% - 70px)\",\r\n        bottom: \"0px\",\r\n        borderRadius: 0,\r\n        zIndex: 2,\r\n        transition: \"transform 0.3s ease\",\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            boxShadow: \"none\",\r\n            width: \"100%\",\r\n            height: \"calc(100% - 120px)\",\r\n            position: \"fixed\",\r\n            top: \"70px\",\r\n        },\r\n    },\r\n    // rootMobile: {\r\n    //     bottom: \"0px\",\r\n    //     borderRadius: 0,\r\n    //     zIndex: 2,\r\n    //     transition: \"transform 0.3s ease\",\r\n    //     boxShadow: \"none\",\r\n    //     width: \"100%\",\r\n    //     height: \"calc(100% - 120px)\",\r\n    //     position: \"fixed\",\r\n    //     top: \"70px\",\r\n    // },\r\n    root_children: {\r\n        width: \"100%\",\r\n        height: \"100%\",\r\n        position: \"relative\",\r\n    },\r\n    root_children_showStatis: {\r\n        height: \"calc(100% - 25px)\",\r\n    },\r\n    root_hide: {\r\n        transform: \"translateX(calc(-100% - 3px))\",\r\n    },\r\n\r\n    div_statis: {\r\n        position: \"absolute\",\r\n        bottom: \"0px\",\r\n        width: \"100%\",\r\n        textAlign: \"center\",\r\n        borderTop: \"1px solid #E0E0E0\",\r\n    },\r\n\r\n    btn_close: {\r\n        position: \"absolute\",\r\n        width: \"25px\",\r\n        height: \"45px\",\r\n        background: theme.mainTheme.color2,\r\n        zIndex: 1,\r\n        right: \"-28px\",\r\n        boxShadow: \"3px 3px 10px 0px rgba(0,0,0,0.63)\",\r\n        cursor: \"pointer\",\r\n        \"&:hover\": {\r\n            background: theme.mainTheme.colorAH.colorHover,\r\n            color: theme.mainTheme.colorAH.colorTextHover,\r\n        },\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            display: \"none\",\r\n        },\r\n    },\r\n    arrowIcon: {\r\n        fontSize: \"32px\",\r\n        position: \"absolute\",\r\n        right: \"-4px\",\r\n        top: \"7px\",\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            display: \"none\",\r\n        },\r\n    },\r\n}))(PanelLayoutView);\r\n","import React from 'react';\r\nimport { withStyles } from '@material-ui/core/styles'\r\nimport AppBar from '@material-ui/core/AppBar';\r\nimport Toolbar from '@material-ui/core/Toolbar';\r\nimport IconButton from '@material-ui/core/IconButton';\r\nimport ArrowLeft from '@material-ui/icons/KeyboardArrowLeft';\r\n\r\nconst AppBarHeaderView = ({\r\n    classes,\r\n    title = \"\",\r\n    onClickBack\r\n}) => {\r\n    return (\r\n        <AppBar position=\"relative\" className={classes.header_appbar}>\r\n            <Toolbar className={classes.header_toobar}>\r\n                {onClickBack &&\r\n                    <IconButton className={classes.arrowIcon_button} onClick={onClickBack}>\r\n                        <ArrowLeft className={classes.arrowIcon} />\r\n                    </IconButton>\r\n                }\r\n                <div className={classes.header_text}>\r\n                    {title}\r\n                </div>\r\n            </Toolbar>\r\n        </AppBar>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    header_appbar: {\r\n        height: '45px',\r\n        lineHeight: '45px',\r\n        fontSize: theme.textSize.title,\r\n        textAlign: 'center'\r\n    },\r\n    header_toobar: {\r\n        minHeight: '100%',\r\n        width: '100%',\r\n        padding: '0px'\r\n    },\r\n    arrowIcon_button: {\r\n        padding: '20px',\r\n        left: '5px',\r\n        top:'2px',\r\n        position:'absolute'\r\n    },\r\n    arrowIcon: {\r\n        position: 'absolute',\r\n        fontSize: '32px',\r\n    },\r\n    header_text: {\r\n        width: '100%',\r\n        height :'45px',\r\n        // paddingRight: '18px',\r\n        [theme.breakpoints.down('sm')]: {\r\n            paddingRight: 0\r\n        }\r\n    },\r\n}))(AppBarHeaderView)\r\n","import React, { Fragment } from \"react\";\r\nimport PropTypes from \"prop-types\";\r\nimport { Scrollbars } from \"react-custom-scrollbars\";\r\nimport Grid from \"@material-ui/core/Grid\";\r\nimport ListItem from \"@material-ui/core/ListItem\";\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\nimport ExpansionPanel from \"@material-ui/core/ExpansionPanel\";\r\nimport ExpansionPanelSummary from \"@material-ui/core/ExpansionPanelSummary\";\r\nimport ExpansionPanelDetails from \"@material-ui/core/ExpansionPanelDetails\";\r\nimport ExpandMoreIcon from \"@material-ui/icons/ExpandMore\";\r\nimport classNames from \"classnames\";\r\n\r\nimport { CONFIG_MENU } from \"../../../../Constants/MenuConstants\";\r\nimport AppBarHeaderView from \"../AppBarHeaderView\";\r\n\r\nconst SubMenu = ({ classes, menu, subMenu, onItemClick }) => {\r\n    return (\r\n        <ExpansionPanel classes={{ root: classes.expandedEx }}>\r\n            <ExpansionPanelSummary\r\n                expandIcon={<ExpandMoreIcon />}\r\n                className={classes.rootExSummary}>\r\n                <div>{menu.MenuName}</div>\r\n            </ExpansionPanelSummary>\r\n            <ExpansionPanelDetails classes={{ root: classes.rootExDetails }}>\r\n                <Grid container>\r\n                    <Grid xs={12} item>\r\n                        {subMenu.map((itm, index) => {\r\n                            return (\r\n                                <Fragment key={`menu_panel_${itm.ID}_${index}`}>\r\n                                    <ListItem\r\n                                        divider\r\n                                        button\r\n                                        classes={{\r\n                                            root: classes.rootSubMenu,\r\n                                            divider: classes.dividerSubMenu,\r\n                                        }}\r\n                                        onClick={onItemClick(itm)}>\r\n                                        {itm.MenuName}\r\n                                    </ListItem>\r\n                                </Fragment>\r\n                            );\r\n                        })}\r\n                    </Grid>\r\n                </Grid>\r\n            </ExpansionPanelDetails>\r\n        </ExpansionPanel>\r\n    );\r\n};\r\n\r\nconst MenuView = ({\r\n    classes,\r\n    lstMenu = [],\r\n    onItemClick,\r\n    onDownloadUsermanual,\r\n    mobileView = false,\r\n    onClickBack,\r\n}) => {\r\n    const findIndexSubmenu = (findSubMenuID, listSubMenu) => {\r\n        return (\r\n            listSubMenu.findIndex((subMenu) => subMenu.ID === findSubMenuID) ===\r\n            -1\r\n        );\r\n    };\r\n\r\n    const checkSubmenu = (menuID, listSubMenu) => {\r\n        // เช็คกรณีมี ฟังก์ชัน ค้นหาและแก้ไข จะต้องไม่เจอ ฟังก์ชันค้นหา\r\n        switch (menuID) {\r\n            case CONFIG_MENU.FCN20.ID: //ตำแหน่งขออนุญาตก่อสร้าง\r\n                return findIndexSubmenu(CONFIG_MENU.FCN22.ID, listSubMenu)\r\n                    ? listSubMenu\r\n                    : listSubMenu.filter(\r\n                          (subMenu) => subMenu.ID !== CONFIG_MENU.FCN29.ID\r\n                      );\r\n            case CONFIG_MENU.FCN23.ID: //ตำแหน่งขอรหัสประจำบ้าน\r\n                return findIndexSubmenu(CONFIG_MENU.FCN25.ID, listSubMenu)\r\n                    ? listSubMenu\r\n                    : listSubMenu.filter(\r\n                          (subMenu) => subMenu.ID !== CONFIG_MENU.FCN30.ID\r\n                      );\r\n            default:\r\n                return listSubMenu;\r\n        }\r\n    };\r\n\r\n    const checkMakeList = (itm) => {\r\n        if (itm.SubMenu && itm.SubMenu.length > 0) {\r\n            return (\r\n                <SubMenu\r\n                    key={`menu_panel_${itm.ID}`}\r\n                    classes={classes}\r\n                    menu={itm}\r\n                    // subMenu={itm.SubMenu}\r\n                    subMenu={checkSubmenu(itm.ID, itm.SubMenu)}\r\n                    onItemClick={onItemClick}\r\n                />\r\n            );\r\n        } else {\r\n            return (\r\n                <Fragment key={`menu_panel_${itm.ID}`}>\r\n                    <ListItem\r\n                        className={classNames(classes.list_item)}\r\n                        divider\r\n                        button\r\n                        onClick={onItemClick(itm)}>\r\n                        {\" \"}\r\n                        {itm.MenuName}{\" \"}\r\n                    </ListItem>\r\n                </Fragment>\r\n            );\r\n        }\r\n    };\r\n\r\n    const makeList = () => {\r\n        // const listMenu = [\r\n        //     ...lstMenu,\r\n        //     { ID: \"FCN99\", MenuName: \"ดาวน์โหลดคู่มือการใช้งาน\", Layer: null, LayerID: null, MenuType: \"MENU\", SubMenu: null }\r\n        // ]\r\n        return lstMenu.map((itm) => {\r\n            return checkMakeList(itm);\r\n        });\r\n    };\r\n\r\n    const AppHeader = () => {\r\n        if (mobileView) {\r\n            return <AppBarHeaderView title=\"เมนู\" onClickBack={onClickBack} />;\r\n        } else {\r\n            return <AppBarHeaderView title=\"เมนู\" />;\r\n        }\r\n    };\r\n\r\n    return (\r\n        <Grid container className={classes.root}>\r\n            <AppHeader />\r\n            <Grid container className={classes.content}>\r\n                <Scrollbars autoHide={false} universal={true}>\r\n                    {makeList()}\r\n                    <ListItem\r\n                        className={classNames(classes.list_item)}\r\n                        divider\r\n                        button\r\n                        onClick={onDownloadUsermanual}>\r\n                        ดาวน์โหลดคู่มือการใช้งาน\r\n                    </ListItem>\r\n                </Scrollbars>\r\n            </Grid>\r\n        </Grid>\r\n    );\r\n};\r\n\r\nexport default withStyles((theme) => ({\r\n    root: {\r\n        width: \"100%\",\r\n        height: \"100%\",\r\n    },\r\n    content: {\r\n        position: \"relative\",\r\n        height: \"calc(100% - 45px)\",\r\n    },\r\n    rootExSummary: {\r\n        padding: \"0px 24px 0 15px\",\r\n        minHeight: \"unset !important\",\r\n        height: \"48px\",\r\n        \"&:hover\": {\r\n            backgroundColor: theme.mainTheme.colorAH.colorHover,\r\n            color: theme.mainTheme.colorAH.colorTextHover,\r\n        },\r\n    },\r\n    rootExDetails: {\r\n        padding: \"0px 0px 0px 0px\",\r\n    },\r\n    rootSubMenu: {\r\n        paddingLeft: \"40px\",\r\n        \"&:hover\": {\r\n            backgroundColor: theme.mainTheme.colorAH.colorHover,\r\n            color: theme.mainTheme.colorAH.colorTextHover,\r\n        },\r\n        \"&:focus\": {\r\n            backgroundColor: \"rgba(0, 0, 0, 0)\",\r\n        },\r\n    },\r\n    expandedEx: {\r\n        margin: \"0px\",\r\n        width: \"100%\",\r\n        boxShadow: \"none\",\r\n        borderStyle: \"solid\",\r\n        borderWidth: \"0px 0px 1px 0px\",\r\n        borderColor: \"#E0E0E0\",\r\n        position: \"initial\",\r\n    },\r\n    dividerSubMenu: {\r\n        borderWidth: \"1px 0px 0px 0px\",\r\n        borderStyle: \"solid\",\r\n        borderColor: \"#E0E0E0\",\r\n    },\r\n    list_item: {\r\n        \"&:focus\": {\r\n            backgroundColor: \"rgba(0, 0, 0, 0)\",\r\n        },\r\n        \"&:hover\": {\r\n            backgroundColor: theme.mainTheme.colorAH.colorHover,\r\n            color: theme.mainTheme.colorAH.colorTextHover,\r\n        },\r\n    },\r\n}))(MenuView);\r\n\r\nMenuView.propTypes = {\r\n    lstMenu: PropTypes.arrayOf(\r\n        PropTypes.shape({\r\n            id: PropTypes.string,\r\n            name: PropTypes.string,\r\n            type: PropTypes.string,\r\n        })\r\n    ),\r\n    onItemClick: PropTypes.func,\r\n};\r\n","import React, { Component } from \"react\";\r\nimport PropTypes from \"prop-types\";\r\nimport { connect } from \"react-redux\";\r\n\r\nimport MenuView from \"../../../../Presentationals/Web/Panel/Menu/MenuView\";\r\nimport {\r\n    FUNCTION_CONTROL,\r\n    SYSTEM,\r\n    PROFILE_GROUP_TYPE,\r\n} from \"../../../../Constants/Constants\";\r\nimport RouteConfig from \"../../../../Config/AppRoute/RouteConfig\";\r\n\r\nconst Menu = ({ authenRdc, menuRdc, onMenuItemClick, history }) => {\r\n    let lstMenu = [];\r\n\r\n    if (\r\n        authenRdc.system &&\r\n        authenRdc.profile &&\r\n        authenRdc.profile.functions &&\r\n        authenRdc.profile.functions[authenRdc.system]\r\n    ) {\r\n        lstMenu = authenRdc.profile.functions[authenRdc.system].filter(\r\n            (itm) => itm.MenuType === FUNCTION_CONTROL.MENU\r\n        );\r\n    }\r\n\r\n    const handleItemClick = (value) => (evt) => {\r\n        evt.stopPropagation();\r\n        if (onMenuItemClick) {\r\n            onMenuItemClick(value);\r\n        }\r\n    };\r\n\r\n    const handleDownloadUsermanual = () => {\r\n        if (authenRdc.profile) {\r\n            if (\r\n                authenRdc.profile.groupID ===\r\n                    PROFILE_GROUP_TYPE.PEOPLE_WITH_PROFILE.id ||\r\n                authenRdc.profile.groupID === PROFILE_GROUP_TYPE.PEOPLE.id\r\n            ) {\r\n                //ประชาชน\r\n                switch (authenRdc.system) {\r\n                    case SYSTEM.CMP: // สอบถามผังเมือง ปชช\r\n                        window.open(window.URL_USERMANUAL.CMP_PEOPLE);\r\n                        break;\r\n                    case SYSTEM.PMR1: //ผมร.1 ประชาชน\r\n                        window.open(window.URL_USERMANUAL.PMR_PEOPLE);\r\n                        break;\r\n                    default:\r\n                        break;\r\n                }\r\n            } else {\r\n                // เจ้าหน้าที่\r\n                switch (authenRdc.system) {\r\n                    case SYSTEM.CMP:\r\n                        window.open(window.URL_USERMANUAL.CMP);\r\n                        break;\r\n                    case SYSTEM.PMR1:\r\n                        window.open(window.URL_USERMANUAL.PMR);\r\n                        break;\r\n                    case SYSTEM.CAH:\r\n                        window.open(window.URL_USERMANUAL.CAH);\r\n                        break;\r\n                    case SYSTEM.Survey:\r\n                        window.open(window.URL_USERMANUAL.SURVEY);\r\n                        break;\r\n                    default:\r\n                        break;\r\n                }\r\n            }\r\n        }\r\n    };\r\n\r\n    const onClickBack = () => {\r\n        // history.push(RouteConfig.CMPMobile);\r\n        window.location.href = window.ROOT_SYSTEM_URL + RouteConfig.CMPMobile;\r\n    };\r\n\r\n    return (\r\n        <MenuView\r\n            lstMenu={lstMenu}\r\n            onItemClick={handleItemClick}\r\n            onDownloadUsermanual={handleDownloadUsermanual}\r\n            mobileView={menuRdc.MobileView}\r\n            onClickBack={onClickBack}\r\n        />\r\n    );\r\n};\r\n\r\nMenu.propTypes = {\r\n    onMenuItemClick: PropTypes.func,\r\n};\r\n\r\nconst mapStateToProps = (state) => ({\r\n    authenRdc: state.authen,\r\n    menuRdc: state.menu,\r\n});\r\n\r\nexport default connect(\r\n    mapStateToProps,\r\n    null\r\n)(Menu);\r\n","import React from 'react'\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport AppBarHeaderView from '../../../../AppBarHeaderView';\r\n\r\nconst SubmitPmrView = ({\r\n    children,\r\n    title,\r\n    onClickBack\r\n}) => {\r\n\r\n    return (\r\n        <Grid container>\r\n            <AppBarHeaderView\r\n                title={title}\r\n                onClickBack={onClickBack}\r\n            />\r\n            <Grid item xs={12} >\r\n                <Grid item xs={12} >\r\n                    {children}\r\n                </Grid>\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n  \r\n}))(SubmitPmrView)\r\n","import React from 'react'\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { Field } from 'redux-form';\r\nimport { reduxForm } from 'redux-form';\r\nimport { validateFormDms, normalizeInteger, normalizeNumber } from '../../../../../../Utilities/Validate';\r\nimport Button from '../../../../../../Controls/Containers/Button';\r\nimport TextFieldRedux from '../../../../../../Controls/Containers/TextFieldRedux';\r\n\r\nconst FormDmsView = ({\r\n    handleSubmit,\r\n    onSubmit\r\n}) => {\r\n    return (\r\n        <form onSubmit={handleSubmit(onSubmit)} method=\"POST\">\r\n            <Grid container spacing={0}>\r\n                <Grid item xs={12}>\r\n                    <Grid xs={12} item>\r\n                        <Grid xs={12} item>ละติจูด </Grid>\r\n                        <Grid container spacing={24}>\r\n                            <Grid xs={4} item>\r\n                                <Field\r\n                                    name=\"latDegrees\"\r\n                                    component={TextFieldRedux}\r\n                                    label={\"องศา\"}\r\n                                    required\r\n                                    disabled={true}\r\n                                />\r\n                            </Grid>\r\n                            <Grid xs={4} item>\r\n                                <Field\r\n                                    name=\"latMinutes\"\r\n                                    component={TextFieldRedux}\r\n                                    normalize={normalizeInteger}\r\n                                    label={\"ลิปดา\"}\r\n                                    required\r\n                                />\r\n                            </Grid>\r\n                            <Grid xs={4} item>\r\n                                <Field\r\n                                    name=\"latSeconds\"\r\n                                    component={TextFieldRedux}\r\n                                    normalize={normalizeNumber}\r\n                                    label={\"ฟิลิปดา\"}\r\n                                    required\r\n                                />\r\n                            </Grid>\r\n                        </Grid>\r\n\r\n                        <Grid xs={12} item>ลองติจูด </Grid>\r\n                        <Grid container spacing={24}>\r\n                            <Grid xs={4} item>\r\n                                <Field\r\n                                    name=\"longDegrees\"\r\n                                    component={TextFieldRedux}\r\n                                    label={\"องศา\"}\r\n                                    normalize={normalizeInteger}\r\n                                    required\r\n                                />\r\n                            </Grid>\r\n                            <Grid xs={4} item>\r\n                                <Field\r\n                                    name=\"longMinutes\"\r\n                                    component={TextFieldRedux}\r\n                                    normalize={normalizeInteger}\r\n                                    label={\"ลิปดา\"}\r\n                                    required\r\n                                />\r\n                            </Grid>\r\n                            <Grid xs={4} item>\r\n                                <Field\r\n                                    name=\"longSeconds\"\r\n                                    component={TextFieldRedux}\r\n                                    normalize={normalizeNumber}\r\n                                    label={\"ฟิลิปดา\"}\r\n                                    required\r\n                                />\r\n                            </Grid>\r\n                        </Grid>\r\n                    </Grid>\r\n                </Grid>\r\n                <Grid container justify=\"flex-end\" style={{ marginTop: '20px' }}>\r\n                    <Button\r\n                        type=\"submit\"\r\n                        label=\"ตกลง\"\r\n                    />\r\n                </Grid>\r\n            </Grid>\r\n        </form>\r\n    )\r\n}\r\n\r\nexport default reduxForm({\r\n    form: 'FormDmsView', // a unique identifier for this form\r\n    validate: validateFormDms,\r\n    initialValues: {\r\n        latDegrees: 13\r\n    }\r\n})(FormDmsView)","import React from 'react'\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { Field } from 'redux-form';\r\nimport { reduxForm } from 'redux-form';\r\nimport { validateFormLatLong } from '../../../../../../Utilities/Validate';\r\nimport Button from '../../../../../../Controls/Containers/Button';\r\nimport TextFieldRedux from '../../../../../../Controls/Containers/TextFieldRedux';\r\n\r\nconst FormLatLongView = ({\r\n    handleSubmit,\r\n    onSubmit\r\n}) => {\r\n    return (\r\n        <form onSubmit={handleSubmit(onSubmit)} method=\"POST\">\r\n            <Grid container spacing={0}>\r\n                <Grid item xs={12}>\r\n                    <Field\r\n                        name=\"latLong\"\r\n                        component={TextFieldRedux}\r\n                        label={\"ละติจูด, ลองจิจูด\"}\r\n                        placeholder={'ตัวอย่าง: 13.000000,100.000000'}\r\n                        required\r\n                    />\r\n                </Grid>\r\n                <Grid container justify=\"flex-end\" style={{ marginTop: '20px' }}>\r\n                    <Button\r\n                        type=\"submit\"\r\n                        label=\"ตกลง\"\r\n                    />\r\n                </Grid>\r\n            </Grid>\r\n        </form>\r\n    )\r\n}\r\n\r\nexport default reduxForm({\r\n    form: 'FormLatLongView', // a unique identifier for this form\r\n    validate: validateFormLatLong\r\n})(FormLatLongView)","import React from \"react\";\r\nimport Grid from \"@material-ui/core/Grid\";\r\nimport { Field } from \"redux-form\";\r\nimport { reduxForm } from \"redux-form\";\r\nimport {\r\n    validateFormUtm,\r\n    normalizeNumber,\r\n} from \"../../../../../../Utilities/Validate\";\r\nimport Button from \"../../../../../../Controls/Containers/Button\";\r\nimport TextFieldRedux from \"../../../../../../Controls/Containers/TextFieldRedux\";\r\n\r\nconst FormUtmView = ({ handleSubmit, onSubmit }) => {\r\n    return (\r\n        <form onSubmit={handleSubmit(onSubmit)} method=\"POST\">\r\n            <Grid container spacing={0}>\r\n                <Grid item xs={12}>\r\n                    <Field\r\n                        name=\"x\"\r\n                        component={TextFieldRedux}\r\n                        label={\"X, (E)\"}\r\n                        normalize={normalizeNumber}\r\n                        placeholder=\"ตัวอย่าง: 667700\"\r\n                        required\r\n                    />\r\n                    <Field\r\n                        name=\"y\"\r\n                        component={TextFieldRedux}\r\n                        normalize={normalizeNumber}\r\n                        label={\"Y, (N)\"}\r\n                        placeholder=\"ตัวอย่าง: 1522600\"\r\n                        required\r\n                    />\r\n                </Grid>\r\n                <Grid\r\n                    container\r\n                    justify=\"flex-end\"\r\n                    style={{ marginTop: \"20px\" }}>\r\n                    <Button type=\"submit\" label=\"ตกลง\" />\r\n                </Grid>\r\n            </Grid>\r\n        </form>\r\n    );\r\n};\r\n\r\nexport default reduxForm({\r\n    form: \"FormUtmView\", // a unique identifier for this form\r\n    validate: validateFormUtm,\r\n})(FormUtmView);\r\n","import React from 'react';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport ExpansionPanel from '@material-ui/core/ExpansionPanel';\r\nimport ExpansionPanelSummary from '@material-ui/core/ExpansionPanelSummary';\r\nimport ExpansionPanelDetails from '@material-ui/core/ExpansionPanelDetails';\r\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport SelectField from '../../../../../../Controls/Containers/SelectField';\r\nimport { SPECIFY_COORDINATE_MODE } from '../../../../../../Constants/Constants';\r\nimport FormDmsView from './FormDmsView';\r\nimport FormLatLongView from './FormLatLongView';\r\nimport FormUtmView from './FormUtmView';\r\n\r\nconst inputProps = {\r\n    name: \"SpecifyCoordinateMode\",\r\n    id: \"SpecifyCoordinateMode\"\r\n};\r\n\r\nconst SpecifyCoordinateView = ({\r\n    classes,\r\n    isActive,\r\n    name,\r\n    modes,\r\n    modeActive,\r\n    onClick,\r\n    onSubmit,\r\n    onChangeMode\r\n}) => {\r\n    const renderSwitch = () => {\r\n        switch (modeActive) {\r\n            case SPECIFY_COORDINATE_MODE.LAT_LONG.id:\r\n                return <FormLatLongView onSubmit={onSubmit} />\r\n            case SPECIFY_COORDINATE_MODE.DMS.id:\r\n                return <FormDmsView onSubmit={onSubmit} />\r\n            case SPECIFY_COORDINATE_MODE.UTM.id:\r\n                return <FormUtmView onSubmit={onSubmit} />\r\n            default:\r\n                break;\r\n        }\r\n    }\r\n\r\n    return (\r\n        <ExpansionPanel\r\n            classes={{\r\n                root: classes.expandedEx\r\n            }}\r\n            expanded={isActive}\r\n        >\r\n            <ExpansionPanelSummary\r\n                expandIcon={<ExpandMoreIcon />}\r\n                className={`${isActive ? classes.rootExSummaryActive : classes.rootExSummary}`}\r\n                onClick={onClick}\r\n            >\r\n                <div className={classes.heading}>{name}</div>\r\n            </ExpansionPanelSummary>\r\n            <ExpansionPanelDetails>\r\n                <Grid container>\r\n                    <Grid xs={12} item>\r\n                        <SelectField\r\n                            keyData={{ value: \"id\", label: \"name\" }}\r\n                            dataItems={modes}\r\n                            value={modeActive}\r\n                            labelName=\"Unit\"\r\n                            inputProps={inputProps}\r\n                            onChange={onChangeMode}\r\n                        />\r\n                    </Grid>\r\n                    <Grid xs={12} item>\r\n                        {renderSwitch()}\r\n                    </Grid>\r\n                </Grid>\r\n            </ExpansionPanelDetails>\r\n        </ExpansionPanel>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        width: '100%',\r\n    },\r\n    rootExSummary: {\r\n        padding: \"0px 24px 0 15px\",\r\n        '&:focus': {\r\n            backgroundColor: theme.mainTheme.color2\r\n        },\r\n        '&:hover': {\r\n            backgroundColor: theme.mainTheme.colorAH.colorHover,\r\n            color: theme.mainTheme.colorAH.colorTextHover\r\n        },\r\n        minHeight: \"unset !important\",\r\n        height: \"48px\"\r\n    },\r\n    rootExSummaryActive: {\r\n        padding: \"0px 24px 0 15px\",\r\n        backgroundColor: theme.mainTheme.colorAH.colorActive,\r\n        '&:hover': {\r\n            color: theme.mainTheme.colorAH.colorTextHover\r\n        },\r\n        minHeight: \"unset !important\",\r\n        height: \"48px\"\r\n    },\r\n    expandedEx: {\r\n        margin: \"0px\",\r\n        width: '100%',\r\n        boxShadow: 'none',\r\n        borderStyle: 'solid',\r\n        borderWidth: '0px 0px 1px 0px',\r\n        borderColor: '#E0E0E0',\r\n        position: \"initial\"\r\n    },\r\n}))(SpecifyCoordinateView)\r\n","import React, { Component } from 'react'\r\nimport { compose } from \"recompose\";\r\nimport { connect } from \"react-redux\";\r\nimport { bindActionCreators } from \"redux\";\r\n\r\n//import constants\r\nimport { SPECIFY_COORDINATE_MODE } from '../../../../../../Constants/Constants';\r\n\r\n//import actions\r\nimport * as MapAction from '../../../../../../Actions/Web/Maps/MapAction';\r\nimport * as MapFunction from '../../../../../../Map/MapFunctions';\r\n\r\n//import component\r\nimport SpecifyCoordinateView from '../../../../../../Presentationals/Web/Panel/Menu/MenuContent/SpecifyCoordinate/SpecifyCoordinateView';\r\nimport WithAlertMessage from '../../../../../../HOC/WithAlertMessage';\r\n\r\nconst MODES = Object.values(SPECIFY_COORDINATE_MODE);\r\n\r\nclass SpecifyCoordinate extends Component {\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.state = {\r\n\t\t\tmodeActive: MODES[0].id\r\n\t\t}\r\n\t}\r\n\tconvertDMSToLatLong = (degrees, minutes, seconds) => {\r\n\t\tdegrees = parseFloat(degrees)\r\n\t\tminutes = parseFloat(minutes)\r\n\t\tseconds = parseFloat(seconds)\r\n\r\n\t\treturn degrees + (minutes / 60) + (seconds / 3600)\r\n\t}\r\n\r\n\thandleSubmit = value => {\r\n\t\tconst { mapAction, hideResult, layerName } = this.props;\r\n\t\tconst { modeActive } = this.state;\r\n\t\tlet unit = null;\r\n\t\tlet x = null;\r\n\t\tlet y = null;\r\n\r\n\t\tif (hideResult) {\r\n\t\t\thideResult();\r\n\t\t}\r\n\r\n\t\tswitch (modeActive) {\r\n\t\t\tcase MODES[0].id://ละติจูด\r\n\t\t\t\tunit = \"LatLong\";\r\n\t\t\t\tconst latLong = value.latLong.split(',');\r\n\t\t\t\tconst lat = parseFloat(latLong[0].trim());\r\n\t\t\t\tconst long = parseFloat(latLong[1].trim());\r\n\t\t\t\tx = long;\r\n\t\t\t\ty = lat;\r\n\t\t\t\tbreak;\r\n\t\t\tcase MODES[1].id://องศา ฟิลิปดา\r\n\t\t\t\tunit = \"LatLong\";\r\n\t\t\t\tx = this.convertDMSToLatLong(value.longDegrees, value.longMinutes, value.longSeconds);\r\n\t\t\t\ty = this.convertDMSToLatLong(value.latDegrees, value.latMinutes, value.latSeconds);\r\n\t\t\t\tbreak;\r\n\t\t\tcase MODES[2].id:\r\n\t\t\t\tunit = \"Utm\";\r\n\t\t\t\tx = value.x;\r\n\t\t\t\ty = value.y;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tmapAction.bindMapCommand(MapFunction.specifyCoordinate, {\r\n\t\t\tx: x,\r\n\t\t\ty: y,\r\n\t\t\tunit: unit,\r\n\t\t\tlayerName: layerName,\r\n\t\t\tcallback: this.handleCallBackAddGrapic\r\n\t\t})\r\n\t}\r\n\r\n\thandleCallBackAddGrapic = (geometry, graphic) => {\r\n\t\tconst { callBackDrawGraphic } = this.props;\r\n\t\tif (callBackDrawGraphic) {\r\n\t\t\tcallBackDrawGraphic({ geometry: geometry }, graphic)\r\n\t\t}\r\n\t}\r\n\r\n\thandleChangeMode = evt => {\r\n\t\tconst { hideResult } = this.props;\r\n\t\tthis.setState({\r\n\t\t\tmodeActive: evt.target.value\r\n\t\t})\r\n\r\n\t\tif (hideResult) {\r\n\t\t\thideResult();\r\n\t\t}\r\n\t}\r\n\r\n\trender() {\r\n\t\tconst { modeActive } = this.state;\r\n\t\tconst {\r\n\t\t\tname,\r\n\t\t\tisActive,\r\n\t\t\tonClick,\r\n\t\t} = this.props;\r\n\r\n\t\treturn (\r\n\t\t\t<SpecifyCoordinateView\r\n\t\t\t\tisActive={isActive}\r\n\t\t\t\tname={name}\r\n\t\t\t\tmodeActive={modeActive}\r\n\t\t\t\tmodes={MODES}\r\n\t\t\t\tonClick={onClick}\r\n\t\t\t\tonSubmit={this.handleSubmit}\r\n\t\t\t\tonChangeMode={this.handleChangeMode}\r\n\t\t\t/>\r\n\t\t)\r\n\t}\r\n}\r\n\r\n// const reduxFormParameter = {\r\n// \tform: \"SpecifyCoordinate\",\r\n// };\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n\tmapAction: bindActionCreators(MapAction, dispatch)\r\n});\r\nconst enhance = compose(\r\n\tconnect(\r\n\t\tnull,\r\n\t\tmapDispatchToProps\r\n\t),\r\n);\r\n\r\nexport default WithAlertMessage(enhance(SpecifyCoordinate));\r\n","import React, { Fragment } from 'react'\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport ListItem from '@material-ui/core/ListItem';\r\nimport classNames from 'classnames';\r\nimport { LISTGRAPHICLAYER } from '../../../../../../../Constants/Constants';\r\n// import SpecifyCoordinate from '../../../../../../../Containers/Web/Panel/Menu/MenuContent/PMR1/SubmitPmr/SpecifyCoordinate';\r\nimport SpecifyCoordinate from '../../../../../../../Containers/Web/Panel/Menu/MenuContent/SpecifyCoordinate/SpecifyCoordinate';\r\n\r\n\r\nconst MenuSubmitPmrView = ({\r\n    classes,\r\n    listMode,\r\n    onMenuItemClick,\r\n    // callbackIdentify,\r\n    callBackDrawGraphic,\r\n}) => {\r\n    const generateListItem = () => {\r\n        return listMode.map((itm, index) => {\r\n            return (\r\n                <Fragment key={`askTheCityPlanMenu_${index}`}>\r\n                    {itm.id === \"specifyCoordinate\" ?\r\n                        <SpecifyCoordinate\r\n                            isActive={itm.isActive}\r\n                            name={itm.name}\r\n                            onClick={onMenuItemClick(itm)}\r\n                            layerName={LISTGRAPHICLAYER.GRAPHICLAYER_SUBMIT_PMR}\r\n                            callBackDrawGraphic={callBackDrawGraphic}\r\n                        />\r\n                        : <ListItem\r\n                            button\r\n                            key={`generateListItem-${itm.id}`}\r\n                            divider={true}\r\n                            className={classNames(classes.menu_item, { [classes.manu_item_active]: itm.isActive })}\r\n                            onClick={onMenuItemClick(itm)}>\r\n                            {itm.name}\r\n                        </ListItem>\r\n                    }\r\n                </Fragment >);\r\n        })\r\n    }\r\n\r\n    return (\r\n        <Fragment>\r\n            {generateListItem()}\r\n        </Fragment>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    menu_item: {\r\n        '&:focus': {\r\n            backgroundColor: theme.mainTheme.color2\r\n        },\r\n        '&:hover': {\r\n            backgroundColor: theme.mainTheme.colorAH.colorHover,\r\n            color: theme.mainTheme.colorAH.colorTextHover\r\n        }\r\n    },\r\n    manu_item_active: {\r\n        backgroundColor: theme.mainTheme.colorAH.colorActive,\r\n        color: theme.mainTheme.colorAH.colorTextActive,\r\n        '&:focus': {\r\n            backgroundColor: theme.mainTheme.colorAH.colorActive\r\n        },\r\n    }\r\n}))(MenuSubmitPmrView)\r\n","import React, { Fragment } from 'react';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport classNames from 'classnames';\r\n\r\n// stepActive = 4,\r\n// listStep = [1, 2, 3, 4]\r\n\r\nconst BreadCrumbView = ({\r\n    classes,\r\n    stepActive,\r\n    listStep\r\n}) => {\r\n    const indexActive = listStep.indexOf(stepActive);\r\n\r\n    return (\r\n        <Grid container className={classes.root} >\r\n            {listStep.map((item, index) => {\r\n                if (index === 0) {\r\n                    return (\r\n                        <div\r\n                            className={classNames(classes.item, { [classes.itemActive]: index <= indexActive })}\r\n                            key={`breadCrumb-${index}`} >\r\n                            {item}\r\n                        </div>\r\n                    )\r\n                } else {\r\n                    return (\r\n                        <Fragment key={`breadCrumb-${index}`}>\r\n                            <div className={listStep.length > 2 ? classes.lineShort : classes.lineLong} />\r\n                            <div className={classNames(classes.item, { [classes.itemActive]: index <= indexActive })}>{item}</div>\r\n                        </Fragment>\r\n                    )\r\n                }\r\n            })}\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        width: '100%',\r\n        height: '70px',\r\n        display: 'flex',\r\n        alignItems: 'center',\r\n        justifyContent: 'center'\r\n    },\r\n    item: {\r\n        width: '50px',\r\n        height: '50px',\r\n        borderRadius: '50%',\r\n        display: 'flex',\r\n        justifyContent: 'center',\r\n        alignItems: 'center',\r\n        border: '3px solid #CFDDEA',\r\n        fontWeight: 'bold',\r\n        boxShadow: '0 1px 10px 0 rgba(0, 0, 0, 0.2), 0 0px 2px 0 rgba(0, 0, 0, 0.19)',\r\n        color: 'black',\r\n        backgroundColor: 'white'\r\n    },\r\n    itemActive: {\r\n        backgroundColor: '#35D672',\r\n        color: 'white',\r\n    },\r\n    lineShort: {\r\n        height: '3px',\r\n        width: '10%',\r\n        backgroundColor: '#CFDDEA',\r\n        boxShadow: '0 1px 10px 0 rgba(0, 0, 0, 0.2), 0 0px 2px 0 rgba(0, 0, 0, 0.19)'\r\n    },\r\n    lineLong: {\r\n        height: '3px',\r\n        width: '30%',\r\n        backgroundColor: '#CFDDEA',\r\n        boxShadow: '0 1px 10px 0 rgba(0, 0, 0, 0.2), 0 0px 2px 0 rgba(0, 0, 0, 0.19)'\r\n    }\r\n}))(BreadCrumbView)\r\n","import React, { Component } from 'react';\r\nimport BreadCrumbView from '../Presentationals/BreadCrumbView';\r\n\r\nexport default class BreadCrumb extends Component {\r\n    render() {\r\n        const { stepActive, listStep } = this.props;\r\n\r\n        return (\r\n            <BreadCrumbView\r\n                stepActive={stepActive}\r\n                listStep={listStep}\r\n            />\r\n        )\r\n    }\r\n}\r\n","import React, { Fragment } from \"react\";\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\nimport Grid from \"@material-ui/core/Grid\";\r\nimport { Scrollbars } from \"react-custom-scrollbars\";\r\nimport Add from \"@material-ui/icons/Add\";\r\nimport Fab from \"@material-ui/core/Fab\";\r\n// import Button from '../../../../../../../../Controls/Containers/Button';\r\nimport BreadCrumb from \"../../../../../../../Controls/Containers/BreadCrumb\";\r\nimport Tooltip from \"../../../../../../../Controls/Containers/Tooltip\";\r\nimport classnames from \"classnames\";\r\n\r\nlet vh = window.innerHeight * 0.01;\r\ndocument.documentElement.style.setProperty(\"--vh\", `${vh}px`);\r\n\r\nconst FormSubmitPmrView = ({\r\n  classes,\r\n  children,\r\n  formStep,\r\n  viewForm,\r\n  onClickAddStepTwo,\r\n  onDrawGraphic,\r\n  onEditGraphic,\r\n  isActiveDraw,\r\n  isActiveEdit,\r\n}) => {\r\n  const renderTitle = () => {\r\n    switch (formStep) {\r\n      case 1:\r\n        return <label>ข้อมูลผู้ยื่นแบบ</label>;\r\n      case 2:\r\n        return (\r\n          <Fragment>\r\n            <label>ข้อมูลโฉนด</label>\r\n            {!viewForm && (\r\n              <Tooltip title=\"เพิ่มโฉนด\" placement=\"bottom\">\r\n                <Fab\r\n                  color=\"primary\"\r\n                  aria-label=\"Add\"\r\n                  className={classes.btnRightTitle}\r\n                  onClick={onClickAddStepTwo}\r\n                >\r\n                  <Add />\r\n                </Fab>\r\n              </Tooltip>\r\n            )}\r\n          </Fragment>\r\n        );\r\n      case 3:\r\n      case 4:\r\n        return <label>ข้อมูลการใช้ประโยชน์ที่ดิน</label>;\r\n      default:\r\n        break;\r\n    }\r\n  };\r\n\r\n  return (\r\n    <Grid container>\r\n      <Grid item xs={12}>\r\n        <BreadCrumb stepActive={formStep} listStep={[1, 2, 3, 4]} />\r\n      </Grid>\r\n      <Grid item xs={12}>\r\n        <div className={classes.title}>{renderTitle()}</div>\r\n      </Grid>\r\n\r\n      {!viewForm && (\r\n        <Grid container justify=\"flex-end\" className={classes.row}>\r\n          <Tooltip title=\"วาดตำแหน่งใหม่\" placement=\"bottom\">\r\n            <div\r\n              onClick={onDrawGraphic}\r\n              className={classnames(\r\n                classes.btnManageGraphic,\r\n                { [classes.btnAddNormal]: !isActiveDraw },\r\n                { [classes.btnAddSelected]: isActiveDraw }\r\n              )}\r\n            />\r\n          </Tooltip>\r\n          <Tooltip title=\"แก้ไขตำแหน่ง\" placement=\"bottom\">\r\n            <div\r\n              onClick={onEditGraphic}\r\n              className={classnames(\r\n                classes.btnManageGraphic,\r\n                { [classes.btnEditNormal]: !isActiveEdit },\r\n                { [classes.btnEditSelected]: isActiveEdit }\r\n              )}\r\n            />\r\n          </Tooltip>\r\n        </Grid>\r\n      )}\r\n\r\n      <Grid\r\n        container\r\n        wrap=\"nowrap\"\r\n        className={`${viewForm ? classes.rootBodyViewMode : classes.rootBody}`}\r\n      >\r\n        <Scrollbars\r\n          autoHide={true}\r\n          style={{ height: \"calc(100% - 80px)\", maxWidth: \"100%\" }}\r\n        >\r\n          {children}\r\n        </Scrollbars>\r\n      </Grid>\r\n    </Grid>\r\n  );\r\n};\r\n\r\nexport default withStyles((theme) => ({\r\n  root: {},\r\n  title: {\r\n    color: theme.mainTheme.color1,\r\n    textAlign: \"center\",\r\n    fontSize: theme.textSize.title,\r\n    marginTop: \"10px\",\r\n  },\r\n  rootBody: {\r\n    height: \"calc((var(--vh, 1vh) * 100) - 182px)\",\r\n    width: \"100%\",\r\n    [theme.breakpoints.down(\"sm\")]: {\r\n      // height: 'calc(100vh - 196px)',\r\n      height: \"100vh\",\r\n      height: \"calc((var(--vh, 1vh) * 100) - 240px)\",\r\n    },\r\n  },\r\n  rootBodyViewMode: {\r\n    height: \"100vh\",\r\n    height: \"calc((var(--vh, 1vh) * 100) - 135px)\",\r\n    width: \"100%\",\r\n    [theme.breakpoints.down(\"sm\")]: {\r\n      height: \"calc((var(--vh, 1vh) * 100) - 196px)\",\r\n    },\r\n  },\r\n  rootBreadCrumb: {\r\n    width: \"100%\",\r\n    height: \"70px\",\r\n    padding: \"10px\",\r\n  },\r\n  breadCrumbBody: {\r\n    width: \"110%\",\r\n    height: \"50px\",\r\n    backgroundColor: \"#cccccc\",\r\n    lineHeight: \"50px\",\r\n    textAlign: \"center\",\r\n    // cursor: \"pointer\",\r\n    color: \"white\",\r\n    // [\"&:hover\"]: {\r\n    //     backgroundColor: theme.mainTheme.color1,\r\n    // }\r\n  },\r\n  breadCrumbActive: {\r\n    backgroundColor: theme.mainTheme.color1,\r\n  },\r\n  breadCrumbStepStart: {\r\n    clipPath: \"polygon(75% 0%, 100% 50%, 75% 100%, 0% 100%, 0 54%, 0% 0%)\",\r\n    borderRadius: \"10px\",\r\n  },\r\n  breadCrumbStepEnd: {\r\n    clipPath: \"polygon(100% 0, 100% 50%, 100% 100%, 0% 100%, 25% 50%, 0% 0%)\",\r\n    borderRadius: \"10px\",\r\n  },\r\n  breadCrumbStep: {\r\n    clipPath: \"polygon(75% 0%, 100% 50%, 75% 100%, 0% 100%, 25% 50%, 0% 0%)\",\r\n  },\r\n  positionBcStep2: {\r\n    marginLeft: \"-5%\",\r\n  },\r\n  positionBcStep3: {\r\n    marginLeft: \"-10%\",\r\n  },\r\n  positionBcStep4: {\r\n    marginLeft: \"-15%\",\r\n  },\r\n  btnRightTitle: {\r\n    position: \"absolute\",\r\n    right: \"111px\",\r\n    top: \"155px\",\r\n    width: \"35px\",\r\n    height: \"35px\",\r\n  },\r\n  btnManageGraphic: {\r\n    width: \"40px\",\r\n    minHeight: \"40px\",\r\n    margin: \"5px\",\r\n    display: \"block\",\r\n    padding: 0,\r\n    backgroundSize: \"40px 40px\",\r\n    backgroundRepeat: \"no-repeat\",\r\n    backgroundPosition: \"center\",\r\n  },\r\n  btnAddNormal: {\r\n    backgroundImage: `url(${\r\n      process.env.PUBLIC_URL\r\n    }/img/maptools/map_drawing_03_add_normal@2x.png)`,\r\n    \"&:Hover\": {\r\n      backgroundImage: `url(${\r\n        process.env.PUBLIC_URL\r\n      }/img/maptools/map_drawing_03_add_selected@2x.png)`,\r\n    },\r\n    cursor: \"pointer\",\r\n  },\r\n  btnAddSelected: {\r\n    backgroundImage: `url(${\r\n      process.env.PUBLIC_URL\r\n    }/img/maptools/map_drawing_03_add_selected@2x.png)`,\r\n    cursor: \"pointer\",\r\n  },\r\n  btnEditNormal: {\r\n    backgroundImage: `url(${\r\n      process.env.PUBLIC_URL\r\n    }/img/maptools/map_drawing_03_edit_normal@2x.png)`,\r\n    \"&:Hover\": {\r\n      backgroundImage: `url(${\r\n        process.env.PUBLIC_URL\r\n      }/img/maptools/map_drawing_03_edit_selected@2x.png)`,\r\n    },\r\n    cursor: \"pointer\",\r\n  },\r\n  btnEditSelected: {\r\n    backgroundImage: `url(${\r\n      process.env.PUBLIC_URL\r\n    }/img/maptools/map_drawing_03_edit_selected@2x.png)`,\r\n    cursor: \"pointer\",\r\n  },\r\n}))(FormSubmitPmrView);\r\n","import React from 'react'\r\nimport { withStyles } from '@material-ui/core'\r\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\r\nimport FormControl from '@material-ui/core/FormControl';\r\nimport Radio from '@material-ui/core/Radio';\r\nimport FormHelperText from '@material-ui/core/FormHelperText';\r\n\r\nimport RadioGroup from '@material-ui/core/RadioGroup';\r\nconst RadioReduxView = ({\r\n    label,\r\n    prositionLabel = \"end\",\r\n    input,\r\n    meta: { touched, error, invalid },\r\n    classes,\r\n    styleUnit,\r\n    root,\r\n    val,\r\n    valueInRadio,\r\n    isFormOne\r\n}) => {\r\n    // รับค่าเป็น array เข้ามา gen แล้วแสดงออกเป็น Group ของ Radio\r\n    return (\r\n        <FormControl className={`${classes.root} ${root}`} >\r\n            {/* {!isFormOne && <FormControlLabel */} \r\n            {isFormOne && <FormControlLabel\r\n                {...input}\r\n                control={<Radio color={'primary'} />}\r\n                label={label}\r\n                labelPlacement={prositionLabel}\r\n                style={styleUnit}\r\n            >\r\n            </FormControlLabel>}\r\n            <RadioGroup\r\n                {...input}\r\n            >\r\n            \r\n            {valueInRadio}\r\n            </RadioGroup>\r\n            <FormHelperText className={classes.formHelper}>{touched && invalid && error}</FormHelperText>\r\n        </FormControl>\r\n\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        // height: '40px'\r\n        height:\"100%\"\r\n    },\r\n    control: {\r\n        width: '100%',\r\n        // marginTop: theme.spacing.unit,\r\n        // marginBottom: theme.spacing.unit,\r\n    },\r\n    layout: {\r\n        width: '20%',\r\n    },\r\n    formHelper: {\r\n        marginTop: -5,\r\n        marginLeft: 30,\r\n        color: 'red'\r\n\r\n    }\r\n}))(RadioReduxView)\r\n\r\n","import React from 'react'\r\nimport RadioReduxView from '../Presentationals/RadioReduxView'\r\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\r\nimport Radio from '@material-ui/core/Radio';\r\n\r\nconst RadioRedux = ({\r\n\tlabel,\r\n\tstyleUnit,\r\n\tinput,\r\n\ttype,\r\n\tmeta,\r\n\trequired,\r\n\tdisabled,\r\n\troot,\r\n\tval,\r\n\tisFormOne\r\n}) => {\r\n    // รับค่าเป็น array เข้ามา gen แล้วแสดงออกเป็น Group ของ Radio\r\n\r\n\tconst genTag = () => {\r\n        let tag = []\r\n        if (val) {\r\n            val.map((res, index) => {\r\n                tag.push(\r\n                    <FormControlLabel\r\n                        key={`${res.value}${index}`}\r\n\t\t\t\t\t\tcontrol={<Radio />}\r\n                        value={res.value}\r\n\t\t\t\t\t\tlabel={res.name} \r\n\t\t\t\t\t/>\r\n\t\t\t\t)\r\n\t\t\t\t\r\n\t\t\t\treturn true\r\n            })\r\n        }\r\n        return tag\r\n\t}\r\n\r\n\treturn (\r\n\t\t<RadioReduxView\r\n\t\t\tvalueInRadio={genTag()}\r\n\t\t\tlabel={label}\r\n\t\t\tinput={input}\r\n\t\t\ttype={type}\r\n\t\t\tmeta={meta}\r\n\t\t\trequired={required}\r\n\t\t\tdisabled={disabled}\r\n\t\t\tstyleUnit={styleUnit}\r\n\t\t\troot={root}\r\n\t\t\tval={val}\r\n\t\t\tisFormOne={isFormOne}\r\n\t\t/>\r\n\t)\r\n}\r\nexport default RadioRedux\r\n","import React from 'react';\r\nimport { withStyles } from '@material-ui/core';\r\n\r\nconst ErrorSubmitView = ({\r\n    classes,\r\n    className,\r\n    error\r\n}) => {\r\n    return (\r\n        <label className={classes.red}>\r\n            {error}\r\n        </label>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    red: {\r\n        color: 'red'\r\n    }\r\n}))(ErrorSubmitView)","import React, { Component } from 'react';\r\nimport ErrorSubmitView from '../Presentationals/ErrorSubmitView'\r\n\r\nexport default class ErrorSubmit extends Component {\r\n\r\n    render() {\r\n        const {\r\n            meta: { error }\r\n        } = this.props;\r\n        return (\r\n            <ErrorSubmitView\r\n            error={error}\r\n            />\r\n        )\r\n    }\r\n}\r\n","import React from 'react';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { Field } from 'redux-form';\r\nimport TextFieldRedux from '../../../../../../../../Controls/Containers/TextFieldRedux';\r\nimport Button from '../../../../../../../../Controls/Containers/Button';\r\n// import Moment from 'react-moment';\r\nimport 'moment/locale/th';\r\nimport Checkbox from '@material-ui/core/Checkbox';\r\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\r\nimport SelectFieldRedux from '../../../../../../../../Controls/Containers/SelectFieldRedux';\r\nimport RadioRedux from '../../../../../../../../Controls/Containers/RadioRedux';\r\nimport {BTN} from '../../../../../../../../Constants/Constants'\r\nimport ErrorSubmit from '../../../../../../../../Controls/Containers/ErrorSubmit'\r\n\r\nconst renderCheckbox = ({ input, label }) => (\r\n    <FormControlLabel\r\n        control={\r\n            <Checkbox\r\n                checked={input.value ? true : false}\r\n                onChange={input.onChange}\r\n                color='primary'\r\n            />\r\n        }\r\n        label={label}\r\n    />\r\n);\r\n\r\nconst renderCheckboxNameType = (nameTypes, nameTypeSelect, onChangeChkOther, checkboxOther) => {\r\n\r\n    return nameTypes.map((nametype, index) => {\r\n\r\n        if (nametype.value === \"9\") {\r\n            return (\r\n                <Grid key={`${nametype.value}-${index}`} container>\r\n                    <Grid xs={3} item>\r\n                        <Field key={`${nametype.name}-${index}`} onChange={onChangeChkOther} name={`nameType${nametype.value}`} component={renderCheckbox} label={nametype.name} />\r\n                    </Grid>\r\n                    <Grid xs={9} item>\r\n                        <Field\r\n                            name=\"other\"\r\n                            component={TextFieldRedux}\r\n                            disabled={checkboxOther}\r\n                        // disabled={true}\r\n                        />\r\n                    </Grid>\r\n                </Grid>\r\n            )\r\n        } else {\r\n            return (\r\n                <Grid xs={6} key={`${nametype.value}-${index}`} item>\r\n                    <Field key={`${nametype.name}-${index}`} name={`nameType${nametype.value}`} component={renderCheckbox} label={nametype.name} />\r\n                </Grid>\r\n            )\r\n        }\r\n    })\r\n}\r\n\r\nconst FromOneView = ({\r\n    classes,\r\n    // formId,\r\n    // date,\r\n    REQNO,\r\n    nameTypes,\r\n    // radioGroupTwo,\r\n    nameTypeSelect,\r\n    // onHandleSubmit,\r\n    onSubmitCallBack,\r\n    onClickBack,\r\n    onChangeChkOther,\r\n    selectRadio,\r\n    checkboxOther,\r\n    luProvince,\r\n    luDistrict,\r\n    luSubDistrict,\r\n    onChangeAdminPoly,\r\n    isFormOne,\r\n    isSubmitError\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root}>\r\n\r\n            <Field\r\n                name=\"parameterAt\"\r\n                label=\"เขียนที่\"\r\n                component={TextFieldRedux}\r\n\r\n            />\r\n\r\n            {REQNO && <Field\r\n                // name=\"PMR_ID\"\r\n                name=\"REQNO\"\r\n                label=\"รหัสคำร้อง\"\r\n                component={TextFieldRedux}\r\n                disabled\r\n            />}\r\n\r\n            <Field\r\n                name=\"currentDate\"\r\n                label=\"วันที่\"\r\n                component={TextFieldRedux}\r\n                disabled\r\n            />\r\n            <Field\r\n                name=\"parameterName\"\r\n                label=\"ข้าพเจ้า\"\r\n                component={TextFieldRedux}\r\n                required\r\n            />\r\n            <Field\r\n                name=\"parameterIDCard\"\r\n                label=\"เลขบัตรประชาชน\"\r\n                component={TextFieldRedux}\r\n                maxLength={13}\r\n            />\r\n            <Field\r\n                name=\"parameterHouseNo\"\r\n                label=\"บ้านเลขที่\"\r\n                component={TextFieldRedux}\r\n                maxLength={20}\r\n            />\r\n            <Field\r\n                name=\"parameterMoo\"\r\n                label=\"หมู่ที่\"\r\n                component={TextFieldRedux}\r\n                maxLength={5}\r\n            />\r\n            <Field\r\n                name=\"parameterSoi\"\r\n                label=\"ตรอก/ซอย\"\r\n                component={TextFieldRedux}\r\n                maxLength={100}\r\n            />\r\n            <Field\r\n                name=\"parameterRoad\"\r\n                label=\"ถนน\"\r\n                component={TextFieldRedux}\r\n                maxLength={100}\r\n            />\r\n            <Field\r\n                name=\"province\"\r\n                label=\"จังหวัด\"\r\n                component={SelectFieldRedux}\r\n                onChangeValue={onChangeAdminPoly(\"province\")}\r\n                data={luProvince}\r\n                keyData={{ value: \"value\", label: \"name\" }}\r\n            // val={0}\r\n            // required\r\n            />\r\n            <Field\r\n                name=\"district\"\r\n                label=\"เขต/อำเภอ\"\r\n                component={SelectFieldRedux}\r\n                onChangeValue={onChangeAdminPoly(\"district\")}\r\n                data={luDistrict}\r\n                keyData={{ value: \"value\", label: \"name\" }}\r\n            // val={0}\r\n            // required\r\n            />\r\n            <Field\r\n                name=\"subDistrict\"\r\n                label=\"แขวง/ตำบล\"\r\n                component={SelectFieldRedux}\r\n                data={luSubDistrict}\r\n                keyData={{ value: \"value\", label: \"name\" }}\r\n            // val={0}\r\n            // required\r\n            />\r\n            <Field\r\n                name=\"parameterZipCode\"\r\n                label=\"รหัสไปรษณีย์\"\r\n                component={TextFieldRedux}\r\n                maxLength={5}\r\n            />\r\n            <Grid container>\r\n                {renderCheckboxNameType(nameTypes, nameTypeSelect, onChangeChkOther, checkboxOther)}\r\n            </Grid>\r\n\r\n            <Grid container>\r\n                <Grid xs={12} item><label>มีความประสงค์</label><label className={classes.asterisk}>*</label></Grid>\r\n                <Grid xs={12} className={classes.containnerObjective} item>\r\n                    {/* {radioGroupTwo} */}\r\n                    {/* ส่งชุดของ Radio เข้ามา*/}\r\n                    <Field\r\n                        name=\"parameterRadioTwo\"\r\n                        component={RadioRedux}\r\n                        val={selectRadio}\r\n                        isFormOne={isFormOne}\r\n                    // type=\"radio\" \r\n                    />\r\n                </Grid>\r\n            </Grid>\r\n            <div style={{ width: '100%', textAlign: 'justify' }}>\r\n                {`ตามกฏกระทรวงให้ใช้บังคับผังเมืองรวมกรุงเทพมหานครต่อเจ้าพนักงานท้องถิ่น`}\r\n            </div>\r\n\r\n            <Grid container justify=\"center\" spacing={24} className={classes.divFooter}>\r\n            {(isSubmitError) &&\r\n                    <Grid item xs={12}>\r\n                        <Field\r\n                            name=\"errorForm\"\r\n                            component={ErrorSubmit}\r\n                        />\r\n                    </Grid>}\r\n                <Grid item>\r\n                    <Button\r\n                        // color=\"black\"\r\n                        label={BTN.TH.CANCEL}\r\n                        onClick={onClickBack}\r\n                        // className={classes.btnRegister}\r\n                    />\r\n                </Grid>\r\n                <Grid item>\r\n                    <Button\r\n                        type=\"submit\"\r\n                        label={BTN.TH.NEXT}\r\n                        onClick={onSubmitCallBack}\r\n                        // className={classes.btnLogin}\r\n                    />\r\n                </Grid>\r\n            </Grid>\r\n\r\n        </Grid>\r\n    )\r\n}\r\n\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        width: '100%',\r\n        padding: \"10px\"\r\n        // height: '100%',\r\n        // position: 'relative'\r\n    },\r\n    labelTextCenter: {\r\n        // textAlign: 'center'\r\n    },\r\n    labelText: {\r\n        display: 'flex',\r\n        // justifyContent: 'center',\r\n        alignItems: 'center'\r\n    },\r\n    divFooter: {\r\n        marginTop: '10px',\r\n        marginBottom: '10px'\r\n    },\r\n    containnerRow: {\r\n        height: '50px',\r\n        width: '100%',\r\n        marginBottom: '15px'\r\n    },\r\n    containnerRowText: {\r\n        height: '30px',\r\n        width: '100%',\r\n        marginBottom: '15px'\r\n    },\r\n    rootForm: {\r\n        width: '98%',\r\n        height: '100%'\r\n    },\r\n    containnerObjective: {\r\n        // marginTop: '20px'\r\n        height: '110px'\r\n    },\r\n    asterisk: {\r\n        color: \"red\"\r\n    }\r\n}))(FromOneView)","import * as ActionTypes from '../../../Constants/ActionTypes';\r\n\r\nexport const saveLandDetail = (data, geometry) => {\r\n    return {\r\n        type: ActionTypes.SET_LAND_DETAIL,\r\n        data: data,\r\n        geometry: geometry\r\n    }\r\n}\r\n\r\nexport const saveDistrictPMR1ID = (data) => {\r\n    return {\r\n        type: ActionTypes.SET_DISTRICT_PMR1_ID,\r\n        data: data\r\n    }\r\n}\r\n\r\nexport const saveAdminpolyStepThree = (data) =>({\r\n    type: ActionTypes.SET_ADMINPOLY_STEP_THREE,\r\n    data: data\r\n})\r\n\r\nexport const saveFormStepOne = (data) => {\r\n    return {\r\n        type: ActionTypes.SET_FORM_STEP_ONE,\r\n        data: data\r\n    }\r\n}\r\n\r\nexport const saveFormStepTwo = (data) => {\r\n    return {\r\n        type: ActionTypes.SET_FORM_STEP_TWO,\r\n        data: data\r\n    }\r\n}\r\n\r\nexport const saveFormStepThree = (data) => {\r\n    return {\r\n        type: ActionTypes.SET_FORM_STEP_THREE,\r\n        data: data\r\n    }\r\n}\r\n\r\nexport const saveFormStepFour = (data) => {\r\n    return {\r\n        type: ActionTypes.SET_FORM_STEP_FOUR,\r\n        data: data\r\n    }\r\n}\r\n\r\nexport const clearFormStep = () => {\r\n    return {\r\n        type: ActionTypes.CLEAR_FORM_STEP,\r\n    }\r\n}\r\n\r\nexport const changeStatusForm = (data)=>{\r\n    return {\r\n        type: ActionTypes.SET_STATUS_FOUR,\r\n        data:data\r\n    }\r\n}\r\n\r\n","import React, { useState, useEffect } from 'react'\r\nimport { connect } from 'react-redux'\r\nimport { reduxForm, formValueSelector, getFormValues, isDirty, isPristine } from 'redux-form'\r\nimport { compose } from 'recompose'\r\nimport { Field } from 'redux-form';\r\nimport { bindActionCreators } from \"redux\";\r\n// import moment from \"moment\";\r\n\r\n//import component\r\nimport FormOneView from '../../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/PMR1/SubmitPmr/FormStep/FormOneView'\r\nimport RadioRedux from '../../../../../../../../Controls/Containers/RadioRedux'\r\n\r\n//import servie - utils\r\nimport { fetchGet_ } from '../../../../../../../../Utilities/ServiceUtils'\r\nimport { formOneValidate } from '../../../../../../../../Utilities/Validate';\r\nimport { dateThaiFormat,convertDateTimeToDisplayDate } from '../../../../../../../../Utilities/DateTimeUtil';\r\n\r\n//import action\r\nimport * as SubmitPmrAction from '../../../../../../../../Actions/Web/Panel/SubmitPmrAction';\r\n\r\nconst FromOne = (props) => {\r\n    const {\r\n        change,\r\n        handleSubmit,\r\n        submitPmrAction,\r\n        submitPmrRdc,\r\n        onChangeStep,\r\n        onClickBack,\r\n        resultPMR1,\r\n        _values,\r\n        initialize\r\n    } = props;\r\n\r\n    const [nameTypes, setNameType] = useState([]);\r\n    const [radioGroupTwo, setRadioGroupTwo] = useState();\r\n    const [checkboxOther, setCheckboxOther] = useState(true);\r\n    const [luDistrict,setLuDistrict] = useState([]);\r\n    const [luSubDistrict,setluSubDistrict] = useState([]);\r\n    const [luProvince, setluProvince] = useState([]);\r\n    const [province, setProvince] = useState();\r\n    const [isSubmitError,setIsSubmitError] = useState(false);\r\n\r\n    const getLookupPartOne = () => {\r\n        fetchGet_(process.env.REACT_APP_GET_LUTNAME_TYPE).then(res => {\r\n            if (!res.ok) {\r\n                throw res.status;\r\n            }\r\n            return res.json();\r\n        })\r\n        .then(result => {\r\n            setNameType(result.result)\r\n\r\n            if (!submitPmrRdc.stepOne.pmr1id) {\r\n                setDefaultNameType(result.result)\r\n            }\r\n        })\r\n        .catch(ex => {\r\n            console.log('ex fetchAddMajorTopic', ex)\r\n        })\r\n    }\r\n\r\n    const getLookupPartTwo = () => {\r\n        fetchGet_(process.env.REACT_APP_GET_LUTOBJECTIVE).then(res => {\r\n            if (!res.ok) {\r\n                throw res.status;\r\n            }\r\n            return res.json();\r\n        })\r\n        .then(result => {\r\n            setRadioGroupTwo(result.result)\r\n        })\r\n        .catch(ex => {\r\n            console.log('ex fetchAddMajorTopic', ex)\r\n        })\r\n    }\r\n\r\n    const callServiceProvince = () => {\r\n        fetchGet_(`${process.env.REACT_APP_LU_PROVINCE}`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(data => {\r\n                setluProvince(data.result)\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceDistric', ex)\r\n            })\r\n    }\r\n\r\n    useEffect(() => {\r\n        if (submitPmrRdc.stepOne.nameType9 !== undefined) {\r\n            setCheckboxOther(!submitPmrRdc.stepOne.nameType9)\r\n        }\r\n        if (submitPmrRdc.stepOne.province) {\r\n            callServiceDistrict(submitPmrRdc.stepOne.province)\r\n            if(submitPmrRdc.stepOne.district) {\r\n                callServiceSubDistrict(submitPmrRdc.stepOne.province,submitPmrRdc.stepOne.district)\r\n            }\r\n        }\r\n        // console.log('resultPMR1',resultPMR1)\r\n        // if(resultPMR1){ //set ค่าให้พวก textField ที่disable (เมื่อใช้ change **จะทำให้ติด dirty (ยังหาวิธีแก้ไม่ได้))\r\n        //     // if(submitPmrRdc.stepOne.REQNO){\r\n        //     //     change(\"PMR_ID\",submitPmrRdc.stepOne.REQNO)\r\n        //     // }\r\n        //     change(\"currentDate\",dateThaiFormat(new Date(resultPMR1.date)))\r\n\r\n        // }else{\r\n        //     change(\"currentDate\",dateThaiFormat(new Date()))\r\n        // }\r\n\r\n        // console.log('props',props)\r\n\r\n        // initialValues: submitPmrRdc.stepOne,\r\n        const initialValues = submitPmrRdc.stepOne;\r\n\r\n        if(resultPMR1 && resultPMR1.date){\r\n            initialValues.currentDate = dateThaiFormat(new Date(resultPMR1.date));\r\n        }else if(submitPmrRdc.stepOne && submitPmrRdc.stepOne.date){\r\n            initialValues.currentDate = dateThaiFormat(new Date(submitPmrRdc.stepOne.date));\r\n        }else{\r\n            initialValues.currentDate = dateThaiFormat(new Date())\r\n        }\r\n\r\n        initialize(initialValues);\r\n\r\n        getLookupPartOne();\r\n        getLookupPartTwo();      \r\n        callServiceProvince();\r\n    }, []);\r\n\r\n  \r\n    const callServiceDistrict = (provinceID) => {\r\n        fetchGet_(`${process.env.REACT_APP_LU_DISTRICT}?provinceid=${provinceID}`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(data => {\r\n                setLuDistrict(data.result)\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceDistric', ex)\r\n            })\r\n    }\r\n\r\n    const callServiceSubDistrict = (provinceId,districtID) => {\r\n        fetchGet_(`${process.env.REACT_APP_LU_SUBDISTRICT}?provinceid=${provinceId}&districtid=${districtID}`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(data => {\r\n                if(data && data.result){\r\n                    setluSubDistrict(data.result)\r\n                }\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceSubDistric', ex)\r\n            })\r\n    }\r\n\r\n    const handleChangeAdminPoly = (type) => (evt) => {\r\n        const { change } = props;\r\n\r\n        switch (type) {\r\n            case \"province\":\r\n                callServiceDistrict(evt.target.value);\r\n                setProvince(evt.target.value)\r\n                setLuDistrict([]);\r\n                setluSubDistrict([]);\r\n                change('district', null)\r\n                change('subDistrict', null)\r\n                break;\r\n            case \"district\":\r\n                callServiceSubDistrict(province,evt.target.value);\r\n                setluSubDistrict([]);\r\n                change(\"subDistrict\", null);\r\n                break;\r\n            default:\r\n                break;\r\n        }\r\n    }\r\n\r\n    const onClickBackPanel = () => {\r\n        if (onClickBack) {\r\n            onClickBack()\r\n        }\r\n    }\r\n\r\n    const onSubmitCallBack = (res) => {\r\n        // res.date = moment().format('YYYY-MM-D')\r\n        // res.currentDate = moment().format('YYYY-MM-D')\r\n\r\n        if(resultPMR1 && resultPMR1.date){\r\n            res.date = convertDateTimeToDisplayDate(new Date(resultPMR1.date),'YYYY-MM-d','en');\r\n        }else if(submitPmrRdc.stepOne && submitPmrRdc.stepOne.date){\r\n            res.date =  convertDateTimeToDisplayDate(new Date(submitPmrRdc.stepOne.date),'YYYY-MM-d','en');\r\n        }else{\r\n            res.date =  convertDateTimeToDisplayDate(new Date(),'YYYY-MM-d','en')\r\n        }\r\n\r\n        submitPmrAction.saveFormStepOne(res)\r\n        if (onChangeStep) {\r\n            onChangeStep(2)\r\n        }\r\n    }\r\n\r\n    const setDefaultNameType = (data) => {\r\n        let nameType = {}\r\n        data.forEach(data => {\r\n            nameType[data.value] = false\r\n        })\r\n        change(\"nameType\", nameType)\r\n    }\r\n\r\n    const genTagTwo = () => {\r\n        let tag = []\r\n        if (radioGroupTwo) {\r\n            radioGroupTwo.map((res, index) => {\r\n                tag.push(\r\n                    <Field\r\n                        name=\"parameterRadioTwo\"\r\n                        key={`${res.value}${index}`}\r\n                        component={RadioRedux}\r\n                        type=\"radio\"\r\n                        value={res.value}\r\n                        label={res.name} />\r\n                )\r\n            })\r\n        }\r\n        return tag\r\n    }\r\n\r\n    const handleChangeChkOher = (evt,value) => {\r\n        if (!value) {\r\n            change(\"other\", \"\")\r\n        }\r\n        setCheckboxOther(!value)\r\n    }\r\n    const handleSubmitValidate = () =>{\r\n        formOneValidate(_values)\r\n        handleSubmit(onSubmitCallBack)()\r\n        setIsSubmitError(true)\r\n    }\r\n\r\n    return (\r\n        <FormOneView\r\n            REQNO={submitPmrRdc.stepOne.REQNO}\r\n            nameTypes={nameTypes}\r\n            radioGroupTwo={genTagTwo()}\r\n            nameTypeSelect={props.nameTypeSelect}\r\n            // onHandleSubmit={handleSubmit}\r\n            // onSubmitCallBack={onSubmitCallBack}\r\n            onSubmitCallBack={handleSubmitValidate}\r\n            onClickBack={onClickBackPanel}\r\n            onChangeChkOther={handleChangeChkOher}\r\n            checkboxOther={checkboxOther}\r\n            selectRadio={radioGroupTwo}\r\n            luProvince={luProvince}\r\n            luDistrict={luDistrict}\r\n            luSubDistrict={luSubDistrict}\r\n            onChangeAdminPoly={handleChangeAdminPoly}\r\n            isFormOne={false}\r\n            isSubmitError={isSubmitError}\r\n        />\r\n    )\r\n}\r\n\r\nconst selector = formValueSelector('FormOne')\r\n\r\nconst mapStateToProps = state => ({\r\n    submitPmrRdc: state.submitPmr,\r\n    nameTypeSelect: selector(state, \"nameType\"),\r\n    // initialValues: state.submitPmr.stepOne,\r\n    _values: getFormValues('FormOne')(state),\r\n    dirty: isDirty('FormOne')(state),\r\n    pristine:isPristine('FormOne')(state),\r\n\r\n})\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    submitPmrAction: bindActionCreators(SubmitPmrAction, dispatch)\r\n});\r\n\r\nconst reduxFormParameter = {\r\n    form: \"FormOne\",\r\n    validate: formOneValidate,\r\n    initialValues: {\r\n        nameType: {}\r\n    }\r\n};\r\n\r\nexport default compose(\r\n    connect(\r\n        mapStateToProps,\r\n        mapDispatchToProps,\r\n    ),\r\n    reduxForm(reduxFormParameter)\r\n)(FromOne)","import React from 'react'\r\nimport Grid from '@material-ui/core/Grid'\r\nimport Delete from \"@material-ui/icons/Delete\";\r\nimport IconButton from \"@material-ui/core/IconButton\";\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport { Field, FieldArray } from 'redux-form';\r\nimport { normalizePositiveInteger, normalizePositiveFloat } from '../../../../../../../../Utilities/Validate';\r\n\r\nimport Button from '../../../../../../../../Controls/Containers/Button';\r\nimport TextFieldRedux from '../../../../../../../../Controls/Containers/TextFieldRedux';\r\nimport Tooltip from '../../../../../../../../Controls/Containers/Tooltip';\r\nimport {BTN} from '../../../../../../../../Constants/Constants'\r\nimport ErrorSubmit from '../../../../../../../../Controls/Containers/ErrorSubmit'\r\nconst renderError = ({ meta: { error }, classes }) => (\r\n    <div className={classes.txtError}>{error}</div>\r\n)\r\n\r\nconst renderFormChanode = ({ fields, meta: { error, submitFailed }, classes }) => {\r\n    return (\r\n        <Grid container >\r\n            {/* <Grid container justify=\"flex-end\" >\r\n                <Button\r\n                    label=\"เพิ่ม\"\r\n                    onClick={() => fields.push({})}\r\n                    className={classes.btnAddForm}\r\n                />\r\n            </Grid> */}\r\n            {fields.map((chanode, index) => (\r\n                <Grid container key={`chanode-form-${index}`} className={classes.form}>\r\n\r\n                    <Field\r\n                                name={`${chanode}.chanodeno`}\r\n                                label=\"ในที่ดิน โฉนดเลขที่\"\r\n                                component={TextFieldRedux}\r\n                                required\r\n                    />\r\n                    <Field\r\n                                name={`${chanode}.surveyno`}\r\n                                label=\"หน้าสำรวจ\"\r\n                                component={TextFieldRedux}\r\n                                required\r\n                            />\r\n                          <Field\r\n                                name={`${chanode}.landno`}\r\n                                label=\"เลขที่ดิน\"\r\n                                component={TextFieldRedux}\r\n                                required\r\n                            />\r\n\r\n                    <Grid item xs={12}>\r\n                            <div className={classes.divLabel}>ขนาดแปลงที่ดิน<label className={classes.asterisk}>*</label></div>\r\n                    </Grid>\r\n                     <Grid container justify={'space-evenly'}>\r\n                            <Grid item xs={3}>\r\n                                <Field\r\n                                    name={`${chanode}.chanoderai`}\r\n                                    label=\"ไร่\"\r\n                                    component={TextFieldRedux}\r\n                                    normalize={normalizePositiveInteger}\r\n                               \r\n                                />\r\n                            </Grid>\r\n                            \r\n                            <Grid item xs={3} classes={{ \"grid-xs-3\": classes.customGrid3 }}>\r\n                                <Field\r\n                                    name={`${chanode}.chanodengan`}\r\n                                    label=\"งาน\"\r\n                                    component={TextFieldRedux}\r\n                                    normalize={normalizePositiveInteger}\r\n                                    \r\n                                />\r\n                            </Grid>\r\n                        \r\n                            <Grid item xs={3}>\r\n                                <Field\r\n                                    name={`${chanode}.chanodewa`}\r\n                                    label=\"ตร.ว.\"\r\n                                    component={TextFieldRedux}\r\n                                    normalize={normalizePositiveFloat}\r\n                                    \r\n                                />\r\n                            </Grid>\r\n                           \r\n                        </Grid>\r\n                    \r\n                    <Grid item xs={12}>\r\n                            <div className={classes.divLabel}>ใช้ประโยชน์<label className={classes.asterisk}>*</label></div>\r\n                    </Grid>\r\n                    <Grid container justify={'space-evenly'}>\r\n                            <Grid item xs={3}>\r\n                                <Field\r\n                                    name={`${chanode}.userai`}\r\n                                    label=\"ไร่\"\r\n                                    component={TextFieldRedux}\r\n                                    normalize={normalizePositiveInteger}\r\n                                    \r\n                                />\r\n                            </Grid>\r\n                     \r\n                            <Grid item xs={3} classes={{ \"grid-xs-3\": classes.customGrid3 }} >\r\n                                <Field\r\n                                    name={`${chanode}.usengan`}\r\n                                    label=\"งาน\"\r\n                                    component={TextFieldRedux}\r\n                                    normalize={normalizePositiveInteger}\r\n                                    \r\n                                />\r\n                            </Grid>\r\n                           \r\n                            <Grid item xs={3}>\r\n                                <Field\r\n                                    name={`${chanode}.usewa`}\r\n                                    label=\"ตร.ว.\"\r\n                                    component={TextFieldRedux}\r\n                                    normalize={normalizePositiveFloat}\r\n                                    \r\n                                />\r\n                            </Grid>\r\n                           \r\n                        </Grid>\r\n\r\n                    \r\n\r\n\r\n                   \r\n\r\n                    <Grid container style={{ height: '20px' }}>\r\n                        <Field\r\n                            name={`${chanode}.errChanode`}\r\n                            component={renderError}\r\n                            classes={classes}\r\n                        />\r\n                    </Grid>\r\n\r\n                    {\r\n                        fields.length > 1 && (\r\n                            <Grid container justify=\"flex-end\">\r\n                                {/* <Grid item>\r\n                                    <Button\r\n                                        label=\"ลบ\"\r\n                                        onClick={() => {\r\n                                            if (fields.length > 1) {\r\n                                                fields.remove(index)\r\n                                            }\r\n                                        }}\r\n                                    />\r\n                                </Grid> */}\r\n\r\n                                <Grid item>\r\n                                    <Tooltip title=\"ลบโฉนด\" placement=\"right-end\">\r\n                                        <IconButton\r\n                                            onClick={() => {\r\n                                                if (fields.length > 1) {\r\n                                                    fields.remove(index)\r\n                                                }\r\n                                            }}\r\n                                        >\r\n                                            <Delete />\r\n                                        </IconButton>\r\n                                    </Tooltip>\r\n                                </Grid>\r\n\r\n                            </Grid>\r\n                        )\r\n                    }\r\n                </Grid>\r\n            ))}\r\n        </Grid>\r\n    )\r\n}\r\n\r\nconst FormTwoView = ({\r\n    classes,\r\n    handleSubmit,\r\n    onClickNextStep,\r\n    onClickPrevStep,\r\n    onClickBack,\r\n    isSubmitError\r\n}) => {\r\n    return (\r\n        <Grid container spacing={0} className={classes.root}>\r\n          \r\n\r\n                <FieldArray name=\"chanode\" component={renderFormChanode} classes={classes} />\r\n\r\n                <Grid container justify=\"center\" spacing={24} className={classes.divFooter}>\r\n                {(isSubmitError) &&\r\n                    <Grid item xs={12}>\r\n                        <Field\r\n                            name=\"errorForm\"\r\n                            component={ErrorSubmit}\r\n                        />\r\n                    </Grid>}\r\n                <Grid item>\r\n                    <Button\r\n                        // color=\"black\"\r\n                        label={BTN.TH.CANCEL}\r\n                        onClick={onClickBack}\r\n                        // className={classes.btnRegister}\r\n                    />\r\n                    </Grid>\r\n                    <Grid item>\r\n                        <Button\r\n                            // color=\"black\"\r\n                            label={BTN.TH.BACK}\r\n                            onClick={onClickPrevStep}\r\n                        />\r\n                    </Grid>\r\n                    <Grid item>\r\n                        <Button\r\n                            type=\"submit\"\r\n                            label={BTN.TH.NEXT}\r\n                            onClick={onClickNextStep}\r\n                        />\r\n                    </Grid>\r\n                </Grid>\r\n            \r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        width: '100%',\r\n        // height: '100%'\r\n        padding:\"10px\"\r\n    },\r\n    rootForm: {\r\n        // width: '100%',\r\n        // height: '100%'\r\n    },\r\n    form: {\r\n        borderWidth: '1px',\r\n        borderStyle: 'solid',\r\n        borderColor: 'black',\r\n        backgroundColor: \"#d9d9d9\",\r\n        padding: '10px',\r\n        marginTop: '10px'\r\n    },\r\n    containnerRow: {\r\n        height: '50px',\r\n        width: '100%',\r\n        marginBottom: '15px'\r\n    },\r\n    containnerMultiRow: {\r\n        height: '100px',\r\n        width: '100%',\r\n        marginBottom: '15px'\r\n    },\r\n    divLabel: {\r\n        lineHeight: '50px'\r\n    },\r\n    divLabelFullWidth: {\r\n        lineHeight: '50px',\r\n        width: '100%',\r\n        textAlign: 'center'\r\n    },\r\n    divFooter: {\r\n        marginTop: \"10px\",  \r\n        marginBottom:\"10px\"\r\n    },\r\n    txtError: {\r\n        fontSize: '14px',\r\n        color: 'red'\r\n    },\r\n    customGrid3: {\r\n        maxWidth: '22%',\r\n    },\r\n    customGrid1: {\r\n        marginRight: '5px',\r\n    },\r\n    asterisk:{\r\n        color:\"red\"\r\n    }\r\n}))(FormTwoView)\r\n","import React, { Component } from 'react'\r\nimport { reduxForm, formValueSelector,getFormValues } from \"redux-form\";\r\nimport { compose } from \"recompose\";\r\nimport { connect } from \"react-redux\";\r\nimport { bindActionCreators } from \"redux\";\r\n\r\n//import component\r\nimport FormTwoView from '../../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/PMR1/SubmitPmr/FormStep/FormTwoView';\r\n\r\n//import service - utills\r\nimport { formTwoValidate } from '../../../../../../../../Utilities/Validate';\r\n\r\n//import action\r\nimport * as SubmitPmrAction from '../../../../../../../../Actions/Web/Panel/SubmitPmrAction';\r\n\r\nclass FormTwo extends Component {\r\n\r\n    constructor() {\r\n        super();\r\n        this.state = {\r\n            isSubmitError:false\r\n        }\r\n    }\r\n\r\n    componentDidMount = () => {\r\n        const { refFuncAddForm } = this.props;\r\n        if (refFuncAddForm) {\r\n            refFuncAddForm(this.handleAddForm)\r\n        }\r\n    }\r\n\r\n    handleClickNextStep = (values) => {\r\n        const { submitPmrAction, onChangeStep } = this.props;\r\n\r\n        submitPmrAction.saveFormStepTwo(values)\r\n        if (onChangeStep) {\r\n            onChangeStep(3)\r\n        }\r\n    }\r\n\r\n    handleClickPrevStep = () => {\r\n        const { chanode, submitPmrAction, onChangeStep } = this.props;\r\n\r\n        submitPmrAction.saveFormStepTwo({ chanode: chanode })\r\n        if (onChangeStep) {\r\n            onChangeStep(1)\r\n        }\r\n    }\r\n\r\n    handleAddForm = () => {\r\n        const { change, chanode } = this.props\r\n\r\n        change(\"chanode\", [...chanode, {}]);\r\n    }\r\n    onClickBackPanel = () => {\r\n        \r\n        const {onClickBack} = this.props\r\n        if (onClickBack) {\r\n            onClickBack()\r\n        }\r\n    }\r\n    handleSubmitValidate = () =>{\r\n        const { handleSubmit,_values } = this.props;\r\n\r\n        // console.log(\"_values\",_values)\r\n        formTwoValidate(_values)\r\n       \r\n        handleSubmit(this.handleClickNextStep)()\r\n        this.setState({isSubmitError:true})\r\n\r\n    }\r\n\r\n    render() {\r\n        // const { handleSubmit } = this.props;\r\n        const {isSubmitError} = this.state\r\n\r\n        return (\r\n            <FormTwoView\r\n                // handleSubmit={handleSubmit}\r\n                // onClickNextStep={this.handleClickNextStep}\r\n                onClickNextStep={this.handleSubmitValidate}\r\n                onClickPrevStep={this.handleClickPrevStep}\r\n                onClickBack={this.onClickBackPanel}\r\n                isSubmitError={isSubmitError}\r\n\r\n            />\r\n        )\r\n    }\r\n}\r\n\r\nconst selector = formValueSelector('FormTwo')\r\nconst reduxFormParameter = {\r\n    form: \"FormTwo\",\r\n    validate: formTwoValidate,\r\n};\r\n\r\nconst mapStateToProps = state => ({\r\n    submitPmrRdc: state.submitPmr,\r\n    initialValues: state.submitPmr.stepTwo,\r\n    chanode: selector(state, \"chanode\"),\r\n    _values: getFormValues('FormTwo')(state),\r\n})\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    submitPmrAction: bindActionCreators(SubmitPmrAction, dispatch)\r\n});\r\n\r\nconst enhance = compose(\r\n    connect(\r\n        mapStateToProps,\r\n        mapDispatchToProps\r\n    ),\r\n    reduxForm(reduxFormParameter)\r\n);\r\n\r\nexport default enhance(FormTwo);","import React from 'react'\r\nimport TextFieldRedux from '../../../../../../../../Controls/Containers/TextFieldRedux';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Grid from '@material-ui/core/Grid'\r\nimport Button from '../../../../../../../../Controls/Containers/Button';\r\nimport { Field } from 'redux-form';\r\nimport SelectFieldRedux from '../../../../../../../../Controls/Containers/SelectFieldRedux';\r\nimport { normalizePositiveInteger } from '../../../../../../../../Utilities/Validate';\r\n// import Tooltip from '../../../../../../../../Controls/Containers/Tooltip';\r\nimport {BTN} from '../../../../../../../../Constants/Constants'\r\nimport ErrorSubmit from '../../../../../../../../Controls/Containers/ErrorSubmit'\r\nconst FormThreeView = ({\r\n    classes,\r\n    luActivity,\r\n    luDistrict,\r\n    luSubDistrict,\r\n    // lupZone,\r\n    // lupColor,\r\n    // lupUse,\r\n    // lupSubZone,\r\n    // handleSubmit,\r\n    onChangeAdminPoly,\r\n    onClickNextStep,\r\n    onClickPrevStep,\r\n    onClickBack,\r\n    isSubmitError\r\n}) => {\r\n    return (\r\n        <Grid container spacing={0} className={classes.root}>\r\n                <Field\r\n                            name=\"landType\"\r\n                            label=\"อยู่ในที่ดินประเภท\"\r\n                            component={TextFieldRedux}\r\n                            multiline\r\n                            rows={2}\r\n                            // normalize={normalizeInteger}\r\n                            // required\r\n                            disabled\r\n                />\r\n                <Field\r\n                            name=\"subZone_Area\"\r\n                            label=\"บริเวณ\"\r\n                            component={TextFieldRedux}\r\n                            // normalize={normalizeInteger}\r\n                            // required\r\n                            disabled\r\n                />\r\n                <Field\r\n                            name=\"forBusiness\"\r\n                            label=\"เพื่อกิจการ\"\r\n                            component={SelectFieldRedux}\r\n                            data={luActivity}\r\n                            keyData={{ value: \"value\", label: \"name\" }}\r\n                            required\r\n                        />\r\n                <Field\r\n                            name=\"houseNo\"\r\n                            label=\"บ้านเลขที่\"\r\n                            component={TextFieldRedux}\r\n                            // normalize={normalizeInteger}\r\n                            \r\n                        />\r\n                    <Field\r\n                            name=\"villageNo\"\r\n                            label=\"หมู่ที่\"\r\n                            component={TextFieldRedux}\r\n                            normalize ={normalizePositiveInteger}\r\n                            \r\n                        />\r\n                           <Field\r\n                            name=\"alley\"\r\n                            label=\"ตรอก/ซอย\"\r\n                            component={TextFieldRedux}\r\n                            \r\n                        />\r\n                          <Field\r\n                            name=\"road\"\r\n                            label=\"ถนน\"\r\n                            component={TextFieldRedux}\r\n                            \r\n                        />\r\n                          <Field\r\n                            name=\"provinceDisplay\"\r\n                            label=\"จังหวัด\"\r\n                            component={TextFieldRedux}\r\n                            disabled\r\n                            \r\n                        />\r\n                          <Field\r\n                            name=\"district\"\r\n                            label=\"เขต\"\r\n                            component={SelectFieldRedux}\r\n                            onChangeValue={onChangeAdminPoly(\"district\")}\r\n                            data={luDistrict}\r\n                            keyData={{ value: \"value\", label: \"name\" }}\r\n                            // val={0}\r\n                            required\r\n                        />\r\n                                 <Field\r\n                            name=\"subDistrict\"\r\n                            label=\"แขวง\"\r\n                            component={SelectFieldRedux}\r\n                            data={luSubDistrict}\r\n                            keyData={{ value: \"value\", label: \"name\" }}\r\n                            // val={0}\r\n                            required\r\n                        />\r\n          \r\n\r\n            \r\n                <Grid container justify=\"center\" spacing={24} className={classes.divFooter}>\r\n                {(isSubmitError) &&\r\n                    <Grid item xs={12}>\r\n                        <Field\r\n                            name=\"errorForm\"\r\n                            component={ErrorSubmit}\r\n                        />\r\n                    </Grid>}\r\n                <Grid item>\r\n                    <Button\r\n                        // color=\"black\"\r\n                        label={BTN.TH.CANCEL}\r\n                        onClick={onClickBack}\r\n                        // className={classes.btnRegister}\r\n                    />\r\n                    </Grid>\r\n                    <Grid item>\r\n                        <Button\r\n                            // color=\"black\"\r\n                            label={BTN.TH.BACK}\r\n                            onClick={onClickPrevStep}\r\n                        />\r\n                    </Grid>\r\n                    <Grid item>\r\n                        <Button\r\n                            type=\"submit\"\r\n                            label={BTN.TH.NEXT}\r\n                            onClick={onClickNextStep}\r\n                        />\r\n                    </Grid>\r\n                </Grid>\r\n            {/* </form> */}\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        width: '100%',\r\n        padding:\"10px\"\r\n        // height: '100%',\r\n        // position: 'relative'\r\n    },\r\n    rootForm: {\r\n        width: '98%',\r\n        height: '100%'\r\n    },\r\n    containnerRow: {\r\n        height: '50px',\r\n        width: '100%',\r\n        marginBottom: '15px'\r\n    },\r\n    divLabel: {\r\n        lineHeight: '50px'\r\n    },\r\n    divFooter: {\r\n        marginTop: '10px',\r\n        marginBottom: '10px'\r\n    },\r\n    asterisk:{\r\n        color:\"red\"\r\n    }\r\n}))(FormThreeView)\r\n","import React, { Component, Fragment } from 'react'\r\nimport { reduxForm, formValueSelector,getFormValues } from \"redux-form\";\r\nimport { compose } from \"recompose\";\r\nimport { connect } from \"react-redux\";\r\nimport { bindActionCreators } from \"redux\";\r\n\r\n//import action\r\nimport * as SubmitPmrAction from '../../../../../../../../Actions/Web/Panel/SubmitPmrAction';\r\n\r\n//import service - utils\r\nimport { fetchGet_ } from '../../../../../../../../Utilities/ServiceUtils';\r\nimport { formThreeValidate } from '../../../../../../../../Utilities/Validate';\r\n\r\n//import component\r\nimport WithAlertMessage from '../../../../../../../../HOC/WithAlertMessage'\r\nimport AlertMessageSuper from '../../../../../../../../Controls/Containers/AlertMessageSuper';\r\nimport WithLoading from '../../../../../../../../HOC/WithLoading';\r\nimport Loading from '../../../../../../../../Controls/Containers/Loading'\r\nimport FormThreeView from '../../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/PMR1/SubmitPmr/FormStep/FormThreeView';\r\n\r\n\r\nclass FormThree extends Component {\r\n    constructor() {\r\n        super();\r\n        this.state = {\r\n            luActivity: [],\r\n            luDistrict: [],\r\n            luSubDistrict: [],\r\n            isSubmitError:false\r\n        }\r\n        \r\n    }\r\n\r\n    componentDidMount = async () => {\r\n        const { submitPmrRdc, change, onCallbackLocation } = this.props;\r\n        this.callServiceDistrict()\r\n        this.callServiceGetLutActivity()    \r\n        \r\n        if (submitPmrRdc.stepThree.district) {\r\n            await this.callServiceSubDistrict(submitPmrRdc.stepThree.district)\r\n            await change('district', submitPmrRdc.stepThree.district)\r\n            await change('subDistrict', submitPmrRdc.stepThree.subDistrict)\r\n        }\r\n        if(onCallbackLocation){\r\n            onCallbackLocation(this.handleCallbackLocation)\r\n        }   \r\n    }\r\n\r\n    componentWillUnmount(){ // clear ref funcction\r\n        const {onCallbackLocation} = this.props;\r\n        if(onCallbackLocation){\r\n            onCallbackLocation()\r\n        }   \r\n    }\r\n\r\n    handleCallbackLocation = async (values) => {\r\n        const { change, showLoading, hideLoading, showAlert } = this.props;\r\n        const { districtID, subDistrictID, isBKK } = values;\r\n        \r\n        if(isBKK) {\r\n            showLoading();\r\n            await this.setState({ luSubDistrict: [] })\r\n            await this.callServiceSubDistrict(districtID)\r\n            await change('district', districtID);\r\n            await change('subDistrict', subDistrictID)\r\n            await hideLoading();\r\n        } else {\r\n            showAlert({ altMsg: 'กรุณาระบุตำแหน่งใน กทม.' })\r\n            await this.setState({ luSubDistrict: [] })\r\n            await change('district', null);\r\n            await change('subDistrict', null)\r\n        }\r\n    }\r\n\r\n    handleClickNextStep = (values) => {\r\n        const { submitPmrAction, onChangeStep } = this.props;\r\n\r\n        submitPmrAction.saveFormStepThree(values)\r\n        if (onChangeStep) {\r\n            onChangeStep(4)\r\n        }\r\n    }\r\n\r\n    handleClickPrevStep = () => {\r\n        const { FormThree, onChangeStep, submitPmrAction } = this.props;\r\n\r\n        submitPmrAction.saveFormStepThree(FormThree)\r\n        if (onChangeStep) {\r\n            onChangeStep(2)\r\n        }\r\n    }\r\n\r\n    callServiceGetLutActivity = () => {\r\n        fetchGet_(process.env.REACT_APP_LU_ACTIVITY)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(data => {\r\n                this.setState({\r\n                    luActivity: data.result\r\n                })\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceDistric', ex)\r\n            })\r\n    }\r\n\r\n    callServiceDistrict = () => {\r\n        fetchGet_(`${process.env.REACT_APP_LU_DISTRICT}?provinceid=10`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(data => {\r\n                this.setState({\r\n                    luDistrict: data.result\r\n                })\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceDistric', ex)\r\n            })\r\n    }\r\n\r\n    callServiceSubDistrict = (districtID) => {\r\n        fetchGet_(`${process.env.REACT_APP_LU_SUBDISTRICT}?provinceid=10&districtid=${districtID}`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(data => {\r\n                this.setState({\r\n                    luSubDistrict: data.result\r\n                })\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceSubDistric', ex)\r\n            })\r\n    }\r\n\r\n    handleChangeAdminPoly = (type) => (evt) => {\r\n        const { change } = this.props;\r\n\r\n        switch (type) {\r\n            case \"district\":\r\n                change(\"subDistrict\", null);\r\n                this.setState({\r\n                    luSubDistrict: [],\r\n                })\r\n                this.callServiceSubDistrict(evt.target.value)\r\n                break;\r\n            default:\r\n                break;\r\n        }\r\n    }\r\n\r\n    onClickBackPanel = () => {\r\n        const {onClickBack} = this.props\r\n        if (onClickBack) {\r\n            onClickBack()\r\n        }\r\n    }\r\n\r\n    handleSubmitValidate = () =>{\r\n        const { handleSubmit,_values } = this.props;\r\n\r\n        \r\n        formThreeValidate(_values)\r\n       \r\n        handleSubmit(this.handleClickNextStep)()\r\n        this.setState({isSubmitError:true})\r\n\r\n    }\r\n\r\n    render() {\r\n        const { isShowLoading ,change} = this.props;\r\n        const { lupZone, lupColor, lupUse, lupSubZone } = this.props.submitPmrRdc.stepThree;\r\n        const { luDistrict, luSubDistrict, luActivity,isSubmitError } = this.state;\r\n        \r\n        change(\"landType\",`${lupZone} (${lupColor}) ${lupUse}`)\r\n        change(\"subZone_Area\",`${lupSubZone}`)\r\n\r\n        return (\r\n            <Fragment>\r\n                <FormThreeView\r\n                    luActivity={luActivity}\r\n                    luDistrict={luDistrict}\r\n                    luSubDistrict={luSubDistrict}\r\n                    lupZone={lupZone}\r\n                    lupColor={lupColor}\r\n                    lupUse={lupUse}\r\n                    lupSubZone={lupSubZone}\r\n\r\n                    // handleSubmit={handleSubmit}\r\n                    // onClickNextStep={this.handleClickNextStep}\r\n                    onClickNextStep={this.handleSubmitValidate}\r\n                    onClickPrevStep={this.handleClickPrevStep}\r\n                    onChangeAdminPoly={this.handleChangeAdminPoly}\r\n                    onClickBack={this.onClickBackPanel}\r\n                    isSubmitError={isSubmitError}\r\n                />\r\n                <AlertMessageSuper {...this.props} />\r\n                <Loading isShowLoading={isShowLoading} />\r\n            </Fragment>\r\n        )\r\n    }\r\n}\r\n\r\nconst reduxFormParameter = {\r\n    form: \"FormThree\",\r\n    validate: formThreeValidate\r\n};\r\n\r\nconst selector = formValueSelector('FormThree')\r\n\r\nconst mapStateToProps = state => ({\r\n    submitPmrRdc: state.submitPmr,\r\n    _values: getFormValues('FormThree')(state),\r\n    FormThree: {\r\n        forBusiness: selector(state, \"forBusiness\"),\r\n        houseNo: selector(state, \"houseNo\"),\r\n        villageNo: selector(state, \"villageNo\"),\r\n        alley: selector(state, \"alley\"),\r\n        road: selector(state, \"road\"),\r\n        // province: selector(state, \"province\"),\r\n        district: selector(state, \"district\"),\r\n        subDistrict: selector(state, \"subDistrict\"),\r\n    },\r\n    initialValues: {\r\n        forBusiness: state.submitPmr.stepThree.forBusiness,\r\n        houseNo: state.submitPmr.stepThree.houseNo,\r\n        villageNo: state.submitPmr.stepThree.villageNo,\r\n        alley: state.submitPmr.stepThree.alley,\r\n        road: state.submitPmr.stepThree.road,\r\n        provinceDisplay: 'กรุงเทพมหานคร',//state.submitPmr.stepThree.province, //เฉพาะ กทม. เท่านั้น\r\n        district: state.submitPmr.stepThree.district, //รอ default ตามที่ปักได้\r\n        subDistrict: state.submitPmr.stepThree.subDistrict //รอ default ตามที่ปักได้\r\n    }\r\n})\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    submitPmrAction: bindActionCreators(SubmitPmrAction, dispatch)\r\n});\r\n\r\nconst enhance = compose(\r\n    connect(\r\n        mapStateToProps,\r\n        mapDispatchToProps\r\n    ),\r\n    reduxForm(reduxFormParameter),\r\n    WithAlertMessage,\r\n    WithLoading\r\n);\r\n\r\nexport default enhance(FormThree);","import React from \"react\";\r\nimport TextFieldRedux from \"../../../../../../../../Controls/Containers/TextFieldRedux\";\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\nimport Grid from \"@material-ui/core/Grid\";\r\nimport Button from \"../../../../../../../../Controls/Containers/Button\";\r\nimport { Field } from \"redux-form\";\r\nimport { normalizeInteger, normalizePositiveFloat } from \"../../../../../../../../Utilities/Validate\";\r\nimport RadioRedux from '../../../../../../../../Controls/Containers/RadioRedux';\r\nimport classnames from \"classnames\";\r\nimport {BTN} from '../../../../../../../../Constants/Constants'\r\nimport ErrorSubmit from '../../../../../../../../Controls/Containers/ErrorSubmit'\r\nconst createLanduseRadio = ({ landuseData, otherStatus, classes, onChangeLanduseRadio }) => {\r\n\tlet elementRadio = landuseData.map((res, index) => {\r\n\t\tif (res.value == 9) {\r\n\t\t\treturn (\r\n\t\t\t\t<Grid item xs={12} container key={`${res.value}${index}`} >\r\n\t\t\t\t\t<Grid item xs={3}>\r\n\t\t\t\t\t\t<Field\r\n\t\t\t\t\t\t\tonChange={onChangeLanduseRadio}\r\n\t\t\t\t\t\t\tname=\"landuseRadio\"\r\n\t\t\t\t\t\t\tcomponent={RadioRedux}\r\n\t\t\t\t\t\t\ttype=\"radio\"\r\n\t\t\t\t\t\t\troot={classes.rootLanduseRadio}\r\n\t\t\t\t\t\t\tvalue={res.value}\r\n\t\t\t\t\t\t\tlabel={res.name} \r\n\t\t\t\t\t\t\tisFormOne\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t\t<Grid item xs={9}>\r\n\t\t\t\t\t\t<Field\r\n\t\t\t\t\t\t\tname=\"other\"\r\n\t\t\t\t\t\t\tcomponent={TextFieldRedux}\r\n\t\t\t\t\t\t\tstyle={{ width: '30%' }}\r\n\t\t\t\t\t\t\tdisabled={otherStatus}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</Grid>\r\n\t\t\t)\r\n\t\t} else {\r\n\t\t\treturn (\r\n\t\t\t\t<Grid item xs={12} key={`${res.value}${index}`}>\r\n\t\t\t\t\t<Field\r\n\t\t\t\t\t\tonChange={onChangeLanduseRadio}\r\n\t\t\t\t\t\tname=\"landuseRadio\"\r\n\t\t\t\t\t\tcomponent={RadioRedux}\r\n\t\t\t\t\t\troot={classes.rootLanduseRadio}\r\n\t\t\t\t\t\ttype=\"radio\"\r\n\t\t\t\t\t\tvalue={res.value}\r\n\t\t\t\t\t\tlabel={res.name}\r\n\t\t\t\t\t\tisFormOne\r\n\t\t\t\t\t\t />\r\n\t\t\t\t</Grid>\r\n\t\t\t)\r\n\t\t}\r\n\t})\r\n\treturn elementRadio\r\n}\r\n\r\nconst FormFourView = ({\r\n\tclasses,\r\n\tvaluesFAR,\r\n\tvaluesOSR,\r\n\tfarStandard,\r\n\tosrStandard,\r\n\tlanduseData,\r\n\totherStatus,\r\n\tonChangeLanduseRadio,\r\n\tonClickPrevStep,\r\n\tonClickSaveForm,\r\n\tonFieldAllAreaChange,\r\n\tonClickBack,\r\n\tisSubmitError\r\n}) => {\r\n\treturn (\r\n\t\t<Grid container spacing={0} className={classes.root}>\r\n\t\t\t<Grid container>\r\n\t\t\t\t<Grid item xs={12}>\r\n\t\t\t\t\t<div>\r\n\t\t\t\t\t\tโดยมีรายละเอียดเกี่ยวกับการใช้ประโยชน์ที่ดินตามแผนที่สังเขป ดังนี้\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</Grid>\r\n\t\t\t\t<Grid item xs={12} style={{ marginTop: '10px' }}>\r\n\t\t\t\t\t<div>{`1. การใช้ประโยชน์ที่ดิน`}</div>\r\n\t\t\t\t</Grid>\r\n\t\t\t</Grid>\r\n\r\n\t\t\t<Grid container direction=\"column\" wrap=\"nowrap\" >\r\n\t\t\t\t<Grid item xs={12} className={`${classes.tab1} `} >\r\n\t\t\t\t\t<div>{`1.1 เป็น`}<label className={classes.asterisk}>*</label></div>\r\n\t\t\t\t</Grid>\r\n\t\t\t\t<Grid item xs={12} className={classes.tab2}>\r\n\t\t\t\t\t{createLanduseRadio({ landuseData, otherStatus, classes, onChangeLanduseRadio })}\r\n\t\t\t\t</Grid>\r\n\t\t\t</Grid>\r\n\r\n\t\t\t<Grid item xs={12} className={classes.tab1} >\r\n\t\t\t\t<Field\r\n\t\t\t\t\tname=\"sumLanduseArea\"\r\n\t\t\t\t\tlabel={`1.2 พื้นที่ดิน(ตารางเมตร)`}\r\n\t\t\t\t\tcomponent={TextFieldRedux}\r\n\t\t\t\t\tdisabled\r\n\t\t\t\t/>\r\n\r\n\t\t\t\t<Field\r\n\t\t\t\t\tname=\"activateArea\"\r\n\t\t\t\t\tlabel='1.3 พื้นที่ประกอบการ(ตารางเมตร)'\r\n\t\t\t\t\tcomponent={TextFieldRedux}\r\n\t\t\t\t\tonChange={(evt) => onFieldAllAreaChange('activateArea', evt)}\r\n\t\t\t\t\tnormalize={normalizeInteger}\r\n\t\t\t\t\trequired\r\n\r\n\t\t\t\t/>\r\n\r\n\t\t\t\t<Field\r\n\t\t\t\t\tname=\"allArea\"\r\n\t\t\t\t\tlabel='1.4 พื้นที่อาคารรวม(ตารางเมตร)'\r\n\t\t\t\t\tonChange={(evt) => onFieldAllAreaChange('allArea', evt)}\r\n\t\t\t\t\tcomponent={TextFieldRedux}\r\n\t\t\t\t\tnormalize={normalizeInteger}\r\n\t\t\t\t\trequired\r\n\t\t\t\t/>\r\n\r\n\t\t\t\t<div style={{height:\"60px\"}}>\r\n\t\t\t\t\t<div>1.5 อัตราส่วนพื้นที่อาคารรวมต่อพื้นที่ดิน</div>\r\n\t\t\t\t\t<div style={{ paddingLeft: '20px' }}>\r\n\t\t\t\t\t\t<label>{`(FAR = ${farStandard ? farStandard : \"-\"}) `}</label>\r\n\t\t\t\t\t\t<label className={classnames(null, { [classes.errorTxt]: (parseFloat(farStandard) < parseFloat(valuesFAR) || !farStandard) })}><u>{parseFloat(valuesFAR) ? valuesFAR:0}</u></label>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\r\n\t\t\t\t<div style={{height:\"60px\"}}>\r\n\t\t\t\t\t<div>1.6 อัตราส่วนของที่ว่างต่อพื้นที่อาคารรวม</div>\r\n\t\t\t\t\t<div style={{ paddingLeft: '20px' }}>\r\n\t\t\t\t\t\t<label>{`(OSR = ${osrStandard ? osrStandard : \"-\"}) `}</label>\r\n\t\t\t\t\t\t<label className={classnames({ [classes.errorTxt]: (parseFloat(osrStandard) > parseFloat(valuesOSR) || !osrStandard) })}><u>{valuesOSR?valuesOSR:0}</u></label>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\r\n\t\t\t\t<Field\r\n\t\t\t\t\tname=\"bdclos\"\r\n\t\t\t\t\tlabel='1.7 ร้อยละพื้นที่ว่างตามกฎหมายควบคุม'\r\n\t\t\t\t\tcomponent={TextFieldRedux}\r\n\t\t\t\t\tnormalize={normalizeInteger}\r\n\t\t\t\t/>\r\n\r\n\t\t\t\t<Field\r\n\t\t\t\t\tname=\"waterPass\"\r\n\t\t\t\t\tlabel='1.8 พื้นที่น้ำซึมผ่าน'\r\n\t\t\t\t\tcomponent={TextFieldRedux}\r\n\t\t\t\t\tdisabled\r\n\t\t\t\t/>\r\n\r\n\t\t\t\t<Grid item xs={12}>\r\n\t\t\t\t\t<div >1.9 ความสูง</div>\r\n\t\t\t\t</Grid>\r\n\r\n\t\t\t\t<Grid container justify={'space-between'}>\r\n\t\t\t\t\t<Grid item xs={5}>\r\n\t\t\t\t\t\t<Field\r\n\t\t\t\t\t\t\tname=\"heightFloor\"\r\n\t\t\t\t\t\t\tlabel='ชั้น'\r\n\t\t\t\t\t\t\tcomponent={TextFieldRedux}\r\n\t\t\t\t\t\t\tnormalize={normalizePositiveFloat}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t\t<Grid item xs={5} classes={{ \"grid-xs-3\": classes.customGrid3 }} >\r\n\t\t\t\t\t\t<Field\r\n\t\t\t\t\t\t\tname=\"heightMeter\"\r\n\t\t\t\t\t\t\tlabel='เมตร'\r\n\t\t\t\t\t\t\tcomponent={TextFieldRedux}\r\n\t\t\t\t\t\t\tnormalize={normalizePositiveFloat}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</Grid>\r\n\r\n\t\t\t\t<Field\r\n\t\t\t\t\tname=\"bldg\"\r\n\t\t\t\t\tlabel='1.10 จำนวนอาคารที่มีในที่ดิน(หลัง)'\r\n\t\t\t\t\tcomponent={TextFieldRedux}\r\n\t\t\t\t/>\r\n\r\n\t\t\t\t<Grid container justify=\"center\" spacing={24} className={classes.divFooter}>\r\n\t\t\t\t\t{(isSubmitError) &&\r\n\t\t\t\t\t\t<Grid item xs={12}>\r\n\t\t\t\t\t\t\t<Field\r\n\t\t\t\t\t\t\t\tname=\"errorForm\"\r\n\t\t\t\t\t\t\t\tcomponent={ErrorSubmit}\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t<Grid item>\r\n\t\t\t\t\t\t<Button\r\n\t\t\t\t\t\t\tlabel={BTN.TH.CANCEL}\r\n\t\t\t\t\t\t\tonClick={onClickBack}\r\n\t\t\t\t\t\t/>\r\n                    </Grid>\r\n\r\n                    <Grid item>\r\n                        <Button\r\n                            label={BTN.TH.BACK}\r\n                            onClick={onClickPrevStep}\r\n                        />\r\n                    </Grid>\r\n\t\t\t\t\t\r\n\t\t\t\t\t<Grid item>\r\n\t\t\t\t\t\t<Button\r\n\t\t\t\t\t\t\ttype=\"submit\"\r\n\t\t\t\t\t\t\tlabel={BTN.TH.SAVE}\r\n\t\t\t\t\t\t\tclassName={classes.btnLogin}\r\n\t\t\t\t\t\t\tonClick={onClickSaveForm}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</Grid>\r\n\t\t\t</Grid>\r\n\t\t</Grid>\r\n\t);\r\n};\r\n\r\nexport default withStyles(theme => ({\r\n\troot: {\r\n        width: '100%',\r\n        padding:\"10px\"\r\n    },\r\n\trootLanduseRadio: {\r\n\t\theight: 'auto'\r\n\t},\r\n\tdivFooter: {\r\n\t\tmarginTop: \"10px\",\r\n\t\tmarginBottom: \"10px\"\r\n\t},\r\n\ttab1: {\r\n\t\tpaddingLeft: theme.spacing.unit * 2,\r\n\t},\r\n\ttab2: {\r\n\t\tpaddingLeft: theme.spacing.unit * 4,\r\n\t},\r\n\terrorTxt: {\r\n\t\tcolor: 'red'\r\n\t},\r\n\tasterisk:{\r\n        color:\"red\"\r\n    }\r\n}))(FormFourView);\r\n","import Unchecked from '../../../../../../../../Images/checkbox/unchecked.png';\r\nimport Checked from '../../../../../../../../Images/checkbox/checked.png';\r\nimport moment from 'moment';\r\n\r\nimport pdfMake from \"pdfmake/build/pdfmake\";\r\nimport pdfFonts from \"pdfmake/build/vfs_fonts\";\r\npdfMake.vfs = pdfFonts.pdfMake.vfs;\r\npdfMake.fonts = {\r\n    THSarabun: {\r\n        normal: 'THSarabun.ttf',\r\n        bold: 'THSarabun-Bold.ttf',\r\n        italics: 'THSarabun-Italic.ttf',\r\n        bolditalics: 'THSarabun-BoldItalic.ttf'\r\n    },\r\n    Roboto: {\r\n        normal: 'Roboto-Regular.ttf',\r\n        bold: 'Roboto-Medium.ttf',\r\n        italics: 'Roboto-Italic.ttf',\r\n        bolditalics: 'Roboto-MediumItalic.ttf'\r\n    }\r\n}\r\n\r\nconst fontStyle = {\r\n    fontHeading: {\r\n        fontSize: 16\r\n    },\r\n    fontTitle: {\r\n        fontSize: 16,\r\n        // marginTop: 5,\r\n        marginBottom: 1\r\n    },\r\n    fontSubheading: {\r\n        fontSize: 16\r\n    },\r\n    fontBody: {\r\n        fontSize: 16\r\n    }\r\n}\r\n\r\nconst layoutStyle = {\r\n    // Document Header\r\n    documentHeaderLeft: {\r\n        fontSize: 10,\r\n        margin: [5,5,5,5],\r\n        alignment:'left'\r\n    },\r\n    documentHeaderCenter: {\r\n        fontSize: 10,\r\n        margin: [5,5,5,5],\r\n        alignment:'center'\r\n    },\r\n    documentHeaderRight: {\r\n        fontSize: 10,\r\n        margin: [5,20,40,5],\r\n        alignment:'right'\r\n    },\r\n\r\n    submitText:{\r\n        alignment: 'left'\r\n    },\r\n    submitValue:{\r\n        alignment: 'left'\r\n    },\r\n\r\n    submitHeader: {\r\n        alignment: 'center'\r\n        // margin: [40, 0, 40, 0]\r\n    },\r\n    submitTitle: {\r\n        alignment: 'right'\r\n    },\r\n    submitTitleValue: {\r\n        alignment: 'right'\r\n    },\r\n\r\n    submitInfo: {\r\n        alignment: 'left'\r\n    },\r\n    submitInfoValue:{\r\n        alignment: 'left'\r\n    },\r\n\r\n    checkboxPrivilege:{\r\n        margin: [60, 0, 0, 0]\r\n    },\r\n    checkboxText:{\r\n        alignment: 'left'\r\n    },\r\n    checkboxValue:{\r\n        alignment: 'left'\r\n    },\r\n\r\n    areaBenefitTitle:{\r\n\r\n    },\r\n    benefitText: {\r\n\r\n    },\r\n    benefitValue: {\r\n\r\n    },\r\n    signature: {\r\n        alignment: 'right'\r\n    },\r\n\r\n    chanodeHeader: {\r\n        alignment: 'center'\r\n        // margin: [40, 0, 40, 0]\r\n    },\r\n    chanodeTableHeader: {\r\n        alignment: 'center',\r\n    },\r\n    chanodeItemText:{\r\n        alignment: 'center',\r\n    },\r\n    chanodeItemNumber: {\r\n        //margin: [0,5,0,5],\r\n        alignment: 'center',\r\n    },\r\n    marginBottom: {\r\n        margin: [60,0,0,3]\r\n    }\r\n}\r\n\r\nconst lightHorizontalLines = {\r\n    table: {\r\n            widths: ['*'],\r\n            body: [[\" \"], [\" \"]]\r\n    },\r\n    layout: {\r\n        hLineWidth: function(i, node) {\r\n            return (i === 0 || i === node.table.body.length) ? 0 : 0.5;\r\n        },\r\n        vLineWidth: function(i, node) {\r\n            return 0;\r\n        },\r\n    }\r\n}\r\n\r\nconst configPage = {\r\n    pageSize: 'A4',\r\n    pageOrientation: 'portrait',//landscape\r\n    info: {\r\n        title: 'หนังสือแจ้งการใช้ประโยชน์ที่ดินหรือเปลี่ยนแปลงการใช้ประโยชน์ที่ดินในเขตผังเมืองรวมกรุงเทพมหานคร',\r\n        subject: 'หนังสือแจ้งการใช้ประโยชน์ที่ดินหรือเปลี่ยนแปลงการใช้ประโยชน์ที่ดินในเขตผังเมืองรวมกรุงเทพมหานคร',\r\n        keywords: 'หนังสือแจ้งการใช้ประโยชน์ที่ดินหรือเปลี่ยนแปลงการใช้ประโยชน์ที่ดินในเขตผังเมืองรวมกรุงเทพมหานคร',\r\n    },\r\n    // pageMargins: [ 40, 60, 40, 60 ],// [left, top, right, bottom] or [horizontal, vertical]\r\n}\r\n\r\nconst generateCheckboxTypePMR = (typeID, typeDetail=null) => {\r\n    return [\r\n        {\r\n            style: 'checkboxPrivilege',\r\n            columns:[\r\n                {\r\n                    image: !typeID ? Unchecked: (typeID.indexOf('1') > -1) ? Checked : Unchecked,\r\n                    margin: [0,4,0,0],//[left, top, right, bottom]\r\n                    width: 13,\r\n                },\r\n                {\r\n                    text: 'เจ้าของที่ดิน หรือตัวแทน',\r\n                    noWrap: true, \r\n                    style: [ 'checkboxValue', 'fontTitle'],\r\n                    width: 110,\r\n                },\r\n                {\r\n                    image: !typeID ? Unchecked: (typeID.indexOf('2') > -1) ? Checked : Unchecked,\r\n                    margin: [0,4,0,0],//[left, top, right, bottom]\r\n                    width: 13\r\n                },\r\n                {\r\n                    text: 'ผู้เช่าที่ดิน', \r\n                    noWrap: true,\r\n                    style: [ 'checkboxValue', 'fontTitle'],\r\n                    width: 90,\r\n                },\r\n                {\r\n                    image: !typeID ? Unchecked: (typeID.indexOf('3') > -1) ? Checked : Unchecked,\r\n                    margin: [0,4,0,0],//[left, top, right, bottom]\r\n                    width: 13\r\n                },\r\n                {\r\n                    text: 'เจ้าของอาคาร', \r\n                    noWrap: true,\r\n                    style: [ 'checkboxValue', 'fontTitle'],\r\n                    width: 85,\r\n                },\r\n                {\r\n                    image: !typeID ? Unchecked: (typeID.indexOf('4') > -1) ? Checked : Unchecked,\r\n                    margin: [0,4,0,0],//[left, top, right, bottom]\r\n                    width: 13\r\n                },\r\n                {\r\n                    text: 'ผู้เช่าอาคาร', \r\n                    noWrap: true,\r\n                    style: [ 'checkboxValue', 'fontTitle'],\r\n                    width: 90,\r\n                }\r\n            ]\r\n        },\r\n        {\r\n            style: 'checkboxPrivilege',\r\n            columns:[\r\n                {\r\n                    image: !typeID ? Unchecked: (typeID.indexOf('5') > -1) ? Checked : Unchecked,\r\n                    margin: [0,4,0,0],//[left, top, right, bottom]\r\n                    width: 13\r\n                },\r\n                {\r\n                    text: 'เป็นบุคคลธรรมดา', \r\n                    style: [ 'checkboxValue', 'fontTitle'],\r\n                    width: 110,\r\n                    noWrap: true\r\n                },\r\n                {\r\n                    image: !typeID ? Unchecked: (typeID.indexOf('6') > -1) ? Checked : Unchecked,\r\n                    margin: [0,4,0,0],//[left, top, right, bottom]\r\n                    width: 13\r\n                },\r\n                {\r\n                    text: 'เป็นผู้ได้รับมอบอำนาจจากนิติบุคคล', \r\n                    style: [ 'checkboxValue', 'fontTitle'],\r\n                    width: 90,\r\n                    noWrap: true\r\n                }\r\n            ]\r\n        },\r\n        {\r\n            style: 'checkboxPrivilege',\r\n            columns:[\r\n                {\r\n                    image: !typeID ? Unchecked: (typeID.indexOf('9') > -1) ? Checked : Unchecked,\r\n                    margin: [0,4,0,0],//[left, top, right, bottom]\r\n                    width: 13\r\n                },\r\n                {\r\n                    text: 'อื่นๆ', \r\n                    style: [ 'checkboxValue', 'fontTitle'],\r\n                    width: 20,\r\n                    noWrap: true\r\n                },\r\n                {\r\n                    text: !typeID ? '.....................................': ( (typeID.indexOf('9') > -1) && typeDetail) ? typeDetail : '.....................................', \r\n                    style: [ 'checkboxValue', 'fontTitle'],\r\n                    width: 'auto',\r\n                }\r\n            ]   \r\n        }\r\n    ]\r\n}\r\n\r\nconst generateCheckboxObjectivePMR = (id) => {\r\n    return [\r\n        {\r\n            style: 'checkboxPrivilege',\r\n            columns:[\r\n                {\r\n                    text: 'มีความประสงค์', \r\n                    style: [ 'checkboxValue', 'fontTitle'],\r\n                    width: 60,\r\n                    noWrap: true\r\n                },\r\n                {\r\n                    image: (id === '1') ? Checked : Unchecked,\r\n                    margin: [0,4,0,0],//[left, top, right, bottom]\r\n                    width: 13\r\n                },\r\n                {\r\n                    text: 'ขอแจ้งการใช้ประโยชน์ที่ดิน', \r\n                    style: [ 'checkboxValue', 'fontTitle'],\r\n                    width: 120,\r\n                    noWrap: true\r\n                },\r\n                {\r\n                    image: (id === '2') ? Checked : Unchecked,\r\n                    margin: [0,4,0,0],//[left, top, right, bottom]\r\n                    width: 13\r\n                },\r\n                {\r\n                    text: 'ขอแจ้งเปลี่ยนแปลงการใช้ประโยชน์ที่ดิน', \r\n                    style: [ 'checkboxValue', 'fontTitle'],\r\n                    width: 170,\r\n                    noWrap: true\r\n                },\r\n            ]\r\n        }\r\n    ]\r\n}\r\n\r\nconst generateCheckboxLandUse = (id, detail=null) => {\r\n    // console.log('id', id)\r\n    return [\r\n        {\r\n            margin: [70, 0, 0, 0],\r\n            columns:[\r\n                {\r\n                    text: '๑.๑ เป็น', \r\n                    style: [ 'submitText', 'fontTitle'],\r\n                    width: 'auto',\r\n                    noWrap: true\r\n                },\r\n                {\r\n                    image: (id === '1') ? Checked : Unchecked,\r\n                    margin: [0,4,0,0],//[left, top, right, bottom]\r\n                    width: 13,\r\n                },\r\n                {\r\n                    text: 'การประกอบกิจการใหม่',\r\n                    noWrap: true, \r\n                    style: [ 'checkboxValue', 'fontTitle'],\r\n                    width: 142,\r\n                },\r\n                {\r\n                    image: (id === '3') ? Checked : Unchecked,\r\n                    margin: [0,4,0,0],//[left, top, right, bottom]\r\n                    width: 13,\r\n                },\r\n                {\r\n                    text: 'เปลี่ยนแปลงพื้นที่อาคารและประกอบกิจการเดิม',\r\n                    noWrap: true, \r\n                    style: [ 'checkboxValue', 'fontTitle'],\r\n                    width: 90,\r\n                },\r\n            ]\r\n        },\r\n        {\r\n            margin: [117, 0, 0, 0],\r\n            columns:[\r\n                {\r\n                    image: (id === '2') ? Checked : Unchecked,\r\n                    margin: [0,4,0,0],//[left, top, right, bottom]\r\n                    width: 13,\r\n                },\r\n                {\r\n                    text: 'เปลี่ยนแปลงจากกิจการเดิมเป็นกิจการใหม่',\r\n                    noWrap: true, \r\n                    style: [ 'checkboxValue', 'fontTitle'],\r\n                    width: 178,\r\n                },\r\n                // {\r\n                //     image: (id === '4') ? Checked : Unchecked,\r\n                //     margin: [0,4,0,0],//[left, top, right, bottom]\r\n                //     width: 13,\r\n                // },\r\n                // {\r\n                //     text: 'เปลี่ยนแปลงพื้นที่อาคารและประกอบกิจการเดิมและ เพิ่มพื้นที่อาคารและประกอบกิจการใหม่',\r\n                //     style: [ 'checkboxValue', 'fontTitle'],\r\n                //     width: 200,\r\n                // },\r\n            ]\r\n        },\r\n        {\r\n            margin: [117, 0, 0, 0],\r\n            columns:[\r\n                {\r\n                    image: (id === '4') ? Checked : Unchecked,\r\n                    margin: [0,4,0,0],//[left, top, right, bottom]\r\n                    width: 13,\r\n                },\r\n                {\r\n                    text: 'เปลี่ยนแปลงพื้นที่อาคารและประกอบกิจการเดิมและเพิ่มพื้นที่อาคารและประกอบกิจการใหม่',\r\n                    style: [ 'checkboxValue', 'fontTitle'],\r\n                    width: 500,\r\n                },\r\n            ]\r\n        },\r\n        {\r\n            margin: [117, 0, 0, 0],\r\n            columns:[\r\n                {\r\n                    image: (id === '9') ? Checked : Unchecked,\r\n                    margin: [0,4,0,0],//[left, top, right, bottom]\r\n                    width: 13,\r\n                },\r\n                {\r\n                    text: 'อื่น ๆ',\r\n                    noWrap: true, \r\n                    style: [ 'checkboxValue', 'fontTitle'],\r\n                    width: 'auto',\r\n                },\r\n                {\r\n                    text: ((id === '9') && detail) ? detail : '.............................',\r\n                    style: [ 'checkboxValue', 'fontTitle'],\r\n                    width: 'auto',\r\n                },\r\n            ]\r\n        }\r\n    ]\r\n}\r\n\r\nconst submitFormPMR = pmrData => {\r\n    //console.log('pmrData', pmrData)\r\n    moment.locale('th');\r\n    return [\r\n        {\r\n            text: 'หนังสือแจ้งการใช้ประโยชน์ที่ดินหรือเปลี่ยนแปลงการใช้ประโยชน์ที่ดินในเขตกรุงเทพมหานคร', \r\n            style: [ 'submitHeader', 'fontTitle', 'bold_font'],\r\n            width: '*',\r\n            noWrap: true,\r\n            margin: [0,0,0,10]\r\n        },\r\n        {\r\n            columns:[\r\n                {\r\n                    text: 'เขียนที่', \r\n                    style: [ 'submitTitle', 'fontTitle'],\r\n                    width: '*',\r\n                    noWrap: true\r\n                },\r\n                {\r\n                    text: pmrData.writePlace ? pmrData.writePlace:'..................', \r\n                    style: [ 'submitTitleValue', 'fontTitle'],\r\n                    width: 'auto',\r\n                }\r\n            ]\r\n        },\r\n        {\r\n            columns:[\r\n                {\r\n                    text: 'วันที่', \r\n                    style: [ 'submitTitle', 'fontTitle'],\r\n                    width: '*',\r\n                    noWrap: true\r\n                },\r\n                {\r\n                    text: `${moment(pmrData.date).format('D')}`, \r\n                    style: [ 'submitTitleValue', 'fontTitle'],\r\n                    width: 'auto',\r\n                    \r\n                },\r\n                {\r\n                    text: 'เดือน', \r\n                    style: [ 'submitTitle', 'fontTitle'],\r\n                    width: 'auto',\r\n                    noWrap: true\r\n                },\r\n                {\r\n                    text: `${moment().format('MMMM')}`, \r\n                    style: [ 'submitTitleValue', 'fontTitle'],\r\n                    width: 'auto'\r\n                },\r\n                {\r\n                    text: 'พ.ศ.', \r\n                    style: [ 'submitTitle', 'fontTitle'],\r\n                    width: 'auto',\r\n                    noWrap: true\r\n                },\r\n                {\r\n                    text: `${parseInt(moment().format('YYYY')) + 543}`, \r\n                    style: [ 'submitTitleValue', 'fontTitle'],\r\n                    width: 'auto'\r\n                }\r\n            ]\r\n        },\r\n        {\r\n            columns:[\r\n                {\r\n                    text: 'ข้าพเจ้า', \r\n                    style: [ 'fontTitle', 'marginBottom'],\r\n                    width: 'auto',\r\n                    noWrap: true,\r\n                },\r\n                {\r\n                    text: pmrData.name, \r\n                    style: [ 'fontTitle'],\r\n                    width: 'auto',\r\n                }\r\n            ]\r\n        },\r\n        ...generateCheckboxTypePMR(pmrData.nameType, pmrData.typeDetail),\r\n        ...generateCheckboxObjectivePMR(pmrData.objective),\r\n        {\r\n            columns:[\r\n                {\r\n                    text: 'ตามกฎกระทรวงให้ใช้บังคับผังเมืองรวมกรุงเทพมหานครต่อเจ้าพนักงานท้องถิ่น ในที่ดินโฉนดเลขที่', \r\n                    style: [ 'submitText', 'fontTitle'],\r\n                    width: 'auto',\r\n                    noWrap: true,\r\n                    margin: [30,0,0,0]\r\n                },\r\n                {\r\n                    text: pmrData.chanode[0].chanodeNo, \r\n                    style: [ 'submitValue', 'fontTitle', 'decorationUnderline'],\r\n                    width: '*',\r\n                }\r\n            ]\r\n        },\r\n        {\r\n            columns:[\r\n                {\r\n                    text: 'หน้าสำรวจ', \r\n                    style: [ 'submitText', 'fontTitle'],\r\n                    width: 'auto',\r\n                    noWrap: true,\r\n                    margin: [30,0,0,0]\r\n                },\r\n                {\r\n                    text: pmrData.chanode[0].surveyNo, \r\n                    style: [ 'submitValue', 'fontTitle', 'decorationUnderline'],\r\n                    width: 'auto',\r\n                },\r\n                {\r\n                    text: 'เลขที่ดิน',\r\n                    style: [ 'submitText', 'fontTitle'],\r\n                    width: 'auto',\r\n                    noWrap: true\r\n                },\r\n                {\r\n                    text: pmrData.chanode[0].landNo, \r\n                    style: [ 'submitValue', 'fontTitle', 'decorationUnderline'],\r\n                    width: 'auto',\r\n                },\r\n                {\r\n                    text: 'ขนาดแปลงที่ดิน', \r\n                    style: [ 'submitText', 'fontTitle'],\r\n                    width: 'auto',\r\n                    noWrap: true\r\n                },\r\n                {\r\n                    text: pmrData.chanode[0].chanodeRai, \r\n                    style: [ 'submitValue', 'fontTitle', 'decorationUnderline'],\r\n                    width: 'auto',\r\n                },\r\n                {\r\n                    text: 'ไร่', \r\n                    style: [ 'submitText', 'fontTitle'],\r\n                    width: 'auto',\r\n                    noWrap: true\r\n                },\r\n                {\r\n                    text: pmrData.chanode[0].chanodeNgan, \r\n                    style: [ 'submitValue', 'fontTitle', 'decorationUnderline'],\r\n                    width: 'auto',\r\n                },\r\n                {\r\n                    text: 'งาน', \r\n                    style: [ 'submitText', 'fontTitle'],\r\n                    width: 'auto',\r\n                    noWrap: true\r\n                },\r\n                {\r\n                    text: pmrData.chanode[0].chanodeWa, \r\n                    style: [ 'submitValue', 'fontTitle', 'decorationUnderline'],\r\n                    width: 'auto',\r\n                },\r\n                {\r\n                    text: 'ตารางวา', \r\n                    style: [ 'submitText', 'fontTitle'],\r\n                    width: 'auto',\r\n                    noWrap: true\r\n                }\r\n            ]\r\n        },\r\n        {\r\n            columns:[\r\n                {\r\n                    text: 'ใช้ประโยชน์', \r\n                    style: [ 'submitText', 'fontTitle'],\r\n                    width: 'auto',\r\n                    noWrap: true,\r\n                    margin: [30,0,0,0]\r\n                },\r\n                {\r\n                    text: pmrData.chanode[0].useRai, \r\n                    style: [ 'submitValue', 'fontTitle', 'decorationUnderline'],\r\n                    width: 'auto',\r\n                },\r\n                {\r\n                    text: 'ไร่', \r\n                    style: [ 'submitText', 'fontTitle'],\r\n                    width: 'auto',\r\n                    noWrap: true\r\n                },\r\n                {\r\n                    text: pmrData.chanode[0].useNgan, \r\n                    style: [ 'submitValue', 'fontTitle', 'decorationUnderline'],\r\n                    width: 'auto',\r\n                },\r\n                {\r\n                    text: 'งาน', \r\n                    style: [ 'submitText', 'fontTitle'],\r\n                    width: 'auto',\r\n                    noWrap: true\r\n                },\r\n                {\r\n                    text: pmrData.chanode[0].useWa, \r\n                    style: [ 'submitValue', 'fontTitle', 'decorationUnderline'],\r\n                    width: 'auto',\r\n                },\r\n                {\r\n                    text: 'ตารางวา', \r\n                    style: [ 'submitText', 'fontTitle'],\r\n                    width: 'auto',\r\n                    noWrap: true\r\n                },\r\n                {\r\n                    text:  pmrData.chanode.length > 1 ? '(กรณีมากกว่า ๑ แปลงดูในเอกสารแนบ)': '', \r\n                    style: [ 'submitText', 'fontTitle'],\r\n                    width: 'auto',\r\n                },\r\n            ]\r\n        },\r\n        {\r\n            columns:[\r\n                {\r\n                    text: 'อยู่ในที่ดินประเภท', \r\n                    style: [ 'submitText', 'fontTitle'],\r\n                    width: 'auto',\r\n                    noWrap: true,\r\n                    margin: [30,0,0,0]\r\n                },\r\n                {\r\n                    text: `${pmrData.zoneNo} ${pmrData.color} ${pmrData.landUse}`, \r\n                    style: [ 'submitValue', 'fontTitle', 'decorationUnderline'],\r\n                    width: 'auto',\r\n                },\r\n                {\r\n                    text: 'บริเวณ', \r\n                    style: [ 'submitText', 'fontTitle'],\r\n                    width: 'auto',\r\n                    noWrap: true\r\n                },\r\n                {\r\n                    text: pmrData.subZone, \r\n                    style: [ 'submitValue', 'fontTitle', 'decorationUnderline'],\r\n                    width: 'auto',\r\n                },\r\n                {\r\n                    text: 'เพื่อกิจการ', \r\n                    style: [ 'submitText', 'fontTitle'],\r\n                    width: 'auto',\r\n                    noWrap: true\r\n                },\r\n                {\r\n                    text: pmrData.activity, \r\n                    style: [ 'submitValue', 'fontTitle', 'decorationUnderline'],\r\n                    width: 'auto',\r\n                }\r\n            ]\r\n        },\r\n        {\r\n            columns:[\r\n                {\r\n                    text: 'บ้านเลขที่', \r\n                    style: [ 'submitText', 'fontTitle'],\r\n                    width: 'auto',\r\n                    noWrap: true,\r\n                    margin: [30,0,0,0]\r\n                },\r\n                {\r\n                    text: pmrData.houseNo? pmrData.houseNo: '-', \r\n                    style: [ 'submitValue', 'fontTitle', 'decorationUnderline'],\r\n                    width: 'auto',\r\n                },\r\n                {\r\n                    text: 'หมู่ที่', \r\n                    style: [ 'submitText', 'fontTitle'],\r\n                    width: 'auto',\r\n                    noWrap: true\r\n                },\r\n                {\r\n                    text: pmrData.moo? pmrData.moo: '-', \r\n                    style: [ 'submitValue', 'fontTitle', 'decorationUnderline'],\r\n                    width: 'auto'\r\n                },\r\n                {\r\n                    text: 'ตรอก/ซอย', \r\n                    style: [ 'submitText', 'fontTitle'],\r\n                    width: 'auto',\r\n                    noWrap: true\r\n                },\r\n                {\r\n                    alignment: 'left',\r\n                    text: pmrData.soi? pmrData.soi: '-', \r\n                    style: [ 'submitValue', 'fontTitle', 'decorationUnderline'],\r\n                    width: 'auto',\r\n                },\r\n                {\r\n                    text: 'ถนน', \r\n                    style: [ 'submitText', 'fontTitle'],\r\n                    width: 'auto',\r\n                    noWrap: true\r\n                },\r\n                {\r\n                    text: pmrData.road? pmrData.road: '-', \r\n                    style: [ 'submitValue', 'fontTitle', 'decorationUnderline'],\r\n                    width: 'auto',\r\n                }\r\n            ]\r\n        },\r\n        {\r\n            columns:[\r\n                {\r\n                    text: 'แขวง', \r\n                    style: [ 'submitText', 'fontTitle'],\r\n                    width: 'auto',\r\n                    noWrap: true,\r\n                    margin: [30,0,0,0]\r\n                },\r\n                {\r\n                    text: pmrData.subDistrictName, \r\n                    style: [ 'submitValue', 'fontTitle', 'decorationUnderline'],\r\n                    width: 'auto',\r\n                },\r\n                {\r\n                    text: 'เขต', \r\n                    style: [ 'submitText', 'fontTitle'],\r\n                    width: 'auto',\r\n                    noWrap: true\r\n                },\r\n                {\r\n                    text: pmrData.districtName, \r\n                    style: [ 'submitValue', 'fontTitle', 'decorationUnderline'],\r\n                    width: 'auto'\r\n                },\r\n                {\r\n                    text: 'กรุงเทพมหานคร', \r\n                    style: [ 'submitText', 'fontTitle'],\r\n                    width: 'auto',\r\n                    noWrap: true\r\n                }\r\n            ]\r\n        },\r\n        {\r\n            text: 'โดยมีรายละเอียดเกี่ยวกับการใช้ประโยชน์ที่ดินตามแผนที่สังเขป ดังนี้', \r\n            style: [ 'submitInfo', 'fontTitle'],\r\n            width: 'auto',\r\n            noWrap: true,\r\n            margin: [30, 0, 3, 0],\r\n        },\r\n        {\r\n            text: '๑. การใช้ประโยชน์ที่ดิน', \r\n            style: [ 'submitInfo', 'fontTitle'],\r\n            width: 'auto',\r\n            noWrap: true,\r\n            margin: [60, 0, 3, 0],\r\n        },\r\n        ...generateCheckboxLandUse(pmrData.luChange, pmrData.luDetail),\r\n        \r\n        {\r\n            margin: [70, 0, 0, 0],\r\n            columns:[\r\n                {\r\n                    text: '๑.๒ พื้นที่ดิน',\r\n                    noWrap: true, \r\n                    style: [ 'submitText', 'fontTitle'],\r\n                    width: 'auto',\r\n                },\r\n                {\r\n                    text: Number(pmrData.landArea).toLocaleString(),\r\n                    style: [ 'submitValue', 'fontTitle', 'decorationUnderline'],\r\n                    width: 105,\r\n                },\r\n                {\r\n                    text: 'ตร.ม.',\r\n                    style: [ 'submitText', 'fontTitle'],\r\n                    width: 25,\r\n                },\r\n                {\r\n                    text: '๑.๖ อัตราส่วนของที่ว่างต่อพื้นที่อาคารรวม',\r\n                    noWrap: true, \r\n                    style: [ 'submitText', 'fontTitle'],\r\n                    width: 'auto',\r\n                },\r\n                {\r\n                    text: Number(pmrData.osr).toLocaleString(),\r\n                    noWrap: true, \r\n                    style: [ 'submitValue', 'fontTitle', 'decorationUnderline'],\r\n                    width: 'auto',\r\n                }\r\n            ]\r\n        },\r\n        {\r\n            margin: [70, 0, 0, 0],\r\n            columns:[\r\n                {\r\n                    text: '๑.๓ พื้นที่ประกอบการ',\r\n                    noWrap: true, \r\n                    style: [ 'submitText', 'fontTitle'],\r\n                    width: 'auto',\r\n                },\r\n                {\r\n                    text: Number(pmrData.activityArea).toLocaleString(),\r\n                    style: [ 'submitValue', 'fontTitle', 'decorationUnderline'],\r\n                    width: 65,\r\n                },\r\n                {\r\n                    text: 'ตร.ม.',\r\n                    style: [ 'submitText', 'fontTitle'],\r\n                    width: 25,\r\n                },\r\n                {\r\n                    text: '๑.๗ ร้อยละพื้นที่ว่างตามกฎหมายควบคุมอาคาร',\r\n                    noWrap: true, \r\n                    style: [ 'submitText', 'fontTitle'],\r\n                    width: 'auto',\r\n                },\r\n                {\r\n                    text: '..........',\r\n                    noWrap: true, \r\n                    style: [ 'submitValue', 'fontTitle'],\r\n                    width: 'auto',\r\n                },\r\n            ]\r\n        },\r\n        {\r\n            margin: [70, 0, 0, 0],\r\n            columns:[\r\n                {\r\n                    text: '๑.๔ พื้นที่อาคารรวม',\r\n                    noWrap: true, \r\n                    style: [ 'submitText', 'fontTitle'],\r\n                    width: 'auto',\r\n                },\r\n                {\r\n                    text: Number(pmrData.buildArea).toLocaleString(),\r\n                    style: [ 'submitValue', 'fontTitle', 'decorationUnderline'],\r\n                    width: 74,\r\n                },\r\n                {\r\n                    text: 'ตร.ม.',\r\n                    style: [ 'submitText', 'fontTitle'],\r\n                    width: 25,\r\n                },\r\n                {\r\n                    text: '๑.๘ พื้นที่น้ำซึมผ่าน',\r\n                    noWrap: true, \r\n                    style: [ 'submitText', 'fontTitle'],\r\n                    width: 'auto',\r\n                },\r\n                {\r\n                    text: Number(pmrData.waterPass) === 0 ? '-': Number(pmrData.waterPass).toLocaleString(),\r\n                    noWrap: true, \r\n                    style: [ 'submitValue', 'fontTitle', 'decorationUnderline'],\r\n                    width: 110,\r\n                },\r\n                {\r\n                    text: 'ตร.ม.',\r\n                    style: [ 'submitText', 'fontTitle'],\r\n                    width: 'auto',\r\n                },\r\n            ]\r\n        },\r\n        {\r\n            margin: [70, 0, 0, 0],\r\n            columns:[\r\n                {\r\n                    text: '๑.๕ อัตราส่วนพื้นที่อาคารรวมต่อพื้นที่ดิน',\r\n                    noWrap: true, \r\n                    style: [ 'submitText', 'fontTitle'],\r\n                    width: 'auto',\r\n                },\r\n                {\r\n                    text: Number(pmrData.far).toLocaleString(),\r\n                    style: [ 'submitValue', 'fontTitle', 'decorationUnderline'],\r\n                    width: 23,\r\n                },\r\n                {\r\n                    text: '๑.๙ ความสูง',\r\n                    noWrap: true, \r\n                    style: [ 'submitText', 'fontTitle'],\r\n                    width: 'auto',\r\n                },\r\n                {\r\n                    text: Number(pmrData.highestStorey) === 0 ? '   -    ' :Number(pmrData.highestStorey).toLocaleString(),\r\n                    noWrap: true, \r\n                    style: [ 'submitTitle', 'fontTitle', 'decorationUnderline'],\r\n                    width: 50,\r\n                },\r\n                {\r\n                    text: 'ชั้น',\r\n                    style: [ 'submitValue', 'fontTitle'],\r\n                    width: 'auto'\r\n                },\r\n                {\r\n                    text: Number(pmrData.height) === 0 ? '   -   ' :Number(pmrData.height).toLocaleString(),\r\n                    noWrap: true, \r\n                    style: [ 'submitTitle', 'fontTitle', 'decorationUnderline'],\r\n                    width: 55,\r\n                },\r\n                {\r\n                    text: 'เมตร',\r\n                    style: [ 'submitValue', 'fontTitle'],\r\n                    width: 'auto'\r\n                }\r\n            ]\r\n        },\r\n        {\r\n            text: 'ลงชื่อ..........................................................',\r\n            noWrap: true, \r\n            style: ['signature', 'fontTitle'],\r\n            width: '*',\r\n            margin:[0,30,0,0]\r\n        },\r\n        {\r\n            text: '(.....................................................)',\r\n            noWrap: true, \r\n            style: ['signature', 'fontTitle'],\r\n            width: '*',\r\n            margin: [0,0,9,0]\r\n        },\r\n        {\r\n            text: 'ผู้แจ้งการใช้ประโยชน์ที่ดิน',\r\n            noWrap: true, \r\n            style: ['signature', 'fontTitle'],\r\n            width: '*',\r\n            margin: [0,0,22,0]\r\n        },\r\n        lightHorizontalLines,\r\n        {\r\n            text: 'หมายเหตุเจ้าหน้าที่',\r\n            noWrap: true, \r\n            style: ['submitText', 'fontTitle', 'decorationUnderline'],\r\n            width: '*',\r\n            margin: [20,0,0,0]\r\n        },\r\n        {\r\n            text: 'ได้ตรวจสอบหนังสือแจ้งการใช้ประโยชน์ที่ดินหรือเปลี่ยนแปลงการใช้ประโยชน์ที่ดินฯ แล้วเป็นไปตาม',\r\n            noWrap: true, \r\n            style: ['submitText', 'fontTitle'],\r\n            width: '*',\r\n            margin: [60,0,0,0]\r\n        },\r\n        {\r\n            columns:[\r\n                {\r\n                    text: 'แผนผังและข้อกำหนดการใช้ประโยชน์ที่ดิน และได้ออกใบอนุญาต/ใบรับแจ้ง/หนังสือรับรองการแจ้งแล้ว ',\r\n                    noWrap: true, \r\n                    style: ['submitText', 'fontTitle'],\r\n                    width: '*',\r\n                    margin: [30,0,0,0]\r\n                },\r\n            ]\r\n        },\r\n        {\r\n            text: 'เล่มที่..........................ฉบับที่................................. ลงวันที่..........เดือน.........................พ.ศ....................',\r\n            noWrap: true, \r\n            style: ['submitText', 'fontTitle'],\r\n            width: '*',\r\n            margin: [30,0,0,0]\r\n        },\r\n        {\r\n            text: 'ลงชื่อ..........................................................',\r\n            noWrap: true, \r\n            style: ['signature', 'fontTitle'],\r\n            width: '*',\r\n            margin:[0,30,0,0]\r\n        },\r\n        {\r\n            text: '(.....................................................)',\r\n            noWrap: true, \r\n            style: ['signature', 'fontTitle'],\r\n            width: '*',\r\n            margin: [0,0,9,20]\r\n        },\r\n        {\r\n            text: 'ตำแหน่ง..........................................................',\r\n            noWrap: true, \r\n            style: ['signature', 'fontTitle'],\r\n            width: '*',\r\n        }\r\n    ];\r\n}\r\n\r\n\r\nconst otherChanode = (listChanode=[]) => {\r\n    const isGenerate = (listChanode.length > 1);\r\n\r\n    const chanodeItm = [];\r\n    listChanode.forEach((itm, index) => {\r\n        // if(index > 0){\r\n            chanodeItm.push([ \r\n                {\r\n                    text: ++index,\r\n                    style: 'chanodeItemText'\r\n                }, \r\n                {\r\n                    text: itm.chanodeNo,\r\n                    style: 'chanodeItemText'\r\n                },\r\n                {\r\n                    text: itm.surveyNo,\r\n                    style: 'chanodeItemText'\r\n                },\r\n                {\r\n                    text: itm.landNo,\r\n                    style: 'chanodeItemText'\r\n                },\r\n                \r\n                {\r\n                    text: itm.chanodeRai,\r\n                    style: [ 'chanodeItemText']\r\n                }, \r\n                {\r\n                    text: itm.chanodeNgan,\r\n                    style: [ 'chanodeItemText']\r\n                }, \r\n                {\r\n                    text: itm.chanodeWa,\r\n                    style: [ 'chanodeItemText']\r\n                }, \r\n                {\r\n                    text: itm.useRai,\r\n                    style: [ 'chanodeItemText']\r\n                }, \r\n                {\r\n                    text: itm.useNgan,\r\n                    style: [ 'chanodeItemText']\r\n                }, \r\n                {\r\n                    text: itm.useWa,\r\n                    style: [ 'chanodeItemText']\r\n                }, \r\n            ])\r\n        // }\r\n    });\r\n    return !isGenerate ? [] : [\r\n        {\r\n            text: '',\r\n            pageOrientation: 'landscape',\r\n            pageBreak: 'after'\r\n        },\r\n        {\r\n            text: 'รายการโฉนดที่ดิน (กรณีที่มีมากกว่า 1 โฉนด)',\r\n            noWrap: true, \r\n            style: ['chanodeHeader', 'fontTitle', 'bold_font'],\r\n            width: '*',\r\n        },\r\n        {\r\n            table: {\r\n                // headers are automatically repeated if the table spans over multiple pages\r\n                // you can declare how many rows should be treated as headers\r\n                headerRows: 2,\r\n                widths: [ 40, '*', 60, 60, 60, 60,60,60,60,60 ],\r\n\r\n                body: [\r\n\r\n                    // Table Header\r\n                    [\r\n                        {text: 'ลำดับ', \"rowSpan\":2, style: 'chanodeTableHeader', margin:[0,8,0,0]},\r\n                    //   {text: 'Header 2', colSpan: 5},\r\n                        {text: 'โฉนดเลขที่', \"rowSpan\":2, style: 'chanodeTableHeader', margin:[0,8,0,0]},\r\n                        {text: 'หน้าสำรวจ', \"rowSpan\":2, style: 'chanodeTableHeader', margin:[0,8,0,0]},\r\n                        {text: 'เลขที่ดิน', \"rowSpan\":2, style: 'chanodeTableHeader', margin:[0,8,0,0]},\r\n                        {text: 'ขนาดแปลงที่ดิน', colSpan: 3, style: 'chanodeTableHeader'},\r\n                        {},\r\n                        {},\r\n                        {text: 'ขนาดที่ใช้ประโยชน์', colSpan: 3, style: 'chanodeTableHeader'},\r\n                        {},\r\n                        {}\r\n                        \r\n                    ],//chanodeItemText\r\n                    [ \r\n                        {\r\n                            text: '',\r\n                            style: 'chanodeTableHeader'\r\n                        }, \r\n                        {\r\n                            text: '',\r\n                            style: 'chanodeTableHeader'\r\n                        },\r\n                        {\r\n                            text: '',\r\n                            style: 'chanodeTableHeader'\r\n                        },\r\n                        {\r\n                            text: '',\r\n                            style: 'chanodeTableHeader'\r\n                        },\r\n                        \r\n                        {\r\n                            text: 'ไร่',\r\n                            style: [ 'chanodeTableHeader']\r\n                        }, \r\n                        {\r\n                            text: 'งาน',\r\n                            style: [ 'chanodeTableHeader']\r\n                        }, \r\n                        {\r\n                            text: 'วา',\r\n                            style: [ 'chanodeTableHeader']\r\n                        }, \r\n                        {\r\n                            text: 'ไร่',\r\n                            style: [ 'chanodeTableHeader']\r\n                        }, \r\n                        {\r\n                            text: 'งาน',\r\n                            style: [ 'chanodeTableHeader']\r\n                        }, \r\n                        {\r\n                            text: 'วา',\r\n                            style: [ 'chanodeTableHeader']\r\n                        }, \r\n                    ],\r\n                    ...chanodeItm\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}\r\n\r\nconst generateMapPage = (base64Map) => {\r\n    if(base64Map){\r\n        return [\r\n            {\r\n                text: '',\r\n                pageOrientation: 'portrait',\r\n                pageBreak: 'after'\r\n            },\r\n            {\r\n                image: base64Map,\r\n                alignment: 'left',\r\n                margin: [-47,-45,0,0],//[left, top, right, bottom]\r\n                width: 610\r\n            }\r\n        ]\r\n    }\r\n    else {\r\n        return []\r\n    }\r\n}\r\n\r\nconst ExportSubmitPMR = (pmrData={\r\n    \"pmr1id\": \"00000000000000000000\",\r\n    \"date\": \"00/00/0000 00:00:00 AM\",\r\n    \"name\": \"...............\",\r\n    \"nameType\": \"\",\r\n    \"objective\": \"\",\r\n    \"typeDetail\": '',\r\n    \"houseNo\": \"...............\",\r\n    \"moo\": '...............',\r\n    \"soi\": \"...............\",\r\n    \"road\": \"...............\",\r\n    \"subDistrictName\": \"...............\",\r\n    \"districtName\": \"...............\",\r\n    \"activity\": '...............',\r\n    \"landUse\": \"...............\",\r\n    \"zoneNo\": \"\",\r\n    \"luChange\": \"\",\r\n    \"luDetail\": null,\r\n    \"landArea\": null,\r\n    \"activityArea\": '...............',\r\n    \"buildArea\": '...............',\r\n    \"far\": '...............',\r\n    \"osr\": '...............',\r\n    \"bdclOS\": '...............',\r\n    \"waterPass\": '...............',\r\n    \"highestStorey\": '...............',\r\n    \"height\": '...............',\r\n    \"writePlace\": \"...............\",\r\n    \"chanode\": [\r\n        {\r\n            \"chanodeNo\": \"...............\",\r\n            \"surveyNo\": \"...............\",\r\n            \"landNo\": \"...............\",\r\n            \"chanodeRai\": \"...............\",\r\n            \"chanodeNgan\": \"...............\",\r\n            \"chanodeWa\": \"...............\",\r\n            \"useRai\": \"...............\",\r\n            \"useNgan\": \"...............\",\r\n            \"useWa\": \"...............\"\r\n        }\r\n    ],\r\n    color: 'xxxx',\r\n    subZone: 'yyyy'\r\n},\r\nbase64Map=null) => {\r\n    const docDefinition = {\r\n        ...configPage,\r\n        header: (currentPage, pageCount) => {\r\n            let columnText = `${pmrData.pmr1id} แบบ ผมร.๑`;\r\n\r\n            if(currentPage > 1){\r\n                columnText = '';\r\n                if(currentPage === 2 && pmrData.chanode.length > 1){//หน้า 2 ไม่เป็นแผนที่\r\n                    columnText = 'เอกสารแนบ แบบ ผมร.๑';\r\n                }\r\n            }\r\n\r\n\r\n            return {\r\n                columns: [\r\n                    { text: '', style: 'documentHeaderLeft' },\r\n                    { text: '', style: 'documentHeaderCenter' },\r\n                    { text: columnText, style: 'documentHeaderRight' }\r\n                ]\r\n            }\r\n        },\r\n        content: [\r\n            ...submitFormPMR(pmrData),\r\n            ...otherChanode(pmrData.chanode),\r\n            ...generateMapPage(base64Map)\r\n        ],\r\n        styles: {\r\n            ...fontStyle,\r\n            ...layoutStyle,\r\n            bold_font: {\r\n                bold: true\r\n            },\r\n            decorationUnderline:{\r\n                decoration: 'underline',\r\n                decorationStyle: 'solid',\r\n                decorationColor: 'black'\r\n            }\r\n        },\r\n        defaultStyle: {\r\n            font: \"THSarabun\",\r\n            columnGap: 10,\r\n        }\r\n    };\r\n    pdfMake.createPdf(docDefinition).download('หนังสือแจ้งการใช้ประโยชน์ที่ดินหรือเปลี่ยนแปลงการใช้ประโยชน์ที่ดินในเขตผังเมืองรวมกรุงเทพมหานคร.pdf')\r\n}\r\n\r\nexport default ExportSubmitPMR;","import React, { Component, Fragment } from 'react'\r\nimport { reduxForm, formValueSelector, getFormValues, isDirty } from \"redux-form\";\r\nimport { compose } from \"recompose\";\r\nimport { connect } from \"react-redux\";\r\nimport { bindActionCreators } from \"redux\";\r\n\r\n\r\n//import service utils\r\nimport { fetchGet_, fetchPost_ } from '../../../../../../../../Utilities/ServiceUtils';\r\n\r\n//import action\r\nimport * as SubmitPmrAction from '../../../../../../../../Actions/Web/Panel/SubmitPmrAction';\r\nimport * as MapAction from \"../../../../../../../../Actions/Web/Maps/MapAction\";\r\nimport * as MapFunctions from \"../../../../../../../../Map/MapFunctions\";\r\nimport { numberFormat } from '../../../../../../../../Utilities/Utils';\r\nimport { checkPermission } from '../../../../../../../../Utilities/AuthenUtil'\r\n\r\n//import component\r\nimport AlertMessageSuper from '../../../../../../../../Controls/Containers/AlertMessageSuper'\r\nimport WithAlertMessage from '../../../../../../../../HOC/WithAlertMessage';\r\nimport WithLoading from '../../../../../../../../HOC/WithLoading';\r\nimport Loading from '../../../../../../../../Controls/Containers/Loading';\r\nimport FormFourView from '../../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/PMR1/SubmitPmr/FormStep/FormFourView';\r\nimport WithPanelContentReducer from '../../../../../../../../HOC/ConnectReducer/WithPanelContentReducer';\r\nimport ExportSubmitPMR from '../../ExportSubmitPMR/ExportSubmitPMR';\r\n\r\n//import constants\r\nimport { BKK_CODE_ID, \r\n    LISTGRAPHICLAYER, \r\n    RESOURCEWORDS,\r\n    TABLE_MAPSHEET1K,\r\n    ALERT_MESSAGE,\r\n    PROFILE_GROUP_TYPE,\r\n    SUBMIT_ERROR_MEASSAGE\r\n} from '../../../../../../../../Constants/Constants';\r\nimport { CONFIG_MENU } from '../../../../../../../../Constants/MenuConstants'\r\n\r\n//import lodash\r\nimport {  isEqual, differenceWith } from 'lodash'\r\n\r\nclass FormFour extends Component {\r\n    constructor() {\r\n        super();\r\n        this.pmrSaveSuccessID = null;\r\n        this.state = {\r\n            landuseData: [],\r\n            otherStatus: true,\r\n            valuesFAR: null,\r\n            valuesOSR: null,\r\n            sumLanduseArea: null,\r\n            waterPass: null,\r\n            pmr1IDView:null,\r\n            isSaveSucess: true,\r\n            pmr1id: null,\r\n            isSubmitError:false\r\n        }\r\n    }\r\n\r\n    componentDidMount = async () => {\r\n        const { stepFour, stepThree } = this.props.submitPmrRdc\r\n        const sumLanduse = await this.calSumLanduseArea()\r\n        const osr = await this.calOsr(stepFour.allArea, sumLanduse, stepFour.activateArea);\r\n        const far = await this.calFar(stepFour.allArea, sumLanduse);\r\n        const waterPass = await this.calWaterPass(stepThree.lupOsr, stepFour.allArea)\r\n\r\n        this.callServiceLanduseChange()\r\n        this.setState({\r\n            sumLanduseArea: sumLanduse,\r\n            valuesOSR: osr,\r\n            valuesFAR: parseFloat(far),\r\n            waterPass: waterPass\r\n        })\r\n    }\r\n\r\n    componentWillReceiveProps = (nextProps) => {\r\n        const { lupOsr } = this.props.submitPmrRdc.stepThree;\r\n        if (nextProps.submitPmrRdc.stepThree.lupOsr !== lupOsr) {\r\n            this.setState({\r\n                waterPass: this.calWaterPass(nextProps.submitPmrRdc.stepThree.lupOsr, this.props.stepFour.allArea)\r\n            })\r\n        }\r\n    }\r\n\r\n    calSumLanduseArea = () => {\r\n        const { submitPmrRdc } = this.props\r\n        let sumLanduse = 0;\r\n\r\n        submitPmrRdc.stepTwo.chanode.forEach(itm => {\r\n            sumLanduse += this.callLanduseArea(itm.userai, itm.usengan, itm.usewa)\r\n        })\r\n\r\n        return sumLanduse\r\n    }\r\n\r\n    callLanduseArea = (userai = 0, usengan = 0, usewa = 0) => {\r\n        return (parseInt(userai) * 1600) + (parseInt(usengan) * 400) + (parseFloat(usewa) * 4)\r\n    }\r\n\r\n    calWaterPass = (osrStandard = 0, buildAllArea = 0) => {\r\n        // (มาตรฐาน OSR* พื้นที่อาคารรวม /100)/2\r\n        // osrStandard => มาตรฐาน OSR\r\n        // buildAllArea => พื้นที่อาคารรวม\r\n        return ((osrStandard * buildAllArea) / 100) / 2\r\n    }\r\n\r\n    calOsr = (buildAllArea = 0, sumLanduseArea = 0, activateArea = 0) => {\r\n        // ((พื้นที่ดิน - พื้นที่ประกอบการ)/พื้นที่อาคารรวม)*100 \r\n        // buildAllArea => พื้นที่อาคารรวม\r\n        // sumLanduseArea => พื้นที่ดิน\r\n        // activateArea => พื้นที่ประกอบการ\r\n        \r\n        if (buildAllArea === \"\") { buildAllArea = 0 }\r\n        if (activateArea === \"\") { activateArea = 0 }\r\n        if (sumLanduseArea === \"\") { sumLanduseArea = 0 }\r\n        if (buildAllArea > 0) {\r\n            const result = parseFloat(((parseFloat(sumLanduseArea) - parseFloat(activateArea)) / parseFloat(buildAllArea)) * 100)\r\n            // return result.toFixed(2)\r\n            return numberFormat(result)\r\n        } else {\r\n            return 0\r\n        }\r\n    }\r\n\r\n    calFar = (buildAllArea = 0, sumLanduseArea = 0) => {\r\n        // พื้นที่อาคารรวมข้อ / พื้นที่ดิน\r\n        // buildAllArea => พื้นที่อาคารรวม\r\n        // sumLanduseArea => พื้นที่ดิน\r\n        if (buildAllArea === \"\") { buildAllArea = 0 }\r\n        if (sumLanduseArea === \"\") { sumLanduseArea = 0 }\r\n        \r\n        if (sumLanduseArea > 0) {\r\n            const result = parseFloat(buildAllArea) / parseFloat(sumLanduseArea)\r\n            // return result.toFixed(2)\r\n            return numberFormat(result)\r\n        } else {\r\n            return 0\r\n        }\r\n    }\r\n\r\n    handleChangeLanduseRadio = (res) => {\r\n        if (res.target.defaultValue === '9') {\r\n            this.setState({\r\n                otherStatus: false\r\n            })\r\n        } else {\r\n            this.setState({\r\n                otherStatus: true\r\n            })\r\n        }\r\n    }\r\n\r\n    handleClickPrevStep = () => {\r\n        const { onChangeStep, submitPmrAction, stepFour,_values } = this.props;\r\n        if (onChangeStep) {\r\n            onChangeStep(3)\r\n        }\r\n        submitPmrAction.saveFormStepFour(Object.assign(stepFour, _values))\r\n    }\r\n\r\n    callServiceLanduseChange = () => {\r\n        fetchGet_(process.env.REACT_APP_PMR_GET_LU_LANDUSE)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(data => {\r\n                this.setState({\r\n                    landuseData: data.result\r\n                })\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceLanduseChange', ex)\r\n            })\r\n    }\r\n\r\n    handleClickSaveForm = (values) => {\r\n        const { submitPmrAction, submitPmrRdc, showAlert,showLoading,hideLoading } = this.props;\r\n        showLoading()\r\n        \r\n        if (submitPmrRdc.stepThree.province === BKK_CODE_ID) { // เช็คว่าอยู่ใน กทม.\r\n            let jsonForSave = this.getJsonForSave(values)\r\n            this.callServiceSave(jsonForSave, submitPmrRdc.geometry)\r\n            submitPmrAction.saveFormStepFour(values)\r\n        } else {\r\n            showAlert({ altMsg: ALERT_MESSAGE.POPUP.OUT_OF_BKK })\r\n            hideLoading();\r\n        }\r\n    }\r\n\r\n    checkDifferentValue = (forCheck) => {\r\n        const { submitPmrRdc, authenRdc } = this.props;\r\n        \r\n        let isDiff = false;\r\n        const checkDif = new Promise((resolve, reject) => {\r\n            fetchGet_(`${process.env.REACT_APP_GET_PMR1_ID}?pmr1id=${submitPmrRdc.stepOne.REQNO}`)\r\n                .then(res => {\r\n                    if (!res.ok) {\r\n                        throw res.status\r\n                    }\r\n                    return res.json();\r\n                }).then((result) => {\r\n                    if (submitPmrRdc.status === \"Edit\" && authenRdc.profile.groupID === 'GID2') {\r\n                        result.date = forCheck.date\r\n                        const checkDifJson = differenceWith([forCheck], [result], isEqual)\r\n                        if (checkDifJson.length > 0) {\r\n                            isDiff = true\r\n                            resolve(isDiff)\r\n                        } else {\r\n                            resolve(isDiff)\r\n                        }\r\n                    } else {\r\n                        resolve(true)\r\n                    }\r\n                })\r\n        }).then((resolve) => {\r\n            return resolve\r\n        })\r\n\r\n        return checkDif\r\n    }\r\n\r\n    callServiceMapsheet1K=(objectID)=>{\r\n        const { showAlert, hideLoading } = this.props;\r\n\r\n        if(objectID){\r\n            fetchGet_(`${process.env.REACT_APP_UPDATE_MAPSHEET1K}?objectid=${objectID}&tablename=${TABLE_MAPSHEET1K.PMR1_PNT}&isupdate=true`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(values => {\r\n                if (values && values.statusCode === 1) {\r\n                    showAlert({\r\n                        altMsg: ALERT_MESSAGE.POPUP.SAVE_SUCCESS,\r\n                        callbackClose: this.handleCloseAlertMsg\r\n                    })\r\n                } else {\r\n                    showAlert({ altMsg: ALERT_MESSAGE.POPUP.SAVE_FAIL })\r\n                }\r\n            })\r\n            .catch(ex => {\r\n                showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR })\r\n                console.log('ex callServiceSaveForm', ex)\r\n            })\r\n            .finally(() => {\r\n                hideLoading();\r\n            })\r\n        }else{\r\n            showAlert({ altMsg: ALERT_MESSAGE.POPUP.SAVE_FAIL })\r\n            hideLoading();\r\n        }\r\n    }\r\n\r\n    callServicePMR = (URL, paramter, geometry) => {\r\n        const { mapAction, showAlert, submitPmrRdc, ObjectId, authenRdc,hideLoading } = this.props;\r\n        // console.log('url', url)\r\n        fetchPost_(URL, paramter)\r\n            .then(res => {\r\n                return res.json()\r\n            }).then(value => {\r\n                // let pmr1id = valueForSave.pmr1id\r\n                let pmr1id = submitPmrRdc.status === \"Edit\" ? submitPmrRdc.stepOne.REQNO : value.PMR1ID\r\n                // console.log('paramter',paramter)\r\n                mapAction.bindMapCommand(MapFunctions.SaveGeometryPMR1, {  \r\n                    value:{ geometry, \r\n                        pmr1id, \r\n                        status: submitPmrRdc.status,\r\n                        ObjectId: ObjectId ? ObjectId.OBJECTID : null,\r\n                        authenRdc,\r\n                        date:submitPmrRdc.stepOne.date,\r\n                        pmr1DistrictID :paramter.pmr1DistrictID,\r\n                        statusCode:paramter.status,\r\n                        name:paramter.name\r\n                    }, \r\n                    callbackFn:this.callServiceMapsheet1K\r\n                });\r\n\r\n                if (value.statusCode === 1) {\r\n                    this.pmrSaveSuccessID = value.PMR1ID;\r\n                    \r\n                    this.setState({\r\n                        isSaveSucess: false,\r\n                        pmr1IDView:pmr1id\r\n                    })\r\n                } else {\r\n                    showAlert({ altMsg: ALERT_MESSAGE.POPUP.SAVE_FAIL })\r\n                    hideLoading();\r\n                }\r\n            })\r\n            .catch(ex => {\r\n                showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR })\r\n                console.log('ex callServiceSave pmr', ex)\r\n                this.props.hideLoading();\r\n            })\r\n    }\r\n\r\n    callServiceSave = (valueForSave, geometry) => {\r\n        this.pmrSaveSuccessID = null;\r\n        const { submitPmrRdc } = this.props;\r\n\r\n        if(submitPmrRdc.status === 'Edit') {\r\n            this.callServiceEdit(valueForSave, submitPmrRdc.geometry);\r\n        } else {\r\n            this.callServiceAdd(valueForSave, submitPmrRdc.geometry);\r\n        }\r\n    }\r\n\r\n    callServiceEdit = async (valueForSave, geometry) => {\r\n        const { authenRdc, submitPmrRdc } = this.props;\r\n        const isOfficer = await checkPermission(authenRdc.profile.functions[authenRdc.system], CONFIG_MENU.FCN14.ID)\r\n\r\n        const isDif = await this.checkDifferentValue(valueForSave.forCheck);\r\n        let URL = process.env.REACT_APP_POST_PMR1_UPDATE\r\n        valueForSave.forSave.status = 3\r\n        let paramter = valueForSave.forSave\r\n\r\n        if(isOfficer) {\r\n            if(isDif) {\r\n                valueForSave.forSave.status = 3\r\n                return this.callServicePMR(URL, paramter, geometry)\r\n            } else {\r\n                paramter = { \"pmr1id\": submitPmrRdc.stepOne.REQNO, \"status\": 2 }\r\n                return this.callServicePMR(URL, paramter, geometry)\r\n            }\r\n        } else {\r\n            valueForSave.forSave.status = 1;\r\n            return this.callServicePMR(URL, paramter, geometry)\r\n        }\r\n    }\r\n\r\n    callServiceAdd = (valueForSave, geometry) => {\r\n        const URL = process.env.REACT_APP_PMR_SAVE_PMR\r\n        \r\n        if(this.props.authenRdc.profile.userID === PROFILE_GROUP_TYPE.PEOPLE_WITH_PROFILE.id){\r\n            valueForSave.forSave.status = 1;\r\n        }else{\r\n            valueForSave.forSave.status = 3;\r\n        }\r\n\r\n        const paramter = valueForSave.forSave\r\n        return this.callServicePMR(URL, paramter, geometry)\r\n    }\r\n    \r\n    handleCloseAlertMsg = async () => {\r\n        const { submitPmrAction, mapAction, hideAlert ,authenRdc,panelContentReducer,gotoView} = this.props;\r\n        const {isSaveSucess} = this.state;\r\n\r\n        await submitPmrAction.clearFormStep()\r\n        await mapAction.bindMapCommand(MapFunctions.clearSubmitPmr, [\r\n             LISTGRAPHICLAYER.GRAPHICLAYER_SUBMIT_PMR,\r\n             LISTGRAPHICLAYER.GRAPHICLAYER_SUBMIT_PMR_HIGHLIGHT,\r\n             LISTGRAPHICLAYER.GRAPHICLAYER_PMR1_FORM\r\n         ])\r\n    if(authenRdc && authenRdc.profile.groupID === PROFILE_GROUP_TYPE.PEOPLE_WITH_PROFILE.id) {\r\n        await mapAction.bindMapCommand(MapFunctions.drawGraphicPointPMR1,{ mapserviceUrl: window.GET_POINT_PMR,\r\n             creator: authenRdc.profile.userID})\r\n    }         \r\n        hideAlert()\r\n        if(!isSaveSucess){\r\n            if(gotoView){\r\n                 gotoView(this.state.pmr1IDView)\r\n            }else{\r\n                panelContentReducer.action.setPmrID(this.state.pmr1IDView)\r\n                //เลือกเปิดหน้า view ของเจ้าหน้าที่และประชาชน\r\n                if(authenRdc && authenRdc.profile.groupID === PROFILE_GROUP_TYPE.PEOPLE_WITH_PROFILE.id) {\r\n                    panelContentReducer.action.setCurrentPage(CONFIG_MENU.FCN13)\r\n                }else{\r\n                    panelContentReducer.action.setCurrentPage(CONFIG_MENU.FCN14)\r\n                }\r\n            }\r\n        }\r\n    }\r\n\r\n    formatChanode = (chanode) => {\r\n        const formatChaNode = chanode.map(itm => {\r\n            itm = {\r\n                chanodeNgan: itm.chanodengan,\r\n                chanodeNo: itm.chanodeno,\r\n                chanodeRai: itm.chanoderai,\r\n                chanodeWa: itm.chanodewa,\r\n                landNo: itm.landno,\r\n                surveyNo: itm.surveyno,\r\n                useNgan: itm.usengan,\r\n                useRai: itm.userai,\r\n                useWa: itm.usewa,\r\n            }\r\n\r\n            return itm\r\n        })\r\n\r\n        return formatChaNode\r\n    }\r\n\r\n    getJsonForSave = (formFourValue) => {\r\n        const { stepOne, stepTwo, stepThree, status } = this.props.submitPmrRdc\r\n        const { subDistrictId, districtId } = this.props;\r\n\r\n        let year = new Date().getFullYear() + 543;\r\n        let month = new Date().getMonth() + 1;\r\n        let padMonth = month.toString().length < 2 ? \"0\" + month : month;\r\n        let date = new Date().getDate();\r\n        let padDate = date.toString().length < 2 ? \"0\" + date : date;\r\n\r\n        let pmr1code = `${year}${padMonth}${padDate}`\r\n        const chanodeForSave = this.formatChanode(stepTwo.chanode)\r\n        const { waterPass, valuesFAR, valuesOSR, sumLanduseArea } = this.state\r\n        let parameter = {};\r\n\r\n        parameter.forSave = {\r\n            \"pmr1id\": status === \"Edit\" ? stepOne.REQNO : pmr1code,\r\n            \"date\": stepOne.date, //2019-05-31\r\n            \"name\": stepOne.parameterName,\r\n            \"nameType\": this.convertTypeNameToString(stepOne) !== \"\" ? this.convertTypeNameToString(stepOne) : null, //\"1|2|3\"\r\n            \"objective\": stepOne.parameterRadioTwo,\r\n            \"typeDetail\": stepOne.other ? stepOne.other : null,\r\n            \"houseNo\": stepThree.houseNo,\r\n            \"moo\": stepThree.villageNo,\r\n            \"soi\": stepThree.alley,\r\n            \"road\": stepThree.road,\r\n            \"subDistrictID\": stepThree.subDistrict,\r\n            \"districtID\": stepThree.district,\r\n            \"provinceID\": stepThree.province,\r\n            \"activity\": stepThree.forBusiness,\r\n            \"landUse\": stepThree.lupUserNo,\r\n            \"zoneNo\": stepThree.lupZone,\r\n            \"luChange\": formFourValue.landuseRadio,\r\n            \"luDetail\": formFourValue.other,\r\n            \"landArea\": sumLanduseArea,\r\n            \"activityArea\": formFourValue.activateArea,\r\n            \"buildArea\": formFourValue.allArea,\r\n            \"far\": parseFloat(valuesFAR),\r\n            \"osr\": parseFloat(valuesOSR),\r\n            \"bdclOS\": formFourValue.bdclos,\r\n            \"waterPass\": waterPass,\r\n            \"highestStorey\": formFourValue.heightFloor,\r\n            \"height\": formFourValue.heightMeter,\r\n            \"writePlace\": stepOne.parameterAt,\r\n            \"chanode\": chanodeForSave,\r\n            //new \r\n            \"contactIdentificationNo\": stepOne.parameterIDCard,\r\n            \"contactHouseNo\": stepOne.parameterHouseNo,\r\n            \"contactMoo\": stepOne.parameterMoo,\r\n            \"contactSoi\": stepOne.parameterSoi,\r\n            \"contactRoad\": stepOne.parameterRoad,\r\n            \"contactProvinceID\": stepOne.province,\r\n            \"contactDistrictID\": stepOne.district,\r\n            \"contactSubDistrictID\": stepOne.subDistrict,\r\n            \"contactZipCode\": stepOne.parameterZipCode,\r\n            \"numberBuilding\": formFourValue.bldg,\r\n            \"subZone\": stepThree.lupSubZone,\r\n            \"pmr1SubDistrictID\": subDistrictId,\r\n            \"pmr1DistrictID\": districtId\r\n        }\r\n\r\n        parameter.forCheck = { ...{}, ...parameter.forSave };\r\n        parameter.forCheck.landUse = stepThree.lupUse;\r\n        parameter.forSave.userid = stepOne.userid\r\n\r\n        // console.log('parameter',parameter)\r\n        this.setState({ pmr1id: status === 'Edit'? stepOne.REQNO:pmr1code})\r\n        return parameter\r\n    }\r\n\r\n    convertTypeNameToString = (stepOne) => {\r\n        let nameTypeSelected = []\r\n\r\n        //แก้ส่งค่า Checkbox มาแบบแยกตัวแปล\r\n        for (let index = 1; index < 10; index++) {\r\n            if (stepOne[`nameType${index}`]) {\r\n                nameTypeSelected.push(index)\r\n            }\r\n        }\r\n\r\n        return nameTypeSelected.join(\"|\")\r\n    }\r\n\r\n    handleFieldAllAreaChange = (type, evt) => {\r\n\r\n        const { sumLanduseArea } = this.state\r\n        const { stepThree } = this.props.submitPmrRdc\r\n        const { activateArea, allArea } = this.props.stepFour;\r\n\r\n        if (type) {\r\n            if (type === \"activateArea\") { //พื้นที่ประกอบการเปลี่ยน OSR เปลี่ยนอันเดียว\r\n                const activateAreaValue = evt;\r\n                const osr = this.calOsr(allArea, sumLanduseArea, activateAreaValue)\r\n                this.setState({\r\n                    valuesOSR: osr\r\n                })\r\n            } else { // พื้นที่อาคารรวมเปลี่ยน OSR,FAR,waterPass เปลี่ยน\r\n                const allAreaValue = evt;\r\n                const far = this.calFar(allAreaValue, sumLanduseArea)\r\n                const osr = this.calOsr(allAreaValue, sumLanduseArea, activateArea)\r\n                const waterPassCal = this.calWaterPass(stepThree.lupOsr, allAreaValue)\r\n\r\n                this.setState({\r\n                    valuesFAR: parseFloat(far),\r\n                    valuesOSR: osr,\r\n                    waterPass: waterPassCal\r\n                })\r\n            }\r\n        }\r\n    }\r\n\r\n    generateReport = async (base64Map=null) => {\r\n        try {\r\n            if (this.pmrSaveSuccessID) {\r\n                fetchGet_(`${process.env.REACT_APP_PMR_GET_PDF_PMR1}?pmr1id=${this.pmrSaveSuccessID}`).then(function (response) {\r\n                    return response.json()\r\n                }).then(function (result) {\r\n                                    ExportSubmitPMR(result, base64Map);\r\n                    return result;                \r\n                })\r\n            }\r\n        }\r\n        catch (err) {\r\n            this.props.hideLoading();\r\n            alert('เกิดข้อผิดพลาด')\r\n        }\r\n    }\r\n\r\n    toDataURL = url => fetch(url)\r\n    .then(response => response.blob())\r\n    .then(blob => new Promise((resolve, reject) => {\r\n        const reader = new FileReader()\r\n        reader.onloadend = () => resolve(reader.result)\r\n        reader.onerror = reject\r\n        reader.readAsDataURL(blob)\r\n    }))\r\n\r\n    exportPDF = () => {\r\n        const { mapAction, showLoading } = this.props;\r\n        const { pmr1id } = this.state\r\n        showLoading()\r\n        mapAction.bindMapCommand(MapFunctions.PrintMapPMR1, { pmr1id: pmr1id,  callback: this.handleCallbackPrintMap })\r\n    }\r\n\r\n    handleCallbackPrintMap = (url) => {\r\n        if(url){//export ได้\r\n            this.toDataURL(url)\r\n                .then(async mapPNGBase64 => {\r\n                this.generateReport(mapPNGBase64).then(result=>{\r\n                    this.props.hideLoading();\r\n                })\r\n\r\n            })\r\n        }\r\n        else{//export map ไม่ได้\r\n            this.generateReport().then(result=>{\r\n                this.props.hideLoading();\r\n            })\r\n            this.props.hideLoading()\r\n        }\r\n        \r\n    }\r\n    onClickBackPanel = () => {\r\n        const {onClickBack} = this.props\r\n\r\n        if (onClickBack) {\r\n            onClickBack()\r\n        }\r\n    }\r\n\r\n    handleSubmitValidate = () =>{\r\n        // const { handleSubmit,_values } = this.props;\r\n\r\n        // validateFormFour(_values,this.props)\r\n        // handleSubmit(this.handleClickSaveForm)()\r\n        // this.setState({isSubmitError:true})\r\n\r\n        const {  submitPmrRdc ,mapAction} = this.props;\r\n        mapAction.bindMapCommand(MapFunctions.checkPermissionPointOnMap, {\r\n            geometry: submitPmrRdc.geometry,\r\n            callback: this.callBackCheckPermissionPointOnMap\r\n        })\r\n    }\r\n\r\n    callBackCheckPermissionPointOnMap = (isOnDistrict) =>{\r\n        const { handleSubmit,_values, showAlert } = this.props;\r\n      \r\n        if(isOnDistrict){\r\n            validateFormFour(_values,this.props)\r\n            handleSubmit(this.handleClickSaveForm)()\r\n            this.setState({isSubmitError:true})\r\n        }else{\r\n            showAlert({ altMsg: ALERT_MESSAGE.POPUP.POINT_OUT_OF_PERMISSION})\r\n        }\r\n        \r\n    }\r\n\r\n    render() {\r\n        const {\r\n            // handleSubmit,\r\n            submitPmrRdc,\r\n            isShowLoading,\r\n            change\r\n        } = this.props;\r\n\r\n        const { \r\n            landuseData, \r\n            otherStatus, \r\n            sumLanduseArea, \r\n            waterPass, \r\n            valuesFAR, \r\n            valuesOSR, \r\n            isSaveSucess ,\r\n            isSubmitError\r\n        } = this.state;\r\n\r\n        change(\"sumLanduseArea\",Number(sumLanduseArea).toLocaleString())\r\n        change(\"waterPass\",(waterPass) ? waterPass : 0)\r\n\r\n        return (\r\n            <Fragment>\r\n                <FormFourView\r\n                    landuseData={landuseData}\r\n                    otherStatus={otherStatus}\r\n                    isSaveSucess={isSaveSucess}\r\n\r\n                    valuesFAR={parseFloat(valuesFAR)}\r\n                    valuesOSR={parseFloat(valuesOSR)}\r\n                    farStandard={submitPmrRdc.stepThree.lupFar}\r\n                    osrStandard={submitPmrRdc.stepThree.lupOsr}\r\n\r\n                    // handleSubmit={handleSubmit}\r\n                    // onClickSaveForm={this.handleClickSaveForm}\r\n                    onClickSaveForm={this.handleSubmitValidate}\r\n                    exportPDF={this.exportPDF}\r\n                    onChangeLanduseRadio={this.handleChangeLanduseRadio}\r\n                    onFieldAllAreaChange={this.handleFieldAllAreaChange}\r\n                    onClickPrevStep={this.handleClickPrevStep}\r\n                    onClickBack={this.onClickBackPanel}\r\n                    isSubmitError={isSubmitError}\r\n                />\r\n                <AlertMessageSuper {...this.props} />\r\n                <Loading isShowLoading={isShowLoading} />\r\n            </Fragment>\r\n        )\r\n    }\r\n}\r\n\r\nconst validateFormFour = (values, props) => {\r\n    const errors = {};\r\n    const { authenRdc, submitPmrRdc } = props;\r\n    let errorSubmitMessageRequire = null\r\n    let errorSubmitMessageWrongFormat = null\r\n\r\n    const isOfficer = checkPermission(authenRdc.profile.functions[authenRdc.system], CONFIG_MENU.FCN14.ID);\r\n\r\n    let sumLandUseAreaForValidate = 0;\r\n\r\n    submitPmrRdc.stepTwo.chanode.forEach(itm => {\r\n        return sumLandUseAreaForValidate += (parseInt(itm.userai) * 1600) + (parseInt(itm.usengan) * 400) + (parseFloat(itm.usewa) * 4)\r\n    })\r\n\r\n    if (!values.landuseRadio) {\r\n        errors.landuseRadio = RESOURCEWORDS.ERROR_TEXT.NO_EMPTY;\r\n        errorSubmitMessageRequire = SUBMIT_ERROR_MEASSAGE.MSG_01;\r\n    }\r\n    \r\n    if(authenRdc && isOfficer) {\r\n        if(!values.activateArea) {\r\n            errors.activateArea = RESOURCEWORDS.ERROR_TEXT.NO_EMPTY;\r\n            errorSubmitMessageRequire = SUBMIT_ERROR_MEASSAGE.MSG_01;\r\n        } else {\r\n            if(Number(values.activateArea) > sumLandUseAreaForValidate) {\r\n                errors.activateArea = `ขนาดต้องไม่เกินพื้นที่ดิน`\r\n                errorSubmitMessageWrongFormat = SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n            }\r\n        }\r\n    \r\n        if(!values.allArea) {\r\n            errors.allArea = RESOURCEWORDS.ERROR_TEXT.NO_EMPTY;\r\n            errorSubmitMessageRequire = SUBMIT_ERROR_MEASSAGE.MSG_01;\r\n        }\r\n    } else {\r\n        if(values.activateArea) {\r\n            if(Number(values.activateArea) > sumLandUseAreaForValidate) {\r\n                errors.activateArea = `ขนาดต้องไม่เกินพื้นที่ดิน`\r\n                errorSubmitMessageWrongFormat = SUBMIT_ERROR_MEASSAGE.MSG_02;\r\n            }\r\n        }\r\n    }\r\n\r\n    if(errorSubmitMessageRequire){\r\n        errors.errorForm = errorSubmitMessageRequire\r\n    }else{\r\n        errors.errorForm = errorSubmitMessageWrongFormat\r\n    }\r\n    \r\n    return errors;\r\n}\r\n\r\nconst selector = formValueSelector('FormFour')\r\nconst reduxFormParameter = {\r\n    form: \"FormFour\",\r\n    validate: validateFormFour\r\n};\r\n\r\nconst mapStateToProps = state => ({\r\n    submitPmrRdc: state.submitPmr,\r\n    authenRdc: state.authen,\r\n    stepFour: {\r\n        activateArea: selector(state, \"activateArea\"), //พื้นที่ประกอบการ\r\n        allArea: selector(state, \"allArea\"), //พื้นที่อาคารรวม\r\n        heightFloor: selector(state, \"heightFloor\"),\r\n        heightMeter: selector(state, \"heightMeter\"),\r\n        landuseRadio: selector(state, \"landuseRadio\"),\r\n        other: selector(state, \"other\"),\r\n    },\r\n    initialValues: state.submitPmr.stepFour,\r\n    _values: getFormValues('FormFour')(state),\r\n    dirty: isDirty('FormFour')(state)\r\n})\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    submitPmrAction: bindActionCreators(SubmitPmrAction, dispatch),\r\n    mapAction: bindActionCreators(MapAction, dispatch)\r\n});\r\n\r\nconst FormFourLoadding = WithLoading(FormFour)\r\nconst enhance = compose(\r\n    connect(\r\n        mapStateToProps,\r\n        mapDispatchToProps\r\n    ),\r\n    WithPanelContentReducer,\r\n    reduxForm(reduxFormParameter)\r\n);\r\n\r\n\r\nexport default WithAlertMessage(enhance(FormFourLoadding))","import React, { Component } from 'react'\r\n\r\n//import component\r\nimport FormSubmitPmrView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/PMR1/SubmitPmr/FormSubmitPmrView';\r\nimport FormOne from './FormStep/FormOne'\r\nimport FormTwo from './FormStep/FormTwo';\r\nimport FormThree from './FormStep/FormThree';\r\nimport FormFour from './FormStep/FormFour'\r\n\r\nexport default class FormSubmitPmr extends Component {\r\n    constructor() {\r\n        super();\r\n        this.state = {\r\n            formStep: 1\r\n        }\r\n        this.refFuncAddForm = null;\r\n    }\r\n\r\n    handleChangeStep = (step) => {\r\n        this.setState({\r\n            formStep: step\r\n        })\r\n    }\r\n\r\n    handleClickAddStepTwo = () => {\r\n        if (this.refFuncAddForm) {\r\n            this.refFuncAddForm()\r\n        }\r\n    }\r\n\r\n    handleRefAddForm = node => {\r\n        this.refFuncAddForm = node;\r\n    }\r\n\r\n    renderFormStep = () => {\r\n        const { formStep } = this.state;\r\n        const { onClickBack, subDistrict, district, onCallbackLocation } = this.props;\r\n        switch (formStep) {\r\n            case 1:\r\n                return <FormOne onChangeStep={this.handleChangeStep} onClickBack={onClickBack} />\r\n            case 2:\r\n                return <FormTwo onChangeStep={this.handleChangeStep} refFuncAddForm={this.handleRefAddForm} onClickBack={onClickBack} />\r\n            case 3:\r\n                return <FormThree onChangeStep={this.handleChangeStep} onCallbackLocation={onCallbackLocation} onClickBack={onClickBack} />\r\n            case 4:\r\n                return <FormFour onChangeStep={this.handleChangeStep} subDistrictId={subDistrict} districtId={district} onClickBack={onClickBack} />\r\n            default:\r\n                break;\r\n        }\r\n    }\r\n\r\n    render() {\r\n        const { formStep } = this.state;\r\n        const { isActiveDraw, isActiveEdit, onDrawGraphic, onEditGraphic } = this.props;\r\n\r\n        return (\r\n            <FormSubmitPmrView\r\n                formStep={formStep}\r\n                onDrawGraphic={onDrawGraphic}\r\n                onEditGraphic={onEditGraphic}\r\n                isActiveDraw={isActiveDraw}\r\n                isActiveEdit={isActiveEdit}\r\n                onClickAddStepTwo={this.handleClickAddStepTwo}\r\n            >\r\n                {this.renderFormStep()}\r\n            </FormSubmitPmrView>\r\n        )\r\n    }\r\n}\r\n","import React, { Component, Fragment } from 'react'\r\nimport { connect } from 'react-redux';\r\nimport { bindActionCreators } from 'redux'\r\nimport { compose } from 'recompose'\r\nimport withWidth from '@material-ui/core/withWidth';\r\n\r\n//import component\r\nimport SubmitPmrView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/PMR1/SubmitPmr/SubmitPmrView';\r\nimport MenuSubmitPmrView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/PMR1/SubmitPmr/MenuSubmitPmrView';\r\nimport FormSubmitPmr from './FormSubmitPmr';\r\nimport WithAlertMessage from '../../../../../../../HOC/WithAlertMessage'\r\nimport AlertMessageSuper from '../../../../../../../Controls/Containers/AlertMessageSuper';\r\n\r\n//import constants\r\nimport { MODE_SET_POSITION, ALERT_MESSAGE, ACTIVE_FUNCTION } from '../../../../../../../Constants/Constants';\r\n\r\n//import action\r\nimport * as PanelContentAction from '../../../../../../../Actions/Web/Panel/PanelContentAction';\r\nimport * as MapAction from '../../../../../../../Actions/Web/Maps/MapAction';\r\nimport * as MapFunctions from '../../../../../../../Map/MapFunctions';\r\nimport * as MenuAction from '../../../../../../../Actions/Web/MenuAction';\r\nimport * as SubmitPmrAction from '../../../../../../../Actions/Web/Panel/SubmitPmrAction';\r\n\r\nclass SubmitPmr extends Component {\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.callbackLocationStep3Fn = null;\r\n\t\tthis.state = {\r\n\t\t\tlistMode: [],\r\n\t\t\tisOpenForm: false,\r\n\t\t\tsubDistrictID: null,\r\n\t\t\tdistrictID: null,\r\n\t\t\tisBKK: false,\r\n\t\t\tisActiveDraw: false,\r\n\t\t\tisActiveEdit: false,\r\n\t\t\tgraphic: null\r\n\t\t}\r\n\t}\r\n\r\n\tcomponentDidMount() {\r\n\t\tconst listMode = Object.keys(MODE_SET_POSITION).map(key => {\r\n\t\t\treturn {\r\n\t\t\t\tid: MODE_SET_POSITION[key].id,\r\n\t\t\t\tname: MODE_SET_POSITION[key].name,\r\n\t\t\t\tisActive: false\r\n\t\t\t}\r\n\t\t})\r\n\t\tthis.setState({\r\n\t\t\tlistMode: listMode\r\n\t\t})\r\n\t}\r\n\r\n\tcomponentDidUpdate = async (prevProps, prevState) => {\r\n\t\tconst { menuRdc, menuAction } = this.props;\r\n\t\tconst { listMode, isOpenForm } = this.state;\r\n\r\n\t\tif(!isOpenForm) {\r\n\t\t\tif(prevProps.menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM && menuRdc.ActiveFunction === null) {\r\n\t\t\t\tconst newList = await listMode.map(item => {\r\n\t\t\t\t\titem.isActive = false\r\n\r\n\t\t\t\t\treturn item\r\n\t\t\t\t})\r\n\t\t\t\tawait this.setState({ listMode: newList})\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif(!prevState.isOpenForm && isOpenForm){\r\n\t\t\t\tmenuAction.activeFunction(null)\r\n\t\t\t}\r\n\t\t\t// menuAction.activeFunction(null)\r\n\t\t}\r\n\t}\r\n\r\n\tmanageModeDisplay = (id) => {\r\n\t\tconst { listMode } = this.state;\r\n\r\n\t\tconst tmpListMode = listMode.map((itm, ind) => {\r\n\t\t\tif (itm.id === id) {\r\n\t\t\t\treturn { ...itm, isActive: !itm.isActive }\r\n\t\t\t} else {\r\n\t\t\t\treturn { ...itm, isActive: false }\r\n\t\t\t}\r\n\t\t})\r\n\r\n\t\tthis.setState({\r\n\t\t\tlistMode: tmpListMode\r\n\t\t})\r\n\t}\r\n\r\n\thandleMenuItemClick = (itm) => async (evt) => {\r\n\t\tconst { mapAction, menuAction } = this.props;\r\n\t\tthis.manageModeDisplay(itm.id);\r\n\t\tif(itm && itm.id) {\r\n\t\t\tawait menuAction.activeFunction(ACTIVE_FUNCTION.ADD_GP_FORM)\r\n\t\t}\r\n\r\n\t\tswitch (itm.id) {\r\n\t\t\tcase MODE_SET_POSITION.clickMap.id:\r\n\t\t\t\tawait this.manageClickMap(!itm.isActive)\r\n\t\t\t\tbreak;\r\n\t\t\tcase MODE_SET_POSITION.currentLocation.id:\r\n\t\t\t\tawait this.manageCurrentLocation();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tawait mapAction.bindMapCommand(MapFunctions.clearDrawPointSubmitPmr)\r\n\t\t\t\tawait mapAction.bindClearMapCommand();\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tmanageCurrentLocation = async () => {\r\n\t\tconst { mapAction } = this.props;\r\n\t\t\r\n\t\tawait mapAction.bindMapCommand(MapFunctions.clearDrawPointSubmitPmr)\r\n\t\tmapAction.bindMapCommand(MapFunctions.currentLocationSubmitPmr, {\r\n\t\t\tcallback: this.callBackDrawGraphic\r\n\t\t})\r\n\r\n\t}\r\n\r\n\tmanageClickMap = async (isActive) => {\r\n\t\tconst { mapAction } = this.props;\r\n\r\n\t\tif (isActive) {\r\n\t\t\tsetTimeout(async () => {\r\n\t\t\t\tawait mapAction.bindMapCommand(MapFunctions.drawPointSubmitPmr, {\r\n\t\t\t\t\tcallback: this.callBackDrawGraphic\r\n\t\t\t\t})\r\n\t\t\t\tawait this.managePanelForMobile(true, \"ClickMap\")\r\n\t\t\t}, (50));\r\n\t\t} else {\r\n\t\t\tawait mapAction.bindMapCommand(MapFunctions.clearDrawPointSubmitPmr)\r\n\t\t\tawait mapAction.bindClearMapCommand()\r\n\t\t}\r\n\t}\r\n\r\n\tmanagePanelForMobile = async (isDraw, func) => {\r\n\t\tconst { menuAction, width } = this.props;\r\n\r\n\t\tif (width === 'sm' || width === 'xs') {\r\n\t\t\tswitch (func) {\r\n\t\t\t\tcase \"ClickMap\":\r\n\t\t\t\t\tif (isDraw) {\r\n\t\t\t\t\t\tawait menuAction.closeMenuPanel();\r\n\t\t\t\t\t\tawait menuAction.openMenuMap();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tawait menuAction.openMenuPanel();\r\n\t\t\t\t\t\tawait menuAction.closeMenuMap();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tcallBackDrawGraphic = async (evt, graphic) => {\r\n\t\tif (evt) {\r\n\t\t\tconst { mapAction, menuAction } = this.props;\r\n\t\t\tawait this.managePanelForMobile(false, \"ClickMap\")\r\n\t\t\tawait mapAction.bindClearMapCommand()\r\n\t\t\tawait mapAction.bindMapCommand(MapFunctions.IdentifyComprehensivePlan, {\r\n\t\t\t\tgeometry: evt.geometry,\r\n\t\t\t\tcallbackFn: this.callbackIdentifyResult\r\n\t\t\t})\r\n\t\t\t// await mapAction.bindMapCommand(MapFunctions.editGraphicSubmitPmr, { //edit\r\n\t\t\t// \tgraphic: graphic,\r\n\t\t\t// \tcallback: this.callbackEdit\r\n\t\t\t// })\r\n\t\t\tthis.setState({ graphic: graphic, isActiveDraw: false })\r\n\t\t\tawait mapAction.bindMapCommand(MapFunctions.getDistrictAndSubDistrictFormPoint, { // save sub-district code\r\n\t\t\t\tgeometry: evt.geometry,\r\n\t\t\t\tcallbackFn: this.callbackGetDistrictAndSubDistrict\r\n\t\t\t})\r\n\t\t\tawait menuAction.activeFunction(null)\t\t\t\r\n\t\t}\r\n\t}\r\n\r\n\tcallbackEdit = async (geometry, graphic) => {\r\n\t\tconst { mapAction } = this.props;\r\n\t\tif (geometry) {\r\n\t\t\tawait mapAction.bindMapCommand(MapFunctions.IdentifyComprehensivePlan, {\r\n\t\t\t\tgeometry: geometry,\r\n\t\t\t\tcallbackFn: this.callbackIdentifyResult\r\n\t\t\t})\r\n\t\t\tawait mapAction.bindMapCommand(MapFunctions.getDistrictAndSubDistrictFormPoint, {\r\n\t\t\t\tgeometry: geometry,\r\n\t\t\t\tcallbackFn: this.callbackGetDistrictAndSubDistrict\r\n\t\t\t})\r\n\t\t}\r\n\t\tthis.setState({graphic: graphic})\r\n\t}\r\n\r\n\tcallbackIdentifyResult = (result, geometry, districtPMR1ID) => {\r\n\t\tconst { submitPmrAction, authen } = this.props;\r\n\t\tconst { isOpenForm } = this.state;\r\n\t\tconst landDetail = this.makeDataResult(result, districtPMR1ID);\r\n\t\tsubmitPmrAction.saveLandDetail(landDetail, geometry);\r\n\t\tif (!isOpenForm) { //กรณีที่แก้ไขจะไม่เข้า if นี้\r\n\t\t\tsubmitPmrAction.saveFormStepOne({\r\n\t\t\t\t'parameterName': `${authen.profile.firstName} ${authen.profile.lastName}`,\r\n\t\t\t\t'userid': authen.profile.userID\r\n\t\t\t})\r\n\r\n\t\t\tthis.setState({\r\n\t\t\t\tisOpenForm: true\r\n\t\t\t})\r\n\t\t}\r\n\t}\r\n\r\n\tcallbackGetDistrictAndSubDistrict = async (values) => {\r\n\t\tconst SUBDISTRICT_ID = values && values.SUBDISTRICT_ID && values.SUBDISTRICT_ID\r\n\t\tconst DISTRICT_ID = values && values.DISTRICT_ID && values.DISTRICT_ID\r\n\t\tconst PROVINCE_ID = values && values.PROVINCE_ID && values.PROVINCE_ID\r\n\t\t// let valDistrict, valSubDistrict = null;\r\n\t\tif (!values || (!SUBDISTRICT_ID && !DISTRICT_ID)) {\r\n\t\t\tthis.setState({ isBKK: false, })\r\n\t\t} else {\r\n\t\t\tthis.setState({\r\n\t\t\t\tsubDistrictID: SUBDISTRICT_ID,\r\n\t\t\t\tdistrictID: DISTRICT_ID,\r\n\t\t\t\tisBKK: true\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\tif (this.callbackLocationStep3Fn) { // กรณีเปิด step 3 อยู่\r\n\t\t\tawait this.callbackLocationStep3Fn({\r\n\t\t\t\tsubDistrictID: SUBDISTRICT_ID,\r\n\t\t\t\tdistrictID: DISTRICT_ID,\r\n\t\t\t\tisBKK: (DISTRICT_ID)\r\n\t\t\t})\r\n\t\t} else { // กรณีไม่ได้อยู่ใน step 3 จะยิงไปเก็บใน reducer\r\n\t\t\tif (PROVINCE_ID) {\r\n\t\t\t\tthis.props.submitPmrAction.saveAdminpolyStepThree({\r\n\t\t\t\t\tdistrict: DISTRICT_ID,\r\n\t\t\t\t\tsubDistrict: SUBDISTRICT_ID,\r\n\t\t\t\t\tprovince: PROVINCE_ID\r\n\t\t\t\t})\r\n\t\t\t} else {\r\n\t\t\t\tthis.props.showAlert({ altMsg: ALERT_MESSAGE.POPUP.OUT_OF_BKK })\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\thandleCallbackLocation = (fn) => {\r\n\t\tthis.callbackLocationStep3Fn = fn;\r\n\t}\r\n\r\n\tgetAdminPoly = (districtPMR1ID) => {\r\n\t\tconst province = districtPMR1ID ? districtPMR1ID.substring(0, 2) : null;\r\n\t\tconst district = districtPMR1ID ? districtPMR1ID.substring(2, 4) : null;\r\n\t\tconst subDistrict = districtPMR1ID ? districtPMR1ID.substring(4, 6) : null;\r\n\r\n\t\treturn { province, district, subDistrict }\r\n\t}\r\n\r\n\tmakeDataResult = (result, districtPMR1ID) => {\r\n\t\tconst adminpolyCode = this.getAdminPoly(districtPMR1ID)\r\n\r\n\t\tconst landUse = []\r\n\t\tconst landDetail = {\r\n\t\t\tlupZone: \"\",\r\n\t\t\tlupColor: \"\",\r\n\t\t\tlupUse: \"\",\r\n\t\t\tlupSubZone: \"\",\r\n\t\t\tlupFar: \"\",\r\n\t\t\tlupOsr: \"\",\r\n\t\t\tprovince: adminpolyCode.province ? adminpolyCode.province : \"\",\r\n\t\t}\r\n\r\n\t\tresult.forEach(itm => {\r\n\t\t\tif (itm.layerId === 11) { //รอเอาใส่ config\r\n\t\t\t\tlandUse.push(itm)\r\n\t\t\t}\r\n\t\t})\r\n\r\n\t\tif (landUse.length > 0) {\r\n\t\t\tconst { LUP_ZONE, LUP_COLOR, LUP_USE, LUP_SUBZONE, LUP_FAR, LUP_OSR } = landUse[0].feature.attributes\r\n\t\t\tlandDetail.lupZone = LUP_ZONE;\r\n\t\t\tlandDetail.lupColor = LUP_COLOR;\r\n\t\t\tlandDetail.lupUse = LUP_USE;\r\n\t\t\tlandDetail.lupSubZone = LUP_SUBZONE;\r\n\t\t\tlandDetail.lupFar = LUP_FAR;\r\n\t\t\tlandDetail.lupOsr = LUP_OSR;\r\n\t\t\tlandDetail.lupUserNo = this.makeCodeValue(LUP_USE);\r\n\t\t}\r\n\t\treturn landDetail\r\n\t}\r\n\r\n\tmakeCodeValue = (LUP_USE) => {\r\n\t\tlet lupUserNo = \"\"\r\n\t\tconst landUseValue = window.LANDUSE_VALUES;\r\n\r\n\t\tlandUseValue.forEach(itm => {\r\n\t\t\tif (itm.name === LUP_USE) {\r\n\t\t\t\tlupUserNo = itm.code\r\n\t\t\t}\r\n\t\t})\r\n\r\n\t\treturn lupUserNo\r\n\t}\r\n\r\n\thandleClickBack = () => {\r\n\t\tconst { panelContentAction, mapAction, showAlert, onBackClick } = this.props;\r\n\t\tconst { isOpenForm } = this.state;\r\n\r\n\t\tif (isOpenForm) {\r\n\t\t\tshowAlert({\r\n\t\t\t\taltMsg: `${ALERT_MESSAGE.QUESTION.CANCEL_FORM}`,\r\n\t\t\t\taltType: 2,\r\n\t\t\t\tcallbackConfirm: this.handleCloseForm,\r\n\t\t\t\tcallbackCancel: this.handleCloseConfirm\r\n\t\t\t})\r\n\t\t} else {\r\n\t\t\tpanelContentAction.setCurrentPage();\r\n\t\t\tmapAction.bindClearMapCommand();\r\n\t\t\tonBackClick();\r\n\t\t}\r\n\t}\r\n\r\n\thandleCloseConfirm = () => {\r\n\t\tconst { hideAlert } = this.props;\r\n\r\n\t\thideAlert();\r\n\t}\r\n\r\n\thandleCloseForm = () => {\r\n\t\tconst { submitPmrAction, mapAction, hideAlert, onBackClick, menuAction } = this.props;\r\n\t\tmenuAction.activeFunction(null)\r\n\t\tconst listMode = this.state.listMode.map(itm => ({\r\n\t\t\t...itm,\r\n\t\t\tisActive: false\r\n\t\t}))\r\n\r\n\t\tthis.setState({\r\n\t\t\tisOpenForm: false,\r\n\t\t\tlistMode: listMode\r\n\t\t})\r\n\t\tsubmitPmrAction.clearFormStep();\r\n\t\tmapAction.bindMapCommand(MapFunctions.clearDrawPointSubmitPmr);\r\n\t\tonBackClick();\r\n\t\thideAlert();\r\n\t}\r\n\r\n\tcallAlertFn = (message, type) => {\r\n\t\tconst { showAlert } = this.props;\r\n\t\tswitch (type) {\r\n\t\t\tcase 1:\r\n\t\t\t\treturn (\r\n\t\t\t\t\tshowAlert({\r\n\t\t\t\t\t\taltMsg: message,\r\n\t\t\t\t\t})\r\n\t\t\t\t)\r\n\t\t\tcase 2:\r\n\t\t\t\treturn (\r\n\t\t\t\t\tshowAlert({\r\n\t\t\t\t\t\taltMsg: `${ALERT_MESSAGE.QUESTION.CANCEL_FORM}`,\r\n\t\t\t\t\t\taltType: 2,\r\n\t\t\t\t\t\tcallbackConfirm: this.handleCloseForm,\r\n\t\t\t\t\t\tcallbackCancel: this.handleCloseConfirm\r\n\t\t\t\t\t})\r\n\t\t\t\t)\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\thandleDrawGraphic = async () => {\r\n\t\t// const { isActiveDraw, isActiveEdit } = this.state;\r\n\t\tconst { mapAction, menuRdc, menuAction } = this.props;\r\n\r\n\t\t// if (isActiveDraw) { // ยกเลิกการวาด\r\n\t\t// \tawait mapAction.bindMapCommand(MapFunctions.clearEvtDrawPmr)\r\n\t\t// \tawait mapAction.bindClearMapCommand()\r\n\t\t// \tthis.setState({ isActiveDraw: false })\r\n\r\n\t\t// } else { // เปิดการวาด\r\n\t\t// \tisActiveEdit && await mapAction.bindMapCommand(MapFunctions.clearEditPmr)\r\n\t\t// \tmapAction.bindMapCommand(MapFunctions.drawPointSubmitPmr, {\r\n\t\t// \t\tcallback: this.callBackDrawGraphic\r\n\t\t// \t})\r\n\t\t// \tthis.managePanelForMobile(true, \"ClickMap\")\r\n\t\t// \tthis.setState({\r\n\t\t// \t\tisActiveDraw: true,\r\n\t\t// \t\tisActiveEdit: false\r\n\t\t// \t})\r\n\t\t// }\r\n\r\n\t\tif(menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM){\r\n            menuAction.activeFunction(null)\r\n\t\t\tmapAction.bindMapCommand(MapFunctions.clearEvtDrawPmr)\r\n        }else{\r\n\t\t\tmenuAction.activeFunction(ACTIVE_FUNCTION.ADD_GP_FORM)\r\n\t\t\tawait this.managePanelForMobile(true)\r\n\t\t\tsetTimeout(async () => {\r\n\t\t\t\tawait mapAction.bindMapCommand(MapFunctions.clearEditPmr)\r\n\t\t\t\tawait mapAction.bindMapCommand(MapFunctions.drawPointSubmitPmr, { callback: this.callBackDrawGraphic })\r\n\t\t\t}, (50))\r\n        }\r\n\t}\r\n\r\n\thandleEditGraphic = async () => {\r\n\t\tconst { graphic } = this.state;\r\n\t\tconst { mapAction, menuAction, menuRdc } = this.props;\r\n\r\n\t\t// if (isActiveEdit) { // ยกเลิกการแก้ไข\r\n\t\t// \tawait mapAction.bindMapCommand(MapFunctions.clearEditPmr)\r\n\t\t// \tawait mapAction.bindClearMapCommand();\r\n\t\t// \tthis.setState({ isActiveEdit: false })\r\n\t\t// } else { // เปิดการแก้ไข\r\n\t\t// \tisActiveDraw && await mapAction.bindMapCommand(MapFunctions.clearEvtDrawPmr)\r\n\t\t// \tmapAction.bindMapCommand(MapFunctions.editGraphicSubmitPmr, { //edit\r\n\t\t// \t\tgraphic: graphic,\r\n\t\t// \t\tcallback: this.callbackEdit\r\n\t\t// \t})\r\n\t\t// \tthis.setState({\r\n\t\t// \t\tisActiveDraw: false,\r\n\t\t// \t\tisActiveEdit: true\r\n\t\t// \t})\r\n\t\t// }\r\n\r\n\t\tif(menuRdc.ActiveFunction === ACTIVE_FUNCTION.EDIT_GP_FORM){\r\n\t\t\tmenuAction.activeFunction(null)\r\n\t\t\tawait mapAction.bindMapCommand(MapFunctions.clearEditPmr)\r\n\t\t\tmapAction.bindClearMapCommand();\r\n\t\t}else{\r\n\t\t\tthis.managePanelForMobile(true)\r\n\t\t\tmenuAction.activeFunction(ACTIVE_FUNCTION.EDIT_GP_FORM)\r\n\t\t\tawait mapAction.bindMapCommand(MapFunctions.clearEvtDrawPmr)\r\n\t\t\tawait mapAction.bindMapCommand(MapFunctions.editGraphicSubmitPmr, { graphic, callback: this.callbackEdit })\r\n\t\t}\r\n        \r\n\t}\r\n\r\n\trender() {\r\n\t\tconst { listMode, isOpenForm, subDistrictID, districtID, isBKK} = this.state;\r\n\t\tconst { title, menuRdc } = this.props;\r\n\t\treturn (\r\n\t\t\t<Fragment>\r\n\t\t\t\t<SubmitPmrView\r\n\t\t\t\t\ttitle={title}\r\n\t\t\t\t\tonClickBack={this.handleClickBack}\r\n\t\t\t\t>\r\n\t\t\t\t\t{isOpenForm ? (\r\n\t\t\t\t\t\t<FormSubmitPmr\r\n\t\t\t\t\t\t\tonClickBack={this.handleClickBack}\r\n\t\t\t\t\t\t\tsubDistrict={subDistrictID}\r\n\t\t\t\t\t\t\tdistrict={districtID}\r\n\t\t\t\t\t\t\tisNotBKK={!isBKK}\r\n\t\t\t\t\t\t\tcallAlertFn={this.callAlertFn}\r\n\r\n\t\t\t\t\t\t\tonDrawGraphic={this.handleDrawGraphic}\r\n\t\t\t\t\t\t\tonEditGraphic={this.handleEditGraphic}\r\n\t\t\t\t\t\t\tisActiveDraw={menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM}\r\n\t\t\t\t\t\t\tisActiveEdit={menuRdc.ActiveFunction === ACTIVE_FUNCTION.EDIT_GP_FORM}\r\n\r\n\t\t\t\t\t\t\tonCallbackLocation={this.handleCallbackLocation}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t) : (\r\n\t\t\t\t\t\t\t<MenuSubmitPmrView\r\n\t\t\t\t\t\t\t\tlistMode={listMode}\r\n\t\t\t\t\t\t\t\tcallBackDrawGraphic={this.callBackDrawGraphic}\r\n\t\t\t\t\t\t\t\tonMenuItemClick={this.handleMenuItemClick}\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t)}\r\n\t\t\t\t</SubmitPmrView>\r\n\t\t\t\t<AlertMessageSuper {...this.props} />\r\n\t\t\t</Fragment>\r\n\t\t)\r\n\t}\r\n}\r\n\r\nconst mapStateToProps = state => ({\r\n\tsubmitPmr: state.submitPmr,\r\n\tauthen: state.authen,\r\n\tmenuRdc: state.menu\r\n});\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n\tpanelContentAction: bindActionCreators(PanelContentAction, dispatch),\r\n\tmapAction: bindActionCreators(MapAction, dispatch),\r\n\tmenuAction: bindActionCreators(MenuAction, dispatch),\r\n\tsubmitPmrAction: bindActionCreators(SubmitPmrAction, dispatch)\r\n});\r\n\r\nconst enhance = compose(\r\n\tconnect(\r\n\t\tmapStateToProps,\r\n\t\tmapDispatchToProps,\r\n\t),\r\n\twithWidth() //จะได้ props width มา\r\n)\r\n\r\nexport default WithAlertMessage(enhance(SubmitPmr))","import React, { useState, useEffect,  useRef } from 'react'\r\nimport PropTypes from 'prop-types'\r\nimport ReactDOM from 'react-dom';\r\nimport { withStyles } from '@material-ui/core/styles'\r\nimport InputLabel from '@material-ui/core/InputLabel'\r\nimport FormHelperText from '@material-ui/core/FormHelperText'\r\nimport FormControl from '@material-ui/core/FormControl'\r\nimport Select from '@material-ui/core/Select'\r\nimport OutlinedInput from '@material-ui/core/OutlinedInput';\r\nimport classnames from 'classnames'\r\nconst styles = theme => ({\r\n    // // formControl: {\r\n    // //     minWidth: '100%',\r\n    // //     padding: 0,\r\n    // //     [`& label`]: {\r\n    // //         top: '-5px'\r\n    // //     },\r\n    // // },\r\n    // label: {\r\n    // },\r\n    // red: {\r\n    //     color: 'red'\r\n    // },\r\n    // // formHelper: {\r\n    // //     marginTop: '-10px',\r\n    // //     paddingLeft: '5px'\r\n    // // },\r\n    // select: {\r\n    //     borderRadius: 0,\r\n    //     [`& fieldset`]: {\r\n    //         borderRadius: 0,\r\n    //         height: '45px',\r\n    //         lineHeight: '45px',\r\n    //         [`& input`]: {\r\n    //             borderRadius: 0\r\n    //         }\r\n    //     },\r\n    // },\r\n    // select_root: {\r\n    //     top: '-5px',\r\n    // },\r\n    // formControl: {\r\n    //     minWidth: \"100%\",\r\n    //     minHeight:\"70px\"\r\n    // },\r\n    // labelStyle: {\r\n    //     marginBottom: '5px',\r\n    //     fontSize:\"16px\"\r\n    // },\r\n    // inputLabel: {\r\n    //     top: '-8px',\r\n    //     backgroundColor:'red'\r\n    // },\r\n    // inputLabelMargin: {\r\n    //     top: '21px'\r\n    // },\r\n    // displayNone: {\r\n    //     display: 'none'\r\n    // },\r\n    // red: {\r\n    //     color: \"red\"\r\n    // },\r\n    // formHelper: {\r\n    //     color:\"red\",\r\n    //     marginTop: \"0px\",\r\n    //     marginLeft: 15,\r\n    //     fontFamily: \"prompt\"\r\n    // },\r\n    // select: {\r\n    //     width: '100%',\r\n    //     height: '40px',\r\n    //     backgroundColor: '#FFFFFF',\r\n    //     fontFamily: \"prompt\"\r\n    // },\r\n    // selectMenu: {\r\n    //     whiteSpace: \"nowrap\"\r\n    // },\r\n    // selectMenuRoot: {\r\n    //     position: \"absolute\"\r\n    // }\r\n\r\n    formControl: {\r\n        minWidth: \"100%\",\r\n        // height:\"70px\"\r\n        minHeight:\"70px\"\r\n        // marginTop: theme.spacing.unit,\r\n        // marginBottom: theme.spacing.unit\r\n    },\r\n    labelStyle: {\r\n        marginBottom: '5px',\r\n        fontSize:\"16px\"\r\n    },\r\n    inputLabel: {\r\n        top: '-8px'\r\n    },\r\n    inputLabelMargin: {\r\n        top: '21px'\r\n    },\r\n    displayNone: {\r\n        display: 'none'\r\n    },\r\n    red: {\r\n        color: \"red\"\r\n    },\r\n    formHelper: {\r\n        color:\"red\",\r\n        marginTop: \"5px\",\r\n        marginLeft: 15,\r\n        fontFamily: \"prompt\"\r\n    },\r\n    select: {\r\n        width: '100%',\r\n        height: '40px',\r\n        backgroundColor: '#FFFFFF',\r\n        fontFamily: \"prompt\"\r\n        // [`& input`]: {\r\n        //     height: '40px',\r\n        //     padding: '0px 15px 0px 15px',\r\n        //     backgroundColor: 'white',\r\n        // }\r\n    },\r\n    selectMenu: {\r\n        // whiteSpace: \"normal\"\r\n        whiteSpace: \"nowrap\"\r\n    },\r\n    selectMenuRoot: {\r\n        position: \"absolute\"\r\n    }\r\n})\r\n\r\nconst SelectCustom = ({\r\n    classes,\r\n    input,\r\n    label,\r\n    meta: { touched, error, invalid },\r\n    required,\r\n    children,\r\n    disabled,\r\n    className,\r\n    // classNameSelectField,\r\n    errorFieldLayer,\r\n    style,\r\n}) => {\r\n    let refInputLabel = useRef(null)\r\n    const [selectCustomData, setSelectCustomData] = useState({\r\n        open: false,\r\n        labelWidth: 0\r\n    });\r\n\r\n    useEffect(()=>{\r\n        setSelectCustomData({\r\n            ...selectCustomData,\r\n            labelWidth: ReactDOM.findDOMNode(refInputLabel.current).offsetWidth\r\n        })\r\n    }, []) \r\n\r\n    const handleOpen = () => {\r\n        setSelectCustomData({\r\n            ...selectCustomData,\r\n            open: true \r\n        })\r\n    }\r\n\r\n    const handleClose = () => {\r\n        setSelectCustomData({\r\n            ...selectCustomData,\r\n            open: false \r\n        })\r\n    }   \r\n        return (\r\n            <FormControl variant=\"outlined\" className={`${classes.formControl} ${className}`} style={{...style}} error={touched && invalid}>\r\n                {/* <InputLabel\r\n                    className={classes.label}\r\n                    ref={refInputLabel}\r\n                    htmlFor=\"outlined-age-simple\" >\r\n                    {label}{required && <label className={classes.red}>*</label>}\r\n                </InputLabel> */}\r\n                {label && <span className={classnames(classes.labelStyle, { [classes.red]: touched && invalid })}>\r\n                    {label}{required && <label className={classes.red}>*</label>}\r\n                </span>}\r\n                <InputLabel\r\n                    htmlFor=\"outlined-age-simple\"\r\n                    shrink={false}\r\n                    ref={refInputLabel}\r\n                    disableAnimation={true}\r\n                    disabled={true}\r\n                    className={classnames(classes.inputLabel, {\r\n                        [classes.displayNone]: input.value !== \"\",\r\n                        [classes.inputLabelMargin]: label\r\n                    })}>\r\n                    กรุณาระบุ\r\n                </InputLabel>\r\n                <Select\r\n                    // classes={{ root: classes.select_root }}\r\n                    // open={selectCustomData.open}\r\n                    // name={input.name}\r\n                    // value={input.value}\r\n                    // onOpen={handleOpen}\r\n                    // onClose={handleClose}\r\n                    // onChange={input.onChange}\r\n                    // children={children}\r\n                    // className={classnames(classes.select, classNameSelectField)}\r\n                    // disabled={disabled}\r\n                    // // input={<OutlinedInput labelWidth={selectCustomData.labelWidth} className={classes.input} id=\"outlined-age-simple\" />}\r\n                    // classes={{\r\n                    //     selectMenu: classes.selectMenu,\r\n                    //     root: classes.selectMenuRoot,\r\n                    // }}\r\n                    // input={\r\n                    //     <OutlinedInput\r\n                    //         name=\"outlined\"\r\n                    //         id=\"outlined-age-simple\"\r\n                    //         labelWidth={selectCustomData.labelWidth}\r\n                    //     />\r\n                    // }\r\n                    {...input}\r\n                    onOpen={handleOpen}\r\n                    onClose={handleClose}\r\n                    value={input.value}\r\n                    onChange={input.onChange}\r\n                    displayEmpty\r\n                    className={classes.select}\r\n                    disabled={disabled}\r\n                    children={children}\r\n                    classes={{\r\n                        selectMenu: classes.selectMenu,\r\n                        root: classes.selectMenuRoot,\r\n                    }}\r\n                    input={\r\n                        <OutlinedInput\r\n                            name=\"outlined\"\r\n                            id=\"outlined-simple\"\r\n                            labelWidth={0}\r\n                        />\r\n                    }\r\n                />\r\n                <FormHelperText className={classes.formHelper}>\r\n                    {/* {touched && invalid && error} */}\r\n                    {errorFieldLayer}\r\n                </FormHelperText>\r\n            </FormControl>\r\n        )\r\n}\r\n\r\nSelectCustom.propTypes = {\r\n    label: PropTypes.string,\r\n    required: PropTypes.bool\r\n}\r\n\r\nSelectCustom.defaultProps = {\r\n    required: false\r\n}\r\n\r\nexport default withStyles(styles)(SelectCustom)","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport TextField from '@material-ui/core/TextField';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport FormControl from '@material-ui/core/FormControl';\r\nimport FormHelperText from '@material-ui/core/FormHelperText';\r\nimport InputAdornment from '@material-ui/core/InputAdornment';\r\nimport classnames from 'classnames';\r\nconst styles = theme => ({\r\n    control: {\r\n        width: '100%',\r\n        // marginTop: theme.spacing.unit,\r\n        // marginBottom: theme.spacing.unit,\r\n    },\r\n    textField: {\r\n        width: '100%',\r\n\r\n        // color: 'red',\r\n        [`& fieldset`]: {\r\n            borderRadius: 0,\r\n\r\n        },\r\n        [`& input`]: {\r\n            height: '45px',\r\n            padding: '0px 15px 0px 15px'\r\n        },\r\n        [`& label`]: {\r\n            top: '-5px'\r\n        },\r\n        [`& input:-webkit-autofill`]: {\r\n            WebkitBoxShadow: 'inset 0 0 0px 9999px white'\r\n        }\r\n    },\r\n    menu: {\r\n        width: 200,\r\n    },\r\n    red: {\r\n        color: 'red'\r\n    },\r\n    formHelper: {\r\n        marginTop: theme.spacing.unit / 2,\r\n        marginLeft: 20\r\n    }\r\n})\r\n\r\n\r\n\r\nconst renderField = ({\r\n    classes,\r\n    input,\r\n    label,\r\n    type,\r\n    meta: { touched, error, invalid },\r\n    required,\r\n    placeholder,\r\n    icon,\r\n    asterisk,\r\n    iconColor,\r\n    disabled = false,\r\n    style,\r\n    className,\r\n    classNameTextField,\r\n    inputRef=null\r\n}) => {\r\n\r\n    if (required) {\r\n        asterisk = <span className={classes.red}  >*</span>\r\n    } else {\r\n        asterisk = ''\r\n    }\r\n    return (\r\n\r\n        <FormControl className={`${classes.control} ${className}`} style={{ ...style }} error={touched && invalid}>\r\n            <TextField\r\n                \r\n                multiline={true}\r\n                rows={10}\r\n                disabled={disabled}\r\n                error={(invalid && touched) ? true : false}\r\n                {...input}\r\n                inputRef={inputRef}\r\n                type={type}\r\n                className={classnames(classes.textField, classNameTextField)}\r\n                label={label === null || label === \"\" || label === undefined ? '' : <label required>{label}{asterisk}</label>}\r\n                variant=\"outlined\"\r\n                placeholder={placeholder}\r\n                InputLabelProps={{ required: false }}\r\n                InputProps={icon === null || icon === \"\" || icon === undefined ? null : {\r\n                    startAdornment: (\r\n                        <InputAdornment position=\"start\" variant='standard' disableTypography disablePointerEvents>\r\n                            <span style={{ color: iconColor }}> {icon} </span>\r\n                        </InputAdornment>\r\n                    ),\r\n                }}\r\n            />\r\n            <FormHelperText className={classes.formHelper}>{touched && invalid && error}</FormHelperText>\r\n\r\n        </FormControl>\r\n    )\r\n}\r\n\r\nrenderField.propTypes = {\r\n    required: PropTypes.bool.isRequired,\r\n    label: PropTypes.string\r\n}\r\n\r\nrenderField.defaultProps = {\r\n    required: false\r\n}\r\n\r\n\r\nexport default withStyles(styles)(renderField)","import React, { Component, createRef } from 'react';\r\nimport { Scrollbars } from 'react-custom-scrollbars';\r\nimport { List, AutoSizer } from 'react-virtualized';\r\nimport { withStyles } from '@material-ui/core/styles';\r\n\r\nconst listStyle = { overflowX: false, overflowY: false };\r\n\r\nconst rowStyle = {\r\n    width: '100%',\r\n    height: '45px',\r\n    display: 'flex',\r\n    position: 'relative',\r\n    boxSizing: 'border-box',\r\n    textAlign: 'left',\r\n    alignItems: 'center',\r\n    padding: '11px 16px',\r\n    justifyContent: 'flex-start',\r\n    textDecoration: 'none',\r\n    cursor: 'pointer',\r\n    borderStyle: 'solid',\r\n    borderWidth: '0px 0px 1px 0px',\r\n    borderColor: '#E0E0E0',\r\n};\r\n\r\nclass ListUniqueValue extends Component {\r\n    list = createRef();\r\n\r\n    handleScroll = e => {\r\n        const { scrollTop, scrollLeft } = e.target;\r\n        const { Grid } = this.list.current;\r\n        Grid.handleScrollEvent({ scrollTop, scrollLeft });\r\n    };\r\n\r\n    renderRow = ({ index, key, style }) => {\r\n        const { listUniqueValue, classes, onUniqueValueDblClick } = this.props;\r\n        return (\r\n            <div key={key} style={style} className={classes.listUniqStyle} onDoubleClick={onUniqueValueDblClick(listUniqueValue[index])}>\r\n                <div style={rowStyle}>\r\n                    {listUniqueValue[index]}\r\n                </div>\r\n            </div>\r\n        );\r\n    };\r\n\r\n    render() {\r\n        const { listUniqueValue, classes } = this.props;\r\n\r\n        return (\r\n            <div className={classes.root}>\r\n                <AutoSizer>\r\n                    {({ height, width }) => (\r\n                        <Scrollbars\r\n                            onScroll={this.handleScroll}\r\n                            style={{ height, width }}\r\n                            autoHide\r\n                        >\r\n                            <List\r\n                                height={height}\r\n                                width={width}\r\n                                rowHeight={45}\r\n                                rowRenderer={this.renderRow}\r\n                                style={listStyle}\r\n                                ref={this.list}\r\n                                rowCount={listUniqueValue.length}\r\n                            />\r\n                        </Scrollbars>\r\n                    )}\r\n                </AutoSizer>\r\n            </div>\r\n        );\r\n    }\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        width: '100%',\r\n        height: '100%'\r\n    },\r\n    listUniqStyle: {\r\n        '&:focus': {\r\n            backgroundColor: \"rgba(0, 0, 0, 0)\"\r\n        },\r\n        '&:hover': {\r\n            backgroundColor: theme.mainTheme.colorAH.colorHover,\r\n            color: theme.mainTheme.colorAH.colorTextHover\r\n        }\r\n    },\r\n}))(ListUniqueValue);\r\n","import React from 'react';\r\nimport { Field } from \"redux-form\";\r\nimport Grid from '@material-ui/core/Grid';\r\nimport classnames from 'classnames';\r\nimport {withStyles} from '@material-ui/core/styles';\r\nimport Button from '@material-ui/core/Button';\r\nimport MenuItem from \"@material-ui/core/MenuItem\";\r\nimport List from '@material-ui/core/List';\r\nimport ListItem from '@material-ui/core/ListItem';\r\nimport Scrollbar from 'react-custom-scrollbars'\r\nimport Divider from '@material-ui/core/Divider';\r\n\r\n// import ButtonCustom from './AddOn/ButtonCustom';\r\nimport ButtonCustom from '../Containers/Button';\r\nimport Select from './AddOn/Select';\r\nimport TextArea from './AddOn/TextArea';\r\nimport ListUniqueValue from './ListUniqueValue';\r\n\r\nconst SYMBOL =['=','<>', '>', '>=', '<', '<=', 'Is', 'In', 'Like', '_', 'And', 'Or', 'Not', 'Null', '%', '()']\r\n\r\nconst QueryBuilderView = ({\r\n    classes,\r\n    // cssClassButton=null,\r\n    inputStatementRef=null,\r\n\r\n    listLayer=[],\r\n    listFieldCondition=[],\r\n    listUniqueValue=[],\r\n    statementValue='dddd',\r\n    tableName='Table',\r\n    currentFieldCondition=null,\r\n    isRadiusStyle=true,\r\n    elementResultSQL=null,\r\n    validateFields={\r\n        errorFieldLayer: false,\r\n        errorFieldCondition: false,\r\n        errorFieldSQL: false\r\n    },\r\n    \r\n    onChangeLayer=null,\r\n    onStatementInputFocus=null,\r\n    onClickSymbol=null,\r\n    onConfirm=null,\r\n    onCancel=null,\r\n    onFieldConditionDblClick=null,\r\n    onFieldConditionClick=null,\r\n    onUniqueValueDblClick=null,\r\n    onGetUniqueValue=null,\r\n    onSqlFieldChange=null\r\n}) => {\r\n\r\n    const makeLookupLayer = (data) => {\r\n        let listData = [];\r\n        data.forEach(itm => {\r\n            listData.push(\r\n            <MenuItem \r\n            key={itm.id} \r\n            value={itm.name} \r\n            data-map_service_url={itm.mapServiceUrl}\r\n            data-unaccess_field={JSON.stringify(itm.unaccessField)}\r\n            data-table={itm.table}>\r\n                <div>\r\n                    {itm.name}\r\n                </div>\r\n            </MenuItem>)\r\n        })\r\n    \r\n        return listData;\r\n    }\r\n    const generateSymbol = () => {\r\n        return SYMBOL.map((sym, index)=> (\r\n            <Grid key={index} item className={classes.symbol_item}>\r\n                <Button classes={{\r\n                    root: classnames(classes.buttonSym)\r\n                }} variant=\"outlined\" onClick={onClickSymbol(sym)}>\r\n                    <span style={{width: '40px'}}>{`${sym}`}</span>\r\n                </Button>\r\n            </Grid>\r\n        ))\r\n    }\r\n    const generateFieldCondition = (data)=>{\r\n        let listData = [];\r\n        data.forEach((field, index) => {\r\n            if(field.name !== 'OBJECTID'){\r\n                listData.push(\r\n                <ListItem \r\n                key={index} \r\n                divider={true} \r\n                button \r\n                className={classnames(classes.listItem_fieldConditionRoot,{\r\n                    [classes.listItem_fieldCondition]: (currentFieldCondition === field.name), \r\n                })}\r\n                onDoubleClick={onFieldConditionDblClick(field.name, field.type)}\r\n                onClick={onFieldConditionClick(field.name, field.type)}>\r\n                    {field.name_alias}\r\n                </ListItem>)\r\n            }\r\n        })\r\n    \r\n        return listData;\r\n    }\r\n\r\n    // const generateUniqueValueResult=(data) => {\r\n    //     let listData = [];\r\n    //     data.forEach((value, index) => {\r\n    //         listData.push(\r\n    //         <ListItem \r\n    //         className={classnames(classes.listUniqStyle)}\r\n    //         key={index} \r\n    //         divider={true} \r\n    //         button \r\n    //         onDoubleClick={onUniqueValueDblClick(value)}>\r\n    //             {`${value}`}\r\n    //         </ListItem>)\r\n    //     })\r\n    \r\n    //     return listData;\r\n    // }\r\n\r\n    var isFirefox = typeof InstallTrigger !== 'undefined';\r\n\r\n    return (\r\n    <Grid container>\r\n        {/* {\r\n            validateFields.errorFieldLayer && <Grid item xs={12} className={classes.error} style={{marginBottom: '10px'}}>* กรุณาเลือกชั้นข้อมูล</Grid>\r\n        } */}\r\n        <Grid item xs={12}>\r\n            <Field\r\n            label={'เลือกชั้นข้อมูล'}\r\n            name=\"layer\"\r\n            component={Select}\r\n            classNameSelectField={classnames({[classes.radiusSelectField]: isRadiusStyle})}\r\n            onChange={onChangeLayer}\r\n            errorFieldLayer = {validateFields.errorFieldLayer && \"กรุณาเลือกชั้นข้อมูล\"}\r\n            required>\r\n                {makeLookupLayer(listLayer)}\r\n            </Field>\r\n        </Grid>\r\n        <Grid container>\r\n            <Grid item xs={12} className={classes.header}>\r\n                กำหนดเงื่อนไข\r\n            </Grid>\r\n            <Grid item xs={12}><Divider style={{marginBottom: '8px'}}/></Grid>\r\n            {\r\n                validateFields.errorFieldCondition && <Grid item xs={12} className={classes.error}>* กรุณาระบุ Field</Grid>\r\n            }\r\n            <Grid item xs={12}>\r\n                    <List className={classnames(classes.uniqueValue, {[classes.radiusStyle_15px]: isRadiusStyle})}>\r\n                        <Scrollbar autoHide={false}>\r\n                            {generateFieldCondition(listFieldCondition)}\r\n                        </Scrollbar>\r\n                    </List>\r\n            </Grid>\r\n\r\n            <Grid container spacing={8} style={{height: '296px', marginBottom: '5px'}}>\r\n                <Grid container className={classes.symbol_container}>\r\n                    {generateSymbol()}\r\n                </Grid>\r\n                <Grid container style={{height: '100%', marginLeft: '5px', width: 'calc(100% - 154px)'}}>\r\n                    {/* <Grid item xs={12} style={{height: 'calc(100% - 40px)'}}>\r\n                        <List className={classnames(classes.uniqueValue_result, {[classes.radiusStyle_15px]: isRadiusStyle})}>\r\n                            <Scrollbar autoHide={false}>\r\n                                {generateUniqueValueResult(listUniqueValue)}\r\n                            </Scrollbar>\r\n                        </List>\r\n                    </Grid> */}\r\n\r\n                    <Grid item xs={12} style={{height: 'calc(100% - 40px)'}}>\r\n                        <List className={classnames(classes.uniqueValue_result, {[classes.radiusStyle_15px]: isRadiusStyle})}>\r\n                            <ListUniqueValue\r\n                                listUniqueValue = {listUniqueValue}\r\n                                onUniqueValueDblClick = {onUniqueValueDblClick}\r\n                            />\r\n                        </List>\r\n                    </Grid>\r\n                    <Grid item xs={12}>\r\n                        <ButtonCustom \r\n                            label='Get Unique Value' \r\n                            className={classes.btnGetUnique}\r\n                            // cssClass={classnames(classes.button, {[classes.radiusStyle_50px]: isRadiusStyle}, cssClassButton)}\r\n                            onClick={onGetUniqueValue}/>\r\n                    </Grid> \r\n                </Grid>\r\n            </Grid>\r\n\r\n            <Grid item xs={12} className={classes.header_2}>\r\n                SELECT * FROM {tableName} WHERE\r\n            </Grid>\r\n            {\r\n                validateFields.errorFieldSQL && <Grid item xs={12} className={classes.error}>* กรุณาระบุเงื่อนไข</Grid>\r\n            }\r\n            <Grid item xs={12} className={classnames(classes.statement)}>\r\n                <Field\r\n                    inputRef={inputStatementRef}\r\n                    label={''}\r\n                    name=\"sqlStatement\"\r\n                    component={TextArea}\r\n                    classNameTextField={classnames({[classes.radiusSQLField]: isRadiusStyle})}\r\n                    value={statementValue}\r\n                    onFocus={onStatementInputFocus}\r\n                    onChange={onSqlFieldChange}\r\n                    required\r\n                />\r\n            </Grid>\r\n        </Grid>\r\n        {elementResultSQL}\r\n        <Grid container spacing={8} justify='center' style={isFirefox ? {marginTop: '10px'}:null}>\r\n            {/* <Grid item xs={4}>\r\n                <ButtonCustom text='ล้างค่า' onClick={onCancel} cssClass={classnames(classes.button, {[classes.radiusStyle_50px]: isRadiusStyle}, cssClassButton)}/>\r\n            </Grid>\r\n            <Grid item xs={4}>\r\n                <ButtonCustom text='ตกลง' onClick={onConfirm} cssClass={classnames(classes.button, {[classes.radiusStyle_50px]: isRadiusStyle}, cssClassButton)}/>\r\n            </Grid> */}\r\n        \r\n            <Grid item>\r\n                <ButtonCustom \r\n                    label = 'ล้างค่า'\r\n                    onClick={onCancel}\r\n                />\r\n            </Grid>\r\n\r\n            <Grid item>\r\n                <ButtonCustom \r\n                    label = 'ตกลง'\r\n                    onClick={onConfirm}\r\n                />\r\n            </Grid>\r\n        </Grid>\r\n        <div style={{height: '10px'}}></div>\r\n    </Grid>);\r\n}\r\n\r\nexport default withStyles((theme)=>({\r\n    error: {\r\n        color: 'red',\r\n        height: '20px',\r\n        lineHeight: '20px',\r\n        fontSize: '14px'\r\n    },\r\n    radiusStyle_15px: {\r\n        borderRadius: '15px',\r\n    },\r\n    radiusStyle_50px: {\r\n        borderRadius: '50px',\r\n    },\r\n    radiusSQLField: {\r\n        [`& fieldset`]: {\r\n            borderRadius: '15px !important',\r\n\r\n        }\r\n    },\r\n    radiusSelectField: {\r\n        borderRadius: 50,\r\n        [`& fieldset`]: {\r\n            borderRadius: 50,\r\n            height: '45px',\r\n            lineHeight: '45px',\r\n            [`& input`]: {\r\n                borderRadius: 50\r\n            }\r\n        },\r\n    },\r\n    header: {\r\n        height: '30px',\r\n        lineHeight: '30px',\r\n        color: '#000000',\r\n        marginBottom: '5px'\r\n    },\r\n    header_2: {\r\n        height: '30px',\r\n        lineHeight: '30px',\r\n        color: '#ffffff',\r\n        backgroundColor: '#6D6D6D',\r\n        marginBottom: '5px'\r\n    },\r\n    button: {\r\n        textAlign: 'center',\r\n        color: '#FFFFFF',\r\n        backgroundColor: '#5fa855',\r\n        padding: '5px 20px 5px 20px'\r\n    },\r\n    buttonSym: {\r\n        '&:focus': {\r\n            backgroundColor: \"rgba(0, 0, 0, 0)\"\r\n        },\r\n        '&:hover': {\r\n            backgroundColor: theme.mainTheme.colorAH.colorHover,\r\n            color: theme.mainTheme.colorAH.colorTextHover\r\n        }\r\n    },\r\n    listUniqStyle:{\r\n        '&:focus': {\r\n            backgroundColor: \"rgba(0, 0, 0, 0)\"\r\n        },\r\n        '&:hover': {\r\n            backgroundColor: theme.mainTheme.colorAH.colorHover,\r\n            color: theme.mainTheme.colorAH.colorTextHover\r\n        }\r\n    },\r\n    symbol_container: {\r\n        width: '148px'\r\n    },\r\n    symbol_item:{\r\n        textAlign:'center'\r\n    },\r\n    uniqueValue:{\r\n        height: '200px',\r\n        marginBottom: '25px',\r\n        padding: '0px',\r\n        border: '1px solid rgba(0, 0, 0, 0.23)',\r\n        '&:hover':{\r\n            border: '1px solid rgba(0, 0, 0, 0.87)',\r\n        } \r\n    },\r\n    uniqueValue_result:{\r\n        height: '100%',\r\n        padding: '0px',\r\n        border: '1px solid rgba(0, 0, 0, 0.23)',\r\n        '&:hover':{\r\n            border: '1px solid rgba(0, 0, 0, 0.87)',\r\n        } \r\n    },\r\n    listItem_fieldConditionRoot:{\r\n        '&:focus': {\r\n            backgroundColor: \"rgba(0, 0, 0, 0)\"\r\n        },\r\n        '&:hover': {\r\n            backgroundColor: theme.mainTheme.colorAH.colorHover,\r\n            color: theme.mainTheme.colorAH.colorTextHover\r\n        }\r\n    },\r\n    listItem_fieldCondition: {\r\n        backgroundColor: theme.mainTheme.colorAH.colorActive,\r\n        color: theme.mainTheme.colorAH.colorTextActive,\r\n        '&:hover': {\r\n            backgroundColor: theme.mainTheme.colorAH.colorHover,\r\n            color: theme.mainTheme.colorAH.colorTextHover\r\n        },\r\n        '&:focus': {\r\n            backgroundColor: theme.mainTheme.colorAH.colorActive,\r\n            color: theme.mainTheme.colorAH.colorTextActive,\r\n        },\r\n    },\r\n    statement: {\r\n        height: '230px',\r\n        marginBottom: '5px'\r\n    },\r\n    btnGetUnique:{\r\n        width:'100%'\r\n    }\r\n}))(QueryBuilderView);","import React, {useState, useRef, useEffect, Fragment} from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { reduxForm } from \"redux-form\";\r\nimport SQLParser from 'sql-parser'\r\nimport QueryBuilderView from './QueryBuilderView';\r\n\r\n//เพิ่มเติม\r\nimport Loading from '../Containers/Loading';\r\nimport WithLoading from '../../HOC/WithLoading'\r\nimport { compose } from 'recompose'\r\n\r\nconst QueryBuilder = (props) => {\r\n    const  {\r\n    //redux from\r\n    // handleSubmit,\r\n    reset,\r\n    change,\r\n\r\n    isRadiusStyle,\r\n    listUniqueValue,\r\n    listLayer,\r\n    elementResultSQL,\r\n\r\n    //ref\r\n    refResetQueryBuilderStateFunction,\r\n\r\n    //event\r\n    onConfirm,\r\n    onReset,\r\n    onGetUniqueValue,\r\n    onChangeLayer,\r\n    onFieldItemClick,\r\n\r\n    //loading\r\n    isShowLoading,\r\n    showLoading,\r\n    hideLoading\r\n    } = props;\r\n\r\n    let refInputStatement = useRef(null);\r\n    let tmpTimeoutFocusInputStatement  = null; //ใช้จัดการกับการ Focus และเลื่อน Cursor ของกล่อง SQL Statement\r\n    const [fieldData, setFieldData] = useState({\r\n        isSelectLayer: false,\r\n        listFieldCondition: [], //เก็บรายการ Fields ที่เลือก และผ่านการกรอง Accessibility Field แล้ว\r\n        listFieldNoFilterAccessibility: [],\r\n        currentTable: `<TABLE_name>`, //เก็บ Table ของ Layer\r\n        currentFieldCondition: null,//เก็บ เงื่อนไขที่เลือกล่าสุด\r\n        currentFieldConditionType: null,//เก็บ Type ของ Field ที่เลือกล่าสุด\r\n        validateFields: {\r\n            errorFieldLayer: false,\r\n            errorFieldCondition: false,\r\n            errorFieldSQL: false\r\n        }\r\n    });\r\n\r\n    useEffect(() => {\r\n        if(refResetQueryBuilderStateFunction){\r\n            refResetQueryBuilderStateFunction(resetQueryBuilderState);\r\n        }\r\n    }, [])\r\n\r\n    const resetQueryBuilderState = () => {\r\n        setFieldData({\r\n            isSelectLayer: false,\r\n            listFieldCondition: [], //เก็บรายการ Fields ที่เลือก\r\n            currentTable: `<TABLE_name>`, //เก็บ Table ของ Layer\r\n            currentFieldCondition: null,//เก็บ เงื่อนไขที่เลือกล่าสุด\r\n            currentFieldConditionType: null,\r\n            validateFields: {\r\n                errorFieldLayer: false,\r\n                errorFieldCondition: false,\r\n                errorFieldSQL: false\r\n            }\r\n        })\r\n    }\r\n\r\n    const moveCursorPosition = (refElement, position=0)  => {\r\n        refElement.focus();\r\n        tmpTimeoutFocusInputStatement = setTimeout(()=>{\r\n            refElement.setSelectionRange(position, position);\r\n        }, 50);\r\n    }\r\n    const inserStringDetectByCursorPosition = (refElement, inputValue, insertValue='') => {\r\n        const startPos = refElement.selectionStart;\r\n        const endPos = refElement.selectionEnd;\r\n        const startText = inputValue.substring(0,  startPos);\r\n        const endText = inputValue.substring(endPos,  inputValue.length);\r\n        return {\r\n            newText: `${startText}${insertValue}${endText}`,\r\n            newCursorPosotion: startPos + insertValue.length\r\n        }\r\n    }\r\n\r\n    const setValueStatementToFieldBox = (value) => {\r\n        const {newText, newCursorPosotion} = inserStringDetectByCursorPosition(refInputStatement.current, `${refInputStatement.current.value}`, `${value}`)\r\n        \r\n        change('sqlStatement', newText)//เปลี่ยนแปลงค่าในช่อง Statement SQL\r\n\r\n        let cursorPosotion = newCursorPosotion;\r\n        if(value === '()'){\r\n            --cursorPosotion;\r\n        }\r\n        moveCursorPosition(refInputStatement.current, cursorPosotion);//เลื่อน Cursor\r\n    }\r\n    const handleClickSymbol = sym => event => {\r\n        setValueStatementToFieldBox(sym)\r\n        setFieldData({\r\n            ...fieldData,\r\n            validateFields:{\r\n                ...fieldData.validateFields,\r\n                errorFieldSQL: false\r\n            }\r\n        });\r\n    };\r\n\r\n    const handleConfirm = () => {\r\n        let errorFieldSQL = false;\r\n        let errorFieldLayer = false;\r\n        const currentWhereCause = refInputStatement.current.value.trim();\r\n        if(!fieldData.isSelectLayer){\r\n            errorFieldLayer = true;\r\n        }\r\n\r\n        if(currentWhereCause !==''){\r\n            let arr = [];\r\n            fieldData.listFieldNoFilterAccessibility.map((value) => {\r\n                if (!value.match(/SHAPE.*/)) {\r\n                    arr.push(value)\r\n                  }\r\n\r\n                  return true\r\n            })\r\n\r\n            const objSQL= {\r\n                fields: arr.join(','),\r\n                tableName: fieldData.currentTable,\r\n                whereCause: currentWhereCause,\r\n                isTrueSql: true\r\n            }\r\n            try{\r\n                SQLParser.parse(`SELECT * FROM ${fieldData.currentTable} ${currentWhereCause !== ''? 'WHERE ' + currentWhereCause : '' }`);//แปลง sql to object\r\n                if(onConfirm && !errorFieldLayer){\r\n                    onConfirm(objSQL)\r\n                }\r\n            }\r\n            catch(e){//fail SQL\r\n                objSQL.isTrueSql = false;\r\n                if(onConfirm  && !errorFieldLayer){\r\n                    onConfirm(objSQL)\r\n                }\r\n            }\r\n        }\r\n        else{\r\n            errorFieldSQL = true;\r\n        }\r\n\r\n        setFieldData({\r\n            ...fieldData,\r\n            validateFields:{\r\n                ...fieldData.validateFields,\r\n                errorFieldLayer: errorFieldLayer,\r\n                errorFieldSQL: errorFieldSQL\r\n            }\r\n        });\r\n    }\r\n\r\n    const handleCancel = () => {\r\n        resetQueryBuilderState();\r\n        if(reset){\r\n            reset();\r\n        }\r\n\r\n        if(onReset){\r\n            onReset()\r\n        }\r\n    }\r\n\r\n    const handleStatementInputFocus = () => {\r\n        if(tmpTimeoutFocusInputStatement){\r\n            clearTimeout(tmpTimeoutFocusInputStatement)\r\n        }\r\n    }\r\n\r\n    const getListFields = async (url) => {\r\n        let result = {\r\n            listField: [],\r\n            displayField:''\r\n        };\r\n        try{\r\n            const response = await fetch(url);\r\n            const resultObj = await response.json();\r\n            result.displayField = resultObj.displayField;\r\n            let arr = [];\r\n            resultObj.fields.forEach((itm) => {\r\n                if(itm.type !== \"esriFieldTypeGeometry\") {\r\n                    arr.push(itm);\r\n                }\r\n            });\r\n\r\n            result.listField = arr.map(itm => ({\r\n                name: itm.name,\r\n                name_alias: `${itm.name}${(itm.name !== itm.alias) ? ` (${itm.alias})`:``}`,\r\n                type: itm.type\r\n            }));\r\n        }\r\n        catch(exception){\r\n            console.log('Error : get mapservice error in Query Builder Control');\r\n        }\r\n\r\n        return result;\r\n    }\r\n\r\n    const filterUnaccessField = (fieldData=[], listUnaccessField=[]) => {\r\n        const listFilter = [];\r\n        fieldData.forEach(fieldITM=>{\r\n            const isUnaccessField = listUnaccessField.some(ufITM => fieldITM.name === ufITM);\r\n            if(!isUnaccessField){\r\n                listFilter.push(fieldITM);\r\n            }\r\n        })\r\n        return listFilter;\r\n    }\r\n\r\n    const handleChangeLayer = async (evt) => {\r\n        const currentMapServiceUrl = evt.currentTarget.dataset.map_service_url;\r\n        const currentTable = evt.currentTarget.dataset.table;\r\n        const unaccessField = JSON.parse(evt.currentTarget.dataset.unaccess_field);\r\n        const listField = await getListFields(`${currentMapServiceUrl}?f=pjson`);\r\n        const currentLayerId = evt.currentTarget.dataset.selected_layer_id;\r\n        const currentLayerName = evt.target.value\r\n        \r\n        setFieldData({\r\n            ...fieldData,\r\n            isSelectLayer: true,\r\n            listFieldCondition: filterUnaccessField(listField.listField, unaccessField),\r\n            listFieldNoFilterAccessibility: listField.listField.map(itm => itm.name),\r\n            currentTable,\r\n            currentFieldCondition: null,\r\n            currentFieldConditionType: null,\r\n            validateFields:{\r\n                ...fieldData.validateFields,\r\n                errorFieldLayer: false\r\n            }\r\n        });\r\n\r\n        change(\"sqlStatement\",\"\")\r\n\r\n        if(onChangeLayer){\r\n            onChangeLayer(listField.displayField, currentMapServiceUrl,currentLayerId,currentLayerName)\r\n        }\r\n    }\r\n        \r\n\r\n    const handleFieldConditionDblClick = (fieldName) => event => {\r\n        setValueStatementToFieldBox(fieldName)\r\n        setFieldData({\r\n            ...fieldData,\r\n            validateFields:{\r\n                ...fieldData.validateFields,\r\n                errorFieldSQL: false\r\n            }\r\n        });\r\n    }\r\n\r\n    const handleFieldConditionClick = (fieldName, fieldType)=> event => {\r\n        setFieldData({\r\n            ...fieldData,\r\n            currentFieldCondition: fieldName,\r\n            currentFieldConditionType: fieldType,\r\n            validateFields:{\r\n                ...fieldData.validateFields,\r\n                errorFieldCondition: false,Text\r\n            }\r\n        })\r\n        if(onFieldItemClick){\r\n            onFieldItemClick(fieldName)\r\n        }\r\n    }\r\n\r\n    const handleUniqueValueDblClick = (value) => event => {\r\n        // fieldData.currentFieldConditionType\r\n        let conditionValue = value;\r\n        if(fieldData.currentFieldConditionType){\r\n            const isStringValue = \"esriFieldTypeString\".indexOf(fieldData.currentFieldConditionType) !== -1;\r\n            if(isStringValue){\r\n                conditionValue = `'${value}'`\r\n            }\r\n        }\r\n        setValueStatementToFieldBox(conditionValue);\r\n\r\n        setFieldData({\r\n            ...fieldData,\r\n            validateFields:{\r\n                ...fieldData.validateFields,\r\n                errorFieldSQL: false\r\n            }\r\n        });\r\n        \r\n    }\r\n\r\n    const handleGetUniqueValue = async () => {\r\n        showLoading();\r\n        let isErrorFieldCondition= true;\r\n        if(fieldData.currentFieldCondition){\r\n            isErrorFieldCondition = false\r\n            if(onGetUniqueValue){\r\n                await onGetUniqueValue(fieldData.currentTable, fieldData.currentFieldCondition);\r\n            }\r\n        }\r\n\r\n        await setFieldData({\r\n            ...fieldData,\r\n            validateFields:{\r\n                ...fieldData.validateFields,\r\n                errorFieldCondition: isErrorFieldCondition\r\n            }\r\n        });\r\n        \r\n        await hideLoading();\r\n    }\r\n\r\n    const handleSqlFieldChange = evt => {\r\n        if(fieldData.validateFields.errorFieldSQL){\r\n            setFieldData({\r\n                ...fieldData,\r\n                validateFields:{\r\n                    ...fieldData.validateFields,\r\n                    errorFieldSQL: false\r\n                }\r\n            });\r\n        }\r\n        \r\n    }\r\n\r\n    return (\r\n        <Fragment>\r\n            <QueryBuilderView\r\n                //Style set\r\n                isRadiusStyle={isRadiusStyle}\r\n\r\n                //ref\r\n                inputStatementRef={refInputStatement}\r\n\r\n                //data\r\n                listLayer={listLayer} \r\n                listFieldCondition={fieldData.listFieldCondition}\r\n                listUniqueValue={listUniqueValue}\r\n                elementResultSQL={elementResultSQL}\r\n\r\n                //validate\r\n                validateFields={fieldData.validateFields}\r\n\r\n                //management\r\n                tableName={fieldData.currentTable}\r\n                currentFieldCondition={fieldData.currentFieldCondition}\r\n\r\n                //event\r\n                onSqlFieldChange={handleSqlFieldChange}\r\n                onChangeLayer={handleChangeLayer}\r\n                onStatementInputFocus={handleStatementInputFocus}\r\n                onClickSymbol={handleClickSymbol}\r\n                onConfirm={handleConfirm}\r\n                onCancel={handleCancel}\r\n                onFieldConditionDblClick={handleFieldConditionDblClick}\r\n                onFieldConditionClick={handleFieldConditionClick}\r\n                onUniqueValueDblClick={handleUniqueValueDblClick}\r\n                onGetUniqueValue={handleGetUniqueValue}\r\n            />\r\n            <Loading isShowLoading={isShowLoading} />\r\n        </Fragment>\r\n    )\r\n}\r\n\r\nQueryBuilder.defaultProps = {\r\n    isRadiusStyle: true,\r\n    listUniqueValue: [\r\n        // 'ตลาด1', 'ตลาด2', 'ตลาด3'\r\n    ],\r\n    listLayer: [\r\n        // {\r\n        //     id: 1, \r\n        //     name: '1',\r\n        //     mapServiceUrl: 'http://10.254.7.94/arcgis/rest/services/bma/Education/FeatureServer/13',\r\n        //     table: 'table1',\r\n        //      unaccessField: ['NAME_L']\r\n        // }\r\n        // {\r\n        //     id: 2, \r\n        //     name: '2',\r\n        //     mapServiceUrl: 'http://10.254.7.94/arcgis/rest/services/bma/Education/FeatureServer/13',\r\n        //     table: 'table2'\r\n        //      unaccessField: ['NAME_L']\r\n        // }\r\n    ],\r\n    elementResultSQL: null,\r\n\r\n    //ref\r\n    refResetQueryBuilderStateFunction: null,\r\n\r\n    //event\r\n    onReset: null,\r\n    onConfirm: null,//callback(sqlStatement)\r\n    onGetUniqueValue: null, //callback(table, field)\r\n    onChangeLayer: null,\r\n    onFieldItemClick: null\r\n}\r\nQueryBuilder.propTypes = {\r\n    isRadiusStyle: PropTypes.bool,\r\n    listUniqueValue: PropTypes.arrayOf(PropTypes.string),\r\n    listLayer: PropTypes.arrayOf(PropTypes.shape({\r\n        id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\r\n        name: PropTypes.string,\r\n        mapServiceUrl: PropTypes.string,\r\n        table: PropTypes.string,\r\n        unaccessField: PropTypes.arrayOf(PropTypes.string)\r\n    })),\r\n    elementResultSQL: PropTypes.element,\r\n\r\n    //ref\r\n    refResetQueryBuilderStateFunction: PropTypes.func,\r\n\r\n    //event\r\n    onReset: PropTypes.func,\r\n    onConfirm: PropTypes.func,\r\n    onGetUniqueValue: PropTypes.func,\r\n    onChangeLayer: PropTypes.func,\r\n    onFieldItemClick: PropTypes.func\r\n}\r\n\r\nconst reduxFormParameter = {\r\n    form: \"QueryBuilderControl\",\r\n    validate: null\r\n};\r\n\r\nexport default compose(\r\n    reduxForm(reduxFormParameter),\r\n    WithLoading\r\n)(QueryBuilder)","import React from 'react';\r\nimport { Scrollbars } from 'react-custom-scrollbars';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport classnames from 'classnames';\r\nimport AppBarHeaderView from '../../../AppBarHeaderView';\r\n\r\nconst QueryBuilderToolView = ({\r\n    classes,\r\n    isResult = false,\r\n    title,\r\n    children,\r\n    onBackClick\r\n}) => {\r\n    return <Grid container className={classes.root}>\r\n        <AppBarHeaderView\r\n            title={title}\r\n            onClickBack={onBackClick}\r\n        />\r\n        <Grid container className={classnames(classes.content, { [classes._hide]: isResult })}>\r\n            <Scrollbars\r\n                autoHide={false}\r\n                universal={true}>\r\n                <Grid item xs={12} className={classes.content_in}>\r\n                    {children.queryBuilder}\r\n                </Grid>\r\n            </Scrollbars>\r\n        </Grid>\r\n        <Grid container className={classnames(classes.content, { [classes._hide]: !isResult })}>\r\n            {children.resultQuery}\r\n        </Grid>\r\n    </Grid>\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    _hide: {\r\n        display: 'none'\r\n    },\r\n    root: {\r\n        position: 'absolute',\r\n        top: 0,\r\n        bottom: 0,\r\n        right: 0,\r\n        left: 0\r\n    },\r\n    content: {\r\n        position: 'relative',\r\n        height: 'calc(100% - 45px)'\r\n    },\r\n    content_in: {\r\n        height: '100%',\r\n        paddingTop: '10px',\r\n        paddingLeft: '5px',\r\n        paddingRight: '5px',\r\n        paddingBottom: '5px'\r\n    },\r\n}))(QueryBuilderToolView);","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport List from '@material-ui/core/List';\r\nimport ListItem from '@material-ui/core/ListItem';\r\nimport Scrollbar from 'react-custom-scrollbars'\r\nimport {withStyles} from '@material-ui/core/styles';\r\nimport classnames from 'classnames';\r\nimport { Scrollbars } from 'react-custom-scrollbars';\r\n\r\n\r\nconst QueryBuilderResultView = ({\r\n    classes,\r\n    isHide=false,\r\n    datasource=[],\r\n    displayField='',\r\n    onClickListItm\r\n}) => {\r\n\r\n    const generateResult = (data)=>{\r\n        let listData = [];\r\n        data.forEach((item, index) => {\r\n            listData.push(\r\n            <ListItem \r\n            key={index} \r\n            divider={true} \r\n            button\r\n            className={classnames(classes.listStyle)}\r\n            classes={{gutters:classes.guttersItem}}\r\n            onClick={onClickListItm(item)}>\r\n                {`${item[`${displayField}`]}`}\r\n            </ListItem>)\r\n        })\r\n    \r\n        return listData;\r\n    }\r\n\r\n    return(\r\n    <Grid container className={classnames({[classes.hide_root]: isHide})}>\r\n        <Grid item xs={12} className={classes.header}>\r\n            รายการผลลัพธ์ทั้งหมด {datasource.length} รายการ\r\n        </Grid>\r\n        <Grid item xs={12} className={classes.content}>\r\n            <Scrollbars\r\n            autoHide={false}\r\n            universal={true}>\r\n                {   (datasource.length !== 0 &&\r\n                    <List className={classes.listContent}>\r\n                        <Scrollbar autoHide={false}>\r\n                            {generateResult(datasource)}\r\n                        </Scrollbar>\r\n                    </List>) ||\r\n                    <div style={{padding: '10px'}}>ไม่พบผลลัพธ์</div>\r\n                }\r\n            </Scrollbars>\r\n        </Grid>\r\n    </Grid>);\r\n}\r\n\r\nQueryBuilderResultView.propTypes = {\r\n    datasource: PropTypes.array\r\n}\r\n\r\nexport default withStyles(theme=>({\r\n    hide_root: {\r\n        display: 'none'\r\n    },\r\n    header: {\r\n        backgroundColor: '#6D6D6D',\r\n        color: '#ffffff',\r\n        height: '30px',\r\n        lineHeight: '30px',\r\n        textAlign: 'center'\r\n    },\r\n    content: {\r\n        height: 'calc(100% - 30px)',\r\n    },\r\n    listContent:{\r\n        // height: '100%',\r\n        height: 'calc(100% - 5px)',\r\n        marginBottom: '0px',\r\n        [theme.breakpoints.down(\"xs\")]: {\r\n            marginBottom: '25px',\r\n        },\r\n        padding: '0px',\r\n        border: '1px solid rgba(0, 0, 0, 0.23)',\r\n        '&:hover':{\r\n            border: '1px solid rgba(0, 0, 0, 0.87)',\r\n        } \r\n    },\r\n    listStyle:{\r\n        '&:focus': {\r\n            backgroundColor: \"rgba(0, 0, 0, 0)\"\r\n        },\r\n        '&:hover': {\r\n            backgroundColor: theme.mainTheme.colorAH.colorHover,\r\n            color: theme.mainTheme.colorAH.colorTextHover\r\n        }\r\n    },\r\n    guttersItem:{\r\n        height:'45px'\r\n    }\r\n}))(QueryBuilderResultView);","import React from 'react';\r\nimport {bindActionCreators} from 'redux';\r\nimport {connect} from 'react-redux';\r\n\r\n//import component\r\nimport QueryBuilderResultView from '../../../../../../Presentationals/Web/Panel/Menu/MenuContent/QueryBuilder/QueryBuilderResultView'\r\n\r\n//import actions\r\nimport * as MapAction from '../../../../../../Actions/Web/Maps/MapAction';\r\nimport {zoomQueryBuilder} from '../../../../../../Map/MapFunctions';\r\n\r\nconst QueryBuilderResult = ({\r\n    mapAction,\r\n\r\n    isHide=false,\r\n    mapserviceUrl='',\r\n    displayField,\r\n    datasource\r\n})=> {\r\n\r\n    const handleClickListItm = (value) => event =>{\r\n        mapAction.bindMapCommand(zoomQueryBuilder, {\r\n            mapserviceUrl: mapserviceUrl, \r\n            objectID: value.OBJECTID\r\n        });\r\n    }\r\n\r\n    return (\r\n        <QueryBuilderResultView \r\n            isHide={isHide}\r\n            displayField={displayField} \r\n            datasource={datasource}\r\n            onClickListItm={handleClickListItm}\r\n        />\r\n    )\r\n}\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    mapAction: bindActionCreators(MapAction, dispatch)\r\n})\r\n\r\nexport default connect(null, mapDispatchToProps)(QueryBuilderResult);","import React, {useState, useEffect} from 'react';\r\nimport {connect} from 'react-redux';\r\nimport {bindActionCreators} from 'redux';\r\n\r\n//import component\r\nimport QueryBuilder from '../../../../../../Controls/QueryBuilderControl/QueryBuilder';\r\nimport QueryBuilderToolView from '../../../../../../Presentationals/Web/Panel/Menu/MenuContent/QueryBuilder/QueryBuilderToolView';\r\nimport QueryBuilderResult from './QueryBuilderResult';\r\n\r\n//import service - utils\r\nimport * as ServiceUtils from '../../../../../../Utilities/ServiceUtils';\r\nimport * as MapAction from '../../../../../../Actions/Web/Maps/MapAction';\r\nimport * as MapFunctions from '../../../../../../Map/MapFunctions';\r\nimport * as Constants from '../../../../../../Constants/Constants';\r\n\r\nconst QueryBuilderTool = ({\r\n    title = \"title\",\r\n    onBackClick,\r\n    newTOCDataRdc,\r\n    mapAction\r\n}) => {\r\n\r\n    const [st_displayField, setDisplayField] = useState('')//เก็บ key ที่ใช้ดึงข้อมูลมาแสดงในหน้า Result\r\n    const [st_mapserviceUrl, setMapserviceUrl] = useState('')//เก็บ url สำหรับจัดการ zoom ในหน้า Result\r\n    const [st_managePage, setSt_ManagePage]= useState({\r\n        isHideResultPage: true\r\n    });\r\n    const [st_queryBuilder, setSt_queryBuilder] = useState({\r\n        currentFieldName:null,\r\n        listLayer: [], //ใช้สำหรับแสดงใน Field ชั้นข้อมูล\r\n        listUniqueValue: [], //ใช้สำหรับเก็บผลลัพธ์ของ Get Unique Value\r\n        listResultSQL: [] //เก็บผลลัพธ์สำหรับแสดงผลหน้า ผลลัพธ์\r\n    });\r\n\r\n    useEffect(() => {\r\n        loadLayerData();\r\n    }, [])\r\n\r\n    const makeListLayer =  (sourceLayer) => {\r\n        const list = [];\r\n        sourceLayer.forEach(layer => {\r\n            const isParentLayer = (layer.subLayerID); //ถ้า subLayerID ไม่ null แสดงว่าเป็น Parent\r\n            if(!isParentLayer){\r\n                list.push({\r\n                    id: layer.layerID, \r\n                    name: layer.layerName,\r\n                    mapServiceUrl: `${layer.mapServiceDisplayURL}${layer.mapServiceID}`,\r\n                    table: layer.tableName,\r\n                    unaccessField: []\r\n                })\r\n            }\r\n        })\r\n\r\n        return list;\r\n    }\r\n    \r\n    const loadLayerData = async () => {\r\n        const sourceLayer = newTOCDataRdc.listDefaultLayer.filter(dataLayer => dataLayer.tableName !== null)\r\n        const makeListLayerResult = makeListLayer(sourceLayer)\r\n        setSt_queryBuilder({\r\n            ...st_queryBuilder,\r\n            listLayer: makeListLayerResult\r\n        });\r\n    }\r\n\r\n    const handleFieldItemClick = fieldName => {\r\n        if(st_queryBuilder.currentFieldName !== fieldName){//เปลี่ยน Field\r\n            setSt_queryBuilder({\r\n                ...st_queryBuilder,\r\n                currentFieldName: fieldName,\r\n                listUniqueValue: [] //ล้าง List Unique Value\r\n            })\r\n        }\r\n    }\r\n\r\n    const getUniqueValueApi = async (table, field) => {\r\n        let result = [];\r\n        try{\r\n            const response = await ServiceUtils.fetchGet_(`${process.env.REACT_APP_CMP_GET_UNIQUE_VALUE}?fieldname=${field}&tablename=${table}`)\r\n            result = await response.json();\r\n            result = result.uniqueValue;\r\n        }\r\n        catch(exception){\r\n            console.log('Get Unique Value Fail.')\r\n        }\r\n\r\n        return result;\r\n    }\r\n\r\n    const handleGetUniqueValue = async (table, field) => {\r\n        const listUniqueValue = await getUniqueValueApi(table, field);\r\n        setSt_queryBuilder({\r\n            ...st_queryBuilder,\r\n            listUniqueValue: listUniqueValue\r\n        })\r\n    }\r\n\r\n    const handleChangeLayer = (displayField, mapServiceUrl) => {\r\n        setDisplayField(displayField);\r\n        setMapserviceUrl(mapServiceUrl);\r\n        setSt_queryBuilder({\r\n            ...st_queryBuilder,\r\n            listUniqueValue:[]\r\n        })\r\n    }\r\n\r\n    const displayResultPage = ()=> {\r\n        setSt_ManagePage({\r\n            ...st_managePage,\r\n            isHideResultPage: false\r\n        })\r\n    }\r\n\r\n    const displayQueryBuilderPage = ()=> {\r\n        setSt_ManagePage({\r\n            ...st_managePage,\r\n            isHideResultPage: true\r\n        })\r\n    }\r\n\r\n    const getQueryBuilderApi = async (params) => {\r\n        let result = [];\r\n        try{\r\n            const response = await ServiceUtils.fetchPost_(`${process.env.REACT_APP_CMP_GET_QUERY_BUILDER}`, params);\r\n            const resultObj = await response.json();\r\n            result = resultObj.queryBuilder\r\n        }\r\n        catch(exception){\r\n            console.log('query builder fetch fail');\r\n        }\r\n\r\n        return result;\r\n    }\r\n\r\n    const handleConfirm = async (sqlObject) => {\r\n        const queryBuilderParams = {\r\n            fieldname: sqlObject.fields,\r\n            tablename: sqlObject.tableName,\r\n            condition: sqlObject.whereCause\r\n        }\r\n        const resultSQL =  await getQueryBuilderApi(queryBuilderParams);\r\n        setSt_queryBuilder({\r\n            ...st_queryBuilder,\r\n            listResultSQL: resultSQL\r\n        })\r\n        displayResultPage();\r\n    }\r\n\r\n    const clearResult = () => {\r\n        setSt_queryBuilder({\r\n            ...st_queryBuilder,\r\n            listUniqueValue: [],\r\n            listResultSQL: []\r\n        })\r\n    }\r\n    const handleReset = () => {\r\n        clearResult();\r\n    }\r\n    const handleBack = () => {\r\n        if(st_managePage.isHideResultPage){//หน้า Query Builder back to main menu\r\n            if(onBackClick){\r\n                onBackClick();\r\n            }\r\n        }\r\n        else{//หน้า Result back to query builder\r\n            displayQueryBuilderPage();\r\n            mapAction.bindMapCommand(MapFunctions.clearGraphic,[Constants.LISTGRAPHICLAYER.GRAPHICLAYER_QUERYBUILDER])\r\n        }\r\n    }\r\n    return (\r\n        <QueryBuilderToolView\r\n            title={title}\r\n            isResult={!st_managePage.isHideResultPage}\r\n            onBackClick={handleBack}>\r\n            \r\n                {{\r\n                queryBuilder: \r\n                    <QueryBuilder\r\n                    isRadiusStyle={false}\r\n                    listLayer={st_queryBuilder.listLayer}\r\n                    listUniqueValue={st_queryBuilder.listUniqueValue}\r\n                    \r\n                    onFieldItemClick={handleFieldItemClick}\r\n                    onChangeLayer={handleChangeLayer}\r\n                    onGetUniqueValue={handleGetUniqueValue}\r\n                    onConfirm={handleConfirm}\r\n                    onReset={handleReset}/>,\r\n\r\n                resultQuery:\r\n                    <QueryBuilderResult\r\n                    mapserviceUrl={st_mapserviceUrl}\r\n                    displayField={st_displayField}\r\n                    datasource={st_queryBuilder.listResultSQL}/>\r\n            }}\r\n        </QueryBuilderToolView>\r\n    );\r\n}\r\n\r\nQueryBuilderTool.propTypes = {\r\n\r\n};\r\n\r\nconst mapDispatchToProps = dispatch =>({\r\n    mapAction: bindActionCreators(MapAction,dispatch)\r\n})\r\n\r\nconst mapStateToProps = state =>({\r\n    newTOCDataRdc : state.newTOCData\r\n})\r\n\r\nexport default connect(mapStateToProps,mapDispatchToProps)(QueryBuilderTool)","import React from 'react'\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport ListItem from '@material-ui/core/ListItem';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport IconButton from '@material-ui/core/IconButton';\r\nimport EditIcon from '@material-ui/icons/Edit';\r\nimport DeleteIcon from '@material-ui/icons/Delete';\r\nimport { Scrollbars } from 'react-custom-scrollbars';\r\n\r\n\r\nimport { convertDateTimeToDisplayDate } from '../../../../../../Utilities/DateTimeUtil';\r\nimport AppBarHeaderView from '../../../AppBarHeaderView';\r\n\r\n//import tooltip\r\nimport Tooltip from '../../../../../../Controls/Containers/Tooltip'\r\n\r\nconst EditPmrView = ({\r\n    classes,\r\n    title,\r\n    pmr1Form,\r\n    onClickBack,\r\n    onShowDetail,\r\n    onEdit,\r\n    onDelete\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root}>\r\n            <AppBarHeaderView\r\n                title={title}\r\n                onClickBack={onClickBack}\r\n            />\r\n            <Grid item xs={12} className={classes.container}>\r\n                <Scrollbars autoHide>\r\n                    {pmr1Form.length === 0 ? <Grid item xs={12}>ไม่มีข้อมูล</Grid> :\r\n                        <Grid item xs={12} className={classes.list}>\r\n                            {pmr1Form && pmr1Form.length > 0 ? pmr1Form.map((itm, idx) => {\r\n                                if (itm.date) {\r\n                                    const dataSplit = itm.date.split(\"/\")\r\n                                    itm.dateDisplay = convertDateTimeToDisplayDate(new Date(dataSplit[2], dataSplit[1] - 1, dataSplit[0]), \"d MMM yyyy\")\r\n                                }\r\n\r\n                                return (\r\n                                    <ListItem\r\n                                        divider\r\n                                        button\r\n                                        key={`${itm.pmr1ID}-${idx}`}\r\n                                        classes={{ gutters: classes.guttersListItem }}\r\n                                        onClick={onShowDetail(itm)}\r\n                                    >\r\n                                        <Grid container justify=\"space-between\">\r\n                                            <Grid className={classes.containerTxtResult}>\r\n                                                <label className={classes.txtResult}>{`รหัสคำร้อง : ${itm.pmr1ID && itm.pmr1ID}`}</label><br />\r\n                                                <label className={classes.txtResult}>{`วันที่ : ${itm.dateDisplay && itm.dateDisplay}`}</label>\r\n                                            </Grid>\r\n                                            <Grid item>\r\n                                                {itm.status === 1 &&\r\n                                                    <Tooltip title=\"แก้ไข\" placement=\"bottom\">\r\n                                                        <IconButton\r\n                                                            className={classes.iconButton}\r\n                                                            onClick={onEdit(itm)}\r\n                                                        >\r\n                                                            <EditIcon className={classes.icon} />\r\n                                                        </IconButton>\r\n                                                    </Tooltip>\r\n                                                }\r\n                                                {itm.status === 1 &&\r\n                                                    <Tooltip title=\"ลบ\" placement=\"bottom\">\r\n                                                        <IconButton\r\n                                                            className={classes.iconButton}\r\n                                                            onClick={onDelete(itm)}\r\n                                                        >\r\n                                                            <DeleteIcon className={classes.icon} />\r\n                                                        </IconButton>\r\n                                                    </Tooltip>\r\n                                                }\r\n                                            </Grid>\r\n                                        </Grid>\r\n                                    </ListItem>\r\n                                )\r\n                            }) : <div style={{ padding: '15px' }}>ไม่พบข้อมูล</div>}\r\n                        </Grid>\r\n                    }\r\n                </Scrollbars>\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    // iconEdit: {\r\n    //     fontSize: '18px'\r\n    // },\r\n    root: {\r\n        width: '100%',\r\n        height: '100%'\r\n    },\r\n    container: {\r\n        height: 'calc(100% - 45px)'\r\n    },\r\n    guttersListItem: {\r\n        padding: \"5px 10px\",\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            [`& input`]: {\r\n                padding: \"5px 20px\",\r\n            },\r\n        },\r\n    },\r\n    // list: {\r\n    //     overflow: 'auto',\r\n    //     maxHeight: 'calc(100% - 45px)',\r\n    //     position: 'absolute',\r\n    //     width: '100%'\r\n    // },\r\n    containerTxtResult: {\r\n        maxWidth: 'calc(100% - 70px)',\r\n        textOverflow: 'ellipsis',\r\n        whiteSpace: 'nowrap',\r\n        overflow: 'hidden',\r\n    },\r\n    txtResult: {\r\n        fontSize: '14px',\r\n        margin: '0px',\r\n        lineHeight: '24px'\r\n    },\r\n    iconButton: {\r\n        height: \"35px\",\r\n        width: \"35px\",\r\n        marginTop: \"6px\"\r\n    },\r\n    icon: {\r\n        marginTop: '-6px'\r\n    },\r\n}))(EditPmrView)\r\n","import React, { Component,Fragment } from 'react'\r\nimport Grid from '@material-ui/core/Grid';\r\nimport Button from '../../../../../../../Controls/Containers/Button';\r\nimport {BTN} from '../../../../../../../Constants/Constants'\r\nexport default class ViewPmrView extends Component {\r\n    constructor(props){\r\n        super(props);\r\n        this.state ={\r\n            dataDetail:props.dataDetail\r\n        }\r\n    }\r\n  render() {\r\n    //   const {dataDetail} = this.state\r\n      const {children,onClickBack,onClickNext, formStep,exportPDF} = this.props\r\n    return (\r\n        <Fragment>\r\n            <Grid container spacing={16} style={{ color:\"#00000061\", padding: '10px' }} key={'container'}>\r\n                {children}\r\n            </Grid>\r\n            <Grid container justify=\"center\" spacing={24}  style={{ marginTop:\"20px\", marginBottom:\"10px\"}}>\r\n                    <Grid item>\r\n                        <Button\r\n                            // color=\"black\"\r\n                            label={BTN.TH.BACK}\r\n                            onClick={onClickBack}\r\n                            // className={classes.btnRegister}\r\n                        />\r\n                    </Grid>\r\n                    {formStep !== 4 && <Grid item>\r\n                        <Button\r\n                            type=\"submit\"\r\n                            label={BTN.TH.NEXT}\r\n                            onClick={onClickNext}\r\n                            // className={classes.btnLogin}\r\n                        />\r\n                    </Grid>}\r\n                    <Grid item>\r\n\t\t\t\t\t\t<Button\r\n\t\t\t\t\t\t\t// type=\"submit\"\r\n\t\t\t\t\t\t\tonClick={exportPDF}\r\n\t\t\t\t\t\t\tlabel={BTN.TH.EXPORT_PDF}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t</Grid>\r\n                </Grid>\r\n        </Fragment>\r\n    )\r\n  }\r\n}\r\n","import React, { Component,Fragment } from 'react'\r\nimport Grid from '@material-ui/core/Grid';\r\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\r\nimport Checkbox from '@material-ui/core/Checkbox';\r\nimport Radio from '@material-ui/core/Radio';\r\nimport RadioGroup from '@material-ui/core/RadioGroup';\r\nimport { withStyles } from '@material-ui/core';\r\n// import InputLabel from '@material-ui/core/InputLabel';\r\n\r\nclass ViewPmrOneView extends Component {\r\n    genListType = () =>{\r\n        const {dataView,resultType, classes} = this.props\r\n        if(!resultType) return\r\n        let listType = []\r\n        let nameType = dataView.nameType?dataView.nameType.split(\"|\"):[];\r\n        resultType['result'].map((nametype, index) => {\r\n            let checkedType = nameType.find((element)=>{\r\n                return element === nametype.value?true:false\r\n            })\r\n            if (nametype.value === \"9\") { \r\n                listType.push (\r\n                    <Fragment key={`${nametype.value}-${index}`}>\r\n                        <Grid xs={6} item key={`${nametype.value}-${index}`}>\r\n                        <FormControlLabel disabled classes={{label: classes.colValue}} control={<Checkbox classes={{root: classes.checkbox, checked: classes.checkboxChecked}} checked={checkedType} />} label={nametype.name} />\r\n                        </Grid>\r\n                        <Grid xs={6} item style={{ top: '10px', position: 'relative' }}>\r\n                            <label className={classes.colValue} style={{fontSize: '0.875rem'}}>{checkedType?dataView.other:\"\"}</label>\r\n                        </Grid>\r\n                   </Fragment>\r\n                )\r\n            } else {\r\n                listType.push (\r\n                    <Grid xs={6} key={`${nametype.value}-${index}`} item>\r\n                        <FormControlLabel disabled classes={{label: classes.colValue}} control={<Checkbox classes={{root: classes.checkbox, checked: classes.checkboxChecked}} checked={checkedType} />} label={nametype.name} />\r\n                    </Grid>\r\n                )\r\n            }\r\n\r\n            return true\r\n        })\r\n        return listType\r\n    }\r\n    genTagRadio = ()=>{\r\n        const {radioGroupTwo, classes} = this.props\r\n        if(!radioGroupTwo) return\r\n        let listRadio = []\r\n        radioGroupTwo.map((item,index)=>{\r\n            return    listRadio.push(<FormControlLabel key={`${item.value}${item.index}`} disabled  classes={{label: classes.colValue}} value={item.value} control={<Radio classes={{root: classes.radio, checked: classes.radioChecked}}/>} label={item.name}  />)\r\n\r\n        })\r\n        return listRadio\r\n    }\r\n  render() {\r\n      const {dataView, classes} = this.props\r\n    return (\r\n        <Fragment>\r\n        <Grid item xs={6}>\r\n            <label className={classes.colLabel}>เขียนที่</label>\r\n        </Grid>\r\n        <Grid item xs={6}>\r\n            <label className={classes.colValue}>{dataView.parameterAt?dataView.parameterAt:\"-\"}</label>\r\n        </Grid>\r\n        <Grid item xs={6}>\r\n            <label className={classes.colLabel}>รหัสคำร้อง</label>\r\n        </Grid>\r\n        <Grid item xs={6}>\r\n            <label className={classes.colValue}>{dataView.REQNO}</label>\r\n        </Grid>\r\n        <Grid item xs={6}>\r\n            <label className={classes.colLabel}>วันที่</label>\r\n        </Grid>\r\n        <Grid item xs={6}>\r\n            <label className={classes.colValue}>{dataView.date}</label>\r\n        </Grid>\r\n        <Grid item xs={6}>\r\n            <label className={classes.colLabel}>ข้าพเจ้า</label>\r\n        </Grid>\r\n        <Grid item xs={6}>\r\n            <label className={classes.colValue}>{dataView.parameterName}</label>\r\n        </Grid>\r\n        <Grid item xs={6}>\r\n            <label className={classes.colLabel}>เลขประจำตัวประชาชน</label>\r\n        </Grid>\r\n        <Grid item xs={6}>\r\n            <label className={classes.colValue}>{dataView.parameterIDCard?dataView.parameterIDCard:\"-\"}</label>\r\n        </Grid>\r\n        <Grid item xs={6}>\r\n            <Grid container  spacing={0}>\r\n                <Grid item xs={5}>\r\n                    <label className={classes.colLabel}>บ้านเลขที่</label>\r\n                </Grid>\r\n                <Grid item xs={1}>\r\n                    <label className={classes.colValue}>{dataView.parameterHouseNo?dataView.parameterHouseNo:\"-\"}</label>\r\n                </Grid>\r\n            </Grid>\r\n        </Grid>\r\n        <Grid item xs={6}>\r\n            <Grid container  spacing={0}>\r\n                <Grid item xs={3}>\r\n                    <label className={classes.colLabel}>หมู่ที่</label>\r\n                </Grid>\r\n                <Grid item xs={3}>\r\n                    <label className={classes.colValue}>{dataView.parameterMoo?dataView.parameterMoo:\"-\"}</label>\r\n                </Grid>\r\n            </Grid>\r\n        </Grid>\r\n        <Grid item xs={6}>\r\n            <label className={classes.colLabel}>ตรอก/ซอย</label>\r\n        </Grid>\r\n        <Grid item xs={6}>\r\n            <label className={classes.colValue}>{dataView.parameterSoi?dataView.parameterSoi:\"-\"}</label>\r\n        </Grid>\r\n        <Grid item xs={6}>\r\n            <label className={classes.colLabel}>ถนน</label>\r\n        </Grid>\r\n        <Grid item xs={6}>\r\n            <label className={classes.colValue}>{dataView.parameterRoad?dataView.parameterRoad:\"-\"}</label>\r\n        </Grid>\r\n        <Grid item xs={6}>\r\n            <label className={classes.colLabel}>จังหวัด</label>\r\n        </Grid>\r\n        <Grid item xs={6}>\r\n            <label className={classes.colValue}>{dataView.province?dataView.province:\"-\"}</label>\r\n        </Grid>\r\n        <Grid item xs={6}>\r\n            <label className={classes.colLabel}>เขต/อำเภอ</label>\r\n        </Grid>\r\n        <Grid item xs={6}>\r\n            <label className={classes.colValue}>{dataView.district?dataView.district:\"-\"}</label>\r\n        </Grid>\r\n        <Grid item xs={6}>\r\n            <label className={classes.colLabel}>แขวง/ตำบล</label>\r\n        </Grid>\r\n        <Grid item xs={6}>\r\n            <label className={classes.colValue}>{dataView.subDistrict?dataView.subDistrict:\"-\"}</label>\r\n        </Grid>\r\n        <Grid item xs={6}>\r\n            <label className={classes.colLabel}>รหัส</label>\r\n        </Grid>\r\n        <Grid item xs={6}>\r\n            <label className={classes.colValue}>{dataView.parameterZipCode?dataView.parameterZipCode:\"-\"}</label>\r\n        </Grid>\r\n        <Fragment>\r\n             {this.genListType()}\r\n        </Fragment>\r\n        <Grid xs={12} item><label className={classes.colLabel}>มีความประสงค์</label></Grid>\r\n        <Grid xs={12} item>\r\n            <RadioGroup\r\n                aria-label=\"Gender\"\r\n                // name=\"gender1\"\r\n                // className={classes.group}\r\n                value={dataView.parameterRadioTwo}\r\n                // onChange={this.handleChange}\r\n            >\r\n                {this.genTagRadio()}\r\n            </RadioGroup>\r\n        </Grid>\r\n        <Grid xs={12} item>\r\n            <label className={classes.colValue}>{`ตามกฏกระทรวงให้ใช้บังคับผังเมืองรวมกรุงเทพมหานครต่อเจ้าพนักงานท้องถิ่น`}</label>\r\n        </Grid>     \r\n    </Fragment>\r\n    )\r\n  }\r\n}\r\n\r\nexport default withStyles(theme=>({\r\n    colLabel: {\r\n        fontWeight: 'bold',\r\n        color: 'black !important'\r\n    },\r\n    colValue: {\r\n        color: 'black !important'\r\n    },\r\n    radio: {\r\n        color: '#494949 !important',\r\n        '&$disabled': {\r\n            color: '#494949 !important',\r\n        }\r\n        \r\n    },\r\n    radioChecked: {\r\n        \r\n    },\r\n    checkbox: {\r\n        color: '#494949 !important',\r\n        '&$disabled': {\r\n            color: '#494949 !important',\r\n        }\r\n        \r\n    },\r\n    checkboxChecked: {\r\n        \r\n    }\r\n}))(ViewPmrOneView);","import React, { Component } from 'react'\r\n\r\n//import servive - utils\r\nimport { fetchGet_ } from '../../../../../../../Utilities/ServiceUtils'\r\n\r\n//import component\r\nimport ViewPmeOneView from '../../.././../../../../Presentationals/Web/Panel/Menu/MenuContent/PMR1/ViewPmr/ViewPmrOneView'\r\n\r\nexport default class ViewPmrOne extends Component {\r\n    constructor(props){\r\n        super(props);\r\n        this.state ={\r\n            listType:null,\r\n            dataViewResult:props.dataView,\r\n            radioGroupTwo:null\r\n        }\r\n    }\r\n\r\n    componentDidMount(){\r\n        this.genListType()\r\n    }\r\n\r\n    genListType = () => {\r\n        const {dataView} = this.props\r\n        const {dataViewResult} = this.state\r\n        fetchGet_(`${process.env.REACT_APP_GET_LUTNAME_TYPE}`).then(res => {\r\n            if (!res.ok) {\r\n                throw res.status;\r\n            }\r\n            return res.json();\r\n        })\r\n        .then(result => {\r\n            this.setState({\r\n                listType:result\r\n            })\r\n        })\r\n        .catch(ex => {\r\n            console.log('ex fetchAddMajorTopic', ex)\r\n        })\r\n\r\n        fetchGet_(`${process.env.REACT_APP_LU_SUBDISTRICT}?provinceid=${dataView.province}&districtid=${dataView.district}`).then(res => {\r\n            if (!res.ok) {\r\n                throw res.status;\r\n            }\r\n\r\n            return res.json();\r\n        })\r\n        .then(result => {\r\n            if(!result) return\r\n            let subdistrictDisplay = null\r\n            result['result'].map((item)=>{\r\n                if(item.value === dataView.subDistrict) {\r\n                    subdistrictDisplay = item.name\r\n                }\r\n            })\r\n\r\n            Object.assign(dataViewResult,{'subDistrict':subdistrictDisplay})\r\n        })\r\n        .catch(ex => {\r\n            console.log('ex fetchAddMajorTopic', ex)\r\n        })\r\n\r\n        fetchGet_(`${process.env.REACT_APP_LU_DISTRICT}?provinceid=${dataView.province}`).then(res => {\r\n            if (!res.ok) {\r\n                throw res.status;\r\n            }\r\n\r\n            return res.json();\r\n        }).then(result => {\r\n            if(!result) return\r\n            let districtDisplay = null\r\n            result['result'].map((item)=>{\r\n                if(item.value === dataView.district) {\r\n                    districtDisplay = item.name\r\n                }\r\n                \r\n            })\r\n\r\n            Object.assign(dataViewResult,{'district':districtDisplay})\r\n        })\r\n        .catch(ex => {\r\n            console.log('ex fetchAddMajorTopic', ex)\r\n        })\r\n\r\n        fetchGet_(`${process.env.REACT_APP_LU_PROVINCE}`).then(res => {\r\n            if (!res.ok) {\r\n                throw res.status;\r\n            }\r\n            return res.json();\r\n        })\r\n        .then(result => {\r\n            if(!result) return\r\n            let provinceDisplay = null\r\n            result['result'].map((item)=>{\r\n                if(item.value === dataView.province) {\r\n                    provinceDisplay = item.name\r\n                }\r\n            })\r\n\r\n            Object.assign(dataViewResult,{'province':provinceDisplay})\r\n        })\r\n        .catch(ex => {\r\n            console.log('ex fetchAddMajorTopic', ex)\r\n        })\r\n\r\n        fetchGet_(process.env.REACT_APP_GET_LUTOBJECTIVE).then(res => {\r\n            if (!res.ok) {\r\n                throw res.status;\r\n            }\r\n            return res.json();\r\n        })\r\n        .then(result => {\r\n            this.setState({\r\n                radioGroupTwo:result.result\r\n            })\r\n        })\r\n        .catch(ex => {\r\n            console.log('ex fetchAddMajorTopic', ex)\r\n        })\r\n    }\r\n\r\n    render() {\r\n        const {listType,dataViewResult,radioGroupTwo} = this.state\r\n        return (\r\n            <ViewPmeOneView\r\n                dataView={dataViewResult}\r\n                resultType={listType}\r\n                radioGroupTwo={radioGroupTwo}\r\n            >\r\n            </ViewPmeOneView>\r\n        )\r\n  }\r\n}\r\n","import React, { Component } from 'react'\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Grid from '@material-ui/core/Grid';\r\n// import FormLabel from '@material-ui/core/FormLabel';\r\n// import FormControlLabel from '@material-ui/core/FormControlLabel';\r\nimport classnames from 'classnames';\r\n\r\n class ViewPmrTwoView extends Component {\r\n  render() {\r\n      const {classes,dataView} = this.props\r\n    return (\r\n        <Grid container >\r\n        {dataView.map((chanode, index) => (\r\n            <Grid container key={`chanode-form-${index}`} className={classes.form}>\r\n\r\n                <Grid container wrap=\"nowrap\" className={classes.containnerRow} >\r\n                    <Grid item xs={2}>\r\n                        <div className={classnames(classes.divLabel, classes.colLabel)}>ในที่ดิน</div>\r\n                    </Grid>\r\n                    <Grid item xs={3}>\r\n                        <div className={classnames(classes.divLabel, classes.colLabel)}>โฉนดเลขที่</div>\r\n                    </Grid>\r\n                    <Grid item xs={7}>\r\n                        <label className={classes.divLabel}>{chanode.chanodeno}</label>\r\n                    </Grid>\r\n                </Grid>\r\n\r\n                <Grid container wrap=\"nowrap\" className={classes.containnerRow} >\r\n                    <Grid item xs={2} />\r\n                    <Grid item xs={3}>\r\n                        <div className={classnames(classes.divLabel, classes.colLabel)}>หน้าสำรวจ</div>\r\n                    </Grid>\r\n                    <Grid item xs={7}>\r\n                    <label className={classes.divLabel}>{chanode.surveyno}</label>\r\n                    </Grid>\r\n                </Grid>\r\n\r\n                <Grid container wrap=\"nowrap\" className={classes.containnerRow} >\r\n                    <Grid item xs={2} />\r\n                    <Grid item xs={3}>\r\n                        <div className={classnames(classes.divLabel, classes.colLabel)}>เลขที่ดิน</div>\r\n                    </Grid>\r\n                    <Grid item xs={7}>\r\n                        <label className={classes.divLabel}>{chanode.landno}</label>\r\n                    </Grid>\r\n                </Grid>\r\n\r\n                <Grid container wrap=\"nowrap\" direction=\"column\" className={classes.containnerMultiRow} >\r\n                    <Grid item xs={12}>\r\n                        <div className={classnames(classes.divLabel, classes.colLabel)} style={{textAlign: 'left'}}>ขนาดแปลงที่ดิน</div>\r\n                    </Grid>\r\n\r\n                    <Grid container style={{ height: '200px' }}>\r\n                        <Grid item xs={3}>\r\n                            <label className={classes.divLabel}>{chanode.chanoderai}</label>\r\n                        </Grid>\r\n                        <Grid item xs={1}>\r\n                            <div className={classes.divLabelFullWidth}>ไร่</div>\r\n                        </Grid>\r\n                        <Grid item xs={3} classes={{ \"grid-xs-3\": classes.customGrid3 }}>\r\n                            <label className={classes.divLabel}>{chanode.chanodengan}</label>\r\n                        </Grid>\r\n                        <Grid item xs={1} classes={{ \"grid-xs-1\": classes.customGrid1 }}>\r\n                            <div className={classes.divLabelFullWidth}>งาน</div>\r\n                        </Grid>\r\n                        <Grid item xs={3}>\r\n                            <label className={classes.divLabel}>{chanode.chanodewa}</label>\r\n                        </Grid>\r\n                        <Grid item xs={1}>\r\n                            <div className={classes.divLabelFullWidth}>ตร.ว.</div>\r\n                        </Grid>\r\n                    </Grid>\r\n                </Grid>\r\n\r\n                <Grid container wrap=\"nowrap\" direction=\"column\" className={classes.containnerMultiRow} >\r\n                    <Grid item xs={12} >\r\n                        <div style={{textAlign: 'left'}} className={classnames(classes.divLabel, classes.colLabel)}>ใช้ประโยชน์</div>\r\n                    </Grid>\r\n                    <Grid container style={{ height: '200px' }}>\r\n                        <Grid item xs={3}>\r\n                            <label className={classes.divLabel}>{chanode.userai}</label>\r\n                        </Grid>\r\n                        <Grid item xs={1}>\r\n                            <div className={classes.divLabelFullWidth}>ไร่</div>\r\n                        </Grid>\r\n                        <Grid item xs={3} classes={{ \"grid-xs-3\": classes.customGrid3 }} >\r\n                            <label className={classes.divLabel}>{chanode.usengan}</label>\r\n                        </Grid>\r\n                        <Grid item xs={1} classes={{ \"grid-xs-1\": classes.customGrid1 }}>\r\n                            <div className={classes.divLabelFullWidth}>งาน</div>\r\n                        </Grid>\r\n                        <Grid item xs={3}>\r\n                            <label className={classes.divLabel}>{chanode.usewa}</label>\r\n                        </Grid>\r\n                        <Grid item xs={1}>\r\n                            <div className={classes.divLabelFullWidth}>ตร.ว.</div>\r\n                        </Grid>\r\n                    </Grid>\r\n                </Grid>\r\n            \r\n            </Grid>\r\n         ))} \r\n    </Grid>\r\n      )\r\n  }\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n\r\n    },\r\n    rootForm: {\r\n        width: '95%',\r\n        height: '100%'\r\n    },\r\n    form: {\r\n        borderWidth: '1px',\r\n        borderStyle: 'solid',\r\n        borderColor: 'black',\r\n        backgroundColor: \"#d9d9d9\",\r\n        padding: '8px',\r\n        margin: '10px',\r\n        width:'91%'\r\n    },\r\n    containnerRow: {\r\n        height: '50px',\r\n        width: '100%',\r\n        textAlign: 'center'\r\n        // marginBottom: '15px'\r\n    },\r\n    containnerMultiRow: {\r\n        height: '100px',\r\n        width: '100%',\r\n        textAlign: 'center'\r\n        // marginBottom: '15px'\r\n    },\r\n    colLabel: {\r\n        fontWeight: 'bold'\r\n    },\r\n    divLabel: {\r\n        lineHeight: '50px',\r\n        color: 'black !important',\r\n    },\r\n    divLabelFullWidth: {\r\n        lineHeight: '50px',\r\n        width: '100%',\r\n        textAlign: 'center',\r\n        color: 'black !important',\r\n        fontWeight: 'bold'\r\n    },\r\n    divFooter: {\r\n        marginTop: \"30px\"\r\n    },\r\n    txtError: {\r\n        fontSize: '14px',\r\n        color: 'red'\r\n    },\r\n    customGrid3: {\r\n        maxWidth: '22%',\r\n    },\r\n    customGrid1: {\r\n        marginRight: '5px',\r\n    }\r\n}))(ViewPmrTwoView)","import React, { Component } from 'react'\r\n\r\n//import component\r\nimport ViewPmrTwoView from '../../.././../../../../Presentationals/Web/Panel/Menu/MenuContent/PMR1/ViewPmr/ViewPmrTwoView'\r\n\r\nexport default class ViewPmrTwo extends Component {\r\n    render() {\r\n        const {dataView} = this.props\r\n\t\treturn (\r\n\t\t\t<ViewPmrTwoView dataView={dataView} />\r\n\t\t)\r\n    }\r\n}\r\n","import React, { Component,Fragment } from 'react'\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Grid from '@material-ui/core/Grid'\r\nclass ViewPmrThreeView extends Component {\r\n  render() {\r\n      const {classes,dataView,lupZone,lupColor,lupUse,lupSubZone,luActivity,district,subDistrict} = this.props\r\n    return (\r\n        <Fragment >\r\n        <Grid container spacing={16} style={{margin:'0px'}}>\r\n            <Grid item xs={6}>\r\n                <label className={classes.colLabel}>อยู่ในที่ดินประเภท</label>\r\n            </Grid>\r\n            <Grid item xs={6}>\r\n                <label className={classes.colValue}>{`${lupZone} (${lupColor}) ${lupUse}`}</label>\r\n            </Grid>\r\n            <Grid item xs={6}>\r\n                <label className={classes.colLabel}>บริเวณ</label>\r\n            </Grid>\r\n            <Grid item xs={6}>\r\n                <label className={classes.colValue}>{lupSubZone}</label>\r\n            </Grid>\r\n            <Grid item xs={6}>\r\n                <label className={classes.colLabel}>เพื่อกิจการ</label>\r\n            </Grid>\r\n            <Grid item xs={6}>\r\n                <label className={classes.colValue}>{luActivity}</label>            \r\n            </Grid>\r\n            <Grid item xs={6}>\r\n                <label className={classes.colLabel}>บ้านเลขที่</label>\r\n            </Grid>\r\n            <Grid item xs={6}>\r\n                <label className={classes.colValue}>{dataView.houseNo?dataView.houseNo:\"-\"}</label>                        \r\n            </Grid>\r\n            <Grid item xs={6}>  \r\n                <label className={classes.colLabel}>หมู่</label>\r\n            </Grid>\r\n            <Grid item xs={6}>\r\n                <label className={classes.colValue}>{dataView.villageNo?dataView.villageNo:\"-\"}</label>                        \r\n            </Grid>\r\n            <Grid item xs={6}>\r\n                <label className={classes.colLabel}>ตรอก/ซอย</label>\r\n            </Grid>\r\n            <Grid item xs={6}>\r\n                <label className={classes.colValue}>{dataView.alley?dataView.alley:\"-\"}</label> \r\n            </Grid>\r\n            <Grid item xs={6}>\r\n                <label className={classes.colLabel}>ถนน</label>\r\n            </Grid>\r\n            <Grid item xs={6}>\r\n                <label className={classes.colValue}>{dataView.road?dataView.road:\"-\"}</label> \r\n            </Grid>\r\n            <Grid item xs={6}>\r\n                <label className={classes.colLabel}>จังหวัด</label>\r\n            </Grid>\r\n            <Grid item xs={6}>\r\n                <label className={classes.colValue}>กรุงเทพมหานคร</label> \r\n            </Grid>\r\n            <Grid item xs={6}>\r\n                <label className={classes.colLabel}>เขต</label>\r\n            </Grid>\r\n            <Grid item xs={6}>\r\n                <label className={classes.colValue}>{district?district:\"-\"}</label> \r\n            </Grid>\r\n            <Grid item xs={6}>\r\n                <label className={classes.colLabel}>แขวง</label>\r\n            </Grid>\r\n            <Grid item xs={6}>\r\n                <label className={classes.colValue}>{subDistrict?subDistrict:\"-\"}</label> \r\n            </Grid>\r\n      </Grid>\r\n      </Fragment> )\r\n  }\r\n}\r\n\r\nexport default withStyles(theme=>({\r\n    colLabel: {\r\n        fontWeight: 'bold',\r\n        color: 'black !important'\r\n    },\r\n    colValue: {\r\n        color: 'black !important'\r\n    },\r\n}))(ViewPmrThreeView);\r\n","import React, { Component } from 'react'\r\nimport { compose } from \"recompose\";\r\nimport { connect } from \"react-redux\";\r\n\r\n//import component\r\nimport ViewPmrThreeView from '../../.././../../../../Presentationals/Web/Panel/Menu/MenuContent/PMR1/ViewPmr/ViewPmrThreeView'\r\n\r\n//import service - utils\r\nimport { fetchGet_ } from '../../../../../../../Utilities/ServiceUtils'\r\n\r\nclass ViewPmrThree extends Component {\r\n    constructor(){\r\n        super()\r\n        this.state = {\r\n            luActivity:null,\r\n            district:null,\r\n            subDistrict:null\r\n        }\r\n    }\r\n\r\n    componentDidMount(){\r\n        this.genActivity()\r\n    }\r\n\r\n    genActivity = async ()=>{\r\n        const {dataView} = this.props\r\n        await fetchGet_(process.env.REACT_APP_LU_ACTIVITY).then(res => {\r\n            if (!res.ok) {\r\n                throw res.status;\r\n            }\r\n            return res.json();\r\n        }).then( result => {\r\n            result['result'].map((item)=>{\r\n                if(item.value === dataView.forBusiness.toString()){\r\n                    this.setState({\r\n                        luActivity:item.name\r\n                    })\r\n                }\r\n\r\n                return true\r\n            })\r\n        }).catch(ex => {\r\n                console.log('ex fetchAddMajorTopic', ex)\r\n        })\r\n\r\n        fetchGet_(`${process.env.REACT_APP_LU_SUBDISTRICT}?provinceid=10&districtid=${dataView.district}`).then(res => {\r\n            if (!res.ok) {\r\n                throw res.status;\r\n            }\r\n            return res.json();\r\n        }).then(result => {\r\n            if(!result) return\r\n            result['result'].map((item)=>{\r\n                if(item.value === dataView.subDistrict) {\r\n                    this.setState({\r\n                        subDistrict:item.name\r\n                    })\r\n                }\r\n            })\r\n        }).catch(ex => {\r\n                console.log('ex fetchAddMajorTopic', ex)\r\n        })\r\n\r\n        fetchGet_(`${process.env.REACT_APP_LU_DISTRICT}?provinceid=10`).then(res => {\r\n            if (!res.ok) {\r\n                throw res.status;\r\n            }\r\n            return res.json();\r\n        }).then(result => {\r\n            if(!result) return\r\n            result['result'].map((item)=>{\r\n                if(item.value === dataView.district) {\r\n                    this.setState({\r\n                        district:item.name\r\n                    })\r\n                }\r\n                \r\n            })\r\n        }).catch(ex => {\r\n                console.log('ex fetchAddMajorTopic', ex)\r\n        })\r\n    }\r\n    render() {\r\n        const {submitPmrRdc,dataView} = this.props\r\n        const {luActivity,district,subDistrict} = this.state\r\n        return (\r\n            <ViewPmrThreeView \r\n            dataView={dataView}\r\n            stepThree={submitPmrRdc.stepThree}\r\n            lupZone={submitPmrRdc.stepThree.lupZone}\r\n            lupSubZone={submitPmrRdc.stepThree.lupSubZone}\r\n            lupColor={submitPmrRdc.stepThree.lupColor}\r\n            lupUse={submitPmrRdc.stepThree.lupUse}\r\n            luActivity={luActivity}\r\n            district={district}\r\n            subDistrict={subDistrict}\r\n            />\r\n        )\r\n    }\r\n}\r\n\r\nconst mapStateToProps = state => ({\r\n    submitPmrRdc: state.submitPmr,\r\n})\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    \r\n});\r\n\r\nconst enhance = compose(\r\n    connect(\r\n        mapStateToProps,\r\n        mapDispatchToProps\r\n    )\r\n);\r\n\r\nexport default enhance(ViewPmrThree);","import React, { Component } from 'react'\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\r\n// import Checkbox from '@material-ui/core/Checkbox';\r\nimport Radio from '@material-ui/core/Radio';\r\nimport RadioGroup from '@material-ui/core/RadioGroup';\r\nimport {numberWithCommas} from '../../../../../../../Utilities/Utils'\r\n\r\nclass ViewPmrFourView extends Component {\r\n  genTagRadio = ()=>{\r\n\tconst {landuseData, classes,dataView} = this.props\r\n    if(!landuseData) return\r\n    let listRadio = []\r\n    landuseData.map((item,index)=>{\r\n\t\tif(Number(item.ID) === 5){ //other\r\n\t\t\treturn     listRadio.push(<FormControlLabel key={`${item.value}${item.index}`} classes={{label: classes.label}} disabled value={item.value} control={<Radio classes={{root: classes.radio, checked: classes.radioChecked}} />} label={ (dataView.luDetail) ?  `${item.name} : ${dataView.luDetail}` : `${item.name}` }  />)  \r\n\t\t}else{\r\n\t\t\treturn    listRadio.push(<FormControlLabel key={`${item.value}${item.index}`} classes={{label: classes.label}} disabled value={item.value} control={<Radio classes={{root: classes.radio, checked: classes.radioChecked}} />} label={item.name}  />)\r\n\t\t}\r\n       \r\n\r\n    })\r\n    return listRadio\r\n}\r\n  render() {\r\n    const {classes,dataView,farStandard,osrStandard,} = this.props\r\n    return (\r\n      <Grid container spacing={0} className={classes.label}>\r\n\t\t\t\t<Grid container>\r\n\t\t\t\t\t<Grid item xs={12}>\r\n\t\t\t\t\t\t<div style={{ margin: '10px' }} className={classes.divLabel}>\r\n\t\t\t\t\t\t\tโดยมีรายละเอียดเกี่ยวกับการใช้ประโยชน์ที่ดินตามแผนที่สังเขป ดังนี้\r\n            \t\t\t</div>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t\t<Grid item xs={12} >\r\n\t\t\t\t\t\t<div className={classes.divLabel}>{`1. การใช้ประโยชน์ที่ดิน`}</div>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</Grid>\r\n\r\n\t\t\t\t<Grid container direction=\"column\" wrap=\"nowrap\" >\r\n\t\t\t\t\t<Grid item xs={12} className={`${classes.tab1} ${classes.containnerRowTxt}`} style={{ marginTop: '10px' }}>\r\n\t\t\t\t\t\t<div className={classes.divLabel}>{`1.1 เป็น`}</div>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t\t<Grid item xs={12} className={classes.tab2}>\r\n          <RadioGroup\r\n                aria-label=\"Gender\"\r\n                // name=\"gender1\"\r\n                // className={classes.group}\r\n                value={dataView.landuseRadio}\r\n                // onChange={this.handleChange}\r\n            >\r\n\t\t\t\t\t\t{this.genTagRadio()}            \r\n            </RadioGroup>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</Grid>\r\n\r\n\t\t\t\t<Grid container wrap=\"nowrap\">\r\n\t\t\t\t\t<Grid item xs={12} className={classes.tab1}>\r\n\t\t\t\t\t\t<div><label className={classes.divLabel}>1.2 พื้นที่ดิน</label> <u>{numberWithCommas(dataView.landArea.toString())}</u> <label className={classes.divLabel}>ตารางเมตร</label> </div>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</Grid>\r\n\r\n\t\t\t\t<Grid container wrap=\"nowrap\" className={classes.containnerRow} >\r\n\t\t\t\t\t<Grid item xs={6} className={classes.tab1}>\r\n\t\t\t\t\t\t<div className={classes.divLabel}>1.3 พื้นที่ประกอบการ</div>\r\n\t\t\t\t\t\t<div style={{ paddingLeft: \"25px\" }} className={classes.divLabel}>(ตารางเมตร)</div>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t\t<Grid item xs={6}>\r\n\t\t\t\t\t\t<div>{dataView.activateArea}</div>\r\n            \r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</Grid>\r\n\r\n\t\t\t\t<Grid container wrap=\"nowrap\" className={classes.containnerRow} >\r\n\t\t\t\t\t<Grid item xs={6} className={classes.tab1}>\r\n\t\t\t\t\t\t<div className={classes.divLabel}>1.4 พื้นที่อาคารรวม</div>\r\n\t\t\t\t\t\t<div style={{ paddingLeft: \"25px\" }} className={classes.divLabel}>(ตารางเมตร)</div>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t\t<Grid item xs={6}>\r\n\t\t\t\t\t\t<div>{dataView.allArea}</div>\r\n            \r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</Grid>\r\n\r\n\t\t\t\t<Grid container wrap=\"nowrap\" className={classes.containnerRow} >\r\n\t\t\t\t\t<Grid item xs={12} className={classes.tab1}>\r\n\t\t\t\t\t\t<div className={classes.divLabel}>1.5 อัตราส่วนพื้นที่อาคารรวมต่อพื้นที่ดิน</div>\r\n\t\t\t\t\t\t<div style={{ paddingLeft: '25px' }}>\r\n\t\t\t\t\t\t\t<label>{`(FAR = ${farStandard ? farStandard : \"-\"}) `}</label>\r\n\t\t\t\t\t\t\t<label>{dataView.far}</label>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</Grid>\r\n\r\n\t\t\t\t<Grid container wrap=\"nowrap\" className={classes.containnerRow} >\r\n\t\t\t\t\t<Grid item xs={12} className={classes.tab1}>\r\n\t\t\t\t\t\t<div className={classes.divLabel}>1.6 อัตราส่วนของที่ว่างต่อพื้นที่อาคารรวม</div>\r\n\t\t\t\t\t\t<div style={{ paddingLeft: '25px' }}>\r\n              <label>{`(OSR = ${osrStandard ? osrStandard : \"-\"}) `}</label>\r\n\t\t\t\t\t\t\t<label>{dataView.osr}</label>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</Grid>\r\n\r\n\t\t\t\t<Grid container wrap=\"nowrap\" direction=\"column\" style={{ marginTop: '15px' }} >\r\n\t\t\t\t\t<Grid item xs={12} container className={classes.tab1}>\r\n\t\t\t\t\t\t<div className={classes.divLabel}>1.7 ร้อยละพื้นที่ว่างตามกฎหมายควบคุม</div>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t\t<Grid item xs={12} container className={classes.tab2}>\r\n\t\t\t\t\r\n\t\t\t\t\t\t\t<label>{dataView.bdclOS}</label>\r\n            \r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</Grid>\r\n\r\n\t\t\t\t<Grid container wrap=\"nowrap\" className={classes.containnerRowTxt} style={{marginTop: '15px'}}>\r\n\t\t\t\t\t<Grid item xs={12} className={classes.tab1}>\r\n\t\t\t\t\t\t<div><label className={classes.divLabel}>1.8 พื้นที่น้ำซึมผ่าน</label> <u>{dataView.waterPass}</u></div>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</Grid>\r\n\r\n\t\t\t\t<Grid container className={classes.containnerRowWithInput} >\r\n\t\t\t\t\t<Grid item xs={12} className={classes.tab1}>\r\n\t\t\t\t\t\t<div className={classes.divLabel}>1.9 ความสูง</div>\r\n\t\t\t\t\t</Grid>\r\n\r\n\t\t\t\t\t<Grid item xs={12} container className={classes.tab2}>\r\n\t\t\t\t\t\t<Grid item xs={3} style={{textAlign: 'center'}}>\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\t<label>{dataView.heightFloor}</label>\r\n              \r\n\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t<Grid item xs={3} container >\r\n\t\t\t\t\t\t\t<div className={classes.divLabel}>ชั้น</div>\r\n\t\t\t\t\t\t</Grid>\r\n\r\n\t\t\t\t\t\t<Grid item xs={3} style={{textAlign: 'center'}}>\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\t<label>{dataView.heightMeter}</label>\r\n              \r\n\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t<Grid item xs={3} container >\r\n\t\t\t\t\t\t\t<div className={classes.divLabel}>เมตร</div>\r\n\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</Grid>\r\n\r\n\t\t\t\t<Grid container className={classes.containnerRowWithInput} >\r\n\t\t\t\t\t<Grid item xs={12} className={classes.tab1}>\r\n\t\t\t\t\t\t<div className={classes.divLabel}>1.10 จำนวนอาคารที่มีในที่ดิน</div>\r\n\t\t\t\t\t</Grid>\r\n\r\n\t\t\t\t\t<Grid item xs={12} container className={classes.tab2}>\r\n\t\t\t\t\t\t<Grid item xs={3} container justify=\"flex-end\">\r\n\t\t\t\t\t\t\t<div className={classes.divLabel}>จำนวน</div>\r\n\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t<Grid item xs={4} style={{textAlign: 'center'}}>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t<label>{dataView.bldg}</label>\r\n              \r\n\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t\t<Grid item xs={3} container>\r\n\t\t\t\t\t\t\t<div className={classes.divLabel}>หลัง</div>\r\n\t\t\t\t\t\t</Grid>\r\n\r\n\t\t\t\t\t\t<Grid item xs={2} container justify=\"center\">\r\n\t\t\t\t\t\t\t<div></div>\r\n\t\t\t\t\t\t</Grid>\r\n\t\t\t\t\t</Grid>\r\n\t\t\t\t</Grid>\r\n\t\t</Grid>\r\n    )\r\n  }\r\n}\r\nexport default withStyles(theme => ({\r\n\troot: {\r\n\t\twidth: \"100%\",\r\n\t\theight: \"100%\",\r\n\t\tposition: \"relative\"\r\n\t},\r\n\trootForm: {\r\n\t\twidth: \"95%\",\r\n\t\theight: \"100%\"\r\n\t},\r\n\trootLanduseRadio: {\r\n\t\theight: 'auto'\r\n\t},\r\n\tcontainnerRow: {\r\n\t\theight: \"50px\",\r\n\t\twidth: \"100%\",\r\n\t\tmarginTop: \"15px\",\r\n\t\t// paddingLeft: \"28px\"\r\n\t},\r\n\tcontainnerRowWithInput:{\r\n\t\theight: \"75px\",\r\n\t\twidth: \"100%\",\r\n\t\tmarginTop: \"15px\",\r\n\t},\r\n\tcontainnerRowTxt: {\r\n\t\theight: \"30px\",\r\n\t\twidth: \"100%\",\r\n\t\tmarginTop: \"0px\",\r\n\t},\r\n\tdivLabel: {\r\n\t\t// lineHeight: \"50px\",\r\n\t\tcolor: 'black !important',\r\n\t\tfontWeight: 'bold'\r\n\t},\r\n\tlabel:{\r\n\t\tcolor: 'black !important'\r\n\t},\r\n\tdivFooter: {\r\n\t\tmarginTop: \"50px\",\r\n\t\tmarginBottom: \"10px\"\r\n\t},\r\n\ttab1: {\r\n\t\tpaddingLeft: theme.spacing.unit * 2,\r\n\t},\r\n\ttab2: {\r\n\t\tpaddingLeft: theme.spacing.unit * 3,\r\n\t},\r\n\terrorTxt: {\r\n\t\tcolor: 'red'\r\n\t},\r\n\tradio: {\r\n        color: '#494949 !important',\r\n        '&$disabled': {\r\n            color: '#494949 !important',\r\n        }\r\n        \r\n    },\r\n    radioChecked: {\r\n        \r\n    },\r\n}))(ViewPmrFourView);","import React, { Component } from 'react'\r\nimport { compose } from \"recompose\";\r\nimport { connect } from \"react-redux\";\r\n\r\n//import component\r\nimport ViewPmrFourView from '../../.././../../../../Presentationals/Web/Panel/Menu/MenuContent/PMR1/ViewPmr/ViewPmrFourView'\r\n\r\n//import service - utils\r\nimport { fetchGet_ } from '../../../../../../../Utilities/ServiceUtils'\r\n\r\nclass ViewPmrFour extends Component {\r\n    constructor(){\r\n        super();\r\n        this.state = {\r\n            landuseData:null\r\n        }\r\n    }\r\n\r\n    callServiceLanduseChange = () => {\r\n        fetchGet_(process.env.REACT_APP_PMR_GET_LU_LANDUSE)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(data => {\r\n                this.setState({\r\n                    landuseData: data.result\r\n                })\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceLanduseChange', ex)\r\n            })\r\n    }\r\n\r\n    componentDidMount(){\r\n        this.callServiceLanduseChange()\r\n    }\r\n\r\n    render() {\r\n        const {dataView,submitPmrRdc} = this.props\r\n        const {landuseData} = this.state\r\n        return (\r\n            <ViewPmrFourView \r\n                dataView={dataView}\r\n                landuseData={landuseData}\r\n                farStandard={submitPmrRdc.stepThree.lupFar}\r\n                osrStandard={submitPmrRdc.stepThree.lupOsr}\r\n            />\r\n        )\r\n    }\r\n}\r\n\r\nconst mapStateToProps = state => ({\r\n    submitPmrRdc: state.submitPmr,\r\n})\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    \r\n});\r\n\r\nconst enhance = compose(\r\n    connect(\r\n        mapStateToProps,\r\n        mapDispatchToProps\r\n    )\r\n);\r\n\r\nexport default enhance(ViewPmrFour);","import React, { Component } from 'react'\r\n\r\n//import component\r\nimport ViewPmrView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/PMR1/ViewPmr/ViewPmrView'\r\nimport ViewPmrOne from './ViewPmrOne'\r\nimport ViewPmrTwo from './ViewPmrTwo'\r\nimport ViewPmrThree from './ViewPmrThree'\r\nimport ViewPmrFour from './ViewPmrFour'\r\n\r\nexport default class ViewPmr extends Component {\r\nconstructor(props){\r\n    super(props);\r\n    \r\n    this.state ={\r\n        dataDetail:props.dataDetail,\r\n        formStep:props.formStep\r\n    }\r\n}\r\n\r\nrenderForm = ()=>{\r\n    const {formStep,dataDetail} = this.props\r\n\r\n    switch (formStep) {\r\n        case 1:\r\n            return <ViewPmrOne dataView={dataDetail[0].formOne}/>\r\n        case 2:\r\n\r\n           return <ViewPmrTwo dataView={dataDetail[0].formTwo}/>\r\n        case 3:\r\n        \r\n           return <ViewPmrThree dataView={dataDetail[0].formThree}/>\r\n        case 4:\r\n        \r\n           return <ViewPmrFour dataView={dataDetail[0].formFour}/>\r\n        default:\r\n            break;\r\n    }\r\n}\r\nhandleNextForm = ()=>{\r\n    const { onClickNext,formStep } = this.props\r\n    if(onClickNext){\r\n        if(formStep !== 4){\r\n            onClickNext(formStep+1)\r\n        }\r\n       \r\n    }\r\n}\r\nhandleBackForm = ()=>{\r\n    const {onClickBack,onClickNext,formStep} = this.props\r\n        if(formStep === 1){\r\n            onClickBack()\r\n        } else{\r\n            onClickNext(formStep-1)\r\n        }  \r\n}\r\n  render() {\r\n      const {dataDetail} = this.state\r\n      const  { formStep,exportPDF } = this.props;\r\n    return (\r\n      <ViewPmrView dataDetail={dataDetail} onClickBack={this.handleBackForm} onClickNext={this.handleNextForm} formStep={formStep} exportPDF={exportPDF} >      \r\n                {this.renderForm()}\r\n      </ViewPmrView>\r\n    )\r\n  }\r\n}\r\n","import React,{Fragment} from 'react'\r\nimport { withStyles } from '@material-ui/core'\r\nimport { MuiThemeProvider, createMuiTheme } from \"@material-ui/core\";\r\nimport TextField from '@material-ui/core/TextField';\r\nimport FormControl from '@material-ui/core/FormControl';\r\nimport FormHelperText from '@material-ui/core/FormHelperText';\r\nimport InputAdornment from '@material-ui/core/InputAdornment';\r\n\r\nconst theme = createMuiTheme({\r\n    palette: {\r\n        primary: {\r\n            main: '#128C2C', //main color\r\n            dark: '#128C2C', //active color\r\n            contrastText: '#fff' //text color\r\n        },\r\n    },\r\n    typography: {\r\n        useNextVariants: true,\r\n    },\r\n})\r\n\r\nconst TextFieldView = ({\r\n    classes,\r\n    className,\r\n    error,\r\n    errorMsg,\r\n    value,\r\n    label,\r\n    placeholder,\r\n    input,\r\n    type,\r\n    required,\r\n    icon,\r\n    iconColor,\r\n    onChange,\r\n    onClick\r\n}) => {\r\n    const asterisk = required ? <span className={classes.txtErr} >*</span> : \"\"\r\n\r\n    return (\r\n        // <MuiThemeProvider theme={theme}>\r\n        <Fragment>\r\n            <FormControl className={`${classes.control} ${className}`} error={error}>\r\n                <span className={classes.labelStyle}>{\r\n                    label && <label className={`${error ? classes.txtErr : \"\"}`} required>{label}{asterisk}</label>}\r\n                </span>\r\n                <TextField\r\n                    onClick={onClick}\r\n                    {...input}\r\n                    error={error}\r\n                    type={type}\r\n                    className={classes.textField}\r\n                    variant=\"outlined\"\r\n                    placeholder={placeholder}\r\n                    value={value}\r\n                    InputLabelProps={{ required: false }}\r\n                    InputProps={icon && {\r\n                        startAdornment: (\r\n                            <InputAdornment position=\"start\" variant='standard' disableTypography disablePointerEvents>\r\n                                <span style={{ color: iconColor }}> {icon} </span>\r\n                            </InputAdornment>\r\n                        ),\r\n                    }}\r\n                    onChange={onChange}\r\n                />\r\n                \r\n            </FormControl>\r\n            <FormHelperText className={classes.formHelper}>{error && errorMsg}</FormHelperText>\r\n            </Fragment>\r\n        // </MuiThemeProvider>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    control: {\r\n        width: '100%',\r\n        height: '70px',\r\n \r\n        /// แบบนี้คือไม่ต้องมีการกำหนด padding ที่คนเรียกใช้มัน ///\r\n        // height: '70px',\r\n        // paddingTop: '10px',\r\n        // paddingLeft: '10px',\r\n        // paddingRight: '10px'\r\n    },\r\n    textField: {\r\n        width: '100%',\r\n        [`& input`]: {\r\n            height: '40px',\r\n            padding: '0px 15px 0px 15px',\r\n            backgroundColor:'white'\r\n        },\r\n        [`& label`]: {\r\n            top: '-5px'\r\n        },\r\n        [`& input:-webkit-autofill`]: {\r\n            WebkitBoxShadow: 'inset 0 0 0px 9999px white'\r\n        }\r\n    },\r\n    txtErr: {\r\n        color: 'red'\r\n    },\r\n    formHelper: {\r\n        // marginTop: theme.spacing.unit / 2,\r\n        // marginLeft: 15\r\n        color:\"red\",\r\n        marginTop: \"0px\",\r\n        marginLeft: 15,\r\n        fontFamily: \"prompt\"\r\n    },\r\n    labelStyle:{\r\n        marginBottom: '5px',\r\n        fontSize:\"16px\"\r\n    }\r\n}))(TextFieldView)\r\n","import React, { Component } from 'react'\r\nimport TextFieldView from '../Presentationals/TextFieldView'\r\n\r\nexport default class TextField extends Component {\r\n    render() {\r\n        const {\r\n            className,\r\n            error,\r\n            errorMsg,\r\n            value,\r\n            label,\r\n            placeholder,\r\n            input,\r\n            type,\r\n            required,\r\n            icon,\r\n            iconColor,\r\n            onChange,\r\n            onClick\r\n        } = this.props;\r\n\r\n        return (\r\n            <TextFieldView\r\n                onClick={onClick}\r\n                className={className}\r\n                error={error}\r\n                errorMsg={errorMsg}\r\n                value={value}\r\n                label={label}\r\n                placeholder={placeholder}\r\n                input={input}\r\n                type={type}\r\n                required={required}\r\n                icon={icon}\r\n                iconColor={iconColor}\r\n                onChange={onChange}\r\n            />\r\n        )\r\n    }\r\n}\r\n\r\nTextField.defaultProps = {\r\n    error: false,\r\n    required: false\r\n}\r\n","import React, {useState,  useCallback, useRef} from 'react';\r\nimport { DatePicker, MuiPickersUtilsProvider } from \"material-ui-pickers\";\r\nimport {\r\n    format,\r\n    getYear,\r\n    // getMonth,\r\n    // getDate,\r\n    addYears\r\n} from \"date-fns\";\r\nimport DateFnsUtils from '@date-io/date-fns';\r\nimport thLocale from \"date-fns/locale/th\";\r\nimport { MuiThemeProvider, createMuiTheme } from \"@material-ui/core\";\r\nimport TextField from '../TextField'\r\nimport green from \"@material-ui/core/colors/green\";\r\n\r\nconst materialTheme = createMuiTheme({\r\n    palette: {\r\n        primary: green,\r\n    },\r\n    typography: {\r\n        useNextVariants: true,\r\n        fontFamily: 'prompt',\r\n    },\r\n    overrides:{\r\n        MuiPickersDay: {\r\n            //Control Date, DateTime, DateRange\r\n            day: {\r\n                '& > .MuiIconButton-label': {\r\n                    '& > .MuiTypography-body2': {\r\n                        fontFamily: 'prompt',\r\n                        fontWeight: 'normal',\r\n                    },\r\n                },\r\n                fontFamily: 'prompt'\r\n            },\r\n        },\r\n    }\r\n});\r\n\r\nclass LocalizedUtils extends DateFnsUtils {\r\n    _convertADToThaiYear = date => {\r\n        if (getYear(date) <= 2561) {\r\n            return addYears(date, 543);\r\n        }\r\n        return date;\r\n      };\r\n    getCalendarHeaderText(date) {\r\n        return format(this._convertADToThaiYear(date), \"MMMM yyyy\", {\r\n            locale: thLocale\r\n        });\r\n    }\r\n    getDatePickerHeaderText(date) {\r\n        return format(this._convertADToThaiYear(date), \"d MMM yyyy\", {\r\n            locale: thLocale\r\n        });\r\n    }\r\n    getYearText(date) {\r\n        return format(this._convertADToThaiYear(date), \"yyyy\", {\r\n            locale: thLocale\r\n        });\r\n    }\r\n}\r\n\r\nexport const WithMuiPickersUtilsProvider = Wrapcomponent => {\r\n    return (\r\n        <MuiPickersUtilsProvider utils={LocalizedUtils} locale={thLocale}>\r\n            <Wrapcomponent />\r\n        </MuiPickersUtilsProvider>\r\n    );\r\n}\r\n\r\nconst DatePickerThai = ({\r\n    input,\r\n    label,\r\n    value,\r\n    meta,\r\n    required,\r\n    placeholder,\r\n    minDate, //new Date(\"2019-03-25\")\r\n    maxDate, //new Date(\"2019-03-25\")\r\n    // defaultDate,\r\n    onChange\r\n}) => {\r\n    const [selectedDate, setSelectedDate] = useState(null)\r\n    const pickerRef = useRef(null);\r\n    // useEffect(() => {\r\n    //     const dateDefault = (!value || value === '') ? null : value;\r\n    //     setSelectedDate(dateDefault)\r\n    // }, [value]);\r\n\r\n    const getThaiYear = date => {\r\n        return getYear(addYears(date, 543));\r\n    };\r\n    const handleDateChange = date => {\r\n        setSelectedDate(date)\r\n        if(onChange){\r\n            onChange(date)\r\n        }\r\n    }\r\n    const handleOpenDatePicker = useCallback(\r\n        event => {\r\n          if (pickerRef.current) {\r\n            pickerRef.current.open(event);\r\n          }\r\n        },\r\n        [pickerRef.current]\r\n    );\r\n\r\n    const toStringValue = () => {\r\n        if(value){\r\n            const thaiDate = addYears(value, 543);\r\n            const formatDate = format(thaiDate, \"d MMM yyyy\", { locale: thLocale})\r\n            return `${formatDate}`\r\n        }\r\n        else{\r\n            return '';\r\n        }\r\n    }\r\n    \r\n    return (\r\n    <MuiThemeProvider theme={materialTheme}>\r\n        <TextField \r\n        input={input}\r\n        label={label} \r\n        value={toStringValue()} \r\n        error={(meta.touched && meta.invalid && (meta.error?true:false))}\r\n        errorMsg={(meta.touched && meta.invalid && meta.error)}\r\n        onClick={handleOpenDatePicker}\r\n        required={required}\r\n        placeholder={placeholder}/>\r\n        <DatePicker\r\n            style={{display: 'none'}}\r\n            variant=\"outlined\"\r\n            margin=\"normal\"\r\n            label={label}\r\n            value={selectedDate}\r\n            format={`dd/MM/${getThaiYear(selectedDate)}`}\r\n            clearable\r\n            clearLabel={<div>ล้างค่า</div>}\r\n            okLabel={<div>ตกลง</div>}\r\n            cancelLabel={<div>ยกเลิก</div>}\r\n            onChange={handleDateChange}\r\n            ref={pickerRef}\r\n            minDate = {minDate}\r\n            maxDate = {maxDate}\r\n        />\r\n    </MuiThemeProvider>)\r\n}\r\n\r\nexport default DatePickerThai;","import React from 'react';\r\nimport FormControl from '@material-ui/core/FormControl';\r\nimport FormHelperText from '@material-ui/core/FormHelperText';\r\nimport {withStyles} from '@material-ui/core/styles'\r\nimport DatePickerThai from './DatePickerThai';\r\n\r\nconst ReduxFormDatePickerThai = ({\r\n    classes,\r\n    input,\r\n    label,\r\n    meta,\r\n    required,\r\n    placeholder,\r\n    disabled=false,\r\n    minDate, //new Date(\"2019-03-25\")\r\n    maxDate, //new Date(\"2019-03-25\")\r\n}) => {\r\n    return (\r\n    <FormControl className={classes.control}>\r\n        <DatePickerThai \r\n        {...input}\r\n        minDate={minDate}\r\n        maxDate={maxDate}\r\n        label={label}\r\n        value={input.value}\r\n        meta={meta}\r\n        required={required}\r\n        placeholder={placeholder}\r\n        disabled={disabled}/>\r\n    </FormControl>);\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    control: {\r\n        width: '100%',\r\n        // marginTop: theme.spacing.unit,\r\n        // marginBottom: theme.spacing.unit,\r\n    },\r\n    formHelper: {\r\n        marginTop: theme.spacing.unit / 2,\r\n        marginLeft: 20\r\n    }\r\n}))(ReduxFormDatePickerThai);","import React, { Component } from 'react'\r\nimport AppBarHeaderView from '../../../AppBarHeaderView';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { reduxForm, Field } from 'redux-form';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport ListItem from '@material-ui/core/ListItem';\r\nimport IconButton from '@material-ui/core/IconButton';\r\nimport EditIcon from '@material-ui/icons/Edit';\r\nimport DeleteIcon from '@material-ui/icons/Delete';\r\n// import Divider from \"@material-ui/core/Divider\";\r\nimport { compose } from \"recompose\";\r\nimport { Scrollbars } from 'react-custom-scrollbars';\r\n\r\nimport { PMR_EDIT_STAFF } from '../../../../../../Constants/Constants';\r\nimport { BTN } from '../../../../../../Constants/Constants'\r\nimport Button from '../../../../../../Controls/Containers/Button';\r\nimport SelectField from '../../../../../../Controls/Containers/SelectField';\r\nimport TextFieldRedux from '../../../../../../Controls/Containers/TextFieldRedux';\r\nimport SlectFieldRedux from '../../../../../../Controls/Containers/SelectFieldRedux';\r\nimport ReduxFormDatePickerThai from '../../../../../../Controls/Containers/Picker/ReduxFormDatePickerThai';\r\n// import { ListPaginationController, ListPaginationView } from '../../../../../../Controls/RenderProps/ListPagination';\r\n\r\n//import Tooltip\r\nimport Tooltip from '../../../../../../Controls/Containers/Tooltip'\r\n\r\nexport class EditPmrStaffView extends Component {\r\n    renderSwitch = () => {\r\n        const { \r\n            valueChange, \r\n            ddSubdistrict, \r\n            ddDistrict, \r\n            onChangeLookup, \r\n            minDate, \r\n            maxDate,\r\n            onStartDateChange,\r\n            onEndDateChange \r\n        } = this.props;\r\n\r\n        switch (valueChange) {\r\n            case '1':\r\n                return <RequestNO />\r\n            case '2':\r\n                return <RequestName />\r\n            case '3':\r\n                return <RequestDistrict ddSubdistrict={ddSubdistrict} ddDistrict={ddDistrict} onChangeLookup={onChangeLookup} />\r\n            case '4':\r\n                return <RequestDate \r\n                    minDate = { minDate }\r\n                    maxDate = { maxDate }\r\n                    onStartDateChange = { onStartDateChange }\r\n                    onEndDateChange = { onEndDateChange }\r\n                />\r\n            default:\r\n                break;\r\n        }\r\n    }\r\n    render() {\r\n        const {\r\n            isActiveDraw = false,\r\n            title, onClickBack, valueChange, onChangeMode, handleSubmit, onSubmit, displayResultPMR, isShowResult,\r\n            classes, onShowDetail, onEdit, onDelete, onClickSpatialSearch, isOnlySearch,\r\n            userID,districtID } = this.props;\r\n        return (\r\n            <Grid container spacing={16} className={classes.root}>\r\n                <AppBarHeaderView\r\n                    title={title}\r\n                    onClickBack={onClickBack}\r\n                />\r\n\r\n                <Grid item xs={12} style={{ padding: \"10px\" }}>\r\n                    <SelectField\r\n                        keyData={{ value: \"value\", label: \"name\" }}\r\n                        dataItems={PMR_EDIT_STAFF}\r\n                        value={valueChange}\r\n                        labelName=\"แก้ไขแบบผมร.๑ โดยค้นหาจาก\"\r\n                        onChange={onChangeMode}\r\n                    />\r\n                    <form onSubmit={handleSubmit(onSubmit)} method=\"POST\">\r\n                        {this.renderSwitch()}\r\n\r\n                        <Grid container justify=\"center\" spacing={24} className={classes.footer}>\r\n                            <Grid item>\r\n                                <Button\r\n                                    label={BTN.TH.CANCEL}\r\n                                    onClick={onClickBack}\r\n                                />\r\n                            </Grid>\r\n                            <Grid item>\r\n                                <Button\r\n                                    type=\"submit\"\r\n                                    label={BTN.TH.SEARCH}\r\n                                />\r\n                            </Grid>\r\n                            <Grid item>\r\n                                <Button\r\n                                    label=\"เลือกบนแผนที่\"\r\n                                    color={isActiveDraw ? \"black\" : \"green\"}\r\n                                    onClick={onClickSpatialSearch}\r\n                                />\r\n                            </Grid>\r\n                        </Grid>\r\n                    </form>\r\n\r\n                </Grid>\r\n                {/* containerResult2 */}\r\n                <Grid container className={`${valueChange === \"3\" || valueChange === \"4\" ? classes.containerResult2 : classes.containerResult}`} >\r\n                    {isShowResult && displayResultPMR &&\r\n                        <ResultPMR\r\n                            isOnlySearch={isOnlySearch}\r\n                            userID={userID}\r\n                            districtID={districtID}\r\n                            onShowDetail={onShowDetail}\r\n                            onEdit={onEdit}\r\n                            onDelete={onDelete}\r\n                            displayResultPMR={displayResultPMR}\r\n                        />}\r\n                </Grid>\r\n\r\n            </Grid>\r\n        )\r\n    }\r\n}\r\n\r\n\r\nexport default compose(\r\n    withStyles(theme => ({\r\n        root: {\r\n            margin: '0px',\r\n            width: '100%',\r\n            height: '100%'\r\n        },\r\n        list: {\r\n            overflow: 'auto',\r\n            maxHeight: 'calc(100% - 45px)',\r\n            position: 'absolute'\r\n        },\r\n        footer: {\r\n            marginTop: \"10px\",\r\n            // marginBottom: \"10px\"\r\n            marginBottom: \"2px\"\r\n        },\r\n        activeSelectOnMap: {\r\n            backgroundColor: theme.mainTheme.colorAH.colorActive,\r\n            color: theme.mainTheme.colorAH.colorTextActive,\r\n        },\r\n        containerResult: {\r\n            height: 'calc(100% - 314px)',\r\n            // width: '100%',\r\n        },\r\n        containerResult2: {\r\n            height: 'calc(100% - 396px)',\r\n        }\r\n    })),\r\n    reduxForm({\r\n        form: 'FormEditPMR', // a unique identifier for this form\r\n    }),\r\n)(EditPmrStaffView);\r\n\r\nconst ResultPMR = withStyles(theme => ({\r\n    rootResultPMR: {\r\n        width: '100%',\r\n        height: '100%'\r\n    },\r\n    button: {\r\n        height: '10px'\r\n    },\r\n    titleResult: {\r\n        width: '100%',\r\n        color: '#FFFFFF',\r\n        height: '25px',\r\n        fontSize: '18px',\r\n        background: '#494949',\r\n        textAlign: 'center',\r\n        lineHeight: '25px'\r\n    },\r\n    containerResult: {\r\n        width: '100%',\r\n        // height: 'calc(100% - 25px)',\r\n        height: '500px',\r\n    },\r\n    iconButton: {\r\n        height: \"35px\",\r\n        width: \"35px\",\r\n        marginTop: \"6px\"\r\n    },\r\n    icon: {\r\n        marginTop: '-6px'\r\n    },\r\n    guttersItem: {\r\n        padding: \"5px 10px\",\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            [`& input`]: {\r\n                padding: \"5px 20px\",\r\n            },\r\n        },\r\n    },\r\n    rootResult: {\r\n        width: '100%',\r\n        height: 'calc(100% - 25px)'\r\n    },\r\n    containerTxtResult: {\r\n        maxWidth: 'calc(100% - 70px)',\r\n        textOverflow: 'ellipsis',\r\n        whiteSpace: 'nowrap',\r\n        overflow: 'hidden',\r\n    },\r\n    txtResult: {\r\n        fontSize: '14px',\r\n        margin: '0px',\r\n        lineHeight: '24px'\r\n    },\r\n}))(class ResultPMR extends Component {\r\n    render() {\r\n        const { classes, onShowDetail, onEdit, onDelete, displayResultPMR, userID,districtID,isOnlySearch } = this.props;\r\n        // console.log('displayResultPMR', displayResultPMR)\r\n        return (\r\n            <Grid container className={classes.rootResultPMR}>\r\n                <Grid item xs={12} className={classes.titleResult}>\r\n                    {`ผลลัพธ์จำนวน ${displayResultPMR.length} รายการ`}\r\n                </Grid>\r\n\r\n                <Grid item xs={12} className={classes.rootResult}>\r\n                    <Scrollbars>\r\n                        {displayResultPMR.map((itm, idx) => {\r\n                            // จะแสดงปุ่มลบเมื่อ เป็นเจ้าของจุดนั้น หรือ จุดนั้นเป็นของประชาชนและอยุ่ในเขต หรือ user ที่ login ไม่มี districtID\r\n                            const isShowEdit =  !districtID || (itm.updater === userID) || (itm.isInsideDistrict && itm.status === 1) || ((itm.districtID === districtID) && (itm.status === 1))\r\n                            return (\r\n                                itm.pmr1ID === \"ไม่พบข้อมูล\" ? <div style={{ padding: '10px' }} key={`${itm.pmr1ID}`} >ไม่พบข้อมูล</div> :\r\n                                    <ListItem\r\n                                        divider\r\n                                        button\r\n                                        key={`${itm.pmr1ID}-${idx}`}\r\n                                        classes={{ gutters: classes.guttersListItem }}\r\n                                        onClick={onShowDetail(itm)}\r\n                                    >\r\n                                        <Grid direction=\"row\" container>\r\n                                            <Grid container justify=\"space-between\" alignItems=\"center\">\r\n                                                <Grid item className={classes.containerTxtResult} >\r\n                                                    <label className={classes.txtResult}>{`รหัสคำร้องขอ : ${itm.pmr1ID ? itm.pmr1ID : \"\"}`}</label><br />\r\n                                                    <label className={classes.txtResult}>{`ชื่อผู้แจ้ง : ${itm.pmr1Name ? itm.pmr1Name : \"\"}`}</label>\r\n                                                </Grid>\r\n                                                {isShowEdit && !isOnlySearch && <Grid item >\r\n                                                    <Tooltip title=\"แก้ไข\" placement=\"bottom\">\r\n                                                        <IconButton\r\n                                                            className={classes.iconButton}\r\n                                                            onClick={onEdit(itm)}\r\n                                                        >\r\n                                                            <EditIcon className={classes.icon} />\r\n                                                        </IconButton>\r\n                                                    </Tooltip>\r\n                                                    <Tooltip title=\"ลบ\" placement=\"bottom\">\r\n                                                        <IconButton\r\n                                                            className={classes.iconButton}\r\n                                                            onClick={onDelete(itm)}\r\n                                                        >\r\n                                                            <DeleteIcon className={classes.icon} />\r\n                                                        </IconButton>\r\n                                                    </Tooltip>\r\n                                                </Grid>}\r\n                                            </Grid>\r\n                                        </Grid>\r\n                                    </ListItem>\r\n                            )\r\n                        })}\r\n                    </Scrollbars>\r\n                </Grid>\r\n\r\n\r\n                {/* <Scrollbars>\r\n                    <ListPaginationController\r\n                        source={displayResultPMR}\r\n                        dynamicRowPaperPage={{\r\n                            minusPixCelWeb: 220,\r\n                            minusPixCelMobile: 200,\r\n                            heightItem: 50,\r\n                        }}\r\n                        render={(\r\n                            { tempCurrentPage, currentPage, countPage },\r\n                            data,\r\n                            {\r\n                                handleChangePageByInput,\r\n                                goToPage,\r\n                                handleBlurInputChangePage,\r\n                                handleChangePage\r\n                            }\r\n                        ) => (\r\n                                <Fragment>\r\n                                    <Divider />\r\n                                    {data.map((itm, idx) => (\r\n                                        itm.pmr1ID === \"ไม่พบข้อมูล\" ? <label key={`${itm.pmr1ID}`} >\"ไม่พบข้อมูล\"</label> :\r\n                                            <ListItem\r\n                                                divider\r\n                                                button\r\n                                                key={`${itm.pmr1ID}-${idx}`}\r\n                                                classes={{ gutters: classes.guttersListItem }}\r\n                                                onClick={onShowDetail(itm)}\r\n                                            >\r\n                                                <Grid item xs={12} container>\r\n                                                    <Grid item xs={10} container wrap=\"nowrap\" alignItems=\"center\" >\r\n                                                        {itm.pmr1ID} {`${(itm.pmr1Name && itm.pmr1Name !== \"\") ? `(${itm.pmr1Name})` : ''}`}\r\n                                                    </Grid>\r\n                                                    {!isOnlySearch && <Grid item xs={2} container justify=\"flex-end\" >\r\n                                                        <IconButton\r\n                                                            onClick={onEdit(itm)}\r\n                                                        >\r\n                                                            <EditIcon className={classes.iconEdit} />\r\n                                                        </IconButton>\r\n                                                        <IconButton\r\n                                                            onClick={onDelete(itm)}\r\n                                                        >\r\n                                                            <DeleteIcon className={classes.iconEdit} />\r\n                                                        </IconButton>\r\n                                                    </Grid>}\r\n                                                </Grid>\r\n                                            </ListItem>\r\n                                    ))}\r\n                                    <ListPaginationView\r\n                                        tempCurrentPage={tempCurrentPage}\r\n                                        currentPage={currentPage}\r\n                                        countPage={countPage}\r\n                                        onChangePageByInput={\r\n                                            handleChangePageByInput\r\n                                        }\r\n                                        goToPage={goToPage}\r\n                                        onBlurInputChangePage={\r\n                                            handleBlurInputChangePage\r\n                                        }\r\n                                        onChangePage={handleChangePage}\r\n                                    />\r\n                                </Fragment>\r\n                            )}\r\n                    />\r\n                </Scrollbars> */}\r\n            </Grid>\r\n        )\r\n    }\r\n})\r\n\r\n\r\nclass RequestNO extends Component {\r\n    render() {\r\n\r\n        return (\r\n            <Grid container>\r\n                <Field\r\n                    name=\"RequestNO\"\r\n                    component={TextFieldRedux}\r\n                    label={\"รหัสคำร้อง\"}\r\n                    required\r\n                />\r\n            </Grid>\r\n        )\r\n    }\r\n}\r\nclass RequestName extends Component {\r\n    render() {\r\n\r\n        return (\r\n            <Grid container>\r\n                <Field\r\n                    name=\"RequestName\"\r\n                    component={TextFieldRedux}\r\n                    label={\"ชื่อผู้แจ้ง\"}\r\n                    required\r\n                />\r\n            </Grid>\r\n        )\r\n    }\r\n}\r\nclass RequestDistrict extends Component {\r\n    render() {\r\n        const { onChangeLookup, ddSubdistrict, ddDistrict } = this.props;\r\n\r\n        return (\r\n            <Grid container>\r\n                <Field\r\n                    name=\"RequestDistrict\"\r\n                    component={SlectFieldRedux}\r\n                    data={ddSubdistrict}\r\n                    keyData={{ value: \"value\", label: \"name\" }}\r\n                    label={\"เขต\"}\r\n                    onChangeValue={onChangeLookup}\r\n                    required\r\n                />\r\n                <Field\r\n                    name=\"RequestSubdistrict\"\r\n                    component={SlectFieldRedux}\r\n                    data={ddDistrict}\r\n                    keyData={{ value: \"value\", label: \"name\" }}\r\n                    label={\"แขวง\"}\r\n                    required\r\n                />\r\n            </Grid>\r\n        )\r\n    }\r\n}\r\nclass RequestDate extends Component {\r\n    render() {\r\n        const { onStartDateChange, onEndDateChange, minDate, maxDate } = this.props\r\n\r\n        return (\r\n            <Grid container>\r\n                <Field\r\n                    name={'RequestStartDate'}\r\n                    component={ReduxFormDatePickerThai}\r\n                    label={'ช่วงวันที่'}\r\n                    onChange={onStartDateChange}\r\n                    maxDate={maxDate}\r\n                    required\r\n                />\r\n                <Field\r\n                    name={'RequestEndDate'}\r\n                    component={ReduxFormDatePickerThai}\r\n                    label={'ถึงวันที่'}\r\n                    onChange={onEndDateChange}\r\n                    minDate={minDate}\r\n                    required\r\n                />\r\n            </Grid>\r\n        )\r\n    }\r\n}\r\n","import React, { Component,Fragment } from 'react'\r\nimport { connect } from 'react-redux';\r\nimport { bindActionCreators } from 'redux';\r\nimport { compose } from \"recompose\";\r\nimport { reduxForm} from \"redux-form\";\r\nimport { format } from \"date-fns\";\r\nimport enLocale from \"date-fns/locale/en-US\";\r\n\r\n//import component\r\nimport EditPmrStaffView from '../../../../../../Presentationals/Web/Panel/Menu/MenuContent/PMR1/EditPmrStaffView';\r\nimport ViewPmr from './ViewPmr/ViewPmr';\r\nimport FormOne from './SubmitPmr/FormStep/FormOne';\r\nimport FormTwo from './SubmitPmr/FormStep/FormTwo';\r\nimport FormThree from './SubmitPmr/FormStep/FormThree';\r\nimport FormFour from './SubmitPmr/FormStep/FormFour'\r\nimport Loading from '../../../../../../Controls/Containers/Loading';\r\nimport WithLoading from '../../../../../../HOC/WithLoading';\r\nimport FormSubmitPmrView from '../../../../../../Presentationals/Web/Panel/Menu/MenuContent/PMR1/SubmitPmr/FormSubmitPmrView';\r\nimport AppBarHeaderView from '../../../../../../Presentationals/Web/Panel/AppBarHeaderView';\r\nimport WithAlertMessage from '../../../../../../HOC/WithAlertMessage';\r\nimport AlertMessage from '../../../../../../Controls/Containers/AlertMessage'\r\nimport ExportSubmitPMR from './ExportSubmitPMR/ExportSubmitPMR';\r\n\r\n//import service - utils\r\nimport { fetchGet_ } from '../../../../../../Utilities/ServiceUtils';\r\nimport { dateThaiFormat } from '../../../../../../Utilities/DateTimeUtil';\r\nimport {searchEditPmr1Validate} from '../../../../../../Utilities/Validate';\r\n\r\n//import action\r\nimport * as SubmitPmrAction from '../../../../../../Actions/Web/Panel/SubmitPmrAction';\r\nimport * as PanelContentAction from '../../../../../../Actions/Web/Panel/PanelContentAction';\r\nimport * as MapAction from '../../../../../../Actions/Web/Maps/MapAction';\r\nimport * as MapFunctions from '../../../../../../Map/MapFunctions';\r\nimport * as MenuAction from '../../../../../../Actions/Web/MenuAction'\r\n\r\n//import constant\r\nimport { LISTGRAPHICLAYER, ALERT_MESSAGE, ACTIVE_FUNCTION } from '../../../../../../Constants/Constants';\r\nconst CONSTANT_VIEW = {\r\n    SEARCH:\"search\",\r\n    VIEW:\"view\",\r\n    EDIT:\"edit\"\r\n}\r\nexport class EditPmrStaff extends Component {\r\n    constructor(props) {\r\n        super(props);\r\n        this.callbackLocationStep3Fn = null;\r\n\t\tthis.state = {\r\n            valueChange:'1',\r\n            ddSubdistrict:[],\r\n            ddDistrict:[],\r\n            formStep:1,\r\n            resultPMR:null,\r\n\r\n            isShowResult:false,\r\n            // isShowSearch:props.panelContentData.pmrID?false:true,\r\n            // isShowEdit:false,\r\n            // isShowView:props.panelContentData.pmrID?true:false,\r\n            statusView:\"search\",\r\n\r\n            resultPMR1:null,\r\n            subDistrictID: null,\r\n            districtID: null,\r\n            ObjectId: null,\r\n            tempData:null,\r\n            isDirty:null,\r\n            tempSearch:null,\r\n            detailPMR:null,\r\n            deletePMRID:null,\r\n            alertMode:null,\r\n            inPmr1ID:null,\r\n            spatialSearchDetail: {\r\n                isActive: false,//change status while click button\r\n                isSearch: false,//change status after draw complete\r\n                tmpGeometry: null\r\n            },\r\n            backCurrentPage:null,\r\n            isActiveDraw : false,\r\n            isActiveEdit : false,\r\n            graphic:null,\r\n            minDate:null,\r\n            maxDate:null\r\n        }\r\n    }\r\n    handleChangeForm = (data) =>{\r\n        this.setState({\r\n            isDirty:data\r\n        })\r\n    }\r\n\r\n    handleChangeStep = (step) => {\r\n        this.setState({\r\n            formStep: step\r\n        })\r\n    }\r\n\r\n    onClickBack = async ()=>{\r\n        const { panelContentAction, mapAction, showAlert,change } = this.props;\r\n        const { tempSearch,backCurrentPage,statusView} = this.state;\r\n        if(statusView === CONSTANT_VIEW.EDIT){\r\n            showAlert({\r\n                altMsg: ALERT_MESSAGE.QUESTION.CANCEL_FORM,\r\n                altType: 2,\r\n                callbackConfirm: this.handleCloseForm,\r\n                callbackCancel: this.handleCloseConfirm\r\n            })\r\n        }else if(statusView === CONSTANT_VIEW.VIEW){\r\n            if(backCurrentPage){\r\n                panelContentAction.setCurrentPage();\r\n            }\r\n        panelContentAction.setPmrID(); //clear pmrID\r\n\r\n            this.setState({\r\n                formStep:1,\r\n                statusView:'search'\r\n            })\r\n            \r\n            // await mapAction.bindMapCommand(MapFunctions.clearSubmitPmr, [\r\n            //     LISTGRAPHICLAYER.GRAPHICLAYER_SUBMIT_PMR,\r\n            // ])\r\n            mapAction.bindClearMapCommand();\r\n            if(tempSearch){\r\n                for(let param in tempSearch.data){\r\n                    change(param,tempSearch.data[param])\r\n                }\r\n            }\r\n        }else{\r\n            panelContentAction.setCurrentPage();\r\n            mapAction.bindClearMapCommand();\r\n        }\r\n    }\r\n\r\n    handleCloseConfirm = (data) => {\r\n        const { hideAlert } = this.props;\r\n        hideAlert();\r\n    }\r\n\r\n    handleCloseForm = async () => {\r\n        const { submitPmrAction, mapAction,  change, hideAlert } = this.props;\r\n        const { tempSearch,isActiveDraw ,isActiveEdit} = this.state\r\n\r\n        hideAlert();\r\n\r\n        // if(alertMode === \"delete\"){\r\n        //     showLoading()\r\n        //     fetchGet_(`${process.env.REACT_APP_DELETE_PMR_ID}?pmr1id=${deletePMRID.pmr1ID}`)\r\n        //     .then(res => {\r\n        //         if (!res.ok) {\r\n        //             throw res.status\r\n        //         }\r\n        //         return res.json();\r\n        //     })\r\n        //     .then(data => {\r\n        //         if(data.statusCode === 1){\r\n        //             this.handleSubmit(tempSearch.data,null,tempSearch.rux)\r\n        //         }else if (data.statusCode === -1){\r\n        //             hideLoading();\r\n        //             showAlert({altMsg : `ไม่สามารถลบ ${deletePMRID.pmr1ID} ออกจากระบบได้ เนื่องจากมีการเชื่อมโยงกับข้อมูลอ.1 หรือยผ.4`})\r\n        //         }else{\r\n        //             hideLoading();\r\n        //             showAlert({altMsg:ALERT_MESSAGE.POPUP.DELETE_FAIL})\r\n        //         }\r\n        //     })\r\n        //     .catch(ex => {\r\n        //         hideLoading();\r\n        //         showAlert({altMsg:ALERT_MESSAGE.POPUP.DELETE_FAIL})\r\n        //         console.log('ex callServiceSubDistric', ex)\r\n        //     })\r\n        // } else \r\n        if(this.state.spatialSearchDetail.isSearch){//มาจาก spatial search -> edit -> back\r\n            if(tempSearch){\r\n                for(let param in tempSearch.data){\r\n                    change(param,tempSearch.data[param])\r\n                }\r\n            }\r\n        }\r\n        else{\r\n            for(let param in tempSearch.data){\r\n                change(param,tempSearch.data[param])\r\n            }\r\n\r\n            this.handleSubmit(tempSearch.data,null,tempSearch.rux)\r\n        }\r\n        \r\n        isActiveDraw && await mapAction.bindMapCommand(MapFunctions.clearEvtDrawPmr);\r\n\t\tisActiveEdit && await mapAction.bindMapCommand(MapFunctions.clearEditPmr);\r\n\r\n        this.setState({\r\n            formStep:1,\r\n            statusView:'search',\r\n            isActiveDraw:false,\r\n            isActiveEdit :false,\r\n        })\r\n        \r\n        submitPmrAction.clearFormStep()\r\n        await mapAction.bindMapCommand(MapFunctions.clearSubmitPmr, [\r\n            LISTGRAPHICLAYER.GRAPHICLAYER_SUBMIT_PMR,\r\n            LISTGRAPHICLAYER.GRAPHICLAYER_SUBMIT_PMR_HIGHLIGHT,\r\n            LISTGRAPHICLAYER.GRAPHICLAYER_PMR1_FORM\r\n        ])\r\n\r\n        // hideAlert();\r\n    }\r\n    \r\n    handleChange = (e)=>{\r\n        const { initialize } = this.props\r\n\r\n        this.setState({\r\n            isShowResult:false\r\n        })\r\n        initialize({})\r\n        this.setState({\r\n            valueChange:e.target.value\r\n        })\r\n    }\r\n\r\n    handleSubmit = (data,fnc,rux)=>{\r\n        this.setState(prevState => ({\r\n            isShowResult:true,\r\n            tempSearch:{'data':data,'rux':rux},\r\n            resultPMR:[],\r\n            spatialSearchDetail: {\r\n                ...prevState.spatialSearchDetail,\r\n                isSearch: false,\r\n                tmpGeometry: null\r\n            }\r\n        }))\r\n        const {showLoading} = this.props;\r\n        showLoading()\r\n    \r\n        switch (rux.valueChange) {\r\n            case '1':\r\n                    this.callService(process.env.REACT_APP_SEARCH_ID,`pmr1id=${data.RequestNO}`)\r\n                break;\r\n            case '2':\r\n                    this.callService(process.env.REACT_APP_SEARCH_NAME,`name=${data.RequestName}`)\r\n                break;\r\n            case '3':\r\n                    this.callService(process.env.REACT_APP_SEARCH_DISTRICT_SUBDISTRICT,`districtid=${data.RequestDistrict}&subdistrictid=${data.RequestSubdistrict}`)\r\n                break;\r\n            case '4':         \r\n                    let start = format(data.RequestStartDate, `yyyy-MM-dd`, { locale: enLocale})\r\n                    let end =format(data.RequestEndDate, `yyyy-MM-dd`, { locale: enLocale})\r\n                    this.callService(process.env.REACT_APP_SEARCH_DATE,`startdate=${start}&enddate=${end}`)\r\n                break;\r\n        \r\n            default:\r\n                break;\r\n        }\r\n    }\r\n\r\n    toDateString = (date, formatDate=`yyyy-MM-dd`, locale=enLocale) => {\r\n        const strDate = format(date, formatDate, { locale: locale})\r\n        return strDate\r\n    }\r\n\r\n    handleChangeStartDate = date => {\r\n        // const { FormData } = this.props\r\n\r\n        // const startDate = this.toDateString(date);\r\n        // if(FormData.RequestEndDate){\r\n        //     const endDate = this.toDateString(FormData.endDate);\r\n        // }\r\n        this.setState({\r\n            minDate: date\r\n        })\r\n    }\r\n\r\n    handleChangeEndDate = date => {\r\n        // const { FormData } = this.props\r\n\r\n        // const endDate = this.toDateString(date);\r\n        // if(FormData.RequestStartDate){\r\n        //     const startDate = this.toDateString(FormData.startDate);\r\n        // }\r\n        this.setState({\r\n            maxDate: date\r\n        })\r\n    }\r\n    \r\n    componentWillMount(){\r\n        const { tmpView } = this.props\r\n        if(tmpView){\r\n            this.setDataForView(tmpView)\r\n            this.setState({\r\n                statusView:'view'\r\n            })\r\n        }\r\n    }\r\n\r\n    componentDidMount() {\r\n        this.callServiceDistrict(10)\r\n        const { panelContentData } = this.props\r\n        // if(authenRdc && authenRdc.profile &&authenAction){\r\n        //     authenAction.getUpdatePmr1Form()\r\n        // }\r\n\r\n        if(panelContentData.pmrID){\r\n            this.handleGotoView(panelContentData.pmrID)\r\n            this.setState({\r\n                backCurrentPage:true,\r\n                // statusView:'view'\r\n            })\r\n        }\r\n    }\r\n\r\n    manageData = (data) => {\r\n        const { authenRdc, isOnlySearch } = this.props;\r\n        if(isOnlySearch) {\r\n            this.setState({ \r\n                resultPMR: data ? data.result: [{'pmr1ID':\"ไม่พบข้อมูล\"}]\r\n            })\r\n        } else {\r\n            const filterData = data.result.filter(item => {\r\n                return item.status === 1 || item.updater === authenRdc.profile.userID\r\n            })\r\n    \r\n            this.setState({\r\n                resultPMR: filterData ? filterData:[{'pmr1ID':\"ไม่พบข้อมูล\"}]\r\n            })\r\n        }\r\n    }\r\n\r\n    callService = (URL,Parameter) =>{\r\n        const { showLoading, hideLoading } = this.props;\r\n        showLoading();\r\n        fetchGet_(`${URL}?${Parameter}`)\r\n        .then(res => {\r\n            if (!res.ok) {\r\n                throw res.status\r\n            }\r\n            return res.json();\r\n        })\r\n        .then(async data => {\r\n            if(data && data.result){\r\n                await this.manageData(data)\r\n                // this.props.hideLoading()\r\n            }else{\r\n                await this.setState({resultPMR:[]})\r\n            }\r\n        })\r\n        .catch(ex => {\r\n            console.log('ex callServiceDistric', ex)\r\n            this.setState({resultPMR:[]})\r\n            this.props.hideLoading()\r\n        })\r\n        .finally(() => {\r\n            hideLoading();\r\n        })\r\n    }\r\n\r\n    callServiceDistrict = (provinceID) => {\r\n        fetchGet_(`${process.env.REACT_APP_LU_DISTRICT}?provinceid=${provinceID}`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(data => {\r\n                this.setState({\r\n                    ddSubdistrict:data.result\r\n                })\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceDistric', ex)\r\n            })\r\n    }\r\n\r\n    callServiceSubDistrict = (districtID) => {\r\n        fetchGet_(`${process.env.REACT_APP_LU_SUBDISTRICT}?provinceid=10&districtid=${districtID}`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(data => {\r\n                this.setState({\r\n                    ddDistrict:data.result\r\n                })\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceSubDistric', ex)\r\n            })\r\n    }\r\n    handleChangeLookup = (e)=>{\r\n        this.callServiceSubDistrict(e.target.value)\r\n    }   \r\n    handleShowDetail =  value => async evt => {\r\n        const {showLoading,hideLoading,showAlert} = this.props\r\n        this.setState({\r\n            inPmr1ID:value.pmr1ID\r\n        })\r\n        showLoading()\r\n        const getView = await fetchGet_(`${process.env.REACT_APP_GET_PMR1_ID}?pmr1id=${value.pmr1ID}`)\r\n        let resultView = await getView.json();\r\n        if(resultView){\r\n            this.setDataForView(resultView)\r\n            this.setState({\r\n                statusView:\"view\",\r\n            })\r\n        }else{\r\n            showAlert({altMsg:\"ไม่พบข้อมูล\"})\r\n            hideLoading();\r\n        }\r\n\r\n    }\r\n\r\n    setDataForView = (data)=>{\r\n        const { authenRdc } = this.props\r\n        let listView = []\r\n        let nameType = data && data.nameType?data.nameType.split(\"|\"):null;\r\n        let tempData = {};\r\n            for ( var index in nameType ) {\r\n            tempData[`nameType`+nameType[index]] = true; \r\n            if(`nameType`+nameType[index] === 'nameType9'){\r\n                tempData[`other`] = data.typeDetail\r\n            }\r\n        }\r\n\r\n        let dataFormOne = data && {\r\n            'date': data.date && dateThaiFormat(new Date(data.date)),\r\n            'province':data.contactProvinceID && data.contactProvinceID,\r\n            'district':data.contactDistrictID && data.contactDistrictID,\r\n            'subDistrict':data.contactSubDistrictID && data.contactSubDistrictID,\r\n            'parameterAt':data.writePlace && data.writePlace,\r\n            'parameterName':data.name && data.name,\r\n            'parameterIDCard':data.contactIdentificationNo && data.contactIdentificationNo,\r\n            'parameterHouseNo':data.contactHouseNo && data.contactHouseNo,\r\n            'parameterMoo':data.contactMoo && data.contactMoo,\r\n            'parameterSoi':data.contactSoi && data.contactSoi,\r\n            'parameterRoad':data.contactRoad && data.contactRoad,\r\n            'parameterZipCode':data.contactZipCode && data.contactZipCode,\r\n            'parameterRadioTwo':data.objective && data.objective,\r\n            'userid': authenRdc.profile.userID,\r\n            'REQNO':data.pmr1id && data.pmr1id,\r\n            'nameType':data.nameType && data.nameType\r\n        }\r\n        Object.assign(dataFormOne,tempData);\r\n\r\n        let chanode = []\r\n        data['chanode'].forEach(element => {\r\n                chanode.push( {\r\n                    'chanodeno':element.chanodeNo,\r\n                    'surveyno':element.surveyNo,\r\n                    'landno':element.landNo,\r\n                    'chanoderai':element.chanodeRai,\r\n                    'chanodengan':element.chanodeNgan,\r\n                    'chanodewa':element.chanodeWa,\r\n                    'userai':element.useRai,\r\n                    'usengan':element.useNgan,\r\n                    'usewa':element.useWa\r\n                })\r\n        });\r\n\r\n        let dataFormThree = {\r\n            'forBusiness':data.activity,\r\n            'houseNo':data.houseNo,\r\n            'villageNo':data.moo,\r\n            'alley':data.soi,\r\n            'road':data.road,\r\n            'district':data.districtID,\r\n            'subDistrict':data.subDistrictID,\r\n        }\r\n\r\n        let dataFormFour = {\r\n            'bldg': data.numberBuilding,\r\n            \"heightFloor\": data.highestStorey,\r\n            \"heightMeter\": data.height,\r\n            \"bdclos\": data.bdclOS,\r\n            \"activateArea\": data.activityArea,\r\n            \"allArea\": data.buildArea,\r\n            \"landuseRadio\": data.luChange,\r\n            \"other\": data.luDetail,\r\n        }\r\n        Object.assign(dataFormFour,data);\r\n\r\n        listView.push({\r\n            formOne:dataFormOne,\r\n            formTwo:chanode,\r\n            formThree:dataFormThree,\r\n            formFour:dataFormFour\r\n        })\r\n\r\n        this.setState({\r\n            detailPMR:listView\r\n        })\r\n        this.getLatLongPMR(data.pmr1id)\r\n    }\r\n\r\n    handleEdit = (data)=>(e)=>{\r\n        fetchGet_(`${process.env.REACT_APP_GET_PMR1_ID}?pmr1id=${data.pmr1ID}`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(data => {\r\n                this.setState({\r\n                    resultPMR1:data\r\n                })\r\n                this.initialValuesfForm(data)\r\n                this.setState({\r\n                    statusView:\"edit\"\r\n                })\r\n\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceSubDistric', ex)\r\n            })\r\n        \r\n        e.stopPropagation();\r\n    }  \r\n\r\n    handleDelete = (data)=>(e)=>{\r\n        const { showAlert} = this.props\r\n        this.setState({\r\n            deletePMRID:data,\r\n            alertMode:\"delete\"\r\n        })\r\n        showAlert({\r\n            altMsg: `${ALERT_MESSAGE.QUESTION.DELETE} ${data.pmr1ID} ?`,\r\n            altType: 2,\r\n            callbackConfirm: () => this.deletePMR(data.pmr1ID),\r\n            callbackCancel: this.handleCloseConfirm\r\n        })\r\n        e.stopPropagation()\r\n    }  \r\n\r\n    deletePMR = (pmrID) => {\r\n        const { showLoading, hideLoading, showAlert, hideAlert } = this.props;\r\n        const { tempSearch } = this.state\r\n        hideAlert();\r\n        showLoading()\r\n            fetchGet_(`${process.env.REACT_APP_DELETE_PMR_ID}?pmr1id=${pmrID}`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(data => {\r\n                if(data.statusCode === 1){\r\n                    showAlert({ \r\n                        altMsg: ALERT_MESSAGE.POPUP.DELETE_SUCCESS,\r\n                        altType: 1,\r\n                        callbackConfirm: this.handleCloseForm,\r\n                        callbackCancel: this.handleCloseConfirm\r\n                    })\r\n                    this.handleSubmit(tempSearch.data,null,tempSearch.rux)\r\n                }else if (data.statusCode === -1){\r\n                    hideLoading();\r\n                    showAlert({altMsg : `ไม่สามารถลบ ${pmrID} ออกจากระบบได้ เนื่องจากมีการเชื่อมโยงกับข้อมูลอ.1 หรือยผ.4`})\r\n                }else{\r\n                    hideLoading();\r\n                    showAlert({altMsg:ALERT_MESSAGE.POPUP.DELETE_FAIL})\r\n                }\r\n            })\r\n            .catch(ex => {\r\n                hideLoading();\r\n                showAlert({altMsg:ALERT_MESSAGE.POPUP.DELETE_FAIL})\r\n                console.log('ex callServiceSubDistric', ex)\r\n            })\r\n    }\r\n\r\n    initialValuesfForm = (data)=>{\r\n        const {submitPmrAction,authenRdc,showLoading} = this.props\r\n        showLoading()\r\n        this.setState({\r\n            tempData:data\r\n        })\r\n        let nameType = data.nameType?data.nameType.split(\"|\"):null;\r\n        var tempData = {};\r\n        for ( var index in nameType ) {\r\n            tempData[`nameType`+nameType[index]] = true; \r\n            if(`nameType`+nameType[index] === 'nameType9'){\r\n                tempData[`other`] = data.typeDetail\r\n            }\r\n        }\r\n        submitPmrAction.changeStatusForm(\"Edit\");\r\n\r\n        let dataFormOne = {\r\n            'province':data.contactProvinceID,\r\n            'district':data.contactDistrictID,\r\n            'subDistrict':data.contactSubDistrictID,\r\n            'parameterAt':data.writePlace,\r\n            'parameterName':data.name,\r\n            'parameterIDCard':data.contactIdentificationNo,\r\n            'parameterHouseNo':data.contactHouseNo,\r\n            'parameterMoo':data.contactMoo,\r\n            'parameterSoi':data.contactSoi,\r\n            'parameterRoad':data.contactRoad,\r\n            'parameterZipCode':data.contactZipCode,\r\n            'parameterRadioTwo':data.objective,\r\n            'userid': authenRdc.profile.userID,\r\n            'REQNO':data.pmr1id\r\n        }\r\n        Object.assign(dataFormOne,tempData );\r\n        submitPmrAction.saveFormStepOne(dataFormOne)\r\n\r\n        let chanode = []\r\n        data['chanode'].forEach(element => {\r\n                chanode.push( {\r\n                    'chanodeno':element.chanodeNo,\r\n                    'surveyno':element.surveyNo,\r\n                    'landno':element.landNo,\r\n                    'chanoderai':element.chanodeRai,\r\n                    'chanodengan':element.chanodeNgan,\r\n                    'chanodewa':element.chanodeWa,\r\n                    'userai':element.useRai,\r\n                    'usengan':element.useNgan,\r\n                    'usewa':element.useWa\r\n                })\r\n        });\r\n        submitPmrAction.saveFormStepTwo({'chanode':chanode})\r\n\r\n        let dataFormThree = {\r\n            'forBusiness':data.activity,\r\n            'houseNo':data.houseNo,\r\n            'villageNo':data.moo,\r\n            'alley':data.soi,\r\n            'road':data.road,\r\n            'district':data.districtID,\r\n            'subDistrict':data.subDistrictID,\r\n        }\r\n        submitPmrAction.saveFormStepThree(dataFormThree)\r\n\r\n        let dataFormFour = {\r\n            'bldg': data.numberBuilding,\r\n            \"heightFloor\": data.highestStorey,\r\n            \"heightMeter\": data.height,\r\n            \"bdclos\": data.bdclOS,\r\n            \"activateArea\": data.activityArea,\r\n            \"allArea\": data.buildArea,\r\n            \"landuseRadio\": data.luChange,\r\n            \"other\": data.luDetail,\r\n        }\r\n        submitPmrAction.saveFormStepFour(dataFormFour)\r\n        this.getLatLongPMR(data.pmr1id)\r\n    }\r\n\r\n    getLatLongPMR = async (PMRNO) => {\r\n        const {mapAction} = this.props\r\n    \r\n        try{\r\n        await   mapAction.bindMapCommand(MapFunctions.getPointPMR,{\r\n                mapserviceUrl: window.GET_POINT_PMR, \r\n                pmr1ID: PMRNO,\r\n                callback:this.callBackGetPointPMR\r\n            })\r\n        }\r\n        catch(exception){\r\n            console.log('Error : get mapservice error in Query Builder Control');\r\n        }\r\n    }\r\n\r\n    callBackGetPointPMR = async (data)=>{\r\n        const { mapAction } = this.props\r\n    \r\n        this.setState({\r\n            ObjectId:data.features[0].attributes\r\n        })\r\n        await mapAction.bindMapCommand(MapFunctions.drawPointEditPMRForm, {\r\n            attributes:data.features[0].attributes,\r\n            geometry:data.features[0].geometry,\r\n            callback: this.callBackDrawGraphic,\r\n            symbolColor : this.state.statusView === CONSTANT_VIEW.VIEW && [213, 128, 255]\r\n        })\r\n    }\r\n\r\n    callBackDrawGraphic = async (evt, graphic) => {\r\n        if (evt) {\r\n            const { mapAction, menuAction } = this.props;\r\n            // const {isShowEdit,statusView} = this.state;\r\n            this.managePanelForMobile(false, \"ClickMap\")\r\n            await mapAction.bindClearMapCommand()\r\n        \r\n            await mapAction.bindMapCommand(MapFunctions.IdentifyComprehensivePlan, {\r\n                geometry: evt.geometry,\r\n                callbackFn: this.callbackIdentifyResult\r\n            })\r\n            this.setState({graphic: graphic , isActiveDraw : false})\r\n            await menuAction.activeFunction(null)\r\n        }\r\n    }\r\n\r\n    callbackIdentifyResult = async (result, geometry, districtPMR1ID) => {\r\n        const { submitPmrAction,hideLoading,hideAlertFn } = this.props;\r\n        const landDetail = this.makeDataResult(result, districtPMR1ID);\r\n        await submitPmrAction.saveLandDetail(landDetail, geometry);\r\n        await submitPmrAction.saveDistrictPMR1ID(districtPMR1ID);\r\n        hideLoading()\r\n\r\n        if(hideAlertFn){\r\n            hideAlertFn()\r\n        }\r\n    }\r\n\r\n    callbackEdit = (geometry, graphic) => {\r\n        const { mapAction } = this.props;\r\n        if (geometry) {\r\n            mapAction.bindMapCommand(MapFunctions.IdentifyComprehensivePlan, {\r\n                geometry: geometry,\r\n                callbackFn: this.callbackIdentifyResult\r\n            })\r\n            mapAction.bindMapCommand(MapFunctions.getDistrictAndSubDistrictFormPoint, {\r\n                geometry: geometry,\r\n                callbackFn: this.callbackGetDistrictAndSubDistrict\r\n            })\r\n        }\r\n        this.setState({graphic: graphic})\r\n    }\r\n\r\n    callbackGetDistrictAndSubDistrict = async (values) => {\r\n        const { hideLoading } = this.props;\r\n        let valDistrict, valSubDistrict = null;\r\n        if(!values || (!values.SUBDISTRICT_ID && !values.DISTRICT_ID)) {\r\n            this.setState({ isBKK: false, })\r\n        } else {\r\n            const { SUBDISTRICT_ID, DISTRICT_ID } = values;\r\n            valDistrict = DISTRICT_ID;\r\n            valSubDistrict = SUBDISTRICT_ID;\r\n            this.setState({\r\n                subDistrictID: SUBDISTRICT_ID,\r\n                districtID: DISTRICT_ID,\r\n                isBKK: true\r\n            })\r\n        }\r\n        \r\n        if(this.callbackLocationStep3Fn){\r\n            await this.callbackLocationStep3Fn({\r\n                subDistrictID: valSubDistrict,\r\n                districtID: valDistrict,\r\n                isBKK: (valSubDistrict)})\r\n        }\r\n        hideLoading();\r\n    }\r\n\r\n    handleSpatialSearchCallback = (features, geometry) => {\r\n        let dataShowResult = null;\r\n        if(features){\r\n            dataShowResult = features.map(({attributes}) => {\r\n                return {\r\n                    pmr1ID: attributes.PMR1_ID,\r\n                    // pmr1Name: null,\r\n                    isInsideDistrict:attributes.IS_INSIDE_DISTRICT,\r\n                    status: attributes.STATUS,\r\n                    updater: attributes.UPDATER,\r\n                    pmr1Name:attributes.NAME\r\n                };\r\n            })\r\n        }\r\n        else{//no data\r\n            dataShowResult = [{pmr1ID:\"ไม่พบข้อมูล\"}];\r\n        }\r\n\r\n        this.setState(prevState => ({\r\n            isShowResult:true,\r\n            resultPMR: dataShowResult ? dataShowResult : [{pmr1ID:\"ไม่พบข้อมูล\"}],\r\n            spatialSearchDetail: {\r\n                ...prevState.spatialSearchDetail,\r\n                isActive: false,\r\n                isSearch: true,\r\n                tmpGeometry: geometry\r\n            }\r\n        }))\r\n    }\r\n\r\n    handleSpatialSearchClick = () => {\r\n        const {mapAction} = this.props\r\n        if(!this.state.spatialSearchDetail.isActive){//เปิดการวาด\r\n            mapAction.bindMapCommand(MapFunctions.drawSpatialSearchPMR,{\r\n                callback:this.handleSpatialSearchCallback,\r\n                loading: {\r\n                    show: this.props.showLoading,\r\n                    hide: this.props.hideLoading\r\n                }\r\n            });\r\n        } else {//ปิกการวาด\r\n            mapAction.bindMapCommand(MapFunctions.drawSpatialSearchPMRDeactive);\r\n        }\r\n\r\n        this.setState(prevState => ({\r\n            //set spatial search \r\n            spatialSearchDetail: {\r\n                ...prevState.spatialSearchDetail,\r\n                isActive: !this.state.spatialSearchDetail.isActive,\r\n            }\r\n        }))\r\n    }\r\n\r\n    handleCallbackLocation = (fn) => {\r\n        this.callbackLocationStep3Fn = fn;\r\n    }\r\n\r\n    managePanelForMobile = async (isDraw, func) => {\r\n        const { menuAction, width } = this.props;\r\n\r\n        if (width === 'sm' || width === 'xs') {\r\n            switch (func) {\r\n                case \"ClickMap\":\r\n                    if (isDraw) {\r\n                        await menuAction.closeMenuPanel();\r\n                        await menuAction.openMenuMap();\r\n                    } else {\r\n                        await menuAction.openMenuPanel();\r\n                        await menuAction.closeMenuMap();\r\n                    }\r\n                    break;\r\n                default:\r\n                    break;\r\n            }\r\n        }\r\n    }\r\n\r\n    handleClickAddStepTwo = () => {\r\n        if (this.refFuncAddForm) {\r\n            this.refFuncAddForm()\r\n        }\r\n    }\r\n\r\n    makeDataResult = (result, districtPMR1ID) => {\r\n        const adminpolyCode = this.getAdminPoly(districtPMR1ID)\r\n\r\n        const landUse = []\r\n        const landDetail = {\r\n            lupZone: \"\",\r\n            lupColor: \"\",\r\n            lupUse: \"\",\r\n            lupSubZone: \"\",\r\n            lupFar: \"\",\r\n            lupOsr: \"\",\r\n            district: adminpolyCode.district ? adminpolyCode.district : \"\",\r\n            subDistrict: adminpolyCode.subDistrict ? adminpolyCode.subDistrict : \"\",\r\n            province: adminpolyCode.province ? adminpolyCode.province : \"\",\r\n        }\r\n\r\n        result.forEach(itm => {\r\n            if (itm.layerId === 11) { //รอเอาใส่ config\r\n                landUse.push(itm)\r\n            }\r\n        })\r\n\r\n        if (landUse.length > 0) {\r\n            const { LUP_ZONE, LUP_COLOR, LUP_USE, LUP_SUBZONE, LUP_FAR, LUP_OSR } = landUse[0].feature.attributes\r\n            landDetail.lupZone = LUP_ZONE;\r\n            landDetail.lupColor = LUP_COLOR;\r\n            landDetail.lupUse = LUP_USE;\r\n            landDetail.lupSubZone = LUP_SUBZONE;\r\n            landDetail.lupFar = LUP_FAR;\r\n            landDetail.lupOsr = LUP_OSR;\r\n            landDetail.lupUserNo = this.makeCodeValue(LUP_USE);\r\n        }\r\n        return landDetail\r\n    }\r\n\r\n    makeCodeValue = (LUP_USE) => {\r\n        let lupUserNo = \"\"\r\n        const landUseValue = window.LANDUSE_VALUES;\r\n\r\n        landUseValue.forEach(itm => {\r\n            if (itm.name === LUP_USE) {\r\n                lupUserNo = itm.code\r\n            }\r\n        })\r\n\r\n        return lupUserNo\r\n    }\r\n\r\n    exportPDF = (evt) =>{\r\n        evt.stopPropagation();\r\n        const { mapAction, showLoading ,panelContentData} = this.props;\r\n        const {inPmr1ID} = this.state;\r\n        showLoading();\r\n\r\n        mapAction.bindMapCommand(MapFunctions.PrintMapPMR1, { pmr1id: inPmr1ID?inPmr1ID:panelContentData.pmrID,  callback: this.handleCallbackPrintMap })\r\n    }\r\n\r\n    handleCallbackPrintMap = (url) => {\r\n        if(url){//export ได้\r\n            this.toDataURL(url)\r\n                .then(async mapPNGBase64 => {\r\n                this.generateReport(mapPNGBase64).then(result=>{\r\n                    this.props.hideLoading();\r\n                })\r\n\r\n            })\r\n        } else {//export map ไม่ได้\r\n            this.generateReport().then(result=>{\r\n                this.props.hideLoading();\r\n            })\r\n            this.props.hideLoading()\r\n        }\r\n    }\r\n\r\n    toDataURL = url => fetch(url)\r\n    .then(response => response.blob())\r\n    .then(blob => new Promise((resolve, reject) => {\r\n        const reader = new FileReader()\r\n        reader.onloadend = () => resolve(reader.result)\r\n        reader.onerror = reject\r\n        reader.readAsDataURL(blob)\r\n    }))\r\n\r\n    generateReport = async (base64Map=null) => {\r\n        const {panelContentData} = this.props;\r\n        const {resultPMR1,inPmr1ID} = this.state;\r\n        try {\r\n            // let pmr1ID = inPmr1ID?inPmr1ID:panelContentData.pmrID\r\n            // let pmr1ID = resultPMR1 && resultPMR1.pmr1id ? resultPMR1.pmr1id : panelContentData.pmrID;\r\n\r\n            let pmr1ID = null;\r\n\r\n            if(resultPMR1 && resultPMR1.pmr1id){\r\n                pmr1ID = resultPMR1.pmr1id\r\n            }else if(panelContentData && panelContentData.pmrID){\r\n                pmr1ID = panelContentData.pmrID\r\n            }else if(inPmr1ID){\r\n                pmr1ID = inPmr1ID\r\n            }\r\n\r\n            // console.log('pmr1ID',pmr1ID)\r\n            if (pmr1ID) {\r\n                fetchGet_(`${process.env.REACT_APP_PMR_GET_PDF_PMR1}?pmr1id=${pmr1ID}`).then(function (response) {\r\n                    return response.json()\r\n                }).then(function (result) {\r\n                    ExportSubmitPMR(result, base64Map);\r\n                    return result;                \r\n                })\r\n            }\r\n        }\r\n        catch (err) {\r\n            this.props.hideLoading();\r\n        }\r\n    }\r\n\r\n    handleGotoView = async res => {\r\n        // const {...param} = this.props\r\n        const getView = await fetchGet_(`${process.env.REACT_APP_GET_PMR1_ID}?pmr1id=${res}`)\r\n        let resultView = await getView.json();\r\n        if(resultView){\r\n            this.setDataForView(resultView)\r\n            this.setState({\r\n                formStep:1,\r\n                statusView:'view',\r\n            })\r\n        }else{\r\n            this.props.showAlert({altMsg:\"ไม่พบข้อมูล\"})\r\n            this.props.hideLoading();\r\n        }\r\n    }\r\n\r\n    getAdminPoly = (districtPMR1ID) => {\r\n        const province = districtPMR1ID ? districtPMR1ID.substring(0, 2) : null;\r\n        const district = districtPMR1ID ? districtPMR1ID.substring(0, 4) : null;\r\n        const subDistrict = districtPMR1ID ? districtPMR1ID.substring(0, 6) : null;\r\n\r\n        return { province, district, subDistrict }\r\n    }\r\n    \r\n    handleRefAddForm = node => {\r\n        this.refFuncAddForm = node;\r\n    }\r\n\r\n    renderFormStep = () => {\r\n        const { formStep, resultPMR1, ObjectId, tempData, isDirty } = this.state;\r\n        const {  subDistrictID, districtID } = this.state;\r\n        let dataEdit = {\r\n            \"isDirty\":isDirty,\r\n            \"ObjectId\":ObjectId,\r\n            \"tempData\":tempData\r\n        }\r\n        switch (formStep) {\r\n            case 1:\r\n                return <FormOne onChangeStep={this.handleChangeStep} onClickBack={this.onClickBack} resultPMR1={resultPMR1} />\r\n            case 2:\r\n                return <FormTwo onChangeStep={this.handleChangeStep} onClickBack={this.onClickBack}  refFuncAddForm={this.handleRefAddForm} />\r\n            case 3:\r\n                return <FormThree onChangeStep={this.handleChangeStep} onClickBack={this.onClickBack} onCallbackLocation={this.handleCallbackLocation} />\r\n            case 4:\r\n            return <FormFour \r\n            onClickBack={this.onClickBack}\r\n            onChangeStep={this.handleChangeStep}   \r\n            subDistrictId={subDistrictID} \r\n            districtId={districtID} \r\n            dataEdit={dataEdit}\r\n                ObjectId={ObjectId} \r\n                gotoView={this.handleGotoView}            />\r\n            default:\r\n                break;\r\n        }\r\n    }\r\n\r\n    handleDrawGraphic = async () => {\r\n\t\t// const { isActiveDraw, isActiveEdit } = this.state;\r\n        const { mapAction, menuAction, menuRdc } = this.props;\r\n\r\n\t\t// if (isActiveDraw) { // ยกเลิกการวาด\r\n\t\t// \tawait mapAction.bindMapCommand(MapFunctions.clearEvtDrawPmr)\r\n\t\t// \tawait mapAction.bindClearMapCommand()\r\n\t\t// \tthis.setState({ isActiveDraw: false })\r\n\r\n\t\t// } else { // เปิดการวาด\r\n\t\t// \tisActiveEdit && await mapAction.bindMapCommand(MapFunctions.clearEditPmr)\r\n\t\t// \tmapAction.bindMapCommand(MapFunctions.drawPointSubmitPmr, {\r\n\t\t// \t\tcallback: this.callBackDrawGraphic\r\n\t\t// \t})\r\n\t\t// \tthis.managePanelForMobile(true, \"ClickMap\")\r\n\t\t// \tthis.setState({\r\n\t\t// \t\tisActiveDraw: true,\r\n\t\t// \t\tisActiveEdit: false\r\n\t\t// \t})\r\n        // }\r\n        \r\n        if(menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM){\r\n            menuAction.activeFunction(null)\r\n\t\t\tmapAction.bindMapCommand(MapFunctions.clearEvtDrawPmr)\r\n        }else{\r\n            this.managePanelForMobile(true)\r\n            await menuAction.activeFunction(ACTIVE_FUNCTION.ADD_GP_FORM)\r\n            setTimeout(async () => {\r\n                await mapAction.bindMapCommand(MapFunctions.clearEditPmr)\r\n                await mapAction.bindMapCommand(MapFunctions.drawPointSubmitPmr, { callback: this.callBackDrawGraphic })\r\n            }, (50))\r\n        }\r\n\t}\r\n\r\n\thandleEditGraphic = async () => {\r\n\t\tconst { graphic } = this.state;\r\n\t\tconst { mapAction, menuAction, menuRdc } = this.props;\r\n\r\n\t\t// if (isActiveEdit) { // ยกเลิกการแก้ไข\r\n\t\t// \tawait mapAction.bindMapCommand(MapFunctions.clearEditPmr)\r\n\t\t// \tawait mapAction.bindClearMapCommand();\r\n\t\t// \tthis.setState({ isActiveEdit: false })\r\n\t\t// } else { // เปิดการแก้ไข\r\n\t\t// \tisActiveDraw && await mapAction.bindMapCommand(MapFunctions.clearEvtDrawPmr)\r\n\t\t// \tmapAction.bindMapCommand(MapFunctions.editGraphicSubmitPmr, { //edit\r\n\t\t// \t\tgraphic: graphic,\r\n\t\t// \t\tcallback: this.callbackEdit\r\n\t\t// \t})\r\n\t\t// \tthis.setState({\r\n\t\t// \t\tisActiveDraw: false,\r\n\t\t// \t\tisActiveEdit: true\r\n\t\t// \t})\r\n        // }\r\n        if(menuRdc.ActiveFunction === ACTIVE_FUNCTION.EDIT_GP_FORM){\r\n\t\t\tmenuAction.activeFunction(null)\r\n\t\t\tawait mapAction.bindMapCommand(MapFunctions.clearEditPmr)\r\n\t\t\tmapAction.bindClearMapCommand();\r\n\t\t}else{\r\n\t\t\tthis.managePanelForMobile(true)\r\n\t\t\tmenuAction.activeFunction(ACTIVE_FUNCTION.EDIT_GP_FORM)\r\n\t\t\tawait mapAction.bindMapCommand(MapFunctions.clearEvtDrawPmr)\r\n\t\t\tawait mapAction.bindMapCommand(MapFunctions.editGraphicSubmitPmr, { graphic, callback: this.callbackEdit })\r\n\t\t}\r\n\t}\r\n\r\n    renderEditForm = (status)=>{\r\n        const { \r\n            valueChange,\r\n            ddSubdistrict,\r\n            ddDistrict,\r\n            resultPMR,\r\n            formStep,\r\n            detailPMR,\r\n            spatialSearchDetail,\r\n            // isActiveDraw,\r\n            // isActiveEdit,\r\n            minDate,\r\n            maxDate\r\n        } = this.state\r\n        \r\n        const { isShowResult} = this.state\r\n        const {title, isOnlySearch,hideLoading,authenRdc, menuRdc } = this.props;\r\n\r\n        switch (status) {\r\n            case CONSTANT_VIEW.SEARCH:\r\n                return  <Fragment>\r\n                        <EditPmrStaffView \r\n                            title={title}\r\n                            isActiveDraw={spatialSearchDetail.isActive}\r\n                            isOnlySearch = {isOnlySearch}\r\n                            isShowResult={isShowResult}\r\n                            valueChange={valueChange}\r\n                            ddSubdistrict={ddSubdistrict}\r\n                            ddDistrict={ddDistrict}\r\n                            displayResultPMR={resultPMR}\r\n                            userID = {authenRdc.profile && authenRdc.profile.userID ? authenRdc.profile.userID : \"\"}\r\n                            districtID = {authenRdc.profile && authenRdc.profile.districtID ? authenRdc.profile.districtID : \"\"}\r\n\r\n                            onChangeLookup={this.handleChangeLookup}\r\n                            onClickBack={this.onClickBack}\r\n                            onShowDetail={this.handleShowDetail}\r\n                            onEdit={this.handleEdit}\r\n                            onDelete={this.handleDelete}\r\n                            onClickSpatialSearch={this.handleSpatialSearchClick}\r\n                            onChangeMode={this.handleChange}\r\n                            onSubmit={this.handleSubmit}\r\n                            onStartDateChange={this.handleChangeStartDate}\r\n                            onEndDateChange={this.handleChangeEndDate}\r\n                            minDate={minDate}\r\n                            maxDate={maxDate}\r\n                        />\r\n                        </Fragment>\r\n            case CONSTANT_VIEW.VIEW:\r\n                return <Fragment>\r\n                        <AppBarHeaderView\r\n                            title={title}\r\n                            onClickBack={this.onClickBack} \r\n                        />\r\n                        <FormSubmitPmrView\r\n                            formStep={formStep}\r\n                            viewForm\r\n                        >\r\n                        <ViewPmr \r\n                            isShowLoading={hideLoading}\r\n                            exportPDF={this.exportPDF}\r\n                            formStep={formStep}\r\n                            dataDetail={detailPMR}\r\n                            onClickBack={this.onClickBack}\r\n                            onClickNext={this.handleChangeStep}\r\n                        />\r\n                        </FormSubmitPmrView>\r\n                    </Fragment>\r\n            case CONSTANT_VIEW.EDIT:\r\n                return  <Fragment>\r\n                            <AppBarHeaderView\r\n                                title={title}\r\n                                onClickBack={this.onClickBack}\r\n                            />\r\n                            <FormSubmitPmrView\r\n                                formStep={formStep}\r\n                                onDrawGraphic={this.handleDrawGraphic}\r\n                                onEditGraphic={this.handleEditGraphic}\r\n                                isActiveDraw={menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM}\r\n                                isActiveEdit={menuRdc.ActiveFunction === ACTIVE_FUNCTION.EDIT_GP_FORM}\r\n                                onClickAddStepTwo={this.handleClickAddStepTwo}\r\n                            >\r\n                                {this.renderFormStep()}\r\n                            </FormSubmitPmrView>\r\n                        </Fragment>\r\n           \r\n            default:\r\n                break;\r\n        }\r\n    }\r\n\r\n    render() {\r\n        const {statusView} = this.state\r\n        const { altTitle, altMsg, altType, isShowAlt, callbackConfirm, callbackCancel,isShowLoading } = this.props;\r\n\r\n        return (\r\n            <Fragment>\r\n                <Loading isShowLoading={isShowLoading} />\r\n                {this.renderEditForm(statusView)}\r\n                <AlertMessage\r\n                    title={altTitle}\r\n                    text={altMsg}\r\n                    type={altType}\r\n                    showAlert={isShowAlt}\r\n                    onSubmit={callbackConfirm}\r\n                    onCancel={callbackCancel}\r\n                /> \r\n        </Fragment>)\r\n    }\r\n}\r\nconst mapStateToProps = state => ({\r\n    authenRdc: state.authen,\r\n    submitPmr:state.submitPmr,\r\n    panelContentData:state.PanelContentData,\r\n    menuRdc: state.menu\r\n});\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    panelContentAction: bindActionCreators(PanelContentAction, dispatch),\r\n    submitPmrAction: bindActionCreators(SubmitPmrAction, dispatch),\r\n    mapAction: bindActionCreators(MapAction, dispatch),\r\n    menuAction: bindActionCreators(MenuAction, dispatch)\r\n});\r\n\r\nconst formName =  \"FormEditPMR\";\r\nconst reduxFormParameter = {\r\n    form: formName,\r\n    validate:searchEditPmr1Validate\r\n};\r\nconst FormEditStaff = WithLoading(EditPmrStaff)\r\nconst enhance = compose(\r\n\tconnect(\r\n\t\tmapStateToProps,\r\n\t\tmapDispatchToProps,\r\n    ),\r\n    reduxForm(reduxFormParameter),\r\n)\r\nexport default WithAlertMessage(enhance(FormEditStaff))","import React, { Component, Fragment } from 'react'\r\nimport { connect } from 'react-redux';\r\nimport { bindActionCreators } from 'redux';\r\nimport { compose } from 'recompose'\r\n\r\n//import component\r\nimport EditPmrView from '../../../../../../Presentationals/Web/Panel/Menu/MenuContent/PMR1/EditPmrView';\r\nimport FormOne from './SubmitPmr/FormStep/FormOne'\r\nimport FormTwo from './SubmitPmr/FormStep/FormTwo';\r\nimport FormThree from './SubmitPmr/FormStep/FormThree';\r\nimport FormFour from './SubmitPmr/FormStep/FormFour'\r\nimport ViewPmr from './ViewPmr/ViewPmr'\r\nimport FormSubmitPmrView from '../../../../../../Presentationals/Web/Panel/Menu/MenuContent/PMR1/SubmitPmr/FormSubmitPmrView';\r\nimport AppBarHeaderView from '../../../../../../Presentationals/Web/Panel/AppBarHeaderView';\r\nimport EditPmrStaff from './EditPmrStaff'\r\nimport ExportSubmitPMR from './ExportSubmitPMR/ExportSubmitPMR';\r\nimport WithLoading from '../../../../../../HOC/WithLoading';\r\nimport Loading from '../../../../../../Controls/Containers/Loading';\r\nimport WithAlertMessage from '../../../../../../HOC/WithAlertMessage';\r\n\r\n// import AlertMessage from '../../../../../../Controls/Containers/AlertMessage';\r\nimport AlertMessageSuper from '../../../../../../Controls/Containers/AlertMessageSuper';\r\n\r\n//import service - utils\r\nimport { fetchGet_ } from '../../../../../../Utilities/ServiceUtils'\r\nimport { dateThaiFormat } from '../../../../../../Utilities/DateTimeUtil';\r\nimport {getTypeLocalStore} from '../../../../../../Utilities/LocalStorageUtill';\r\n\r\n//import action\r\nimport * as MapFunctions from '../../../../../../Map/MapFunctions';\r\nimport * as MapAction from '../../../../../../Actions/Web/Maps/MapAction';\r\nimport * as SubmitPmrAction from '../../../../../../Actions/Web/Panel/SubmitPmrAction';\r\nimport * as PanelContentAction from '../../../../../../Actions/Web/Panel/PanelContentAction';\r\nimport * as AuthenAction from '../../../../../../Actions/Authentications/AuthenAction';\r\nimport * as MenuAction from '../../../../../../Actions/Web/MenuAction'\r\n\r\n//import constants\r\nimport { LISTGRAPHICLAYER, ALERT_MESSAGE, ACTIVE_FUNCTION } from '../../../../../../Constants/Constants';\r\nimport { CONFIG_MENU } from '../../../../../../Constants/MenuConstants';\r\n\r\nclass EditPmr extends Component {\r\n    constructor() {\r\n        super();\r\n        this.callbackLocationStep3Fn = null;\r\n\r\n        this.state = {\r\n            formStep: 1,\r\n            isShowListPMR: true,\r\n            isShowEdit: false,\r\n            isShowView: false,\r\n            resultPMR1: null,\r\n            listPMR: [],\r\n            detailPMR: null,\r\n            subDistrictID: null,\r\n            districtID: null,\r\n            ObjectId: null,\r\n            tempData: null,\r\n            isDirty: null,\r\n            deletePMRID:null,\r\n            alertMode:null,\r\n            inPmr1ID:null,\r\n            tmpView:null,\r\n            isActiveDraw:false,\r\n            isActiveEdit:false,\r\n            graphic:null\r\n        }\r\n    }\r\n\r\n    handleShowDetail = value => async evt => {\r\n        this.setState({\r\n            inPmr1ID:value.pmr1ID\r\n        })\r\n        const getView = await fetchGet_(`${process.env.REACT_APP_GET_PMR1_ID}?pmr1id=${value.pmr1ID}`)\r\n        let resultView = await getView.json();\r\n        this.setDataForView(resultView)\r\n        this.setState({\r\n            isShowView: true,\r\n            isShowListPMR: false,\r\n            isShowEdit: false,\r\n        })\r\n    }\r\n\r\n    setDataForView = (data) => {\r\n        const { authenRdc } = this.props\r\n        let listView = []\r\n        let nameType = data.nameType ? data.nameType.split(\"|\") : null;\r\n        let tempData = {};\r\n        for (var index in nameType) {\r\n            tempData[`nameType` + nameType[index]] = true;\r\n            if (`nameType` + nameType[index] === 'nameType9') {\r\n                tempData[`other`] = data.typeDetail\r\n            }\r\n        }\r\n\r\n        let dataFormOne = {\r\n            'date': dateThaiFormat(new Date(data.date)),\r\n            'province': data.contactProvinceID,\r\n            'district': data.contactDistrictID,\r\n            'subDistrict': data.contactSubDistrictID,\r\n            'parameterAt': data.writePlace,\r\n            'parameterName': data.name,\r\n            'parameterIDCard': data.contactIdentificationNo,\r\n            'parameterHouseNo': data.contactHouseNo,\r\n            'parameterMoo': data.contactMoo,\r\n            'parameterSoi': data.contactSoi,\r\n            'parameterRoad': data.contactRoad,\r\n            'parameterZipCode': data.contactZipCode,\r\n            'parameterRadioTwo': data.objective,\r\n            'userid': authenRdc.profile.userID,\r\n            'REQNO': data.pmr1id,\r\n            'nameType': data.nameType\r\n        }\r\n        Object.assign(dataFormOne, tempData);\r\n\r\n        let chanode = []\r\n\r\n        data['chanode'].forEach(element => {\r\n            chanode.push({\r\n                'chanodeno': element.chanodeNo,\r\n                'surveyno': element.surveyNo,\r\n                'landno': element.landNo,\r\n                'chanoderai': element.chanodeRai,\r\n                'chanodengan': element.chanodeNgan,\r\n                'chanodewa': element.chanodeWa,\r\n                'userai': element.useRai,\r\n                'usengan': element.useNgan,\r\n                'usewa': element.useWa\r\n            })\r\n        });\r\n\r\n        let dataFormThree = {\r\n            'forBusiness': data.activity,\r\n            'houseNo': data.houseNo,\r\n            'villageNo': data.moo,\r\n            'alley': data.soi,\r\n            'road': data.road,\r\n            'district': data.districtID,\r\n            'subDistrict': data.subDistrictID,\r\n        }\r\n\r\n        let dataFormFour = {\r\n            'bldg': data.numberBuilding,\r\n            \"heightFloor\": data.highestStorey,\r\n            \"heightMeter\": data.height,\r\n            \"bdclos\": data.bdclOS,\r\n            \"activateArea\": data.activityArea,\r\n            \"allArea\": data.buildArea,\r\n            \"landuseRadio\": data.luChange,\r\n            \"other\": data.luDetail,\r\n        }\r\n        Object.assign(dataFormFour, data);\r\n\r\n\r\n        listView.push({\r\n            formOne: dataFormOne,\r\n            formTwo: chanode,\r\n            formThree: dataFormThree,\r\n            formFour: dataFormFour\r\n        })\r\n\r\n        this.setState({\r\n            detailPMR: listView\r\n        })\r\n        this.getLatLongPMR(data.pmr1id)\r\n    }\r\n\r\n    handleEdit = value => evt => {\r\n        evt.stopPropagation()\r\n        fetchGet_(`${process.env.REACT_APP_GET_PMR1_ID}?pmr1id=${value.pmr1ID}`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(data => {\r\n                this.setState({\r\n                    resultPMR1: data\r\n                })\r\n                this.initialValuesfForm(data)\r\n                this.setState({\r\n                    isShowEdit: true,\r\n                    isShowListPMR: false\r\n                })\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceSubDistric', ex)\r\n            })\r\n    }\r\n\r\n    handleDelete = value => evt => {\r\n        evt.stopPropagation()\r\n        // this.setState({\r\n        //     deletePMRID:value.pmr1ID,\r\n        //     alertMode:\"delete\"\r\n        // })\r\n        this.props.showAlert({\r\n            altMsg: `${ALERT_MESSAGE.QUESTION.DELETE} ${value.pmr1ID} ?`,\r\n            altType: 2,\r\n            callbackConfirm: () => this.deletePMR(value.pmr1ID),\r\n            callbackCancel: this.handleCloseConfirm\r\n        })\r\n    }\r\n\r\n    deletePMR = async (deletePMRID) => {\r\n        const { showAlert } = this.props;\r\n        await fetchGet_(`${process.env.REACT_APP_DELETE_PMR_ID}?pmr1id=${deletePMRID}`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(data => {\r\n                if(data && data.statusCode === 1){\r\n                    showAlert({\r\n                        altMsg: ALERT_MESSAGE.POPUP.DELETE_SUCCESS,\r\n                        altType: 1,\r\n                        callbackConfirm: this.handleCloseForm,\r\n                        callbackCancel: this.handleCloseConfirm\r\n                    })\r\n                    this.setState({\r\n                        alertMode:null\r\n                    })\r\n                }else if (data && data.statusCode === -1){\r\n                    showAlert({altMsg : `ไม่สามารถลบ ${deletePMRID} ออกจากระบบได้ เนื่องจากมีการเชื่อมโยงกับข้อมูลอ.1 หรือยผ.4`})\r\n                }else{\r\n                    showAlert({altMsg:ALERT_MESSAGE.POPUP.DELETE_FAIL})\r\n                }\r\n\r\n            })\r\n            .catch(ex => {\r\n                showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR})\r\n                console.log('ex callServiceSubDistric', ex)\r\n            })\r\n    }\r\n\r\n    componentDidMount = ()=>{\r\n        const {panelContentData,authenRdc,authenAction,functionID,showLoading} = this.props\r\n        const localType = getTypeLocalStore();\r\n        if(authenRdc && authenRdc.profile && localType !== \"o\" ){\r\n            authenAction.getUpdatePmr1Form()\r\n        }\r\n        if(functionID === CONFIG_MENU.FCN13.ID){\r\n            if(panelContentData.pmrID){\r\n                this.handleGotoView(panelContentData.pmrID)\r\n                showLoading()\r\n            }\r\n        }else{\r\n            if(panelContentData.pmrID){\r\n                  new Promise(async (resolve, reject) => {\r\n                 await fetchGet_(`${process.env.REACT_APP_GET_PMR1_ID}?pmr1id=${panelContentData.pmrID}`).then((res)=>{\r\n                        if(res){\r\n                            this.setState({\r\n                                tmpView:res.json()\r\n                            })\r\n                        }\r\n                    })\r\n                 \r\n                })  \r\n                showLoading()\r\n            }\r\n        }\r\n        this.genListPMR()\r\n    }\r\n\r\n    exportPDF = ()=>{\r\n        const { mapAction, showLoading ,panelContentData} = this.props;\r\n        const {inPmr1ID} = this.state;\r\n        showLoading()\r\n        mapAction.bindMapCommand(MapFunctions.PrintMapPMR1, { pmr1id: inPmr1ID? inPmr1ID:panelContentData.pmrID,  callback: this.handleCallbackPrintMap })\r\n\r\n    }\r\n    handleCallbackPrintMap = (url) => {\r\n        if(url){//export ได้\r\n            this.toDataURL(url)\r\n                .then(async mapPNGBase64 => {\r\n                    // console.log('mapPNGBase64 :: ', mapPNGBase64);\r\n                this.generateReport(mapPNGBase64).then(result=>{\r\n                    this.props.hideLoading();\r\n                })\r\n            })\r\n        } else {//export map ไม่ได้\r\n            this.generateReport().then(result=>{\r\n                this.props.hideLoading();\r\n            })\r\n            this.props.hideLoading()\r\n        }\r\n    }\r\n\r\n    toDataURL = url => fetch(url)\r\n    .then(response => response.blob())\r\n    .then(blob => new Promise((resolve, reject) => {\r\n        const reader = new FileReader()\r\n        reader.onloadend = () => resolve(reader.result)\r\n        reader.onerror = reject\r\n        reader.readAsDataURL(blob)\r\n    }))\r\n\r\n    generateReport = async (base64Map=null) => {\r\n        const { panelContentData } = this.props;\r\n        const { resultPMR1,inPmr1ID} = this.state;\r\n        try {\r\n            // let pmr1ID = inPmr1ID?inPmr1ID:panelContentData.pmrID\r\n            let pmr1ID = null;\r\n            \r\n            if(panelContentData && panelContentData.pmrID){\r\n                pmr1ID = panelContentData && panelContentData.pmrID\r\n            }else if(inPmr1ID){\r\n                pmr1ID = inPmr1ID\r\n            }else if(resultPMR1 && resultPMR1.pmr1id){\r\n                pmr1ID = resultPMR1.pmr1id\r\n            }\r\n\r\n            if (pmr1ID) {\r\n                fetchGet_(`${process.env.REACT_APP_PMR_GET_PDF_PMR1}?pmr1id=${pmr1ID}`).then(function (response) {\r\n                    return response.json()\r\n                }).then(function (result) {\r\n                    ExportSubmitPMR(result, base64Map);\r\n                    return result;                \r\n                })\r\n            }\r\n        }\r\n        catch (err) {\r\n            console.log('err',err)\r\n            this.props.hideLoading();\r\n            alert('เกิดข้อผิดพลาด')\r\n        }\r\n    }\r\n\r\n    handleGotoView = async res =>{\r\n        const { showLoading } = this.props;\r\n        showLoading()\r\n        const getView = await fetchGet_(`${process.env.REACT_APP_GET_PMR1_ID}?pmr1id=${res}`)\r\n        let resultView = await getView.json();\r\n        this.setDataForView(resultView)\r\n        this.setState({\r\n            formStep:1,\r\n            isShowView: true,\r\n            isShowListPMR: false,\r\n            isShowEdit: false,\r\n        })\r\n    }\r\n\r\n    initialValuesfForm = (data) => {\r\n        const { submitPmrAction, authenRdc, showLoading } = this.props\r\n        showLoading()\r\n        this.setState({\r\n            tempData: data,\r\n        })\r\n        let nameType = data.nameType ? data.nameType.split(\"|\") : null;\r\n        let tempData = {};\r\n        for (var index in nameType) {\r\n            tempData[`nameType` + nameType[index]] = true;\r\n            if (`nameType` + nameType[index] === 'nameType9') {\r\n                tempData[`other`] = data.typeDetail\r\n            }\r\n        }\r\n        submitPmrAction.changeStatusForm(\"Edit\");\r\n\r\n        let dataFormOne = {\r\n            'province': data.contactProvinceID,\r\n            'district': data.contactDistrictID,\r\n            'subDistrict': data.contactSubDistrictID,\r\n            'parameterAt': data.writePlace,\r\n            'parameterName': data.name,\r\n            'parameterIDCard': data.contactIdentificationNo,\r\n            'parameterHouseNo': data.contactHouseNo,\r\n            'parameterMoo': data.contactMoo,\r\n            'parameterSoi': data.contactSoi,\r\n            'parameterRoad': data.contactRoad,\r\n            'parameterZipCode': data.contactZipCode,\r\n            'parameterRadioTwo': data.objective,\r\n            'userid': authenRdc.profile.userID,\r\n            'REQNO': data.pmr1id,\r\n            \"date\": data.date,\r\n            \"pmr1DistrictID\": data.pmr1DistrictID,\r\n            \"pmr1SubDistrictID\": data.pmr1SubDistrictID\r\n        }\r\n\r\n        Object.assign(dataFormOne, tempData);\r\n        submitPmrAction.saveFormStepOne(dataFormOne)\r\n\r\n        let chanode = []\r\n        data['chanode'].forEach(element => {\r\n            chanode.push({\r\n                'chanodeno': element.chanodeNo,\r\n                'surveyno': element.surveyNo,\r\n                'landno': element.landNo,\r\n                'chanoderai': element.chanodeRai,\r\n                'chanodengan': element.chanodeNgan,\r\n                'chanodewa': element.chanodeWa,\r\n                'userai': element.useRai,\r\n                'usengan': element.useNgan,\r\n                'usewa': element.useWa\r\n            })\r\n        });\r\n        submitPmrAction.saveFormStepTwo({ 'chanode': chanode })\r\n\r\n        let dataFormThree = {\r\n            'forBusiness': data.activity,\r\n            'houseNo': data.houseNo,\r\n            'villageNo': data.moo,\r\n            'alley': data.soi,\r\n            'road': data.road,\r\n            'district': data.districtID,\r\n            'subDistrict': data.subDistrictID,\r\n        }\r\n        submitPmrAction.saveFormStepThree(dataFormThree)\r\n\r\n        let dataFormFour = {\r\n            'bldg': data.numberBuilding,\r\n            \"heightFloor\": data.highestStorey,\r\n            \"heightMeter\": data.height,\r\n            \"bdclos\": data.bdclOS,\r\n            \"activateArea\": data.activityArea,\r\n            \"allArea\": data.buildArea,\r\n            \"landuseRadio\": data.luChange,\r\n            \"other\": data.luDetail,\r\n        }\r\n        submitPmrAction.saveFormStepFour(dataFormFour)\r\n        this.getLatLongPMR(data.pmr1id)\r\n    }\r\n\r\n    genPointView = async (PMRNO) => {\r\n        const { mapAction } = this.props\r\n        try {\r\n            await mapAction.bindMapCommand(MapFunctions.getPointPMR, {\r\n                mapserviceUrl: window.GET_POINT_PMR,\r\n                pmr1ID: PMRNO,\r\n                callback: this.callBackGetPointPMR\r\n            })\r\n        }\r\n        catch (exception) {\r\n            console.log('Error : get mapservice error in Query Builder Control');\r\n        }\r\n    }\r\n\r\n    getLatLongPMR = async (PMRNO) => {\r\n        const { mapAction } = this.props\r\n        try {\r\n            await mapAction.bindMapCommand(MapFunctions.getPointPMR, {\r\n                mapserviceUrl: window.GET_POINT_PMR,\r\n                pmr1ID: PMRNO,\r\n                callback: this.callBackGetPointPMR\r\n            })\r\n        }\r\n        catch (exception) {\r\n            console.log('Error : get mapservice error in Query Builder Control');\r\n        }\r\n    }\r\n\r\n    callBackGetPointPMR = (data) => {\r\n        const { mapAction } = this.props;\r\n        if(data.features.length > 0) {\r\n            this.setState({\r\n                ObjectId: data.features[0].attributes\r\n            })\r\n    \r\n            mapAction.bindMapCommand(MapFunctions.drawPointEditPMRForm, {\r\n                attributes: data.features[0].attributes,\r\n                geometry: data.features[0].geometry,\r\n                callback: this.callBackDrawGraphic,\r\n                symbolColor : this.state.isShowView && [213, 128, 255]\r\n            })\r\n        }\r\n    }\r\n    \r\n    callBackDrawGraphic = async (evt, graphic) => {\r\n        if (evt) {\r\n            const { mapAction, menuAction } = this.props;\r\n            const { isShowEdit } = this.state;\r\n            this.managePanelForMobile(false, \"ClickMap\")\r\n            await mapAction.bindClearMapCommand()\r\n\r\n            await mapAction.bindMapCommand(MapFunctions.IdentifyComprehensivePlan, {\r\n                geometry: evt.geometry,\r\n                callbackFn: this.callbackIdentifyResult\r\n            })\r\n\r\n            if (isShowEdit) {\r\n                // await mapAction.bindMapCommand(MapFunctions.editGraphicSubmitPmr, { //edit\r\n                //     graphic: graphic,\r\n                //     callback: this.callbackEdit\r\n                // })\r\n                this.setState({graphic: graphic , isActiveDraw : false})\r\n                await mapAction.bindMapCommand(MapFunctions.getDistrictAndSubDistrictFormPoint, { // save sub-district code\r\n                    geometry: evt.geometry,\r\n                    callbackFn: this.callbackGetDistrictAndSubDistrict\r\n                })\r\n            }\r\n            await menuAction.activeFunction(null)\r\n        }\r\n    }\r\n\r\n    callbackIdentifyResult = async (result, geometry, districtPMR1ID) => {\r\n        const { submitPmrAction,hideLoading } = this.props;\r\n        const landDetail = this.makeDataResult(result, districtPMR1ID);\r\n        await submitPmrAction.saveLandDetail(landDetail, geometry);\r\n        await submitPmrAction.saveDistrictPMR1ID(districtPMR1ID);\r\n        hideLoading();     \r\n    }\r\n\r\n    callbackEdit = async (geometry, graphic) => {\r\n        const { mapAction } = this.props;\r\n        if (geometry) {\r\n            await mapAction.bindMapCommand(MapFunctions.IdentifyComprehensivePlan, {\r\n                geometry: geometry,\r\n                callbackFn: this.callbackIdentifyResult\r\n            })\r\n            await mapAction.bindMapCommand(MapFunctions.getDistrictAndSubDistrictFormPoint, {\r\n                geometry: geometry,\r\n                callbackFn: this.callbackGetDistrictAndSubDistrict\r\n            })\r\n        }\r\n        this.setState({ graphic: graphic })\r\n    }\r\n\r\n    callbackGetDistrictAndSubDistrict = async (values) => {\r\n        const { hideLoading } = this.props;\r\n\t\tlet valDistrict, valSubDistrict = null;\r\n\t\tif(!values || (!values.SUBDISTRICT_ID && !values.DISTRICT_ID)) {\r\n\t\t\tthis.setState({ isBKK: false, })\r\n\t\t} else {\r\n\t\t\tconst { SUBDISTRICT_ID, DISTRICT_ID } = values;\r\n\t\t\tvalDistrict = DISTRICT_ID;\r\n\t\t\tvalSubDistrict = SUBDISTRICT_ID;\r\n\t\t\tthis.setState({\r\n\t\t\t\tsubDistrictID: SUBDISTRICT_ID,\r\n\t\t\t\tdistrictID: DISTRICT_ID,\r\n\t\t\t\tisBKK: true\r\n\t\t\t})\r\n        }\r\n        \r\n\t\tif(this.callbackLocationStep3Fn){\r\n\t\t\tawait this.callbackLocationStep3Fn({\r\n\t\t\t\tsubDistrictID: valSubDistrict,\r\n\t\t\t\tdistrictID: valDistrict,\r\n\t\t\t\tisBKK: (valSubDistrict)})\r\n        }\r\n        hideLoading();\r\n    }\r\n    \r\n    handleCallbackLocation = (fn) => {\r\n\t\tthis.callbackLocationStep3Fn = fn;\r\n\t}\r\n\r\n    managePanelForMobile = async (isDraw, func) => {\r\n        const { menuAction, width } = this.props;\r\n\r\n        if (width === 'sm' || width === 'xs') {\r\n            switch (func) {\r\n                case \"ClickMap\":\r\n                    if (isDraw) {\r\n                        await menuAction.closeMenuPanel();\r\n                        await menuAction.openMenuMap();\r\n                    } else {\r\n                        await menuAction.openMenuPanel();\r\n                        await menuAction.closeMenuMap();\r\n                    }\r\n                    break;\r\n                default:\r\n                    break;\r\n            }\r\n        }\r\n    }\r\n\r\n    handleClickAddStepTwo = () => {\r\n        if (this.refFuncAddForm) {\r\n            this.refFuncAddForm()\r\n        }\r\n    }\r\n    makeDataResult = (result, districtPMR1ID) => {\r\n        const adminpolyCode = this.getAdminPoly(districtPMR1ID)\r\n        const landUse = []\r\n        const landDetail = {\r\n            lupZone: \"\",\r\n            lupColor: \"\",\r\n            lupUse: \"\",\r\n            lupSubZone: \"\",\r\n            lupFar: \"\",\r\n            lupOsr: \"\",\r\n            district: adminpolyCode.district ? adminpolyCode.district : \"\",\r\n            subDistrict: adminpolyCode.subDistrict ? adminpolyCode.subDistrict : \"\",\r\n            province: adminpolyCode.province ? adminpolyCode.province : \"\",\r\n        }\r\n\r\n        result.forEach(itm => {\r\n            if (itm.layerId === 11) { //รอเอาใส่ config\r\n                landUse.push(itm)\r\n            }\r\n        })\r\n\r\n        if (landUse.length > 0) {\r\n            const { LUP_ZONE, LUP_COLOR, LUP_USE, LUP_SUBZONE, LUP_FAR, LUP_OSR } = landUse[0].feature.attributes\r\n            landDetail.lupZone = LUP_ZONE;\r\n            landDetail.lupColor = LUP_COLOR;\r\n            landDetail.lupUse = LUP_USE;\r\n            landDetail.lupSubZone = LUP_SUBZONE;\r\n            landDetail.lupFar = LUP_FAR;\r\n            landDetail.lupOsr = LUP_OSR;\r\n            landDetail.lupUserNo = this.makeCodeValue(LUP_USE);\r\n        }\r\n        return landDetail\r\n    }\r\n\r\n    makeCodeValue = (LUP_USE) => {\r\n        let lupUserNo = \"\"\r\n        const landUseValue = window.LANDUSE_VALUES;\r\n\r\n        landUseValue.forEach(itm => {\r\n            if (itm.name === LUP_USE) {\r\n                lupUserNo = itm.code\r\n            }\r\n        })\r\n\r\n        return lupUserNo\r\n    }\r\n\r\n    getAdminPoly = (districtPMR1ID) => {\r\n        const province = districtPMR1ID ? districtPMR1ID.substring(0, 2) : null;\r\n        const district = districtPMR1ID ? districtPMR1ID.substring(2, 4) : null;\r\n        const subDistrict = districtPMR1ID ? districtPMR1ID.substring(4, 6) : null;\r\n\r\n        return { province, district, subDistrict }\r\n    }\r\n    \r\n    handleClickBack = () => {\r\n        const { panelContentAction } = this.props\r\n        panelContentAction.setCurrentPage();\r\n    }\r\n\r\n    genListPMR = () => {\r\n        const { authenRdc } = this.props;\r\n        if (!authenRdc.profile.pmr1Form) return\r\n        let list = []\r\n        authenRdc.profile.pmr1Form.map((res) => {\r\n            if (res.status <= 1) {\r\n                list.push(res)\r\n            }\r\n\r\n            return true\r\n        })\r\n        this.setState({\r\n            listPMR: list\r\n        })\r\n    }\r\n\r\n    handleChangeStep = (step) => {\r\n        this.setState({\r\n            formStep: step\r\n        })\r\n    }\r\n\r\n    onClickBack =async () => {\r\n        const { panelContentAction, mapAction,  showAlert } = this.props;\r\n        const { isShowEdit, isShowView } = this.state;\r\n        if (isShowEdit) {\r\n            showAlert({\r\n                altMsg: `${ALERT_MESSAGE.QUESTION.CANCEL_FORM}`,\r\n                altType: 2,\r\n                callbackConfirm: this.handleCloseForm,\r\n                callbackCancel: this.handleCloseConfirm\r\n            })\r\n        } else if (isShowView) {\r\n            this.setState({\r\n                isShowListPMR: true,\r\n                isShowView: false,\r\n                formStep: 1\r\n            })\r\n\r\n            await mapAction.bindMapCommand(MapFunctions.clearSubmitPmr, [\r\n                LISTGRAPHICLAYER.GRAPHICLAYER_SUBMIT_PMR,\r\n            ])\r\n            mapAction.bindClearMapCommand();\r\n        } else {\r\n            panelContentAction.setCurrentPage();\r\n            mapAction.bindClearMapCommand();\r\n        }\r\n        panelContentAction.setPmrID(); //clear pmrID\r\n    }\r\n\r\n    handleCloseConfirm = () => {\r\n        \r\n        const { hideAlert } = this.props;\r\n\r\n        hideAlert();\r\n    }\r\n\r\n    handleCloseForm = async () => {\r\n        const { submitPmrAction, mapAction, hideAlert ,authenRdc,authenAction} = this.props;\r\n        const {isActiveEdit,isActiveDraw} = this.state;\r\n        hideAlert();\r\n        // if(this.state.alertMode === \"delete\"){\r\n        //    await fetchGet_(`${process.env.REACT_APP_DELETE_PMR_ID}?pmr1id=${deletePMRID}`)\r\n        //             .then(res => {\r\n        //                 if (!res.ok) {\r\n        //                     throw res.status\r\n        //                 }\r\n        //                 return res.json();\r\n        //             })\r\n        //             .then(data => {\r\n        //                 if(data && data.statusCode === 1){\r\n        //                     showAlert({\r\n        //                         altMsg: ALERT_MESSAGE.POPUP.DELETE_SUCCESS,\r\n        //                         altType: 1,\r\n        //                         callbackConfirm: this.handleCloseForm,\r\n        //                         callbackCancel: this.handleCloseConfirm\r\n        //                     })\r\n        //                     this.setState({\r\n        //                         alertMode:null\r\n        //                     })\r\n        //                 }else if (data && data.statusCode === -1){\r\n        //                     showAlert({altMsg : `ไม่สามารถลบ ${deletePMRID} ออกจากระบบได้ เนื่องจากมีการเชื่อมโยงกับข้อมูลอ.1 หรือยผ.4`})\r\n        //                 }else{\r\n        //                     showAlert({altMsg:ALERT_MESSAGE.POPUP.DELETE_FAIL})\r\n        //                 }\r\n\r\n        //             })\r\n        //             .catch(ex => {\r\n        //                 showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR})\r\n        //                 console.log('ex callServiceSubDistric', ex)\r\n        //             })\r\n        // }\r\n\r\n        if(authenRdc && authenRdc.profile ){\r\n            authenAction.getUpdatePmr1Form()\r\n        }\r\n\r\n        isActiveDraw && await mapAction.bindMapCommand(MapFunctions.clearEvtDrawPmr);\r\n\t\tisActiveEdit && await mapAction.bindMapCommand(MapFunctions.clearEditPmr);\r\n\r\n        this.setState({\r\n            isShowEdit: false,\r\n            isShowListPMR: true,\r\n            formStep: 1,\r\n            isActiveDraw: false,\r\n            isActiveEdit: false\r\n        })\r\n\r\n       await submitPmrAction.clearFormStep()\r\n       await mapAction.bindMapCommand(MapFunctions.clearSubmitPmr, [\r\n            LISTGRAPHICLAYER.GRAPHICLAYER_SUBMIT_PMR,\r\n            LISTGRAPHICLAYER.GRAPHICLAYER_SUBMIT_PMR_HIGHLIGHT,\r\n            LISTGRAPHICLAYER.GRAPHICLAYER_PMR1_FORM\r\n        ])\r\n        \r\n        await mapAction.bindMapCommand(MapFunctions.drawGraphicPointPMR1,{ mapserviceUrl: window.GET_POINT_PMR,\r\n            creator: authenRdc.profile.userID})\r\n    }\r\n\r\n    handleChangeForm = (data) => {\r\n        this.setState({\r\n            isDirty: data\r\n        })\r\n    }\r\n\r\n    handleRefAddForm = node => {\r\n        this.refFuncAddForm = node;\r\n    }\r\n\r\n    handleClickAddStepTwo = () => {\r\n        if (this.refFuncAddForm) {\r\n            this.refFuncAddForm()\r\n        }\r\n    }\r\n\r\n    \r\n\thandleDrawGraphic = async () => {\r\n\t\t// const { isActiveDraw, isActiveEdit } = this.state;\r\n\t\t// const { mapAction } = this.props;\r\n\r\n\t\t// if (isActiveDraw) { // ยกเลิกการวาด\r\n\t\t// \tawait mapAction.bindMapCommand(MapFunctions.clearEvtDrawPmr)\r\n\t\t// \tawait mapAction.bindClearMapCommand()\r\n\t\t// \tthis.setState({ isActiveDraw: false })\r\n\t\t// } else { // เปิดการวาด\r\n\t\t// \tisActiveEdit && await mapAction.bindMapCommand(MapFunctions.clearEditPmr)\r\n\t\t// \tmapAction.bindMapCommand(MapFunctions.drawPointSubmitPmr, {\r\n\t\t// \t\tcallback: this.callBackDrawGraphic\r\n\t\t// \t})\r\n\t\t// \tthis.managePanelForMobile(true, \"ClickMap\")\r\n\t\t// \tthis.setState({\r\n\t\t// \t\tisActiveDraw: true,\r\n\t\t// \t\tisActiveEdit: false\r\n\t\t// \t})\r\n        // }\r\n\r\n        const { menuRdc, menuAction, mapAction } = this.props\r\n        \r\n        if(menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM){\r\n            menuAction.activeFunction(null)\r\n\t\t\tmapAction.bindMapCommand(MapFunctions.clearEvtDrawPmr)\r\n        }else{\r\n            this.managePanelForMobile(true)\r\n            await menuAction.activeFunction(ACTIVE_FUNCTION.ADD_GP_FORM)\r\n            setTimeout(async () => {\r\n                await mapAction.bindMapCommand(MapFunctions.clearEditPmr)\r\n                await mapAction.bindMapCommand(MapFunctions.drawPointSubmitPmr, { callback: this.callBackDrawGraphic })\r\n            }, (50))\r\n        }\r\n\t}\r\n\r\n\thandleEditGraphic = async () => {\r\n\t\tconst { graphic } = this.state;\r\n\t\t// const { mapAction } = this.props;\r\n\r\n\t\t// if (isActiveEdit) { // ยกเลิกการแก้ไข\r\n\t\t// \tawait mapAction.bindMapCommand(MapFunctions.clearEditPmr)\r\n\t\t// \tawait mapAction.bindClearMapCommand();\r\n\t\t// \tthis.setState({ isActiveEdit: false })\r\n\t\t// } else { // เปิดการแก้ไข\r\n\t\t// \tisActiveDraw && await mapAction.bindMapCommand(MapFunctions.clearEvtDrawPmr)\r\n\t\t// \tmapAction.bindMapCommand(MapFunctions.editGraphicSubmitPmr, { //edit\r\n\t\t// \t\tgraphic: graphic,\r\n\t\t// \t\tcallback: this.callbackEdit\r\n\t\t// \t})\r\n\t\t// \tthis.setState({\r\n\t\t// \t\tisActiveDraw: false,\r\n\t\t// \t\tisActiveEdit: true\r\n\t\t// \t})\r\n        // }\r\n        const { menuRdc, menuAction, mapAction } = this.props;\r\n\r\n        if(menuRdc.ActiveFunction === ACTIVE_FUNCTION.EDIT_GP_FORM){\r\n\t\t\tmenuAction.activeFunction(null)\r\n\t\t\tawait mapAction.bindMapCommand(MapFunctions.clearEditPmr)\r\n\t\t\tmapAction.bindClearMapCommand();\r\n\t\t}else{\r\n\t\t\tthis.managePanelForMobile(true)\r\n\t\t\tmenuAction.activeFunction(ACTIVE_FUNCTION.EDIT_GP_FORM)\r\n\t\t\tawait mapAction.bindMapCommand(MapFunctions.clearEvtDrawPmr)\r\n\t\t\tawait mapAction.bindMapCommand(MapFunctions.editGraphicSubmitPmr, { graphic, callback: this.callbackEdit })\r\n\t\t}\r\n\t}\r\n\r\nhideAlertFn = ()=>{\r\n    const {hideLoading} = this.props\r\n    hideLoading()\r\n}\r\n    renderFormStep = () => {\r\n        const { formStep, ObjectId, tempData, isDirty, subDistrictID, districtID } = this.state;\r\n        let dataEdit = {\r\n            \"isDirty\": isDirty,\r\n            \"ObjectId\": ObjectId,\r\n            \"tempData\": tempData\r\n        }\r\n\r\n        switch (formStep) {\r\n            case 1:\r\n                return <FormOne onChangeStep={this.handleChangeStep} onClickBack={this.onClickBack} />\r\n            case 2:\r\n                return <FormTwo onChangeStep={this.handleChangeStep} onClickBack={this.onClickBack}  refFuncAddForm={this.handleRefAddForm} />\r\n            case 3:\r\n                return <FormThree onChangeStep={this.handleChangeStep} onClickBack={this.onClickBack}  onCallbackLocation={this.handleCallbackLocation} />\r\n            case 4:\r\n                return <FormFour onChangeStep={this.handleChangeStep} \r\n                onClickBack={this.onClickBack} \r\n                subDistrictId={subDistrictID} \r\n                districtId={districtID}\r\n                 dataEdit={dataEdit} \r\n                 ObjectId={ObjectId} \r\n                 gotoView={this.handleGotoView}/>\r\n            default:\r\n                break;\r\n        }\r\n    }\r\n\r\n    render() {\r\n        const { authenRdc, isShowLoading,functionID ,title, menuRdc} = this.props;\r\n        const { \r\n            isShowEdit, \r\n            formStep, \r\n            subDistrict, \r\n            district, \r\n            isShowView, \r\n            isShowListPMR, \r\n            detailPMR,\r\n            tmpView ,\r\n            // isActiveDraw,\r\n            // isActiveEdit\r\n        } = this.state;\r\n\r\n        return (<Fragment>\r\n            {isShowListPMR && <Fragment>\r\n                {(functionID === CONFIG_MENU.FCN14.ID || functionID === CONFIG_MENU.FCN15.ID) ?\r\n                    <EditPmrStaff \r\n                        title={title} \r\n                        subDistrictId={subDistrict} \r\n                        districtId={district}\r\n                        isOnlySearch = {(functionID === CONFIG_MENU.FCN15.ID)}\r\n                        tmpView={tmpView}\r\n                        hideAlertFn={this.hideAlertFn}\r\n                    /> :\r\n                    <EditPmrView\r\n                        title={title}\r\n                        pmr1Form={authenRdc.profile.pmr1Form?authenRdc.profile.pmr1Form:[]}\r\n                        onShowDetail={this.handleShowDetail}\r\n                        onEdit={this.handleEdit}\r\n                        onDelete={this.handleDelete}\r\n                        onClickBack={this.handleClickBack}\r\n                    />}\r\n            </Fragment>}\r\n            {isShowEdit &&\r\n                <Fragment>\r\n                    <AppBarHeaderView\r\n                        title={title}\r\n                        onClickBack={this.onClickBack}\r\n                    />\r\n                    <FormSubmitPmrView\r\n                        formStep={formStep}\r\n                        onDrawGraphic={this.handleDrawGraphic}\r\n                        onEditGraphic={this.handleEditGraphic}\r\n                        isActiveDraw={menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM}\r\n                        isActiveEdit={menuRdc.ActiveFunction === ACTIVE_FUNCTION.EDIT_GP_FORM}\r\n                        onClickAddStepTwo={this.handleClickAddStepTwo}\r\n                    >\r\n                        {this.renderFormStep()}\r\n                    </FormSubmitPmrView>\r\n                </Fragment>}\r\n            {isShowView &&\r\n                <Fragment>\r\n                    <AppBarHeaderView\r\n                        title={title}\r\n                        onClickBack={this.onClickBack}\r\n                    />\r\n                    <FormSubmitPmrView\r\n                        formStep={formStep}\r\n                        viewForm //เอาไว้เช็คการแสดงปุ่ม เพิ่ม ที่ formThree\r\n                    >\r\n                        <ViewPmr\r\n                            exportPDF={this.exportPDF}\r\n                            formStep={formStep}\r\n                            dataDetail={detailPMR}\r\n                            onClickBack={this.onClickBack}\r\n                            onClickNext={this.handleChangeStep}\r\n                        />\r\n                    </FormSubmitPmrView>\r\n                </Fragment>}\r\n            {/* <AlertMessage\r\n                title={altTitle}\r\n                text={altMsg}\r\n                type={altType}\r\n                showAlert={isShowAlt}\r\n                onSubmit={callbackConfirm}\r\n                onCancel={callbackCancel}\r\n            /> */}\r\n            <AlertMessageSuper {...this.props} />\r\n            <Loading isShowLoading={isShowLoading} />\r\n        </Fragment>)\r\n    }\r\n}\r\n\r\nconst mapStateToProps = state => ({\r\n    authenRdc: state.authen,\r\n    panelContentData:state.PanelContentData,\r\n    menuRdc: state.menu\r\n});\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    panelContentAction: bindActionCreators(PanelContentAction, dispatch),\r\n    submitPmrAction: bindActionCreators(SubmitPmrAction, dispatch),\r\n    mapAction: bindActionCreators(MapAction, dispatch),\r\n    authenAction: bindActionCreators(AuthenAction, dispatch),\r\n    menuAction: bindActionCreators(MenuAction, dispatch)\r\n});\r\n\r\nconst FormEdit = WithLoading(EditPmr)\r\n\r\nconst enhance = compose(\r\n    connect(\r\n        mapStateToProps,\r\n        mapDispatchToProps,\r\n    )\r\n)\r\nexport default WithAlertMessage(enhance(FormEdit))\r\n\r\n\r\n","import React from 'react';\r\nimport {PieChart, Pie, Cell, Legend } from 'recharts';\r\n\r\n\r\nconst RADIAN = Math.PI / 180;\r\nconst renderCustomizedLabel = ({\r\n  cx, cy, midAngle, innerRadius, outerRadius, percent, index, fill, textAnchor\r\n}) => {\r\n  const radius = 25 + innerRadius + (outerRadius - innerRadius);\r\n  const x = cx + radius * Math.cos(-midAngle * RADIAN);\r\n  const y = cy + radius * Math.sin(-midAngle * RADIAN);\r\n\r\n  let valuePercent = parseInt((percent * 100).toFixed(0), 10);\r\n\r\n  return (\r\n    <text x={x} y={y} fill={fill} textAnchor={x > cx ? 'start' : 'end'} dominantBaseline=\"central\"  fontSize={25}>\r\n      {`${valuePercent}%`}\r\n    </text>\r\n  );\r\n};\r\n\r\nconst EvaluationPieChart = props => {\r\n    const {\r\n      pieRef,\r\n      data=[]\r\n    } = props;\r\n\r\n    return (\r\n    <PieChart width={750} height={750} wrapperStyle={{marginLeft: '50px'}} ref={pieRef}>\r\n      <Pie data={data} dataKey=\"value\" nameKey=\"name\" cx=\"50%\" cy=\"50%\" fill=\"#8884d8\" labelLine={true} label={renderCustomizedLabel}>\r\n        {\r\n          data.map((entry, index)=> (<Cell key={`pie_${index}`} fill={entry.color} stroke={'black'}/>))\r\n        }\r\n      </Pie>\r\n      <Legend verticalAlign=\"bottom\" align='left' width={200}/>\r\n    </PieChart>)\r\n}\r\n\r\nexport default EvaluationPieChart;","import React from 'react';\r\nimport StopLegend from '@material-ui/icons/Stop';\r\nconst PieChartLegend =  ({\r\n    legendRef,\r\n    data=[]\r\n}) => {\r\n    return (\r\n    <div ref={legendRef}>\r\n        {\r\n            data.map(itm => <StopLegend key={`legend_${itm.id}`} id={itm.id} data-name={itm.name} style={{fill: itm.color}}/>)\r\n        }\r\n    </div>)\r\n}\r\n\r\nexport default PieChartLegend;","import React from 'react';\r\nimport { Scrollbars } from 'react-custom-scrollbars';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { withStyles } from '@material-ui/core/styles';\r\n// import Button from '@material-ui/core/Button';\r\nimport Button from '../../../../../../../Controls/Containers/Button';\r\nimport classnames from 'classnames';\r\nimport { Field } from \"redux-form\";\r\nimport SelectField from '../../../../../../../Controls/Containers/SelectFieldRedux';\r\nimport EvaluationPieChart from '../../../../../../../Containers/Web/Panel/Menu/MenuContent/Report/Evaluation/EvaluationPieChart';\r\nimport PieChartLegend from '../../../../../../../Containers/Web/Panel/Menu/MenuContent/Report/Evaluation/PieChartLegend';\r\nimport AppBarHeaderView from '../../../../AppBarHeaderView';\r\nimport { BTN } from '../../../../../../../Constants/Constants'\r\n\r\nconst EvaluationView = ({\r\n    classes,\r\n    title,\r\n    pieChartMonthData = [],\r\n    pieChartYearData = [],\r\n    pieLegendData = [],\r\n    yearList = [],\r\n    monthList = [],\r\n    onBackClick,\r\n    onYearChange,\r\n    onMonthChange,\r\n    onSubmit,\r\n    pieMonthRef,\r\n    pieYearRef,\r\n    legendRef\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root}>\r\n            <AppBarHeaderView\r\n                title={title}\r\n                onClickBack={onBackClick}\r\n            />\r\n            <Grid container className={classnames(classes.content)}>\r\n                <Scrollbars\r\n                    autoHide={false}\r\n                    universal={true}>\r\n                    <Grid container spacing={0} className={classes.content_in}>\r\n                            <Field\r\n                                label={'ปี'}\r\n                                name={'evaluationYear'}\r\n                                component={SelectField}\r\n                                onChangeValue={onYearChange}\r\n                                data={yearList}\r\n                                // val={value}\r\n                                required\r\n                            />\r\n\r\n                            <Field\r\n                                label={'เดือน'}\r\n                                name={'evaluationMonth'}\r\n                                component={SelectField}\r\n                                onChangeValue={onMonthChange}\r\n                                data={monthList}\r\n                                // val={value}\r\n                                required\r\n                            />\r\n                        {/* <Grid container justify='center'>\r\n                            <Grid item xs={3} style={{ textAlign: 'right' }}>\r\n                                <Button type=\"submit\" variant=\"contained\" color=\"primary\" onClick={onSubmit}>\r\n                                {BTN.TH.SEARCH}\r\n                            </Button>\r\n                            </Grid>\r\n                        </Grid> */}\r\n                        <Grid container justify=\"center\" spacing={24} className={classes.divFooter}>\r\n                        <Grid item>\r\n                                <Button\r\n                                    label={BTN.TH.CANCEL}\r\n                                    onClick={onBackClick}\r\n                                />\r\n                            </Grid>\r\n                            <Grid item>\r\n                                <Button\r\n                                    type=\"submit\"\r\n                                    // onClick={onHandleSubmit(onClickSubmit)}\r\n                                    onClick={onSubmit}\r\n                                    label={BTN.TH.SEARCH}\r\n                                    className={classes.btnLogin}\r\n                                />\r\n                            </Grid>\r\n                        </Grid>\r\n                    </Grid>\r\n\r\n                    {/** use for generate pdf */}\r\n                    <Grid container style={{ display: 'none' }}>\r\n                        <EvaluationPieChart pieRef={pieMonthRef} data={pieChartMonthData} />\r\n                        <EvaluationPieChart pieRef={pieYearRef} data={pieChartYearData} />\r\n                        <PieChartLegend legendRef={legendRef} data={pieLegendData} />\r\n                    </Grid>\r\n                </Scrollbars>\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    _hide: {\r\n        display: 'none'\r\n    },\r\n    root: {\r\n        position: 'absolute',\r\n        top: 0,\r\n        bottom: 0,\r\n        right: 0,\r\n        left: 0\r\n    },\r\n    content: {\r\n        position: 'relative',\r\n        height: 'calc(100% - 45px)'\r\n    },\r\n    content_in: {\r\n        // height: '100%',\r\n        // paddingTop: '10px',\r\n        // paddingLeft: '5px',\r\n        // paddingRight: '5px',\r\n        // paddingBottom: '5px'\r\n        padding: \"10px\"\r\n    },\r\n    divFooter: {\r\n        marginTop: '10px',\r\n        marginBottom: '10px'\r\n    },\r\n}))(EvaluationView);","import { numberWithCommas } from '../../../../../../../Utilities/Utils'\r\nimport pdfMake from \"pdfmake/build/pdfmake\";\r\nimport pdfFonts from \"pdfmake/build/vfs_fonts\";\r\nimport { FOOTER_REPORT } from '../../../../../../../Constants/Constants'\r\n\r\npdfMake.vfs = pdfFonts.pdfMake.vfs;\r\npdfMake.fonts = {\r\n    THSarabun: {\r\n        normal: 'THSarabun.ttf',\r\n        bold: 'THSarabun-Bold.ttf',\r\n        italics: 'THSarabun-Italic.ttf',\r\n        bolditalics: 'THSarabun-BoldItalic.ttf'\r\n    },\r\n    Roboto: {\r\n        normal: 'Roboto-Regular.ttf',\r\n        bold: 'Roboto-Medium.ttf',\r\n        italics: 'Roboto-Italic.ttf',\r\n        bolditalics: 'Roboto-MediumItalic.ttf'\r\n    }\r\n}\r\n\r\nconst configPage = {\r\n    pageSize: 'A4',\r\n    pageOrientation: 'portrait',//landscape\r\n    info: {\r\n        title: 'รายงานผลการประเมินความพึงพอใจ',\r\n        subject: 'รายงานผลการประเมินความพึงพอใจ',\r\n        keywords: 'รายงานผลการประเมินความพึงพอใจ',\r\n    }\r\n    // pageMargins: [ 40, 60, 40, 60 ],// [left, top, right, bottom] or [horizontal, vertical]\r\n}\r\n\r\n\r\nconst fontStyle = {\r\n    fontHeading: {\r\n        fontSize: 18\r\n    },\r\n    fontTitle: {\r\n        fontSize: 16\r\n    },\r\n    fontSubheading: {\r\n        fontSize: 14\r\n    },\r\n    fontBody: {\r\n        fontSize: 12\r\n    }\r\n}\r\n\r\nconst tableStyle = {\r\n    rowNumber: {\r\n        alignment: 'right'\r\n    },\r\n    rowHeaderColor: {\r\n        fillColor: '#5E9A50'\r\n    },\r\n    rowFooterColor: {\r\n        fillColor: '#5E9A50'\r\n    },\r\n    rowOtherColor1: {\r\n        fillColor: '#D0EFDA'\r\n    },\r\n    rowOtherColor2: {\r\n        fillColor: '#E5F6E8'\r\n    }\r\n}\r\n\r\nconst SubmaryRow = (datasource = []) => {\r\n    const totalYear = datasource.map(itm => itm.SumYear).reduce((accumulator, currentValue) => accumulator + currentValue);\r\n    const totalMonth = datasource.map(itm => itm.SumMonth).reduce((accumulator, currentValue) => accumulator + currentValue);\r\n    const generateRow = datasource.map(itm => {\r\n        return [\r\n            {\r\n                text: itm.Text,\r\n                style: ['fontTitle', 'rowOtherColor1'],\r\n                bold: true\r\n            },\r\n            {\r\n                text: numberWithCommas(itm.SumMonth),\r\n                style: ['fontTitle', 'rowNumber', 'rowOtherColor1'],\r\n                bold: true\r\n            },\r\n            {\r\n                text: numberWithCommas(itm.SumYear),\r\n                style: ['fontTitle', 'rowNumber', 'rowOtherColor1'],\r\n                bold: true\r\n            }\r\n        ]\r\n    })\r\n    return [...generateRow, [\r\n        {\r\n            text: 'รวม',\r\n            style: ['fontTitle', 'rowFooterColor'],\r\n            bold: true\r\n        },\r\n        {\r\n            text: numberWithCommas(totalMonth),\r\n            style: ['fontTitle', 'rowNumber', 'rowFooterColor'],\r\n            bold: true\r\n        },\r\n        {\r\n            text: numberWithCommas(totalYear),\r\n            style: ['fontTitle', 'rowNumber', 'rowFooterColor'],\r\n            bold: true\r\n        }\r\n    ]];\r\n}\r\n\r\nconst SummaryTable = ({ datasource, selectMonth, selectYear }) => {\r\n    return [\r\n        {\r\n            margin: [0, 20, 0, 0],//[left, top, right, bottom]\r\n            columns: [\r\n                { width: '*', text: '' },\r\n                {\r\n                    width: 'auto',\r\n                    table: {\r\n                        // headers are automatically repeated if the table spans over multiple pages\r\n                        // you can declare how many rows should be treated as headers\r\n                        headerRows: 2,\r\n                        widths: [200, 100, 100],\r\n                        body: [\r\n\r\n                            // Table Header\r\n                            [\r\n                                { text: 'ระดับความพึงพอใจ', rowSpan: 2, style: ['fontTitle', 'rowHeaderColor', 'alignmentCenter'], margin: [0, 8, 0, 0], bold: true },\r\n                                { text: 'จำนวนผู้ประเมิน', colSpan: 2, style: ['fontTitle', 'alignmentCenter', 'rowHeaderColor'], bold: true },\r\n                                {}\r\n                            ],//chanodeItemText\r\n                            [\r\n                                {},\r\n                                {\r\n                                    text: `เดือน ${selectMonth}`,\r\n                                    style: ['fontTitle', 'alignmentRight', 'rowHeaderColor'],\r\n                                    bold: true\r\n                                },\r\n                                {\r\n                                    text: `ปี ${selectYear}`,\r\n                                    style: ['fontTitle', 'alignmentRight', 'rowHeaderColor'],\r\n                                    bold: true\r\n                                },\r\n                            ],\r\n                            ...SubmaryRow(datasource)\r\n                        ]\r\n                    }\r\n                },\r\n                { width: '*', text: '' }\r\n            ]\r\n        }\r\n    ]\r\n}\r\n\r\nconst Chart = ({ selectMonth, selectYear }, chartMonthPNGBase64, chartYearPNGBase64) => {\r\n    // console.log('chartMonthPNGBase64 : ', chartMonthPNGBase64)\r\n    return [\r\n        {\r\n            margin: [0, 20, 0, 0],//[left, top, right, bottom]\r\n            columns: [\r\n                {\r\n                    text: `เดือน ${selectMonth}`,\r\n                    style: ['fontTitle'],\r\n                    bold: true,\r\n                    alignment: 'center'\r\n                },\r\n                {\r\n                    text: `พ.ศ. ${selectYear}`,\r\n                    style: ['fontTitle'],\r\n                    bold: true,\r\n                    alignment: 'center'\r\n                },\r\n            ]\r\n        },\r\n        {\r\n            columns: [\r\n                {\r\n                    image: chartMonthPNGBase64,\r\n                    alignment: 'left',\r\n                    margin: [0, 20, 0, 0],//[left, top, right, bottom]\r\n                    width: 250\r\n                },\r\n                {\r\n                    image: chartYearPNGBase64,\r\n                    alignment: 'left',\r\n                    margin: [0, 20, 0, 0],//[left, top, right, bottom]\r\n                    width: 250\r\n                },\r\n            ]\r\n        }\r\n    ]\r\n}\r\n\r\nconst ChartLegend = ({ pngLegendList }) => {\r\n    let legend = {\r\n        margin: [-30, 0, 0, 0],\r\n        columns: []\r\n    }\r\n    pngLegendList.forEach(itm => {\r\n        legend.columns = [\r\n            ...legend.columns,\r\n            {\r\n                image: `${itm.image}`,\r\n                alignment: 'left',\r\n                width: 25,\r\n            },\r\n            {\r\n                text: `${itm.name}`,\r\n                style: ['fontSubheading', 'rowHeaderColor'],\r\n                bold: true,\r\n                width: 70,\r\n                margin: [0, 10, 0, 0]//[left, top, right, bottom]\r\n            }\r\n        ]\r\n    })\r\n    return [legend]\r\n}\r\n\r\n\r\nconst EvaluationExportPDF = (data, chartMonthPNGBase64, chartYearPNGBase64) => {\r\n    const docDefinition = {\r\n        ...configPage,\r\n        footer: {\r\n            columns: [\r\n                { \r\n                    text: FOOTER_REPORT,\r\n                    alignment: 'right',\r\n                    margin: [0,0,35,0],\r\n                    fontSize: 10\r\n                }\r\n            ]\r\n        },\r\n        content: [\r\n            {\r\n                text: 'ผลประเมินระดับความพึงพอใจ',\r\n                style: ['fontTitle', 'header', 'alignmentCenter'],\r\n                width: '*',\r\n                noWrap: true\r\n            },\r\n            {\r\n                // text: 'ระบบแจ้งการใช้ประโยชน์ (ผมร.๑) กรุงเทพมหานคร', \r\n                text: data.systemName, //dynamic ตามชื่อระบบที่เรียกใช้\r\n                style: ['fontTitle', 'header', 'alignmentCenter'],\r\n                margin: [0, 15, 0, 0],//[left, top, right, bottom]\r\n                width: '*',\r\n                noWrap: true\r\n            },\r\n            {\r\n                margin: [0, 15, 0, 0],//[left, top, right, bottom]\r\n                columns: [\r\n                    {\r\n                        text: `เดือน ${data.selectMonth}`,\r\n                        style: ['fontTitle'],\r\n                        bold: true,\r\n                        alignment: 'right'\r\n                    },\r\n                    {\r\n                        text: `พ.ศ. ${data.selectYear}`,\r\n                        style: ['fontTitle'],\r\n                        bold: true,\r\n                        alignment: 'left'\r\n                    },\r\n                ]\r\n            },\r\n            ...SummaryTable(data),\r\n            ...Chart(data, chartMonthPNGBase64, chartYearPNGBase64),\r\n            ...ChartLegend(data),\r\n        ],\r\n        styles: {\r\n            ...fontStyle,\r\n            ...tableStyle,\r\n            header: {\r\n                bold: true\r\n            },\r\n            alignmentCenter: {\r\n                alignment: 'center'\r\n            },\r\n            alignmentRight: {\r\n                alignment: 'right'\r\n            }\r\n        },\r\n        defaultStyle: {\r\n            font: \"THSarabun\",\r\n            columnGap: 10,\r\n        }\r\n    };\r\n    // pdfMake.createPdf(docDefinition).open()\r\n    pdfMake.createPdf(docDefinition).download(\"รายงานผลการประเมินความพึงพอใจ.pdf\")\r\n}\r\n\r\nexport default EvaluationExportPDF;","//สถิติการประเมินความพึงพอใจ\r\nimport React, { Fragment, useState, useEffect, useRef } from 'react';\r\nimport { connect } from \"react-redux\";\r\nimport { reduxForm, formValueSelector } from \"redux-form\";\r\nimport { compose } from \"recompose\";\r\n\r\n//import component\r\nimport EvaluationView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/Report/Evaluation/EvaluationView';\r\nimport EvaluationExportPDF from './EvaluationExportPDF';\r\nimport Loading from '../../../../../../../Controls/Containers/Loading';\r\nimport AlertMessageSuper from '../../../../../../../Controls/Containers/AlertMessageSuper';\r\nimport WithAlertMessage from '../../../../../../../HOC/WithAlertMessage';\r\n\r\n//import constants\r\nimport { MONTH, EVALUATION_REPORT_LEGEND_COLOR, HEADER_EXPORT_REPORT, SYSTEM, ALERT_MESSAGE } from '../../../../../../../Constants/Constants';\r\n\r\n//import service - utils\r\nimport * as ServiceUtil from '../../../../../../../Utilities/ServiceUtils';\r\nimport * as Util from '../../../../../../../Utilities/Utils';\r\n\r\n\r\nconst Evaluation = (props) => {\r\n\r\n    const {\r\n        onBackClick,\r\n        handleSubmit,\r\n        FormData,\r\n        title,\r\n        system,\r\n        showAlert,\r\n        hideAlert,\r\n        change\r\n    } = props;\r\n\r\n    const pieMonthRef = useRef(null);\r\n    const pieYearRef = useRef(null);\r\n    const legendRef = useRef(null);\r\n\r\n    const [monthList, setMonthList] = useState(MONTH)\r\n    const [yearList, setYearList] = useState([])\r\n    const [exportData, setExportData] = useState({\r\n        evaluationMonthDetail: [],\r\n        evaluationYearDetail: [],\r\n        legendDetail: EVALUATION_REPORT_LEGEND_COLOR\r\n    });\r\n    const [isLoading, setLoading] = useState(false);\r\n\r\n    useEffect(() => {\r\n        loadDDLyear();\r\n        loadDDLmonth();\r\n    }, [])\r\n\r\n    const loadDDLmonth = () => {\r\n        let date = new Date();\r\n        let currentMonth = date.getMonth() + 1;\r\n        change('evaluationMonth', currentMonth)\r\n    }\r\n\r\n    const loadDDLyear = () => {\r\n        const MIN_YEAR = 2562;\r\n        const currentDate = new Date();\r\n        const currentYear = currentDate.getFullYear() + 543;\r\n        let keepListYear = [];\r\n        for (let i = MIN_YEAR; i <= currentYear; i++) {\r\n            keepListYear.push({ id: i - 543, name: i });\r\n        }\r\n        setYearList(keepListYear);\r\n        change('evaluationYear', currentYear - 543);\r\n    }\r\n\r\n    const svgLegendToPNG = (domNodeSVG) => {\r\n        return new Promise((resolv, reject) => {\r\n            try {\r\n                const svgURL = new XMLSerializer().serializeToString(domNodeSVG);\r\n                const svgBlob = new Blob([svgURL], { type: \"image/svg+xml;charset=utf-8\" });\r\n                const url = URL.createObjectURL(svgBlob);\r\n                const img = new Image();\r\n                const canvas = document.createElement(\"canvas\")\r\n                canvas.width = 350;\r\n                canvas.height = 350;\r\n                const ctx = canvas.getContext(\"2d\");\r\n                img.onload = function () {\r\n                    ctx.drawImage(img, 0, 0, img.width, img.height, 0, 0, canvas.width, canvas.height);\r\n                    var png = canvas.toDataURL(\"image/png\");\r\n                    resolv({\r\n                        id: domNodeSVG.id,\r\n                        name: domNodeSVG.dataset.name,\r\n                        image: png\r\n                    })\r\n                    URL.revokeObjectURL(png);\r\n                };\r\n                img.src = url;\r\n            }\r\n            catch (err) {\r\n                reject(null)\r\n            }\r\n        })\r\n    }\r\n\r\n    const getPNGPieChart = async () => {\r\n        const domNodePieChartMonth = pieMonthRef.current.container.children[0];\r\n        const domNodePieChartYear = pieYearRef.current.container.children[0];\r\n        const pngChart = await Promise.all([Util.svg2pngBase64(domNodePieChartMonth), Util.svg2pngBase64(domNodePieChartYear)]);\r\n        return {\r\n            month: pngChart[0],\r\n            year: pngChart[1]\r\n        }\r\n    }\r\n\r\n    const getPNGLegend = async () => {\r\n        const listNodeLegend = legendRef.current.childNodes;\r\n        let listPromiseLegend = [];\r\n        listNodeLegend.forEach(node => {\r\n            listPromiseLegend.push(svgLegendToPNG(node))\r\n        })\r\n        const listPNGLegend = await Promise.all(listPromiseLegend);\r\n        return listPNGLegend;\r\n    }\r\n\r\n    const checkUrkGetEvaluation = () => {\r\n        //url เช็คผลการประเมินจะแตกต่าวกันทั้ง 3 ระบบ\r\n        switch (system) {\r\n            case SYSTEM.CMP:\r\n                return process.env.REACT_APP_GET_EVALUATION_EXPORT_DATA_CMP\r\n            case SYSTEM.CAH:\r\n                return process.env.REACT_APP_GET_SATISFICATION_REPORT\r\n            case SYSTEM.PMR1:\r\n                return process.env.REACT_APP_GET_EVALUATION_EXPORT_DATA_PMR\r\n            default:\r\n                return null\r\n        }\r\n    }\r\n\r\n    const getEvaluationData = async (month = 0, year = 0) => {\r\n        const url = checkUrkGetEvaluation();\r\n        let result = [];\r\n        try {\r\n            const response = await ServiceUtil.fetchGet_(`${url}?month=${month}&year=${year}`)\r\n            const responseJson = await response.json();\r\n            if (responseJson) {\r\n                const serviceResult = responseJson.result;\r\n                result = serviceResult;\r\n                const chartYearData = [];\r\n                const chartMonthData = [];\r\n                serviceResult.forEach(itm => {\r\n                    const matchLegendColor = EVALUATION_REPORT_LEGEND_COLOR.filter(itmLegend => {\r\n                        return itm.ID.toString() === itmLegend.id.toString()\r\n                    });\r\n                    chartYearData.push({\r\n                        id: itm.ID,\r\n                        name: itm.Text,\r\n                        value: itm.SumYear,\r\n                        color: matchLegendColor[0].color\r\n                    });\r\n                    chartMonthData.push({\r\n                        id: itm.ID,\r\n                        name: itm.Text,\r\n                        value: itm.SumMonth,\r\n                        color: matchLegendColor[0].color\r\n                    });\r\n                });\r\n                setExportData({\r\n                    ...exportData,\r\n                    evaluationYearDetail: chartYearData,\r\n                    evaluationMonthDetail: chartMonthData\r\n                })\r\n            }\r\n            else {\r\n                setLoading(false);\r\n                showAlert({ altMsg: \"ไม่พบข้อมูลสำหรับออกรายงาน\", callbackClose: hideAlert })\r\n            }\r\n        }\r\n        catch (err) {\r\n            setLoading(false);\r\n            showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR , callbackClose: hideAlert })\r\n        }\r\n        return result;\r\n    }\r\n\r\n    const exportPDF = async (data) => {\r\n        const pngPieChart = await getPNGPieChart();\r\n        const pngLegendList = await getPNGLegend();\r\n\r\n        const indexMonth = MONTH.map(itm => itm.id).indexOf(FormData.selectMonth)\r\n        EvaluationExportPDF({\r\n            datasource: data,\r\n            selectYear: (FormData.selectYear + 543),\r\n            selectMonth: MONTH[indexMonth].name,\r\n            pngLegendList,\r\n            systemName: HEADER_EXPORT_REPORT[system]\r\n        }, pngPieChart.month, pngPieChart.year);\r\n    }\r\n\r\n    const waitRender = () => {\r\n        return new Promise(resolv => {\r\n            setTimeout(() => {\r\n                resolv(null);\r\n            }, 5000)//5s\r\n        })\r\n    }\r\n\r\n    const handleSubmitForm = async values => {\r\n        setLoading(true);\r\n        const reportData = await getEvaluationData(values.evaluationMonth, values.evaluationYear);\r\n        if (reportData.length !== 0) {\r\n            waitRender().then(() => {\r\n                setLoading(false);\r\n                exportPDF(reportData);\r\n            });\r\n        }\r\n    }\r\n    \r\n    return <Fragment>\r\n        <EvaluationView\r\n            title={title}\r\n            pieMonthRef={pieMonthRef}\r\n            pieYearRef={pieYearRef}\r\n            pieChartMonthData={exportData.evaluationMonthDetail}\r\n            pieChartYearData={exportData.evaluationYearDetail}\r\n            legendRef={legendRef}\r\n            pieLegendData={exportData.legendDetail}\r\n            yearList={yearList}\r\n            monthList={monthList}\r\n            onBackClick={onBackClick}\r\n            onSubmit={handleSubmit(handleSubmitForm)} />\r\n        <Loading isShowLoading={isLoading} />\r\n        <AlertMessageSuper {...props} />\r\n    </Fragment>\r\n}\r\n\r\nconst formName = \"EvaluationFormPMR\";\r\nconst selector = formValueSelector(formName)\r\n\r\nexport const Validate = (values) => {\r\n    const errors = {};\r\n    if (!values.evaluationYear) {\r\n        errors.evaluationYear = 'กรุณาระบุปี';\r\n    }\r\n    if (!values.evaluationMonth) {\r\n        errors.evaluationMonth = 'กรุณาระบุเดือน';\r\n    }\r\n\r\n    return errors;\r\n};\r\n\r\nconst reduxFormParameter = {\r\n    form: formName,\r\n    validate: Validate\r\n};\r\n\r\nconst mapStateToProps = state => {\r\n    return {\r\n        FormData: {\r\n            selectYear: selector(state, \"evaluationYear\"),\r\n            selectMonth: selector(state, \"evaluationMonth\"),\r\n        }\r\n    }\r\n}\r\nexport default compose(\r\n    connect(mapStateToProps, null),\r\n    reduxForm(reduxFormParameter),\r\n    WithAlertMessage\r\n)(Evaluation);","import React, { Fragment } from 'react';\r\nimport {BarChart, Bar, XAxis, YAxis, CartesianGrid } from 'recharts'\r\nconst StatisticUserBarChart = props => {\r\n    return (\r\n        <Fragment>\r\n            <BarChart\r\n                ref={props.refer}\r\n                width={500} \r\n                height={500} \r\n                data={props.data}\r\n                margin={{top: 20}}\r\n            >\r\n                <CartesianGrid stroke=\"#ebf3f0\" vertical={false}/>\r\n                <XAxis dataKey=\"name\" angle={-45}  textAnchor=\"end\" interval={0} height={80}/>\r\n                <YAxis \r\n                    tickFormatter={(value) => value.toLocaleString()} \r\n                />\r\n                <Bar dataKey=\"value\" fill=\"#8884d8\" barSize={20} />\r\n            </BarChart>\r\n        </Fragment>\r\n    )\r\n}\r\n\r\nexport default StatisticUserBarChart;","import React from 'react';\r\nimport { Scrollbars } from 'react-custom-scrollbars';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport classnames from 'classnames';\r\nimport { Field } from \"redux-form\";\r\nimport SelectField from '../../../../../../../Controls/Containers/SelectFieldRedux';\r\nimport Button from '../../../../../../../Controls/Containers/Button'\r\nimport StatisticUserBarChart from '../../../../../../../Containers/Web/Panel/Menu/MenuContent/Report/StatisticUser/StatisticUserBarChart';\r\nimport AppBarHeaderView from '../../../../AppBarHeaderView';\r\nimport { BTN } from '../../../../../../../Constants/Constants'\r\nconst StatisticUserView = ({\r\n    classes,\r\n    title,\r\n    displayChartData = [],\r\n    yearList = [],\r\n    barChartRef,\r\n    onBackClick,\r\n    onYearChange,\r\n    onSubmit\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root}>\r\n            <AppBarHeaderView\r\n                title={title}\r\n                onClickBack={onBackClick}\r\n            />\r\n            <Grid container className={classnames(classes.content)}>\r\n                <Scrollbars\r\n                    autoHide={false}\r\n                    universal={true}>\r\n                    <Grid item xs={12} className={classes.content_in}>\r\n                        {/* <Grid container>\r\n                            <Grid item xs={12}>\r\n                                <Field\r\n                                    label={'ปี'}\r\n                                    name={'statisticUserYear'}\r\n                                    component={SelectField}\r\n                                    onChangeValue={onYearChange}\r\n                                    data={yearList}\r\n                                    required\r\n                                />\r\n                            </Grid>\r\n                        </Grid> */}\r\n                        <Field\r\n                                    label={'ปี'}\r\n                                    name={'statisticUserYear'}\r\n                                    component={SelectField}\r\n                                    onChangeValue={onYearChange}\r\n                                    data={yearList}\r\n                                    required\r\n                        />\r\n                        <Grid container justify=\"center\" spacing={24} className={classes.divFooter}>\r\n                            <Grid item>\r\n                                <Button\r\n                                    label={BTN.TH.CANCEL}\r\n                                    onClick={onBackClick}\r\n                                />\r\n                            </Grid>\r\n                            <Grid item>\r\n                                <Button\r\n                                    label={BTN.TH.SEARCH}\r\n                                    onClick={onSubmit}\r\n                                    type='submit'\r\n                                />\r\n                            </Grid>\r\n                        </Grid>\r\n                        <Grid container style={{ display: 'none' }}>\r\n                            <StatisticUserBarChart refer={barChartRef} data={displayChartData} />\r\n                        </Grid>\r\n                    </Grid>\r\n                </Scrollbars>\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    _hide: {\r\n        display: 'none'\r\n    },\r\n    root: {\r\n        position: 'absolute',\r\n        top: 0,\r\n        bottom: 0,\r\n        right: 0,\r\n        left: 0\r\n    },\r\n    content: {\r\n        position: 'relative',\r\n        height: 'calc(100% - 45px)'\r\n    },\r\n    content_in: {\r\n        // height: '100%',\r\n        // paddingTop: '10px',\r\n        // paddingLeft: '5px',\r\n        // paddingRight: '5px',\r\n        // paddingBottom: '5px'\r\n        width:\"100%\",\r\n        padding:\"10px\"\r\n    },\r\n    divFooter:{\r\n        marginTop:\"10px\",\r\n        marginBottom:\"10px\"\r\n    }\r\n}))(StatisticUserView);","import {numberWithCommas} from '../../../../../../../Utilities/Utils'\r\nimport {MONTH} from '../../../../../../../Constants/Constants'\r\nimport pdfMake from \"pdfmake/build/pdfmake\";\r\nimport pdfFonts from \"pdfmake/build/vfs_fonts\";\r\nimport { FOOTER_REPORT } from '../../../../../../../Constants/Constants'\r\n\r\npdfMake.vfs = pdfFonts.pdfMake.vfs;\r\npdfMake.fonts = {\r\n    THSarabun: {\r\n        normal: 'THSarabun.ttf',\r\n        bold: 'THSarabun-Bold.ttf',\r\n        italics: 'THSarabun-Italic.ttf',\r\n        bolditalics: 'THSarabun-BoldItalic.ttf'\r\n    },\r\n    Roboto: {\r\n        normal: 'Roboto-Regular.ttf',\r\n        bold: 'Roboto-Medium.ttf',\r\n        italics: 'Roboto-Italic.ttf',\r\n        bolditalics: 'Roboto-MediumItalic.ttf'\r\n    }\r\n}\r\n\r\nconst configPage = {\r\n    pageSize: 'A4',\r\n    pageOrientation: 'landscape',//portrait\r\n    info: {\r\n        title: 'รายงานสถิติผู้เข้าใช้งาน',\r\n        subject: 'รายงานสถิติผู้เข้าใช้งาน',\r\n        keywords: 'รายงานสถิติผู้เข้าใช้งาน',\r\n    }\r\n}\r\n\r\n\r\nconst fontStyle = {\r\n    fontHeading: {\r\n        fontSize: 18\r\n    },\r\n    fontTitle: {\r\n        fontSize: 16\r\n    },\r\n    fontSubheading: {\r\n        fontSize: 14\r\n    },\r\n    fontBody: {\r\n        fontSize: 12\r\n    }\r\n}\r\n\r\nconst tableStyle = {\r\n    rowNumber: {\r\n        alignment: 'right'\r\n    },\r\n    rowHeaderColor: {\r\n        fillColor: '#5E9A50'\r\n    },\r\n    rowFooterColor: {\r\n        fillColor: '#5E9A50'\r\n    },\r\n    rowOtherColor1: {\r\n        fillColor: '#D0EFDA'\r\n    },\r\n    rowOtherColor2: {\r\n        fillColor: '#E5F6E8'\r\n    }\r\n}\r\n\r\nconst SubmaryRow = data => {\r\n    const totalMonth = data.map(itm => itm.value).reduce((accumulator, currentValue) => accumulator + currentValue);\r\n    const monthRow = MONTH.map(itm => {\r\n        const indexMatchData = data.map(dataITM => dataITM.id).indexOf(itm.id);\r\n        return [\r\n            {\r\n                text: itm.name,\r\n                style: ['fontTitle', 'rowOtherColor1'],\r\n                bold:true\r\n            },\r\n            {\r\n                text: indexMatchData > -1 ? numberWithCommas(data[indexMatchData].value) : 0,\r\n                style: ['fontTitle', 'rowNumber', 'rowOtherColor1'],\r\n                bold:true\r\n            }\r\n        ]\r\n    });\r\n    return [\r\n        ...monthRow,\r\n        [\r\n            {\r\n                text: 'รวม',\r\n                style: ['fontTitle', 'rowFooterColor'],\r\n                bold:true\r\n            },\r\n            {\r\n                text: numberWithCommas(totalMonth),\r\n                style: ['fontTitle', 'rowNumber', 'rowFooterColor'],\r\n                bold:true\r\n            }\r\n        ]\r\n    ]\r\n}\r\n\r\nconst SummaryTable = data => {\r\n    return [\r\n        {\r\n            margin: [30,0,0,0],//[left, top, right, bottom]\r\n            columns: [\r\n                {\r\n                    table: {\r\n                        headerRows: 1,\r\n                        widths: [ 100, 100],\r\n                        body: [\r\n                            [\r\n                                {text: 'เดือน', style: ['fontTitle', 'rowHeaderColor', 'alignmentCenter'], bold:true},\r\n                                {text: 'จำนวน', style: ['fontTitle', 'alignmentCenter', 'rowHeaderColor'], bold:true},\r\n                            ],//chanodeItemText\r\n                            ...SubmaryRow(data.chartData)\r\n                        ]\r\n                    }\r\n                },\r\n            ]\r\n        }\r\n    ]\r\n}\r\n\r\nconst Chart = (chartPNGBase64) => {\r\n    return [\r\n        {\r\n            columns: [\r\n                {\r\n                    text: 'จำนวน(ครั้ง)',\r\n                    margin: [-40,0,0,0]\r\n                },\r\n\r\n                {\r\n                    image: chartPNGBase64,\r\n                    alignment: 'left',\r\n                    margin: [-70,10,0,0],//[left, top, right, bottom]\r\n                    width: 350\r\n                },\r\n                {\r\n                    text: 'เดือน',\r\n                    alignment: 'left',\r\n                    margin: [-50,300,0,0]\r\n                }\r\n            ]\r\n        }\r\n    ]\r\n}\r\n\r\n\r\nconst StatisticUserExportPDF = (data, chartPNGBase64) => {\r\n    const docDefinition = {\r\n        ...configPage,\r\n        footer: {\r\n            columns: [\r\n                { \r\n                    text: FOOTER_REPORT,\r\n                    alignment: 'right',\r\n                    margin: [0,0,35,0],\r\n                    fontSize: 10\r\n                }\r\n            ]\r\n        },\r\n        content: [\r\n            {\r\n                text: 'จำนวนผู้เข้าใช้งาน', \r\n                style: [ 'fontTitle', 'header','alignmentCenter'],\r\n                width: '*',\r\n                noWrap: true\r\n            },\r\n            {\r\n                // text: 'ระบบแจ้งการใช้ประโยชน์ (ผมร.๑) กรุงเทพมหานคร', \r\n                text: data.systemName, //dynamic ตามชื่อระบบ \r\n                style: [ 'fontTitle', 'header','alignmentCenter'],\r\n                margin: [0,15,0,0],//[left, top, right, bottom]\r\n                width: '*',\r\n                noWrap: true\r\n            },\r\n            {\r\n                text: `พ.ศ. ${data.selectYearBC}`, \r\n                style: [ 'fontTitle', 'header','alignmentCenter'],\r\n                margin: [0,15,0,0],//[left, top, right, bottom]\r\n                width: '*',\r\n                noWrap: true\r\n            },\r\n            {\r\n                margin: [0,15,0,0],//[left, top, right, bottom]\r\n                columnGap: -10,\r\n                columns:[\r\n                    ...SummaryTable(data),\r\n                    ...Chart(chartPNGBase64)\r\n                ]\r\n            }\r\n            \r\n        ],\r\n        styles: {\r\n            ...fontStyle,\r\n            ...tableStyle,\r\n            header: {\r\n                bold: true\r\n            },\r\n            alignmentCenter: {\r\n                alignment: 'center'\r\n            },\r\n            alignmentRight: {\r\n                alignment: 'right'\r\n            }\r\n        },\r\n        defaultStyle: {\r\n            font: \"THSarabun\",\r\n            columnGap: 10,\r\n        }\r\n    };\r\n    // pdfMake.createPdf(docDefinition).open()\r\n    pdfMake.createPdf(docDefinition).download('รายงานสถิติผู้เข้าใช้งาน.pdf'); \r\n}\r\n\r\nexport default StatisticUserExportPDF;","//สถิติผู้เข้าใช้งาน\r\nimport React, { Fragment, useState, useEffect, useRef } from 'react';\r\nimport {\r\n    reduxForm,\r\n    // formValueSelector \r\n} from \"redux-form\";\r\nimport { compose } from \"recompose\";\r\n\r\n//import component\r\nimport StatisticUserView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/Report/StatisticUser/StatisticUserView';\r\nimport StatisticUserExportPDF from './StatisticUserExportPDF'\r\nimport Loading from '../../../../../../../Controls/Containers/Loading';\r\nimport AlertMessageSuper from '../../../../../../../Controls/Containers/AlertMessageSuper';\r\nimport WithAlertMessage from '../../../../../../../HOC/WithAlertMessage';\r\n\r\n//import service - utils\r\nimport * as ServiceUtil from '../../../../../../../Utilities/ServiceUtils';\r\nimport * as Util from '../../../../../../../Utilities/Utils';\r\n\r\n//import constants\r\nimport { MONTH, HEADER_EXPORT_REPORT, SYSTEM, ALERT_MESSAGE } from '../../../../../../../Constants/Constants';\r\n\r\nconst StatisticUser = (props) => {\r\n\r\n    const {\r\n        onBackClick,\r\n        handleSubmit,\r\n        title,\r\n        system,\r\n        showAlert,\r\n        hideAlert,\r\n        change\r\n    } = props\r\n\r\n    const barChartRef = useRef(null);\r\n\r\n    const [isLoading, setLoading] = useState(false);\r\n    const [yearList, setYearList] = useState([]);\r\n    const [displayChartData, setDisplayChartData] = useState([]);\r\n\r\n    useEffect(() => {\r\n        loadDDLyear();\r\n    }, [])\r\n\r\n    const loadDDLyear = () => {\r\n        const MIN_YEAR = 2562;\r\n        const currentDate = new Date();\r\n        const currentYear = currentDate.getFullYear() + 543;\r\n        let keepListYear = [];\r\n        for (let i = MIN_YEAR; i <= currentYear; i++) {\r\n            keepListYear.push({ id: i - 543, name: i });\r\n        }\r\n        setYearList(keepListYear);\r\n        change('statisticUserYear', currentYear - 543);\r\n    }\r\n\r\n    const makeFormatChart = (data) => {\r\n        const chartData = MONTH.map(monthITM => {\r\n            const indexMatchData = data.map(dataITM => dataITM.month).indexOf(monthITM.id);\r\n            return {\r\n                ...monthITM,\r\n                value: (indexMatchData > -1) ? data[indexMatchData].summary : 0\r\n            }\r\n        });\r\n        return chartData;\r\n    }\r\n\r\n    const waitRender = () => {\r\n        return new Promise(resolv => {\r\n            setTimeout(() => {\r\n                resolv(null);\r\n            }, 2000)//2s\r\n        })\r\n    }\r\n\r\n    const checkUrkGetEvaluation = () => {\r\n        //url เช็คผลการประเมินจะแตกต่าวกันทั้ง 3 ระบบ\r\n        switch (system) {\r\n            case SYSTEM.CMP:\r\n                return process.env.REACT_APP_GET_REPORT_STATISTIC_USER_CMP\r\n            case SYSTEM.CAH:\r\n                return process.env.REACT_APP_GET_PLANUSAGE_REPORT\r\n            case SYSTEM.PMR1:\r\n                return process.env.REACT_APP_GET_REPORT_STATISTIC_USER_PMR\r\n            default:\r\n                return null\r\n        }\r\n    }\r\n\r\n    const handleSubmitForm = async values => {\r\n        const url = checkUrkGetEvaluation();\r\n        setLoading(true)\r\n        try {\r\n            //Get Export Data \r\n            const response = await ServiceUtil.fetchGet_(`${url}?year=${values.statisticUserYear}`);\r\n            const result = await response.json();\r\n            if (result && result.result.length) {\r\n                const chartData = makeFormatChart(result.result);\r\n                setDisplayChartData(chartData);\r\n                waitRender().then(async () => {\r\n                    setLoading(false)\r\n                    const selectYearBC = values.statisticUserYear + 543;\r\n                    //to chart png\r\n                    const exportParam = {\r\n                        selectYearBC,\r\n                        chartData,\r\n                        systemName: HEADER_EXPORT_REPORT[system]\r\n                    }\r\n                    const nodeBarChart = barChartRef.current.container.children[0];\r\n                    const pngChart = await Util.svg2pngBase64(nodeBarChart, 650, 650);\r\n                    StatisticUserExportPDF(exportParam, pngChart)\r\n                })\r\n\r\n            }\r\n            else {\r\n                setLoading(false);\r\n                showAlert({ altMsg: \"ไม่พบข้อมูลในการออกรายงาน\", callbackClose: hideAlert })\r\n            }\r\n        }\r\n        catch (err) {\r\n            setLoading(false);\r\n            showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR, callbackClose: hideAlert })\r\n        }\r\n    }\r\n    return <Fragment>\r\n        <StatisticUserView\r\n            title={title}\r\n            barChartRef={barChartRef}\r\n            yearList={yearList}\r\n            displayChartData={displayChartData}\r\n            onBackClick={onBackClick}\r\n            onSubmit={handleSubmit(handleSubmitForm)} />\r\n        <Loading isShowLoading={isLoading} />\r\n        <AlertMessageSuper {...props} />\r\n    </Fragment>\r\n}\r\n\r\nexport const Validate = (values) => {\r\n    const errors = {};\r\n    if (!values.statisticUserYear) {\r\n        errors.statisticUserYear = 'กรุณาระบุปี';\r\n    }\r\n\r\n    return errors;\r\n};\r\n\r\nconst formName = \"StatisticUserFormPMR\";\r\nconst reduxFormParameter = {\r\n    form: formName,\r\n    validate: Validate\r\n};\r\n\r\nexport default compose(\r\n    // connect(mapStateToProps,null),\r\n    reduxForm(reduxFormParameter),\r\n    WithAlertMessage\r\n)(StatisticUser);","import React from 'react';\r\nimport { Scrollbars } from 'react-custom-scrollbars';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport classnames from 'classnames';\r\nimport { Field } from \"redux-form\";\r\nimport SelectField from '../../../../../../../Controls/Containers/SelectFieldRedux';\r\nimport Button from '../../../../../../../Controls/Containers/Button';\r\nimport AppBarHeaderView from '../../../../AppBarHeaderView';\r\nimport { BTN } from '../../../../../../../Constants/Constants'\r\nconst DistrictReportView = ({\r\n    classes,\r\n    title,\r\n    onBackClick,\r\n    listYear = [],\r\n    listMonth = [],\r\n    listDistrict = [],\r\n    previewFn,\r\n    exportExcelFn,\r\n    handleSubmit,\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root}>\r\n            <AppBarHeaderView\r\n                title={title}\r\n                onClickBack={onBackClick}\r\n            />\r\n            <Grid container className={classnames(classes.content)}>\r\n                <Scrollbars\r\n                    autoHide={false}\r\n                    universal={true}>\r\n                    <Grid item xs={12} className={classes.content_in}>\r\n                        {/* <Grid container>\r\n                            <Grid item xs={12}>\r\n                                <Field\r\n                                    label={'ปี'}\r\n                                    name={'districtReportYear'}\r\n                                    component={SelectField}\r\n                                    // onChange={onValueChange('year')}\r\n                                    data={listYear}\r\n                                    required\r\n                                />\r\n                            </Grid>\r\n                        </Grid> */}\r\n                        {/* <Grid container>\r\n                            <Grid item xs={12}>\r\n                                <Field\r\n                                    label={'เดือน'}\r\n                                    name={'districtReportMonth'}\r\n                                    component={SelectField}\r\n                                    // onChange={onValueChange('month')}\r\n                                    data={listMonth}\r\n                                    required\r\n                                />\r\n                            </Grid>\r\n                        </Grid> */}\r\n                        {/* <Grid container>\r\n                            <Grid item xs={12}>\r\n                                <Field\r\n                                    label={'เขต'}\r\n                                    name={'districtReportDistrict'}\r\n                                    component={SelectField}\r\n                                    // onChange={onValueChange('district')}\r\n                                    data={listDistrict}\r\n                                    required\r\n                                />\r\n                            </Grid>\r\n                        </Grid> */}\r\n                        <Field\r\n                            label={'ปี'}\r\n                            name={'districtReportYear'}\r\n                            component={SelectField}\r\n                            // onChange={onValueChange('year')}\r\n                            data={listYear}\r\n                            required\r\n                        />\r\n                        <Field\r\n                            label={'เดือน'}\r\n                            name={'districtReportMonth'}\r\n                            component={SelectField}\r\n                            // onChange={onValueChange('month')}\r\n                            data={listMonth}\r\n                            required\r\n                        />\r\n                        <Field\r\n                            label={'เขต'}\r\n                            name={'districtReportDistrict'}\r\n                            component={SelectField}\r\n                            // onChange={onValueChange('district')}\r\n                            data={listDistrict}\r\n                            required\r\n                        />\r\n\r\n                        <Grid container justify=\"center\" spacing={24} className={classes.divFooter}>\r\n                            <Grid item>\r\n                                <Button\r\n                                    // color=\"black\"\r\n                                    label={BTN.TH.CANCEL}\r\n                                    onClick={onBackClick}\r\n                                />\r\n                            </Grid>\r\n                            <Grid item>\r\n                                <Button\r\n                                    label={BTN.EN.EXPORT_EXCEL}\r\n                                    onClick={handleSubmit(exportExcelFn)}\r\n                                />\r\n                            </Grid>\r\n                            <Grid item>\r\n                                <Button\r\n                                    label={BTN.EN.EXPORT_PDF}\r\n                                    onClick={handleSubmit(previewFn)}\r\n                                />\r\n                            </Grid>\r\n                            \r\n\r\n                        </Grid>\r\n                    </Grid>\r\n                </Scrollbars>\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    _hide: {\r\n        display: 'none'\r\n    },\r\n    root: {\r\n        position: 'absolute',\r\n        top: 0,\r\n        bottom: 0,\r\n        right: 0,\r\n        left: 0\r\n    },\r\n    content: {\r\n        position: 'relative',\r\n        height: 'calc(100% - 45px)'\r\n    },\r\n    content_in: {\r\n        // height: '100%',\r\n        // paddingTop: '10px',\r\n        // paddingLeft: '5px',\r\n        // paddingRight: '5px',\r\n        // paddingBottom: '5px'\r\n        padding: \"10px\",\r\n        width:\"100%\"\r\n    },\r\n    divFooter: {\r\n        marginTop:\"10px\",\r\n        marginBottom:\"10px\"\r\n        // height: '10px'\r\n    }\r\n}))(DistrictReportView);","import Excel from \"exceljs/dist/es5/exceljs.browser\";\r\n\r\nconst DEFAULT_MONTH = {id:99, name: 'ทุกเดือน'}\r\n\r\nconst DistrictReportExcel = (year='YYYY', month=DEFAULT_MONTH, datasource=[]) => {\r\n    const startRowHeader = 4;//เป็น 3 ใน excel มีชื่อเรืองใช้่ row 1,2 ไปแล้ว\r\n    const workbook = new Excel.Workbook();\r\n    const worksheet = workbook.addWorksheet('sheet', {//จำเป็นต้องตั้งค่าส่วนนี้\r\n        pageSetup:{\r\n            paperSize: 9, //follow documentation the 9 value is A4\r\n            orientation:'portrait'\r\n        }\r\n    });\r\n    workbook.creator = 'PMR-WEB';\r\n    workbook.lastModifiedBy = 'PMR-WEB';\r\n    \r\n\r\n    const setCellBorder = (colKey) => {\r\n        worksheet.getCell(colKey).border = {\r\n            top: {style:'thin'},\r\n            left: {style:'thin'},\r\n            bottom: {style:'thin'},\r\n            right: {style:'thin'}\r\n        };\r\n    }\r\n\r\n    const setContentBorder = (colKey) => {\r\n        worksheet.getCell(colKey).border = {\r\n            left: {style:'thin'},\r\n            right: {style:'thin'}\r\n        };\r\n    }\r\n\r\n    const setLastContentBorder = (colKey) => {\r\n        worksheet.getCell(colKey).border = {\r\n            left: {style:'thin'},\r\n            bottom: {style:'thin'},\r\n            right: {style:'thin'}\r\n        };\r\n    }\r\n\r\n    const setContentColor = (colKey) => {\r\n        worksheet.getCell(colKey).fill = {\r\n            type: 'pattern',\r\n            pattern:'solid',\r\n            fgColor:{\r\n                argb:'00D0EFDA'\r\n            }\r\n        };\r\n    }\r\n\r\n    const loadTopic = () => {\r\n        worksheet.mergeCells('A1:I1');\r\n        worksheet.getCell('A1').value = `การใช้ประโยชน์ที่ดิน ตามกฏกระทรวงให้ใช้บังคับผังเมืองรวมกรุงเทพมหานคร พ.ศ.${window.REPORT_YEAR_COMPREHENSIVE_RULE}`;\r\n        worksheet.getCell('A1').alignment = { horizontal:'center'};\r\n\r\n        worksheet.mergeCells('A2:H2');\r\n        let displayMonth = (month.id === DEFAULT_MONTH.id) ? DEFAULT_MONTH.name : `เดือน${month.name}`\r\n        worksheet.getCell('A2').value =  `จำแนกตามประเภทที่ดิน ${displayMonth} พ.ศ.${year}`;\r\n        worksheet.getCell('A2').alignment = { horizontal:'center'};\r\n    }\r\n\r\n    const loadHeader = () => {//ใน Excel จะอยู่แถวแรก A1,B1,C1,D1,E1,F1,G1,H1,I1\r\n        const arrHeader = [\r\n            { \r\n                name: 'ลำดับที่', \r\n                key: 'no', \r\n                width: 10,\r\n            },\r\n            {\r\n                name: 'เขต',\r\n                key: 'districtName',\r\n                width: 40\r\n            },\r\n            { \r\n                name: 'บริเวณหมายเลข', \r\n                key: 'LUPSubZone', \r\n                width: 20\r\n            },\r\n            { \r\n                name: 'พื้นที่ตั้งบริเวณ (ตร.ม.)', \r\n                key: 'sumSubZoneArea', \r\n                width: 30\r\n            },\r\n            { \r\n                name: 'พื้นที่ดินรวม (โฉนด) (ตร.ม.)', \r\n                key: 'sumChanodeArea', //sumLandArea ใช้ไปก่อน\r\n                width: 30\r\n            },\r\n            {\r\n                name: 'พี้นที่การใช้ประโยชน์ที่ดิน (ตร.ม.)', \r\n                key: 'sumLandArea', \r\n                width: 30\r\n            },\r\n            { \r\n                name: 'พื้นที่ประกอบการ (ตร.ม.)', \r\n                key: 'sumActivityArea', \r\n                width: 30\r\n            },\r\n            { \r\n                name: 'จำนวนผู้แจ้งการใช้ประโยชน์ที่ดิน', \r\n                key: 'sumUser', \r\n                width: 30\r\n            },\r\n            { \r\n                name: 'หมายเหตุ', \r\n                key: 'remark', \r\n                width: 30\r\n            }\r\n        ];\r\n        worksheet.columns = arrHeader.map(itm => ({key:itm.key, width: itm.width}));\r\n        worksheet.getRow(startRowHeader).values = arrHeader.map(itm => itm.name);\r\n        //กำหนด style ให้ cell Header\r\n        [   `A${startRowHeader}`,\r\n            `B${startRowHeader}`, \r\n            `C${startRowHeader}`, \r\n            `D${startRowHeader}`, \r\n            `E${startRowHeader}`, \r\n            `F${startRowHeader}`,\r\n            `G${startRowHeader}`,\r\n            `H${startRowHeader}`,\r\n            `I${startRowHeader}`\r\n        ].forEach(colKey => {\r\n            setCellBorder(colKey)\r\n            worksheet.getCell(colKey).alignment = {vertical: 'middle', horizontal:'center', wrapText: true};\r\n            worksheet.getCell(colKey).fill = {\r\n                type: 'pattern',\r\n                pattern:'solid',\r\n                fgColor:{\r\n                    argb:'005E9A50'\r\n                }\r\n            }\r\n        });\r\n        //กำหนด format\r\n        \r\n        worksheet.getColumn('D').numFmt = '#,##0.00';\r\n        worksheet.getColumn('E').numFmt = '#,##0.00';\r\n        worksheet.getColumn('F').numFmt = '#,##0.00';\r\n        worksheet.getColumn('G').numFmt = '#,##0.00';\r\n        worksheet.getColumn('H').numFmt = '#,##0.00';\r\n    }\r\n    // const makeSubHeader = (colKey, mergeRang, name) => {//colKey ยกตัวอย่างเช่น 'A1' 'B1' เป็นต้น | mergeRang ต้องกำหนดแบบ 'A1:F1'\r\n    //     worksheet.mergeCells(mergeRang);\r\n    //     worksheet.getCell(colKey).value = name;\r\n    //     worksheet.getCell(colKey).alignment = { horizontal:'center'};\r\n    //     setCellBorder(colKey);\r\n    //     worksheet.getCell(colKey).fill = {\r\n    //         type: 'pattern',\r\n    //         pattern:'solid',\r\n    //         fgColor:{\r\n    //             argb:'00DAEEF3'\r\n    //         }\r\n    //     }\r\n    // }\r\n\r\n    const setCellFontColor = (colKey, argb, isBold) => {\r\n        worksheet.getCell(colKey).font  = {\r\n            bold: isBold,\r\n            color: { argb: argb}\r\n        };\r\n    }\r\n\r\n    const makeRowITM = (rowNumber, rowITM, isSummaryRow=false) => {\r\n        worksheet.addRow({\r\n            no: rowITM.no, \r\n            districtName: rowITM.districtName,\r\n            LUPSubZone: rowITM.LUPSubZone, \r\n            sumSubZoneArea: rowITM.sumSubZoneArea,\r\n            sumLandArea: rowITM.sumLandArea,\r\n            sumChanodeArea: rowITM.sumChanodeArea,\r\n            sumActivityArea: rowITM.sumActivityArea,\r\n            sumUser: rowITM.sumUser,\r\n            remark: rowITM.remark\r\n        });\r\n\r\n        const arrColKey  = [   \r\n            `A${rowNumber}`,\r\n            `B${rowNumber}`,\r\n            `C${rowNumber}`,\r\n            `D${rowNumber}`,\r\n            `E${rowNumber}`,\r\n            `F${rowNumber}`,\r\n            `G${rowNumber}`,\r\n            `H${rowNumber}`,\r\n            `I${rowNumber}`\r\n        ];\r\n\r\n        arrColKey.forEach(colKey =>{\r\n            // setCellBorder(colKey);\r\n            setContentBorder(colKey)\r\n            if(rowITM.isOddRow){\r\n                setContentColor(colKey)\r\n            }\r\n            if(isSummaryRow){//\r\n                setCellFontColor(colKey, '00FF0000', true)\r\n            }\r\n            if(rowITM.lastRow){\r\n                setLastContentBorder(colKey)\r\n            }\r\n\r\n        })\r\n    }\r\n\r\n    const makeRowContent = () => {\r\n        try{\r\n            let rowSubHeaderNumber = startRowHeader//สำหรับรันเลขตำแหน่งเริ่มต้นของ group\r\n            let countItemLastGroup = 0; //เก็บจำนวนทั้งหมดของกลุ่มก่อนหน้า\r\n            datasource.forEach((rowGroupITM, index) => {\r\n                rowSubHeaderNumber = (rowSubHeaderNumber) + countItemLastGroup;\r\n                if(index === 0){\r\n                    rowSubHeaderNumber = rowSubHeaderNumber+1\r\n                }\r\n                \r\n                let rowNumber = rowSubHeaderNumber;\r\n                rowGroupITM.subZone.forEach((rowITM, indexRow) => {\r\n                    makeRowITM(rowNumber+indexRow, {\r\n                        no: indexRow === 0 ? (index+1): null,\r\n                        districtName: indexRow === 0 ? rowGroupITM.districtName:null,\r\n                        lastRow: rowGroupITM.subZone.length === (indexRow+1) ? true:false,\r\n                        isOddRow: (index+1)%2 === 0 ? false : true,\r\n                        ...rowITM\r\n                    })\r\n                })\r\n                countItemLastGroup = (rowGroupITM.subZone.length);\r\n            });\r\n        }\r\n        catch(err){\r\n            console.log('Error Generate Row Excel file DistrictReportExcel.js: ', err);\r\n            throw new Error(err);\r\n        }\r\n    }\r\n\r\n    const processColumns = () => {\r\n        loadTopic();\r\n        loadHeader();\r\n        makeRowContent();\r\n    }\r\n    \r\n    //Main Program\r\n    processColumns();\r\n    workbook.xlsx.writeBuffer().then(function (xls64data) {\r\n        const blob = new Blob([xls64data],\r\n          { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });\r\n        const url = window.URL.createObjectURL(blob);\r\n        const anchor = document.createElement('a');\r\n        document.body.appendChild(anchor); //for firefox ref: https://stackoverflow.com/questions/41805095/excel-export-not-working-on-firefox-but-working-fine-in-google-crome/41806544\r\n        anchor.href = url;\r\n        anchor.download = 'สรุปผลการแจ้ง_ผมร_1_รายเขต.xlsx';\r\n        var isIE = /*@cc_on!@*/false || !!document.documentMode;\r\n        var isEdge = !isIE && !!window.StyleMedia;\r\n        if(isEdge){\r\n            anchor.click();\r\n            anchor.change();\r\n        } else {\r\n            anchor.click();\r\n        }\r\n        anchor.change();\r\n        anchor.click();\r\n        window.URL.revokeObjectURL(url);\r\n      });\r\n}\r\n\r\nexport default DistrictReportExcel;","// import {numberWithCommas} from '../../../../../../../../Utilities/Utils'\r\nimport pdfMake from \"pdfmake/build/pdfmake\";\r\nimport pdfFonts from \"pdfmake/build/vfs_fonts\";\r\nimport { FOOTER_REPORT } from '../../../../../../../Constants/Constants'\r\n\r\nconst DEFAULT_MONTH = {id:99, name: 'ทุกเดือน'}\r\n\r\npdfMake.vfs = pdfFonts.pdfMake.vfs;\r\npdfMake.fonts = {\r\n    THSarabun: {\r\n        normal: 'THSarabun.ttf',\r\n        bold: 'THSarabun-Bold.ttf',\r\n        italics: 'THSarabun-Italic.ttf',\r\n        bolditalics: 'THSarabun-BoldItalic.ttf'\r\n    },\r\n    Roboto: {\r\n        normal: 'Roboto-Regular.ttf',\r\n        bold: 'Roboto-Medium.ttf',\r\n        italics: 'Roboto-Italic.ttf',\r\n        bolditalics: 'Roboto-MediumItalic.ttf'\r\n    }\r\n}\r\n\r\nconst configPage = {\r\n    pageSize: 'A4',\r\n    pageOrientation: 'landscape',//portrait\r\n    info: {\r\n        title: 'รายงานสรุปผลการแจ้ง ผมร.1 รายเขต',\r\n        subject: 'รายงานสรุปผลการแจ้ง ผมร.1 รายเขต',\r\n        keywords: 'รายงานสรุปผลการแจ้ง ผมร.1 รายเขต',\r\n    },\r\n    pageMargins: [ 5, 40, 10, 40 ],// [left, top, right, bottom] or [horizontal, vertical]\r\n}\r\n\r\n\r\nconst fontStyle = {\r\n    fontHeading: {\r\n        fontSize: 18\r\n    },\r\n    fontTitle: {\r\n        fontSize: 16\r\n    },\r\n    fontSubheading: {\r\n        fontSize: 14\r\n    },\r\n    fontBody: {\r\n        fontSize: 12\r\n    }\r\n}\r\n\r\nconst tableStyle = {\r\n    rowNumber: {\r\n        alignment: 'right'\r\n    },\r\n    rowHeaderColor: {\r\n        fillColor: '#5E9A50'\r\n    },\r\n    rowSubHeaderColor:{\r\n        fillColor: '#DAEEF3'\r\n    },\r\n    rowFooterColor: {\r\n        fillColor: '#5E9A50'\r\n    },\r\n    rowOtherColor1: {\r\n        fillColor: '#D0EFDA'\r\n    },\r\n    rowOtherColor2: {\r\n        fillColor: '#E5F6E8'\r\n    }\r\n}\r\n\r\nconst generateTableHeader = (datasource=[]) => {\r\n    // makeTableContent(datasource)\r\n    return [\r\n        {\r\n            margin: [0,15,0,0],//[left, top, right, bottom]\r\n            columns: [\r\n                { width: '*', text: '' },\r\n                {\r\n                    width: 'auto',\r\n                    table: {\r\n                        // headers are automatically repeated if the table spans over multiple pages\r\n                        // you can declare how many rows should be treated as headers\r\n                        headerRows: 1,\r\n                        widths: [ 20, 60, 90, 90, 90, 90, 90, 90, 90],\r\n                        body: [\r\n                            [ \r\n                                {\r\n                                    text: `ลำดับที่`,\r\n                                    style: ['fontTitle', 'alignmentCenter', 'rowHeaderColor'],\r\n                                    bold:true\r\n                                },\r\n                                {\r\n                                    text: `เขต`,\r\n                                    style: ['fontTitle', 'alignmentCenter', 'rowHeaderColor'],\r\n                                    bold: true\r\n                                },\r\n                                {\r\n                                    text: `บริเวณหมายเลข`,\r\n                                    style: ['fontTitle', 'alignmentCenter', 'rowHeaderColor'],\r\n                                    bold:true\r\n                                },\r\n                                {\r\n                                    text: 'พื้นที่ทั้งบริเวณ (ตร.ม.)',\r\n                                    style: ['fontTitle', 'alignmentCenter', 'rowHeaderColor'],\r\n                                    bold:true\r\n                                },\r\n                                {\r\n                                    text: `พื้นที่ดินรวม (โฉนด) (ตร.ม.)`,\r\n                                    style: ['fontTitle', 'alignmentCenter', 'rowHeaderColor'],\r\n                                    bold:true\r\n                                },\r\n                                {\r\n                                    text: `พี้นที่การใช้ประโยชน์ที่ดิน (ตร.ม.)`,\r\n                                    style: ['fontTitle', 'alignmentCenter', 'rowHeaderColor'],\r\n                                    bold:true\r\n                                },\r\n                                {\r\n                                    text: `พื้นที่ประกอบการ (ตร.ม.)`,\r\n                                    style: ['fontTitle', 'alignmentCenter', 'rowHeaderColor'],\r\n                                    bold:true\r\n                                },\r\n                                {\r\n                                    text: `จำนวนผู้แจ้งการใช้ ประโยชน์ที่ดิน`,\r\n                                    style: ['fontTitle', 'alignmentCenter', 'rowHeaderColor'],\r\n                                    bold:true\r\n                                },\r\n                                {\r\n                                    text: `หมายเหตุ`,\r\n                                    style: ['fontTitle', 'alignmentCenter', 'rowHeaderColor'],\r\n                                    bold:true\r\n                                }\r\n                            ],\r\n                            \r\n                            ...makeTableContent(datasource)\r\n                        ]\r\n                    }\r\n                },\r\n                { width: '*', text: '' }\r\n            ]\r\n        }\r\n    ]\r\n}\r\n\r\n// const makeRowSubheader = (txt) => {\r\n//     return [\r\n//         {\r\n//             text: txt, \r\n//             colSpan: 8, \r\n//             style: ['fontTitle', 'rowSubHeaderColor', 'alignmentCenter']\r\n//         }\r\n//     ]\r\n// }\r\n\r\nconst makeRowITM = (rowITM, rowIndexIsOdd) => {\r\n    // const FIXED_NUMBER = 2; //กำหนดจำนวนทศนิยม\r\n\r\n    return [ \r\n        {\r\n            stack: rowITM.no,\r\n            style: rowIndexIsOdd? ['fontTitle', 'alignmentRight', 'rowOtherColor1']:['fontTitle', 'alignmentRight']\r\n        },\r\n        {\r\n            stack: rowITM.districtName, //เขต\r\n            style: rowIndexIsOdd? ['fontTitle', 'rowOtherColor1']:['fontTitle']\r\n        },\r\n        {\r\n            stack: rowITM.LUPSubZone, //บริเวณหมายเลข\r\n            style: rowIndexIsOdd? ['fontTitle', 'rowOtherColor1']:['fontTitle']\r\n        },\r\n        {\r\n            stack: rowITM.sumSubZoneArea,//พื้นที่ทั้งบริเวณ \r\n            style: rowIndexIsOdd? ['fontTitle', 'alignmentRight', 'rowOtherColor1']:['fontTitle', 'alignmentRight']\r\n        },\r\n        {\r\n            stack: rowITM.sumChanodeArea, //พื้รที่ดินรวม\r\n            style: rowIndexIsOdd? ['fontTitle', 'alignmentRight', 'rowOtherColor1']:['fontTitle', 'alignmentRight']\r\n        },\r\n        {\r\n            stack: rowITM.sumLandArea, //พี้นที่การใช้ประโยชน์ที่ดิน\r\n            style: rowIndexIsOdd? ['fontTitle', 'alignmentRight', 'rowOtherColor1']:['fontTitle', 'alignmentRight']\r\n        },\r\n        {\r\n            stack: rowITM.sumActivityArea, //พื้นที่ประกอบการ\r\n            style: rowIndexIsOdd? ['fontTitle', 'alignmentRight', 'rowOtherColor1']:['fontTitle', 'alignmentRight']\r\n        },\r\n        {\r\n            stack: rowITM.sumUser, \r\n            style: rowIndexIsOdd? ['fontTitle', 'alignmentRight', 'rowOtherColor1']:['fontTitle', 'alignmentRight']\r\n        },\r\n        {\r\n            text: rowITM.remark, \r\n            style: rowIndexIsOdd? ['fontTitle', 'alignmentRight', 'rowOtherColor1']:['fontTitle', 'alignmentRight']\r\n        }\r\n    ];\r\n}\r\n\r\nconst makeTableContent = (datasource=[]) => {\r\n    let rowIndexIsOdd = null;\r\n    const list = [];\r\n    datasource.map((item, index) => {\r\n        const listRow = {no:[], districtName:[], LUPSubZone:[], \r\n            sumSubZoneArea:[], sumChanodeArea:[], sumLandArea:[], sumActivityArea:[], \r\n            sumUser:[], remark:[]}\r\n        listRow.no.push(Number(index+1).toLocaleString())\r\n        listRow.districtName.push(item.districtName)\r\n        item.subZone.map((itemSubZone, indexSubZone) => {\r\n            listRow.LUPSubZone.push(itemSubZone.LUPSubZone)\r\n            listRow.sumSubZoneArea.push(Number(itemSubZone.sumSubZoneArea).toLocaleString())\r\n            listRow.sumChanodeArea.push(Number(itemSubZone.sumChanodeArea).toLocaleString())\r\n            listRow.sumLandArea.push(Number(itemSubZone.sumLandArea).toLocaleString())\r\n            listRow.sumActivityArea.push(Number(itemSubZone.sumActivityArea).toLocaleString())\r\n            listRow.sumUser.push(Number(itemSubZone.sumUser).toLocaleString())\r\n\r\n            return true\r\n        })\r\n        rowIndexIsOdd = (index+1)%2 === 0 ? false:true\r\n        return list.push(makeRowITM(listRow, rowIndexIsOdd))\r\n    })\r\n    return list;\r\n}\r\n\r\n\r\nconst DistrictReportPDF = (year='YYYY', month=DEFAULT_MONTH, datasource=[]) => {\r\n    const displayMonth = (month.id === DEFAULT_MONTH.id) ? DEFAULT_MONTH.name : `เดือน${month.name}`\r\n    const docDefinition = {\r\n        ...configPage,\r\n        footer: {\r\n            columns: [\r\n                { \r\n                    text: FOOTER_REPORT,\r\n                    alignment: 'right',\r\n                    margin: [0,0,35,0],\r\n                    fontSize: 10\r\n                }\r\n            ]\r\n        },\r\n        content: [\r\n            {\r\n                text: `การใช้ประโยชน์ที่ดิน ตามกฏกระทรวงให้ใช้บังคับผังเมืองรวมกรุงเทพมหานคร พ.ศ.${window.REPORT_YEAR_COMPREHENSIVE_RULE}`, \r\n                style: [ 'fontTitle', 'header','alignmentCenter'],\r\n                width: '*',\r\n                noWrap: true\r\n            },\r\n            {\r\n                text: `จำแนกตามรายเขต ${displayMonth} พ.ศ.${year}`, \r\n                style: [ 'fontTitle', 'header','alignmentCenter'],\r\n                margin: [0,10,0,0],//[left, top, right, bottom]\r\n                width: '*',\r\n                noWrap: true\r\n            },\r\n            ...generateTableHeader(datasource)\r\n        ],\r\n        styles: {\r\n            ...fontStyle,\r\n            ...tableStyle,\r\n            header: {\r\n                bold: true\r\n            },\r\n            alignmentCenter: {\r\n                alignment: 'center'\r\n            },\r\n            alignmentRight: {\r\n                alignment: 'right'\r\n            },\r\n            alignmentLeft: {\r\n                alignment: 'left'\r\n            }\r\n        },\r\n        defaultStyle: {\r\n            font: \"THSarabun\",\r\n            columnGap: 10,\r\n        }\r\n    };\r\n    // pdfMake.createPdf(docDefinition).open()\r\n    pdfMake.createPdf(docDefinition).download('รายงานสรุปผลการแจ้ง ผมร.1 รายเขต.pdf');\r\n}\r\n\r\nexport default DistrictReportPDF;","//สถิติผู้เข้าใช้งาน\r\nimport React, { Fragment, useState, useEffect } from 'react';\r\nimport { connect } from 'react-redux'\r\nimport { reduxForm, getFormValues } from \"redux-form\";\r\nimport { compose } from \"recompose\";\r\n\r\n//import component\r\nimport WithAlertMessage from '../../../../../../../HOC/WithAlertMessage';\r\nimport AlertMessageSuper from \"../../../../../../../Controls/Containers/AlertMessageSuper\";\r\nimport Loading from '../../../../../../../Controls/Containers/Loading';\r\nimport DistrictReportView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/Report/DistrictReport/DistrictReportView'\r\nimport DistrictReportExcel from './DistrictReportExcel';\r\nimport DistrictReportPDF from './DistrictReportPDF';\r\n\r\n//import service - utils\r\nimport * as ServiceUtils from '../../../../../../../Utilities/ServiceUtils';\r\n\r\n//import constants\r\nimport { MONTH, ALERT_MESSAGE } from '../../../../../../../Constants/Constants';\r\n\r\n\r\nconst DEFAULT_MONTH = { id: 99, name: 'ทุกเดือน' }\r\nconst DEFAULT_DISTRICT = { id: 99, name: 'ทุกเขต' }\r\n\r\nconst DistrictReport = (props) => {\r\n\r\n    const {\r\n        onBackClick,\r\n        handleSubmit,\r\n        change,\r\n        title,\r\n        showAlert,\r\n        hideAlert,\r\n    } = props;\r\n    \r\n    const [listYear, setListYear] = useState();\r\n    const [listMonth, setListMonth] = useState();\r\n    const [listDistrict, setListDistrict] = useState();\r\n    const [isLoading, setLoading] = useState(false)\r\n\r\n    useEffect(() => {\r\n        loadDDLyear()\r\n        loadDDLmonth()\r\n        loadDDLDistrict();\r\n    }, [])\r\n\r\n    const loadDDLyear = () => {\r\n        const MIN_YEAR = 2562;\r\n        const currentDate = new Date();\r\n        const currentYear = currentDate.getFullYear() + 543;\r\n        let keepListYear = [];\r\n        for (let i = MIN_YEAR; i <= currentYear; i++) {\r\n            keepListYear.push({ id: i - 543, name: i });\r\n        }\r\n        setListYear(keepListYear);\r\n        change('districtReportYear', currentYear - 543);\r\n    }\r\n\r\n    const loadDDLmonth = () => {\r\n        setListMonth([DEFAULT_MONTH, ...MONTH]);\r\n        change('districtReportMonth', DEFAULT_MONTH.id)\r\n    }\r\n\r\n    const loadDDLDistrict = async () => {\r\n        try {\r\n            const PROVINCE_CODE = '10';\r\n            const response = await ServiceUtils.fetchGet_(`${process.env.REACT_APP_LU_DISTRICT}?provinceid=${PROVINCE_CODE}`);\r\n            const objResult = await response.json();\r\n            setListDistrict([\r\n                DEFAULT_DISTRICT,\r\n                ...objResult.result.map(itm => ({\r\n                    id: `${itm.value}`,\r\n                    name: itm.name\r\n                }))\r\n            ]);\r\n            change('districtReportDistrict', DEFAULT_DISTRICT.id)\r\n        }\r\n        catch (err) {\r\n            setListDistrict([]);\r\n        }\r\n\r\n    }\r\n\r\n    const executeGenerateReport = async (values, reportFunction) => {\r\n        setLoading(true);\r\n        try {\r\n            let displayMonth = DEFAULT_MONTH;\r\n            let monthParam = `&month=${values.districtReportMonth}`;\r\n            let districtParam = `&districtid=${values.districtReportDistrict}`;\r\n            if (values.districtReportDistrict === DEFAULT_DISTRICT.id) {\r\n                districtParam = '';\r\n            }\r\n            if (values.districtReportMonth === DEFAULT_MONTH.id) {\r\n                monthParam = '';\r\n            }\r\n            else {\r\n                displayMonth = MONTH.filter(itmMonth => itmMonth.id === values.districtReportMonth)[0];\r\n            }\r\n            //console.log(values)\r\n            const response = await ServiceUtils.fetchGet_(`${process.env.REACT_APP_GET_PMR1_DISTRICT_REPORT}?year=${values.districtReportYear}${districtParam}${monthParam}`)\r\n            setLoading(false);\r\n            const objResult = await response.json();\r\n            if (objResult.result && objResult.result.length > 0) {\r\n                const datasource = objResult.result;\r\n                const displayYearBC = values.districtReportYear + 543;\r\n                reportFunction(displayYearBC, displayMonth, datasource)\r\n            }\r\n            else {\r\n                showAlert({ altMsg: \"ไม่พบข้อมูลสำหรับออกรายงาน\", callbackClose: hideAlert })\r\n            }\r\n\r\n        }\r\n        catch (err) {\r\n            setLoading(false);\r\n            showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR, callbackClose: hideAlert })\r\n        }\r\n    }\r\n\r\n    const previewFunction = (values) => {\r\n        executeGenerateReport(values, DistrictReportPDF)\r\n    }\r\n\r\n    const exportExcelFunction = async (values) => {\r\n        executeGenerateReport(values, DistrictReportExcel)\r\n    }\r\n\r\n    return <Fragment>\r\n        <DistrictReportView\r\n            title={title}\r\n            onBackClick={onBackClick}\r\n            listYear={listYear}\r\n            listMonth={listMonth}\r\n            listDistrict={listDistrict}\r\n            handleSubmit={handleSubmit}\r\n            previewFn={previewFunction}\r\n            exportExcelFn={exportExcelFunction}\r\n        />\r\n        <Loading isShowLoading={isLoading} />\r\n        <AlertMessageSuper {...props} />\r\n    </Fragment>\r\n}\r\n\r\nexport const Validate = (values) => {\r\n    const errors = {};\r\n\r\n    if (!values.districtReportYear) {\r\n        errors.districtReportYear = 'กรุณาระบุปี';\r\n    }\r\n    if (!values.districtReportMonth) {\r\n        errors.districtReportMonth = 'กรุณาระบุเดือน'\r\n    }\r\n    if (!values.districtReportDistrict) {\r\n        errors.districtReportDistrict = 'กรุณาระบุเขต'\r\n    }\r\n\r\n    return errors;\r\n};\r\n\r\nconst mapStateToProps = state => ({\r\n    _values: getFormValues('DistrictReportFormPMR')(state)\r\n})\r\nconst formName = \"DistrictReportFormPMR\";\r\nconst reduxFormParameter = {\r\n    form: formName,\r\n    validate: Validate\r\n};\r\n\r\nexport default compose(\r\n    connect(mapStateToProps, null),\r\n    reduxForm(reduxFormParameter),\r\n    WithAlertMessage\r\n)(DistrictReport);","import React from 'react';\r\nimport { Scrollbars } from 'react-custom-scrollbars';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport classnames from 'classnames';\r\nimport { Field } from \"redux-form\";\r\nimport SelectField from '../../../../../../../Controls/Containers/SelectFieldRedux';\r\nimport Button from '../../../../../../../Controls/Containers/Button';\r\nimport AppBarHeaderView from '../../../../AppBarHeaderView';\r\nimport { BTN } from '../../../../../../../Constants/Constants'\r\nconst DistrictReportView = ({\r\n    classes,\r\n    title,\r\n    onBackClick,\r\n    listYear = [],\r\n    listMonth = [],\r\n    exportExcelFn,\r\n    previewFn,\r\n    handleSubmit\r\n    // onValueChange\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root}>\r\n            <AppBarHeaderView\r\n                title={title}\r\n                onClickBack={onBackClick}\r\n            />\r\n            <Grid container className={classnames(classes.content)}>\r\n                <Scrollbars\r\n                    autoHide={false}\r\n                    universal={true}>\r\n                    <Grid item xs={12} className={classes.content_in}>\r\n                        {/* <Grid container>\r\n                            <Grid item xs={12}>\r\n                                <Field\r\n                                    label={'ปี'}\r\n                                    name={'areaReportYear'}\r\n                                    component={SelectField}\r\n                                    // onChange={onValueChange('year')}\r\n                                    data={listYear}\r\n                                    required\r\n                                />\r\n                            </Grid>\r\n                        </Grid> */}\r\n                        {/* <Grid container>\r\n                            <Grid item xs={12}>\r\n                                <Field\r\n                                    label={'เดือน'}\r\n                                    name={'areaReportMonth'}\r\n                                    component={SelectField}\r\n                                    // onChange={onValueChange('month')}\r\n                                    data={listMonth}\r\n                                    required\r\n                                />\r\n                            </Grid>\r\n                        </Grid> */}\r\n\r\n                        <Field\r\n                            label={'ปี'}\r\n                            name={'areaReportYear'}\r\n                            component={SelectField}\r\n                            // onChange={onValueChange('year')}\r\n                            data={listYear}\r\n                            required\r\n                        />\r\n\r\n                        <Field\r\n                            label={'เดือน'}\r\n                            name={'areaReportMonth'}\r\n                            component={SelectField}\r\n                            // onChange={onValueChange('month')}\r\n                            data={listMonth}\r\n                            required\r\n                        />\r\n\r\n                        <Grid container justify=\"center\" spacing={24} className={classes.divFooter} >\r\n                            <Grid item>\r\n                                <Button\r\n                                    label={BTN.TH.CANCEL}\r\n                                    onClick={onBackClick}\r\n                                />\r\n                            </Grid>\r\n                            <Grid item>\r\n                                <Button\r\n                                      label={BTN.EN.EXPORT_EXCEL}\r\n                                    onClick={handleSubmit(exportExcelFn)}\r\n                                />\r\n                            </Grid>\r\n                            <Grid item>\r\n                                <Button\r\n                                     label={BTN.EN.EXPORT_PDF}\r\n                                    onClick={handleSubmit(previewFn)}\r\n                                />\r\n                            </Grid>\r\n\r\n\r\n                        </Grid>\r\n                    </Grid>\r\n                </Scrollbars>\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        position: 'absolute',\r\n        top: 0,\r\n        bottom: 0,\r\n        right: 0,\r\n        left: 0\r\n    },\r\n    content: {\r\n        position: 'relative',\r\n        height: 'calc(100% - 45px)'\r\n    },\r\n    content_in: {\r\n        padding: \"10px\",\r\n        width: \"100%\"\r\n    },\r\n    divFooter: {\r\n        marginTop: \"10px\",\r\n        marginBottom: \"10px\"\r\n    }\r\n}))(DistrictReportView);","import Excel from \"exceljs/dist/es5/exceljs.browser\";\r\n\r\nconst DEFAULT_MONTH = {id:99, name: 'ทุกเดือน'}\r\n\r\nconst AreaReportExcel = (year='YYYY', month=DEFAULT_MONTH, datasource=[]) => {\r\n    const startRowHeader = 5;//เป็น 3 ใน excel มีชื่อเรืองใช้่ row 1,2,3 ไปแล้ว\r\n    const workbook = new Excel.Workbook();\r\n    const worksheet = workbook.addWorksheet('sheet', {//จำเป็นต้องตั้งค่าส่วนนี้\r\n        pageSetup:{\r\n            paperSize: 9, //follow documentation the 9 value is A4\r\n            orientation:'portrait'\r\n        }\r\n    });\r\n    workbook.creator = 'PMR-WEB';\r\n    workbook.lastModifiedBy = 'PMR-WEB';\r\n\r\n\r\n    const setCellBorder = (colKey) => {\r\n        worksheet.getCell(colKey).border = {\r\n            top: {style:'thin'},\r\n            left: {style:'thin'},\r\n            bottom: {style:'thin'},\r\n            right: {style:'thin'}\r\n        };\r\n    }\r\n\r\n    const loadTopic = () => {\r\n        worksheet.mergeCells('A1:I1');\r\n        worksheet.getCell('A1').value = `การใช้พื้นที่ ในที่ดินแต่ละบริเวณ`;\r\n        worksheet.getCell('A1').alignment = { horizontal:'center'};\r\n\r\n        worksheet.mergeCells('A2:I2');\r\n        worksheet.getCell('A2').value = `ตามกฏกระทรวงให้ใช้บังคับผังเมืองรวมกรุงเทพมหานคร พ.ศ.${window.REPORT_YEAR_COMPREHENSIVE_RULE}`;\r\n        worksheet.getCell('A2').alignment = { horizontal:'center'};\r\n\r\n        worksheet.mergeCells('A3:I3');\r\n        let displayMonth = (month.id === DEFAULT_MONTH.id) ? DEFAULT_MONTH.name : `เดือน${month.name}`\r\n        worksheet.getCell('A3').value = `จำแนกตามประเภทที่ดิน ${displayMonth} พ.ศ.${year}`;\r\n        worksheet.getCell('A3').alignment = { horizontal:'center'};\r\n    }\r\n\r\n    const loadHeader = () => {//ใน Excel จะอยู่แถวแรก A1,B1,C1,D1,E1,F1,G1,H1,I1\r\n        const arrHeader = [\r\n            { \r\n                name: 'ลำดับที่', \r\n                key: 'no', \r\n                width: 10,\r\n            },\r\n            { \r\n                name: 'บริเวณหมายเลข', \r\n                key: 'LUPZone', \r\n                width: 20\r\n            },\r\n            { \r\n                name: 'พื้นที่ตั้งบริเวณ ตามผังเมืองรวม พ.ศ.2556 (ตร.ม.)', \r\n                key: 'sumZoneArea', \r\n                width: 30\r\n            },\r\n            { \r\n                name: 'พี้นที่การใช้ประโยชน์ที่ดิน (ตร.ม.)', \r\n                key: 'sumLandArea', \r\n                width: 30\r\n            },\r\n            { \r\n                name: 'พี้นที่อาคารรวม (ตร.ม.)', \r\n                key: 'sumBuildingArea', \r\n                width: 30\r\n            },\r\n            { \r\n                name: 'พื้นที่ดินรวม (โฉนด) (ตร.ม.)', \r\n                key: 'sumChanodeArea',\r\n                width: 30\r\n            },\r\n            { \r\n                name: 'พื้นที่ประกอบการ (ตร.ม.)', \r\n                key: 'sumActivityArea', \r\n                width: 30\r\n            },\r\n            { \r\n                name: 'จำนวนผู้แจ้งการใช้ประโยชน์ที่ดิน', \r\n                key: 'sumUser', \r\n                width: 30\r\n            },\r\n            { \r\n                name: 'หมายเหตุ', \r\n                key: 'remark', //sumLandArea ใช้ไปก่อน\r\n                width: 30\r\n            }\r\n        ];\r\n        worksheet.columns = arrHeader.map(itm => ({key:itm.key, width: itm.width}));\r\n        worksheet.getRow(startRowHeader).values = arrHeader.map(itm => itm.name);\r\n        //กำหนด style ให้ cell Header\r\n        [   `A${startRowHeader}`,\r\n            `B${startRowHeader}`, \r\n            `C${startRowHeader}`, \r\n            `D${startRowHeader}`, \r\n            `E${startRowHeader}`, \r\n            `F${startRowHeader}`, \r\n            `G${startRowHeader}`,\r\n            `H${startRowHeader}`,\r\n            `I${startRowHeader}`\r\n        ].forEach(colKey => {\r\n            setCellBorder(colKey)\r\n            worksheet.getCell(colKey).alignment = {vertical: 'middle', horizontal:'center', wrapText: true};\r\n            worksheet.getCell(colKey).fill = {\r\n                type: 'pattern',\r\n                pattern:'solid',\r\n                fgColor:{\r\n                    argb:'005E9A50'\r\n                }\r\n            }\r\n        });\r\n        //กำหนด format\r\n        worksheet.getColumn('C').numFmt = '#,##0.00';\r\n        worksheet.getColumn('D').numFmt = '#,##0.00';\r\n        worksheet.getColumn('E').numFmt = '#,##0.00';\r\n        worksheet.getColumn('F').numFmt = '#,##0.00';\r\n        worksheet.getColumn('G').numFmt = '#,##0.00';\r\n        worksheet.getColumn('H').numFmt = '#,##0.00';\r\n    }\r\n    const makeSubHeader = (colKey, mergeRang, name) => {//colKey ยกตัวอย่างเช่น 'A1' 'B1' เป็นต้น | mergeRang ต้องกำหนดแบบ 'A1:F1'\r\n        worksheet.mergeCells(mergeRang);\r\n        worksheet.getCell(colKey).value = name;\r\n        worksheet.getCell(colKey).alignment = { horizontal:'center'};\r\n        setCellBorder(colKey);\r\n        worksheet.getCell(colKey).fill = {\r\n            type: 'pattern',\r\n            pattern:'solid',\r\n            fgColor:{\r\n                argb:'00DAEEF3'\r\n            }\r\n        }\r\n    }\r\n\r\n    const setCellFontColor = (colKey, argb, isBold) => {\r\n        worksheet.getCell(colKey).font  = {\r\n            bold: isBold,\r\n            color: { argb: argb}\r\n        };\r\n    }\r\n\r\n    const makeRowITM = (rowNumber, rowITM, isSummaryRow=false) => {\r\n        worksheet.addRow({\r\n            no: rowITM.no, \r\n            LUPZone: rowITM.LUPZone, \r\n            sumZoneArea: rowITM.sumZoneArea,\r\n            sumLandArea: rowITM.sumLandArea,\r\n            sumBuildingArea: rowITM.sumBuildingArea,\r\n            sumChanodeArea: rowITM.sumChanodeArea,\r\n            sumActivityArea: rowITM.sumActivityArea,\r\n            sumUser: rowITM.sumUser,\r\n            remark: rowITM.remark\r\n        });\r\n\r\n        const arrColKey  = [   \r\n            `A${rowNumber}`,\r\n            `B${rowNumber}`,\r\n            `C${rowNumber}`,\r\n            `D${rowNumber}`,\r\n            `E${rowNumber}`,\r\n            `F${rowNumber}`,\r\n            `G${rowNumber}`,\r\n            `H${rowNumber}`,\r\n            `I${rowNumber}`\r\n        ];\r\n\r\n        arrColKey.forEach(colKey =>{\r\n            setCellBorder(colKey);\r\n            if(isSummaryRow){//\r\n                setCellFontColor(colKey, '00FF0000', true)\r\n            }\r\n        })\r\n    }\r\n\r\n    const makeRowContent = () => {\r\n        try{\r\n            let rowSubHeaderNumber = startRowHeader//สำหรับรันเลขตำแหน่งเริ่มต้นของ group\r\n            let countItemLastGroup = 0; //เก็บจำนวนทั้งหมดของกลุ่มก่อนหน้า\r\n            let rowNO = 1;\r\n            //console.log('datasource : ', datasource);\r\n            datasource.forEach(rowGroupITM => {\r\n                rowSubHeaderNumber = (1 + rowSubHeaderNumber) + countItemLastGroup;\r\n                makeSubHeader(`A${rowSubHeaderNumber}`,`A${rowSubHeaderNumber}:I${rowSubHeaderNumber}`, rowGroupITM.LUPDescription);\r\n                \r\n                const summaryRow = {\r\n                    LUPZone: (rowGroupITM.zone.length > 1) ? `${rowGroupITM.zone[0].LUPZone} - ${rowGroupITM.zone[rowGroupITM.zone.length - 1].LUPZone}` : rowGroupITM.zone[0].LUPZone,\r\n                    sumActivityArea: 0,\r\n                    sumBuildingArea: 0,\r\n                    sumLandArea: 0,\r\n                    sumUser: 0,\r\n                    sumZoneArea: 0,\r\n                    sumChanodeArea: 0\r\n                }\r\n                \r\n                let rowNumber = rowSubHeaderNumber + 1;\r\n                rowGroupITM.zone.forEach(rowITM => {\r\n                    makeRowITM(rowNumber, {\r\n                        no: rowNO++,\r\n                        ...rowITM\r\n                    })\r\n\r\n                    summaryRow.sumActivityArea += rowITM.sumActivityArea;\r\n                    summaryRow.sumBuildingArea += rowITM.sumBuildingArea;\r\n                    summaryRow.sumLandArea += rowITM.sumLandArea;\r\n                    summaryRow.sumUser += rowITM.sumUser;\r\n                    summaryRow.sumZoneArea += rowITM.sumZoneArea;\r\n                    summaryRow.sumChanodeArea += rowITM.sumChanodeArea;\r\n\r\n                    rowNumber++;\r\n                })\r\n                makeRowITM(rowNumber, summaryRow, true)//สร้าง Summary row\r\n                countItemLastGroup = rowGroupITM.zone.length + 1; //+1 คือบวกกับ row summary\r\n            });\r\n        }\r\n        catch(err){\r\n            console.log('Error Generate Row Excel file AreaReportExcel.js: ', err);\r\n            throw new Error(err);\r\n        }\r\n    }\r\n\r\n    const processColumns = () => {\r\n        loadTopic();\r\n        loadHeader();\r\n        makeRowContent();\r\n    }\r\n    \r\n    \r\n    processColumns();\r\n    workbook.xlsx.writeBuffer().then(function (xls64data) {\r\n        const blob = new Blob([xls64data],\r\n          { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });\r\n        const url = window.URL.createObjectURL(blob);\r\n        const anchor = document.createElement('a');\r\n        document.body.appendChild(anchor); //for firefox ref: https://stackoverflow.com/questions/41805095/excel-export-not-working-on-firefox-but-working-fine-in-google-crome/41806544\r\n        \r\n        anchor.href = url;\r\n        anchor.download = 'สรุปผลการแจ้ง_ผมร_1_รายบริเวณ.xlsx';\r\n\r\n        var isIE = /*@cc_on!@*/false || !!document.documentMode;\r\n        var isEdge = !isIE && !!window.StyleMedia;\r\n        if(isEdge){\r\n            anchor.click();\r\n            anchor.change();\r\n        } else {\r\n            anchor.click();\r\n        }\r\n        \r\n        window.URL.revokeObjectURL(url);\r\n    });\r\n}\r\n\r\nexport default AreaReportExcel;","import {numberWithCommas} from '../../../../../../../Utilities/Utils'\r\nimport pdfMake from \"pdfmake/build/pdfmake\";\r\nimport pdfFonts from \"pdfmake/build/vfs_fonts\";\r\nimport { FOOTER_REPORT } from '../../../../../../../Constants/Constants'\r\n\r\nconst DEFAULT_MONTH = {id:99, name: 'ทุกเดือน'}\r\n\r\npdfMake.vfs = pdfFonts.pdfMake.vfs;\r\npdfMake.fonts = {\r\n    THSarabun: {\r\n        normal: 'THSarabun.ttf',\r\n        bold: 'THSarabun-Bold.ttf',\r\n        italics: 'THSarabun-Italic.ttf',\r\n        bolditalics: 'THSarabun-BoldItalic.ttf'\r\n    },\r\n    Roboto: {\r\n        normal: 'Roboto-Regular.ttf',\r\n        bold: 'Roboto-Medium.ttf',\r\n        italics: 'Roboto-Italic.ttf',\r\n        bolditalics: 'Roboto-MediumItalic.ttf'\r\n    }\r\n}\r\n\r\nconst configPage = {\r\n    pageSize: 'A4',\r\n    pageOrientation: 'landscape',//portrait\r\n    info: {\r\n        title: 'รายงานสรุปผลการแจ้ง ผมร.1 รายบริเวณ',\r\n        subject: 'รายงานสรุปผลการแจ้ง ผมร.1 รายบริเวณ',\r\n        keywords: 'รายงานสรุปผลการแจ้ง ผมร.1 รายบริเวณ',\r\n    },\r\n    pageMargins: [ 5, 40, 10, 40 ],// [left, top, right, bottom] or [horizontal, vertical]\r\n}\r\n\r\n\r\nconst fontStyle = {\r\n    fontHeading: {\r\n        fontSize: 18\r\n    },\r\n    fontTitle: {\r\n        fontSize: 16\r\n    },\r\n    fontSubheading: {\r\n        fontSize: 14\r\n    },\r\n    fontBody: {\r\n        fontSize: 12\r\n    }\r\n}\r\n\r\nconst tableStyle = {\r\n    rowNumber: {\r\n        alignment: 'right'\r\n    },\r\n    rowHeaderColor: {\r\n        fillColor: '#5E9A50'\r\n    },\r\n    rowSubHeaderColor:{\r\n        fillColor: '#DAEEF3'\r\n    },\r\n    rowFooterColor: {\r\n        fillColor: '#5E9A50'\r\n    },\r\n    rowOtherColor1: {\r\n        fillColor: '#D0EFDA'\r\n    },\r\n    rowOtherColor2: {\r\n        fillColor: '#E5F6E8'\r\n    }\r\n}\r\n\r\nconst generateTableHeader = (datasource=[]) => {\r\n    return [\r\n        {\r\n            margin: [0,15,0,0],//[left, top, right, bottom]\r\n            columns: [\r\n                { width: '*', text: '' },\r\n                {\r\n                    width: 'auto',\r\n                    table: {\r\n                        // headers are automatically repeated if the table spans over multiple pages\r\n                        // you can declare how many rows should be treated as headers\r\n                        headerRows: 1,\r\n                        widths: [ 40, 60, 90, 90, 90, 90, 90, 90, 90],\r\n                        body: [\r\n                            [ \r\n                                {\r\n                                    text: `ลำดับที่`,\r\n                                    style: ['fontTitle', 'alignmentCenter', 'rowHeaderColor'],\r\n                                    bold:true\r\n                                },\r\n                                {\r\n                                    text: `บริเวณหมายเลข`,\r\n                                    style: ['fontTitle', 'alignmentCenter', 'rowHeaderColor'],\r\n                                    bold:true\r\n                                },\r\n                                {\r\n                                    text: 'พื้นที่ตั้งบริเวณ ตามผังเมืองรวม พ.ศ.2556 (ตร.ม.)',\r\n                                    style: ['fontTitle', 'alignmentCenter', 'rowHeaderColor'],\r\n                                    bold:true\r\n                                },\r\n                                {\r\n                                    text: `พี้นที่การใช้ประโยชน์ที่ดิน (ตร.ม.)`,\r\n                                    style: ['fontTitle', 'alignmentCenter', 'rowHeaderColor'],\r\n                                    bold:true\r\n                                },\r\n                                {\r\n                                    text: `พี้นที่อาคารรวม (ตร.ม.)`,\r\n                                    style: ['fontTitle', 'alignmentCenter', 'rowHeaderColor'],\r\n                                    bold:true\r\n                                },\r\n                                {\r\n                                    text: `พื้นที่ดินรวม (โฉนด) (ตร.ม.)`,\r\n                                    style: ['fontTitle', 'alignmentCenter', 'rowHeaderColor'],\r\n                                    bold:true\r\n                                },\r\n                                {\r\n                                    text: `พื้นที่ประกอบการ (ตร.ม.)`,\r\n                                    style: ['fontTitle', 'alignmentCenter', 'rowHeaderColor'],\r\n                                    bold:true\r\n                                },\r\n                                {\r\n                                    text: `จำนวนผู้แจ้งการใช้ ประโยชน์ที่ดิน`,\r\n                                    style: ['fontTitle', 'alignmentCenter', 'rowHeaderColor'],\r\n                                    bold:true\r\n                                },\r\n                                {\r\n                                    text: `หมายเหตุ`,\r\n                                    style: ['fontTitle', 'alignmentCenter', 'rowHeaderColor'],\r\n                                    bold:true \r\n                                }\r\n                            ],\r\n                            \r\n                            ...makeTableContent(datasource)\r\n                        ]\r\n                    }\r\n                },\r\n                { width: '*', text: '' }\r\n            ]\r\n        }\r\n    ]\r\n}\r\n\r\nconst makeRowSubheader = (txt) => {\r\n    return [\r\n        {\r\n            text: txt, \r\n            colSpan: 9, \r\n            style: ['fontTitle', 'rowSubHeaderColor', 'alignmentCenter']\r\n        }\r\n    ]\r\n}\r\n\r\nconst makeRowITM = (rowITM, isSummary=false) => {\r\n    const FIXED_NUMBER = 2; //กำหนดจำนวนทศนิยม\r\n    let styleSummary = '';\r\n    if(isSummary){\r\n        styleSummary='summaryRow';\r\n    }\r\n\r\n    return [ \r\n        {\r\n            text: rowITM.no,\r\n            style: ['fontTitle', 'alignmentRight', styleSummary]\r\n        },\r\n        {\r\n            text: rowITM.LUPZone, \r\n            style: ['fontTitle', styleSummary]\r\n        },\r\n        {\r\n            text: numberWithCommas(rowITM.sumZoneArea, FIXED_NUMBER), \r\n            style: ['fontTitle', 'alignmentRight', styleSummary]\r\n        },\r\n        {\r\n            text: numberWithCommas(rowITM.sumLandArea, FIXED_NUMBER), \r\n            style: ['fontTitle', 'alignmentRight', styleSummary]\r\n        },\r\n        {\r\n            text: numberWithCommas(rowITM.sumBuildingArea, FIXED_NUMBER), \r\n            style: ['fontTitle', 'alignmentRight', styleSummary]\r\n        },\r\n        {\r\n            text: numberWithCommas(rowITM.sumChanodeArea, FIXED_NUMBER), \r\n            style: ['fontTitle', 'alignmentRight', styleSummary]\r\n        },\r\n        {\r\n            text: numberWithCommas(rowITM.sumActivityArea, FIXED_NUMBER), \r\n            style: ['fontTitle', 'alignmentRight', styleSummary]\r\n        },\r\n        {\r\n            text: numberWithCommas(rowITM.sumUser, FIXED_NUMBER), \r\n            style: ['fontTitle', 'alignmentRight', styleSummary]\r\n        },\r\n        {\r\n            text: rowITM.remark, \r\n            style: ['fontTitle', 'alignmentRight', styleSummary]\r\n        }\r\n    ];\r\n}\r\n\r\nconst makeTableContent = (datasource=[]) => {\r\n    let rowNo = 1;\r\n    const listRow = [];\r\n    datasource.forEach(groupITM => {\r\n        //subheader\r\n        listRow.push(makeRowSubheader(groupITM.LUPDescription));\r\n\r\n        const summaryRow = {\r\n            LUPZone: (groupITM.zone.length > 1) ? `${groupITM.zone[0].LUPZone} - ${groupITM.zone[groupITM.zone.length - 1].LUPZone}` : groupITM.zone[0].LUPZone,\r\n            sumActivityArea: 0,\r\n            sumBuildingArea: 0,\r\n            sumLandArea: 0,\r\n            sumUser: 0,\r\n            sumZoneArea: 0,\r\n            sumChanodeArea: 0\r\n        }\r\n\r\n        //content\r\n        groupITM.zone.forEach(rowITM => {\r\n            summaryRow.sumActivityArea += rowITM.sumActivityArea;\r\n            summaryRow.sumBuildingArea += rowITM.sumBuildingArea;\r\n            summaryRow.sumLandArea += rowITM.sumLandArea;\r\n            summaryRow.sumUser += rowITM.sumUser;\r\n            summaryRow.sumZoneArea += rowITM.sumZoneArea;\r\n            summaryRow.sumChanodeArea += rowITM.sumChanodeArea\r\n\r\n            listRow.push(makeRowITM({\r\n                no:rowNo++,\r\n                ...rowITM\r\n            }));\r\n        })\r\n\r\n        //SUMMARY\r\n        listRow.push(makeRowITM(summaryRow, true));\r\n    })\r\n    return listRow;\r\n}\r\n\r\n\r\nconst AreaReportPDF = (year='YYYY', month=DEFAULT_MONTH, datasource=[]) => {\r\n    const displayMonth = (month.id === DEFAULT_MONTH.id) ? DEFAULT_MONTH.name : `เดือน${month.name}`\r\n    const docDefinition = {\r\n        ...configPage,\r\n        footer: {\r\n            columns: [\r\n                { \r\n                    text: FOOTER_REPORT,\r\n                    alignment: 'right',\r\n                    margin: [0,0,35,0],\r\n                    fontSize: 10\r\n                }\r\n            ]\r\n        },\r\n        content: [\r\n            {\r\n                text: 'การใช้พื้นที่ ในที่ดินแต่ละบริเวณ', \r\n                style: [ 'fontTitle', 'header','alignmentCenter'],\r\n                width: '*',\r\n                noWrap: true\r\n            },\r\n            {\r\n                text: `ตามกฏกระทรวงให้ใช้บังคับผังเมืองรวมกรุงเทพมหานคร พ.ศ.${window.REPORT_YEAR_COMPREHENSIVE_RULE}`, \r\n                style: [ 'fontTitle', 'header','alignmentCenter'],\r\n                margin: [0,10,0,0],//[left, top, right, bottom]\r\n                width: '*',\r\n                noWrap: true\r\n            },\r\n            {\r\n                text: `จำแนกตามประเภทที่ดิน ${displayMonth} พ.ศ.${year}`, \r\n                style: [ 'fontTitle', 'header','alignmentCenter'],\r\n                margin: [0,10,0,0],//[left, top, right, bottom]\r\n                width: '*',\r\n                noWrap: true\r\n            },\r\n            ...generateTableHeader(datasource)\r\n        ],\r\n        styles: {\r\n            ...fontStyle,\r\n            ...tableStyle,\r\n            header: {\r\n                bold: true\r\n            },\r\n            alignmentCenter: {\r\n                alignment: 'center'\r\n            },\r\n            alignmentRight: {\r\n                alignment: 'right'\r\n            },\r\n            summaryRow: {\r\n                color: 'red',\r\n                bold: true\r\n            }\r\n        },\r\n        defaultStyle: {\r\n            font: \"THSarabun\",\r\n            columnGap: 10,\r\n        }\r\n    };\r\n    // pdfMake.createPdf(docDefinition).open()\r\n    pdfMake.createPdf(docDefinition).download('รายงานสรุปผลการแจ้ง ผมร.1 รายบริเวณ.pdf');\r\n}\r\n\r\nexport default AreaReportPDF;","//สถิติผู้เข้าใช้งาน\r\nimport React, { Fragment, useState, useEffect } from 'react';\r\nimport { connect } from 'react-redux'\r\nimport { reduxForm, getFormValues } from \"redux-form\";\r\nimport { compose } from \"recompose\";\r\n\r\n//import component\r\nimport AreaReportView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/Report/AreaReport/AreaReportView';\r\nimport WithAlertMessage from '../../../../../../../HOC/WithAlertMessage';\r\nimport AlertMessageSuper from \"../../../../../../../Controls/Containers/AlertMessageSuper\";\r\nimport Loading from '../../../../../../../Controls/Containers/Loading';\r\nimport AreaReportExcel from './AreaReportExcel';\r\nimport AreaReportPDF from './AreaReportPDF';\r\n\r\n//import service - utils\r\nimport * as ServiceUtils from '../../../../../../../Utilities/ServiceUtils';\r\n\r\n//import constants\r\nimport { MONTH, ALERT_MESSAGE } from '../../../../../../../Constants/Constants';\r\n\r\nconst DEFAULT_MONTH = { id: 99, name: 'ทุกเดือน' }\r\n\r\nconst DistrictReport = (props) => {\r\n\r\n    const {\r\n        onBackClick,\r\n        handleSubmit,\r\n        change,\r\n        title,\r\n        showAlert,\r\n        hideAlert,\r\n    } = props;\r\n\r\n    const [listYear, setListYear] = useState();\r\n    const [listMonth, setListMonth] = useState();\r\n    const [isLoading, setLoading] = useState(false)\r\n\r\n    useEffect(() => {\r\n        loadDDLmonth();\r\n        loadDDLyear();\r\n    }, []);\r\n\r\n    const loadDDLyear = () => {\r\n        const MIN_YEAR = 2562;\r\n        const currentDate = new Date();\r\n        const currentYear = currentDate.getFullYear() + 543;\r\n        let keepListYear = [];\r\n        for (let i = MIN_YEAR; i <= currentYear; i++) {\r\n            keepListYear.push({ id: i - 543, name: i });\r\n        }\r\n        setListYear(keepListYear);\r\n        change('areaReportYear', currentYear - 543);\r\n    }\r\n\r\n    const loadDDLmonth = () => {\r\n        setListMonth([DEFAULT_MONTH, ...MONTH]);\r\n        change('areaReportMonth', DEFAULT_MONTH.id)\r\n    }\r\n\r\n    const executeGenerateReport = async (values, reportFunction) => {\r\n        setLoading(true);\r\n        try {\r\n            let displayMonth = DEFAULT_MONTH;\r\n            let monthParam = `&month=${values.areaReportMonth}`;\r\n            if (values.areaReportMonth === DEFAULT_MONTH.id) {\r\n                monthParam = '';\r\n            }\r\n            else {\r\n                displayMonth = MONTH.filter(itmMonth => itmMonth.id === values.areaReportMonth)[0];\r\n            }\r\n            const response = await ServiceUtils.fetchGet_(`${process.env.REACT_APP_GET_PMR1_ZONE_REPORT}?year=${values.areaReportYear}${monthParam}`)\r\n            setLoading(false);\r\n            const objResult = await response.json();\r\n            if (objResult.result && objResult.result.length > 0) {\r\n                const datasource = objResult.result;\r\n                const displayYearBC = values.areaReportYear + 543;\r\n                reportFunction(displayYearBC, displayMonth, datasource)\r\n            }\r\n            else {\r\n                showAlert({ altMsg: \"ไม่พบข้อมูลสำหรับออกรายงาน\", callbackClose: hideAlert })\r\n            }\r\n        }\r\n        catch (err) {\r\n            setLoading(false);\r\n            showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR, callbackClose: hideAlert })\r\n        }\r\n    };\r\n\r\n    const previewFunction = async (values) => {\r\n        executeGenerateReport(values, AreaReportPDF)\r\n    }\r\n\r\n    const exportExcelFunction = (values) => {\r\n        executeGenerateReport(values, AreaReportExcel)\r\n    }\r\n\r\n    return (\r\n        <Fragment>\r\n            <AreaReportView\r\n                title={title}\r\n                onBackClick={onBackClick}\r\n                listYear={listYear}\r\n                listMonth={listMonth}\r\n                handleSubmit={handleSubmit}\r\n                previewFn={previewFunction}\r\n                exportExcelFn={exportExcelFunction}\r\n            />\r\n            <Loading isShowLoading={isLoading} />\r\n            <AlertMessageSuper {...props} />\r\n        </Fragment>\r\n    )\r\n}\r\n\r\nexport const Validate = (values) => {\r\n    const errors = {};\r\n\r\n    if (!values.areaReportYear) {\r\n        errors.areaReportYear = 'กรุณาระบุปี';\r\n    }\r\n    if (!values.areaReportMonth) {\r\n        errors.areaReportMonth = 'กรุณาระบุเดือน'\r\n    }\r\n\r\n    return errors;\r\n};\r\n\r\nconst mapStateToProps = state => ({\r\n    _values: getFormValues('AreaReportFormPMR')(state)\r\n})\r\nconst formName = \"AreaReportFormPMR\";\r\nconst reduxFormParameter = {\r\n    form: formName,\r\n    validate: Validate\r\n};\r\n\r\nexport default compose(\r\n    connect(mapStateToProps, null),\r\n    reduxForm(reduxFormParameter),\r\n    WithAlertMessage\r\n)(DistrictReport);","import React from 'react';\r\n// import PropTypes from 'prop-types';\r\nimport { Scrollbars } from 'react-custom-scrollbars';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport { Field } from 'redux-form';\r\nimport Button from '../../../../../../Controls/Containers/Button';\r\nimport RadioRedux from '../../../../../../Controls/Containers/RadioRedux'\r\nimport AppBarHeaderView from '../../../AppBarHeaderView';\r\n\r\nconst SatisfactionFormView = ({\r\n    classes,\r\n    // isResult=false,\r\n    title,\r\n    // children,\r\n    onBackClick,\r\n    onSubmitClick,\r\n    onHandleSubmit,\r\n    lookupSatisfactionRate\r\n}) => {\r\n    return (\r\n\r\n        <Grid container spacing={0} className={classes.root}>\r\n            <AppBarHeaderView\r\n                title={title}\r\n                onClickBack={onBackClick}\r\n            />\r\n            <Scrollbars\r\n                autoHide={false}\r\n                universal={true}>\r\n                <form onSubmit={onHandleSubmit(onSubmitClick)} className={classes.rootForm} method=\"POST\">\r\n                    <Grid container className={classes.projectionFormContainer}>\r\n                        <Grid xs={12} item><label>แบบประเมินความพึงพอใจการใช้งาน</label></Grid>\r\n                        <Grid xs={12} className={classes.projectionFormDiv} item>\r\n                            <Field\r\n                                name=\"satisfactionScore\"\r\n                                component={RadioRedux}\r\n                                val={lookupSatisfactionRate}\r\n                            />\r\n                        </Grid>\r\n\r\n                        <Grid container justify=\"center\" spacing={24} className={classes.divFooter}>\r\n                            <Grid item>\r\n                                <Button\r\n                                    label=\"ยกเลิก\"\r\n                                    onClick={onBackClick}\r\n                                    className={classes.btnRegister}\r\n                                />\r\n                            </Grid>\r\n                            <Grid item>\r\n                                <Button\r\n                                    type=\"submit\"\r\n                                    label=\"บันทึก\"\r\n                                    className={classes.btnLogin}\r\n                                />\r\n                            </Grid>\r\n                        </Grid>\r\n                    </Grid>\r\n                </form>\r\n            </Scrollbars>\r\n        </Grid>\r\n    )\r\n\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        position: 'absolute',\r\n        top: 0,\r\n        bottom: 0,\r\n        right: 0,\r\n        left: 0\r\n    },\r\n    labelText: {\r\n        display: 'flex',\r\n        // justifyContent: 'center',\r\n        alignItems: 'center'\r\n    },\r\n    divFooter: {\r\n        // marginTop: '20px',\r\n        marginBottom: '10px'\r\n    },\r\n    containnerRow: {\r\n        height: '50px',\r\n        width: '100%',\r\n        marginBottom: '15px'\r\n    },\r\n    containnerRowText: {\r\n        height: '30px',\r\n        width: '100%',\r\n        marginBottom: '15px'\r\n    },\r\n    rootForm: {\r\n        width: '95%',\r\n        height: '100%'\r\n    },\r\n    projectionFormDiv: {\r\n        paddingLeft: '20px'\r\n\r\n    },\r\n    projectionFormContainer: {\r\n        padding: \"20px\"\r\n    }\r\n}))(SatisfactionFormView)","import React, { Component, Fragment } from 'react'\r\nimport { reduxForm } from \"redux-form\";\r\nimport { compose } from \"recompose\";\r\nimport { connect } from \"react-redux\";\r\nimport { bindActionCreators } from \"redux\";\r\n\r\n//import component\r\nimport SatisfactionFormView from '../../../../../../Presentationals/Web/Panel/Menu/MenuContent/SatisfactionForm/SatisfactionFormView'\r\nimport AlertMessageSuper from '../../../../../../Controls/Containers/AlertMessageSuper';\r\nimport WithAlertMessage from \"../../../../../../HOC/WithAlertMessage\";\r\n\r\n//import service - utils\r\nimport { fetchGet_, fetchPost_ } from '../../../../../../Utilities/ServiceUtils';\r\n\r\n//import actions\r\nimport * as SatisfactionAndStatisticAction from '../../../../../../Actions/Web/Panel/SatisfactionAndStatisticAction'\r\n\r\n//import constants\r\nimport * as Constants from '../../../../../../Constants/Constants'\r\n\r\nexport class SatisfactionForm extends Component {\r\n\r\n    constructor() {\r\n        super();\r\n        this.state = {\r\n            lookupSatisfactionRate: []\r\n        }\r\n    }\r\n    \r\n    componentDidMount() {\r\n        this.fetchSatisfactionLookup()\r\n\r\n        this.props.initialize({ //set ค่าเริ่มต้นให้คะแนนแบบประเมินเป็น 4\r\n            \"satisfactionScore\": \"4\"\r\n        })\r\n    }\r\n\r\n    fetchSatisfactionLookup = () => {\r\n        fetchGet_(`${process.env.REACT_APP_PMR_SATISFACTION_POINT}`).then(res => {\r\n            if (!res.ok) {\r\n                throw res.status;\r\n            }\r\n            return res.json();\r\n        })\r\n            .then(result => {\r\n                this.setState({\r\n                    lookupSatisfactionRate: result.result\r\n                })\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex', ex)\r\n                this.setState({ result: [] })\r\n            });\r\n\r\n    }\r\n\r\n    handleSubmitClick = (value) => {\r\n        const { system } = this.props\r\n\r\n        switch (system) {\r\n            case Constants.SYSTEM.CMP:\r\n                this.saveSatisfactionCMP(value.satisfactionScore)\r\n                break;\r\n            case Constants.SYSTEM.CAH:\r\n                this.saveSatisfactionCAH(value.satisfactionScore)\r\n                break;\r\n            case Constants.SYSTEM.PMR1:\r\n                this.saveSatisfactionPMR(value.satisfactionScore)\r\n                break;\r\n            default:\r\n                break;\r\n        }\r\n    }\r\n\r\n    checkStatusCode = (statusCode) => {\r\n        const { showAlert } = this.props;\r\n        if (statusCode === 1) {\r\n            showAlert({ altMsg: Constants.ALERT_MESSAGE.POPUP.SAVE_SUCCESS , callbackClose: this.handleCloseForm })\r\n        } else {\r\n            showAlert({ altMsg: Constants.ALERT_MESSAGE.POPUP.SAVE_FAIL })\r\n        }\r\n    }\r\n\r\n    handleCloseForm = () => {\r\n        const { hideAlert, onBackClick } = this.props;\r\n        hideAlert();\r\n        onBackClick();\r\n    }\r\n\r\n    saveSatisfactionCMP = (satisfactionScore) => {\r\n        let params = {}\r\n        const { satisfactionAndStatisticRdc, SatisfactionAndStatisticAction,  authenRdc } = this.props\r\n        SatisfactionAndStatisticAction.updateSatisfactionStatus(true) //set true เพื่อบอกให้รู้ว่ามีการบันทึกสถิติและแบบประเมินครั้งแรกไปแล้ว\r\n        if (authenRdc.profile) { //เจ้าหน้าที่\r\n            params = {\r\n                \"point\": parseInt(satisfactionScore),\r\n                \"userid\": authenRdc.profile.userID,\r\n                \"peoplecode\": satisfactionAndStatisticRdc.sessionId\r\n            }\r\n        } else { //ประชาชน\r\n            params = {\r\n                \"point\": parseInt(satisfactionScore),\r\n                \"peoplecode\": satisfactionAndStatisticRdc.sessionId\r\n            }\r\n        }\r\n\r\n        fetchPost_(process.env.REACT_APP_SAVE_SATISFACTION_POINT, params)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json()\r\n            })\r\n            .then(status => {\r\n                if (status && status.statusCode) {\r\n                    this.checkStatusCode(status.statusCode)\r\n                } else {\r\n                    this.checkStatusCode(0)\r\n                }\r\n            })\r\n            .catch(ex => {\r\n                this.checkStatusCode(0)\r\n                console.log('ex saveSatisfactionCMP', ex)\r\n            })\r\n    }\r\n\r\n    saveSatisfactionCAH = (satisfactionScore) => {\r\n        const { satisfactionAndStatisticRdc, authenRdc } = this.props\r\n        const params = {\r\n            \"point\": parseInt(satisfactionScore),\r\n            \"userid\": authenRdc.profile.userID,\r\n            \"sessionid\": satisfactionAndStatisticRdc.sessionId\r\n        }\r\n        fetchPost_(process.env.REACT_APP_CAH_SAVE_SATISFICATION_POINT, params)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json()\r\n            })\r\n            .then(status => {\r\n                if (status && status.statusCode) {\r\n                    this.checkStatusCode(status.statusCode)\r\n                } else {\r\n                    this.checkStatusCode(0)\r\n                }\r\n            })\r\n            .catch(ex => {\r\n                this.checkStatusCode(0)\r\n                console.log('ex saveSatisfactionCAH', ex)\r\n            })\r\n    }\r\n\r\n    saveSatisfactionPMR = (satisfactionScore) => {\r\n        const { satisfactionAndStatisticRdc, authenRdc } = this.props\r\n        let params = {}\r\n\r\n        if (authenRdc.profile.groupID == Constants.PROFILE_GROUP_TYPE.PEOPLE_WITH_PROFILE.id) { //ประชาชน\r\n            params = {\r\n                \"point\": parseInt(satisfactionScore),\r\n                \"peoplecode\": authenRdc.profile.userID,\r\n                \"sessionid\": satisfactionAndStatisticRdc.sessionId //ย้ายมาใช้ session ใน satisfactionAndStatisticRdc\r\n            }\r\n        } else { //เจ้าหน้าที่\r\n            params = {\r\n                \"point\": parseInt(satisfactionScore),\r\n                \"userid\": authenRdc.profile.userID,\r\n                \"sessionid\": satisfactionAndStatisticRdc.sessionId //ย้ายมาใช้ session ใน satisfactionAndStatisticRdc\r\n            }\r\n        }\r\n\r\n        fetchPost_(process.env.REACT_APP_PMR_SAVE_SATISFACTION, params)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json()\r\n            })\r\n            .then(status => {\r\n                if (status && status.statusCode) {\r\n                    this.checkStatusCode(status.statusCode)\r\n                } else {\r\n                    this.checkStatusCode(0)\r\n                }\r\n            })\r\n            .catch(ex => {\r\n                this.checkStatusCode(0)\r\n                console.log('ex saveSatisfactionPMR', ex)\r\n            })\r\n    }\r\n\r\n    getLookupSatisfactionFormat = (lookupSatisfactionRate) => {\r\n        lookupSatisfactionRate.forEach(itm => {\r\n            itm.name = itm.value + \" - \" + itm.detail\r\n            itm.value = itm.value.toString();\r\n        });\r\n    }\r\n\r\n    render() {\r\n        const { onBackClick, title, handleSubmit } = this.props\r\n        const { lookupSatisfactionRate } = this.state\r\n        this.getLookupSatisfactionFormat(lookupSatisfactionRate) //จัด format ของข้อมูลเพื่อส่งเข้าไปใช้ใน control radioRedux\r\n\r\n        return (\r\n            <Fragment>\r\n                <SatisfactionFormView onBackClick={onBackClick}\r\n                    title={title}\r\n                    onHandleSubmit={handleSubmit}\r\n                    onSubmitClick={this.handleSubmitClick}\r\n                    lookupSatisfactionRate={lookupSatisfactionRate}\r\n                />\r\n                <AlertMessageSuper {...this.props} />\r\n            </Fragment>\r\n        )\r\n    }\r\n}\r\n\r\nconst mapStateToProps = state => ({\r\n    authenRdc: state.authen,\r\n    satisfactionAndStatisticRdc: state.SatisfactionAndStatisticReducer\r\n})\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    SatisfactionAndStatisticAction: bindActionCreators(SatisfactionAndStatisticAction, dispatch)\r\n});\r\n\r\nconst reduxFormParameter = {\r\n    form: \"SatisfactionForm\",\r\n};\r\n\r\nconst enhance = compose(\r\n    connect(\r\n        mapStateToProps,\r\n        mapDispatchToProps,\r\n    ),\r\n    reduxForm(reduxFormParameter)\r\n)\r\n\r\nexport default WithAlertMessage(enhance(SatisfactionForm));\r\n","import React from 'react';\r\nimport { Scrollbars } from 'react-custom-scrollbars';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport AppBarHeaderView from '../../../AppBarHeaderView';\r\n\r\nconst AskTheCityPlanView = ({\r\n    classes,\r\n    title,\r\n    children,\r\n    onBackClick\r\n}) => {\r\n    return <Grid container className={classes.root}>\r\n        <AppBarHeaderView\r\n            title={title}\r\n            onClickBack={onBackClick}\r\n        />\r\n        <Grid container className={classes.content}>\r\n            <Scrollbars\r\n                autoHide={false}\r\n                universal={true}>\r\n                {children}\r\n            </Scrollbars>\r\n        </Grid>\r\n    </Grid>\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        position: 'absolute',\r\n        top: 0,\r\n        bottom: 0,\r\n        right: 0,\r\n        left: 0\r\n    },\r\n    content: {\r\n        position: 'relative',\r\n        height: 'calc(100% - 45px)'\r\n    },\r\n}))(AskTheCityPlanView);","import React from 'react'\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { Field } from 'redux-form';\r\nimport { reduxForm } from 'redux-form';\r\nimport { validateFormDms, normalizeInteger, normalizeNumber } from '../../../../../../../Utilities/Validate';\r\nimport Button from '../../../../../../../Controls/Containers/Button';\r\nimport TextFieldRedux from '../../../../../../../Controls/Containers/TextFieldRedux';\r\n\r\nconst FormDmsView = ({\r\n    handleSubmit,\r\n    onSubmit\r\n}) => {\r\n    return (\r\n        <form onSubmit={handleSubmit(onSubmit)} method=\"POST\">\r\n            <Grid container spacing={0}>\r\n                <Grid item xs={12}>\r\n                    <Grid xs={12} item>\r\n                        <Grid xs={12} item>ละติจูด </Grid>\r\n                        <Grid container spacing={24}>\r\n                            <Grid xs={4} item>\r\n                                <Field\r\n                                    name=\"latDegrees\"\r\n                                    component={TextFieldRedux}\r\n                                    label={\"องศา\"}\r\n                                    required\r\n                                    disabled={true}\r\n                                />\r\n                            </Grid>\r\n                            <Grid xs={4} item>\r\n                                <Field\r\n                                    name=\"latMinutes\"\r\n                                    component={TextFieldRedux}\r\n                                    normalize={normalizeInteger}\r\n                                    label={\"ลิปดา\"}\r\n                                    required\r\n                                />\r\n                            </Grid>\r\n                            <Grid xs={4} item>\r\n                                <Field\r\n                                    name=\"latSeconds\"\r\n                                    component={TextFieldRedux}\r\n                                    normalize={normalizeNumber}\r\n                                    label={\"ฟิลิปดา\"}\r\n                                    required\r\n                                />\r\n                            </Grid>\r\n                        </Grid>\r\n\r\n                        <Grid xs={12} item>ลองติจูด </Grid>\r\n                        <Grid container spacing={24}>\r\n                            <Grid xs={4} item>\r\n                                <Field\r\n                                    name=\"longDegrees\"\r\n                                    component={TextFieldRedux}\r\n                                    label={\"องศา\"}\r\n                                    normalize={normalizeInteger}\r\n                                    required\r\n                                />\r\n                            </Grid>\r\n                            <Grid xs={4} item>\r\n                                <Field\r\n                                    name=\"longMinutes\"\r\n                                    component={TextFieldRedux}\r\n                                    normalize={normalizeInteger}\r\n                                    label={\"ลิปดา\"}\r\n                                    required\r\n                                />\r\n                            </Grid>\r\n                            <Grid xs={4} item>\r\n                                <Field\r\n                                    name=\"longSeconds\"\r\n                                    component={TextFieldRedux}\r\n                                    normalize={normalizeNumber}\r\n                                    label={\"ฟิลิปดา\"}\r\n                                    required\r\n                                />\r\n                            </Grid>\r\n                        </Grid>\r\n                    </Grid>\r\n                </Grid>\r\n                <Grid container justify=\"flex-end\" style={{ marginTop: '20px' }}>\r\n                    <Button\r\n                        type=\"submit\"\r\n                        label=\"ตกลง\"\r\n                    />\r\n                </Grid>\r\n            </Grid>\r\n        </form>\r\n    )\r\n}\r\n\r\nexport default reduxForm({\r\n    form: 'FormDmsView', // a unique identifier for this form\r\n    validate: validateFormDms,\r\n    initialValues: {\r\n        latDegrees: 13\r\n    }\r\n})(FormDmsView)","import React from 'react'\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { Field } from 'redux-form';\r\nimport { reduxForm } from 'redux-form';\r\nimport { validateFormLatLong } from '../../../../../../../Utilities/Validate';\r\nimport Button from '../../../../../../../Controls/Containers/Button';\r\nimport TextFieldRedux from '../../../../../../../Controls/Containers/TextFieldRedux';\r\n\r\nconst FormLatLongView = ({\r\n    handleSubmit,\r\n    onSubmit\r\n}) => {\r\n    return (\r\n        <form onSubmit={handleSubmit(onSubmit)} method=\"POST\">\r\n            <Grid container spacing={0}>\r\n                <Grid item xs={12}>\r\n                    <Field\r\n                        name=\"latLong\"\r\n                        component={TextFieldRedux}\r\n                        label={\"ละติจูด, ลองจิจูด\"}\r\n                        placeholder={'ตัวอย่าง: 13.000000,100.000000'}\r\n                        required\r\n                    />\r\n                    {/* <Field\r\n                        name=\"latitude\"\r\n                        component={TextFieldRedux}\r\n                        label={\"ละติจูด\"}\r\n                        normalize={normalizeNumber}\r\n                        required\r\n                    />\r\n                    <Field\r\n                        name=\"longitude\"\r\n                        component={TextFieldRedux}\r\n                        normalize={normalizeNumber}\r\n                        label={\"ลองจิจูด\"}\r\n                        required\r\n                    /> */}\r\n                </Grid>\r\n                <Grid container justify=\"flex-end\" style={{ marginTop: '20px' }}>\r\n                    <Button\r\n                        type=\"submit\"\r\n                        label=\"ตกลง\"\r\n                    />\r\n                </Grid>\r\n            </Grid>\r\n        </form>\r\n    )\r\n}\r\n\r\nexport default reduxForm({\r\n    form: 'FormLatLongView', // a unique identifier for this form\r\n    validate: validateFormLatLong\r\n})(FormLatLongView)","import React from \"react\";\r\nimport Grid from \"@material-ui/core/Grid\";\r\nimport { Field } from \"redux-form\";\r\nimport { reduxForm } from \"redux-form\";\r\nimport {\r\n    validateFormUtm,\r\n    normalizeNumber,\r\n} from \"../../../../../../../Utilities/Validate\";\r\nimport Button from \"../../../../../../../Controls/Containers/Button\";\r\nimport TextFieldRedux from \"../../../../../../../Controls/Containers/TextFieldRedux\";\r\n\r\nconst FormUtmView = ({ handleSubmit, onSubmit }) => {\r\n    return (\r\n        <form onSubmit={handleSubmit(onSubmit)} method=\"POST\">\r\n            <Grid container spacing={0}>\r\n                <Grid item xs={12}>\r\n                    <Field\r\n                        name=\"x\"\r\n                        component={TextFieldRedux}\r\n                        label={\"X, (E)\"}\r\n                        normalize={normalizeNumber}\r\n                        placeholder=\"ตัวอย่าง: 667700\"\r\n                        required\r\n                    />\r\n                    <Field\r\n                        name=\"y\"\r\n                        component={TextFieldRedux}\r\n                        normalize={normalizeNumber}\r\n                        label={\"Y, (N)\"}\r\n                        placeholder=\"ตัวอย่าง: 1522600\"\r\n                        required\r\n                    />\r\n                </Grid>\r\n                <Grid\r\n                    container\r\n                    justify=\"flex-end\"\r\n                    style={{ marginTop: \"20px\" }}>\r\n                    <Button type=\"submit\" label=\"ตกลง\" />\r\n                </Grid>\r\n            </Grid>\r\n        </form>\r\n    );\r\n};\r\n\r\nexport default reduxForm({\r\n    form: \"FormUtmView\", // a unique identifier for this form\r\n    validate: validateFormUtm,\r\n})(FormUtmView);\r\n","import React from 'react';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport ExpansionPanel from '@material-ui/core/ExpansionPanel';\r\nimport ExpansionPanelSummary from '@material-ui/core/ExpansionPanelSummary';\r\nimport ExpansionPanelDetails from '@material-ui/core/ExpansionPanelDetails';\r\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport SelectField from '../../../../../../Controls/Containers/SelectField';\r\nimport { SPECIFY_COORDINATE_MODE } from '../../../../../../Constants/Constants';\r\nimport FormDmsView from './SpecifyCoordinate/FormDmsView';\r\nimport FormLatLongView from './SpecifyCoordinate/FormLatLongView';\r\nimport FormUtmView from './SpecifyCoordinate/FormUtmView';\r\n\r\nconst inputProps = {\r\n    name: \"SpecifyCoordinateMode\",\r\n    id: \"SpecifyCoordinateMode\"\r\n};\r\n\r\nconst SpecifyCoordinateView = ({\r\n    classes,\r\n    isActive,\r\n    name,\r\n    modes,\r\n    modeActive,\r\n    onClick,\r\n    onSubmit,\r\n    onChangeMode\r\n}) => {\r\n    const renderSwitch = () => {\r\n        switch (modeActive) {\r\n            case SPECIFY_COORDINATE_MODE.LAT_LONG.id:\r\n                return <FormLatLongView onSubmit={onSubmit} />\r\n            case SPECIFY_COORDINATE_MODE.DMS.id:\r\n                return <FormDmsView onSubmit={onSubmit} />\r\n            case SPECIFY_COORDINATE_MODE.UTM.id:\r\n                return <FormUtmView onSubmit={onSubmit} />\r\n            default:\r\n                break;\r\n        }\r\n    }\r\n\r\n    return (\r\n        <ExpansionPanel\r\n            classes={{\r\n                root: classes.expandedEx\r\n            }}\r\n            expanded={isActive}\r\n        >\r\n            <ExpansionPanelSummary\r\n                expandIcon={<ExpandMoreIcon />}\r\n                className={`${isActive ? classes.rootExSummaryActive : classes.rootExSummary}`}\r\n                onClick={onClick}\r\n            >\r\n                <div className={classes.heading}>{name}</div>\r\n            </ExpansionPanelSummary>\r\n            <ExpansionPanelDetails>\r\n                <Grid container>\r\n                    <Grid xs={12} item>\r\n                        <SelectField\r\n                            keyData={{ value: \"id\", label: \"name\" }}\r\n                            dataItems={modes}\r\n                            value={modeActive}\r\n                            labelName=\"Unit\"\r\n                            inputProps={inputProps}\r\n                            onChange={onChangeMode}\r\n                        />\r\n                    </Grid>\r\n                    <Grid xs={12} item>\r\n                        {renderSwitch()}\r\n                    </Grid>\r\n                </Grid>\r\n            </ExpansionPanelDetails>\r\n        </ExpansionPanel>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        width: '100%',\r\n    },\r\n    rootExSummary: {\r\n        padding: \"0px 24px 0 15px\",\r\n        '&:focus': {\r\n            backgroundColor: theme.mainTheme.color2\r\n        },\r\n        '&:hover': {\r\n            backgroundColor: theme.mainTheme.colorAH.colorHover,\r\n            color: theme.mainTheme.colorAH.colorTextHover\r\n        },\r\n        minHeight: \"unset !important\",\r\n        height: \"48px\"\r\n    },\r\n    rootExSummaryActive: {\r\n        padding: \"0px 24px 0 15px\",\r\n        color: theme.mainTheme.colorAH.colorTextActive,\r\n        backgroundColor: theme.mainTheme.colorAH.colorActive,\r\n        minHeight: \"unset !important\",\r\n        height: \"48px\",\r\n        '&:hover': {\r\n            color: theme.mainTheme.colorAH.colorTextHover,\r\n        }\r\n    },\r\n    expandedEx: {\r\n        margin: \"0px\",\r\n        width: '100%',\r\n        boxShadow: 'none',\r\n        borderStyle: 'solid',\r\n        borderWidth: '0px 0px 1px 0px',\r\n        borderColor: '#E0E0E0',\r\n        position: \"initial\"\r\n    },\r\n}))(SpecifyCoordinateView)\r\n","import React, { Component } from 'react'\r\nimport SpecifyCoordinateView from '../../../../../../Presentationals/Web/Panel/Menu/MenuContent/AskTheCityPlan/SpecifyCoordinateView';\r\nimport WithAlertMessage from '../../../../../../HOC/WithLoading';\r\n// import { reduxForm } from 'redux-form';\r\nimport { compose } from \"recompose\";\r\nimport { connect } from \"react-redux\";\r\nimport { SPECIFY_COORDINATE_MODE } from '../../../../../../Constants/Constants';\r\nimport * as MapAction from '../../../../../../Actions/Web/Maps/MapAction';\r\nimport * as MapFunction from '../../../../../../Map/MapFunctions';\r\nimport { bindActionCreators } from \"redux\";\r\n\r\nconst MODES = Object.values(SPECIFY_COORDINATE_MODE);\r\n\r\nclass SpecifyCoordinate extends Component {\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.state = {\r\n\t\t\tmodeActive: MODES[0].id\r\n\t\t}\r\n\t}\r\n\tconvertDMSToLatLong = (degrees, minutes, seconds) => {\r\n\t\tdegrees = parseFloat(degrees)\r\n\t\tminutes = parseFloat(minutes)\r\n\t\tseconds = parseFloat(seconds)\r\n\r\n\t\treturn degrees + (minutes / 60) + (seconds / 3600)\r\n\t}\r\n\r\n\thandleSubmit = value => {\r\n\t\tconst { mapAction, hideResult } = this.props;\r\n\t\tconst { modeActive } = this.state;\r\n\t\tlet unit = null;\r\n\t\tlet x = null;\r\n\t\tlet y = null;\r\n\r\n\t\tif (hideResult) {\r\n\t\t\thideResult();\r\n\t\t}\r\n\r\n\t\tswitch (modeActive) {\r\n\t\t\tcase MODES[0].id: //ละติจูด\r\n\t\t\t\tunit = \"LatLong\";\r\n\t\t\t\t// x = value.longitude;\r\n\t\t\t\t// y = value.latitude;\r\n\t\t\t\tconst latLong = value.latLong.split(',');\r\n\t\t\t\tconst lat = parseFloat(latLong[0].trim());\r\n\t\t\t\tconst long = parseFloat(latLong[1].trim());\r\n\t\t\t\tx = long;\r\n\t\t\t\ty = lat;\r\n\t\t\t\tbreak;\r\n\t\t\tcase MODES[1].id: //องศา ฟิลิปดา\r\n\t\t\t\tunit = \"LatLong\";\r\n\t\t\t\tx = this.convertDMSToLatLong(value.longDegrees, value.longMinutes, value.longSeconds);\r\n\t\t\t\ty = this.convertDMSToLatLong(value.latDegrees, value.latMinutes, value.latSeconds);\r\n\t\t\t\tbreak;\r\n\t\t\tcase MODES[2].id:\r\n\t\t\t\tunit = \"Utm\";\r\n\t\t\t\tx = value.x;\r\n\t\t\t\ty = value.y;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tmapAction.bindMapCommand(MapFunction.specifyCoordinateCMP, {\r\n\t\t\tx: x,\r\n\t\t\ty: y,\r\n\t\t\tunit: unit,\r\n\t\t\tcallback: this.handleCallBackAddGrapic\r\n\t\t})\r\n\t}\r\n\r\n\thandleCallBackAddGrapic = (geometry) => {\r\n\t\tconst { mapAction } = this.props;\r\n\t\tmapAction.bindClearMapCommand();\r\n\t\tmapAction.bindMapCommand(MapFunction.IdentifyComprehensivePlanCMP, {\r\n\t\t\tgeometry: geometry,\r\n\t\t\tcallbackFn: this.callbackIdentifyComprehensivePlanResult\r\n\t\t})\r\n\t}\r\n\r\n\tcallbackIdentifyComprehensivePlanResult = (result, geometry) => {\r\n\t\tconst { callbackIdentify } = this.props;\r\n\t\tif (callbackIdentify) {\r\n\t\t\tcallbackIdentify(result, geometry)\r\n\t\t}\r\n\t}\r\n\r\n\thandleChangeMode = evt => {\r\n\t\tconst { hideResult } = this.props;\r\n\t\tthis.setState({\r\n\t\t\tmodeActive: evt.target.value\r\n\t\t})\r\n\r\n\t\tif (hideResult) {\r\n\t\t\thideResult();\r\n\t\t}\r\n\t}\r\n\r\n\trender() {\r\n\t\tconst { modeActive } = this.state;\r\n\t\tconst {\r\n\t\t\tname,\r\n\t\t\tisActive,\r\n\t\t\tonClick,\r\n\t\t} = this.props;\r\n\r\n\t\treturn (\r\n\t\t\t<SpecifyCoordinateView\r\n\t\t\t\tisActive={isActive}\r\n\t\t\t\tname={name}\r\n\t\t\t\tmodeActive={modeActive}\r\n\t\t\t\tmodes={MODES}\r\n\t\t\t\tonClick={onClick}\r\n\t\t\t\tonSubmit={this.handleSubmit}\r\n\t\t\t\tonChangeMode={this.handleChangeMode}\r\n\t\t\t/>\r\n\t\t)\r\n\t}\r\n}\r\n\r\n// const reduxFormParameter = {\r\n// \tform: \"SpecifyCoordinate\",\r\n// \t// validate: specifyCoordinateValidate\r\n// };\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n\tmapAction: bindActionCreators(MapAction, dispatch)\r\n});\r\nconst enhance = compose(\r\n\tconnect(\r\n\t\tnull,\r\n\t\tmapDispatchToProps\r\n\t),\r\n\t// reduxForm(reduxFormParameter)\r\n);\r\n\r\nexport default WithAlertMessage(enhance(SpecifyCoordinate));\r\n","import React from \"react\";\r\nimport Grid from \"@material-ui/core/Grid\";\r\nimport { Field } from \"redux-form\";\r\nimport { withStyles } from \"@material-ui/styles\";\r\nimport SelectField from \"../../../../../../Controls/Containers/SelectFieldRedux\";\r\nimport TextField from \"../../../../../../Controls/Containers/TextFieldRedux\";\r\nimport Button from \"../../../../../../Controls/Containers/Button\";\r\nimport { TYPE_SEARCH_LAND_INFORMATION } from \"../../../../../../Constants/Constants\";\r\n\r\nconst listType = Object.keys(TYPE_SEARCH_LAND_INFORMATION).map((key) => ({\r\n    id: TYPE_SEARCH_LAND_INFORMATION[key],\r\n    name: TYPE_SEARCH_LAND_INFORMATION[key],\r\n}));\r\n\r\nconst renderForm = ({ type, luDistrict }) => {\r\n    switch (type) {\r\n        case TYPE_SEARCH_LAND_INFORMATION.DISTRICT:\r\n            return (\r\n                <Grid container>\r\n                    <Grid item xs={12}>\r\n                        <Field\r\n                            label={\"เลขโฉนดที่ดิน\"}\r\n                            name=\"parcelNo\"\r\n                            component={TextField}\r\n                            required\r\n                        />\r\n                    </Grid>\r\n                    <Grid item xs={12}>\r\n                        <Field\r\n                            label={\"เขต\"}\r\n                            name=\"district\"\r\n                            component={SelectField}\r\n                            data={luDistrict}\r\n                            keyData={{ value: \"name\", label: \"name\" }}\r\n                            required\r\n                        />\r\n                    </Grid>\r\n                </Grid>\r\n            );\r\n        case TYPE_SEARCH_LAND_INFORMATION.SURVEY_NO:\r\n            return (\r\n                <Grid container>\r\n                    <Grid item xs={12}>\r\n                        <Field\r\n                            label={\"เลขโฉนดที่ดิน\"}\r\n                            name=\"parcelNo\"\r\n                            component={TextField}\r\n                            required\r\n                        />\r\n                    </Grid>\r\n                    <Grid item xs={12}>\r\n                        <Field\r\n                            label={\"หน้าสำรวจ\"}\r\n                            name=\"surveyNo\"\r\n                            component={TextField}\r\n                            required\r\n                        />\r\n                    </Grid>\r\n                </Grid>\r\n            );\r\n        case TYPE_SEARCH_LAND_INFORMATION.SHEET_NO:\r\n            return (\r\n                <Grid container>\r\n                    <Grid item xs={12}>\r\n                        <Field\r\n                            label={\"เลขที่ดิน\"}\r\n                            name=\"landNo\"\r\n                            component={TextField}\r\n                            required\r\n                        />\r\n                    </Grid>\r\n                    <Grid item xs={12}>\r\n                        <Field\r\n                            label={\"ระวาง 1:1,000\"}\r\n                            name=\"sheetNo\"\r\n                            component={TextField}\r\n                            required\r\n                        />\r\n                    </Grid>\r\n                </Grid>\r\n            );\r\n        default:\r\n            break;\r\n    }\r\n};\r\n\r\nconst FormSearchLandView = ({\r\n    classes,\r\n    handleSubmit,\r\n    type,\r\n    luDistrict,\r\n    onSubmit,\r\n    onClickBack,\r\n    // onClickCancel\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.rootFormSearch}>\r\n            <form onSubmit={handleSubmit(onSubmit)} className={classes.form}>\r\n                <Grid item xs={12}>\r\n                    <Field\r\n                        label={\"เงื่อนไขการค้นหา\"}\r\n                        name=\"type\"\r\n                        component={SelectField}\r\n                        data={listType}\r\n                        required\r\n                    />\r\n                </Grid>\r\n\r\n                {renderForm({ type, luDistrict })}\r\n\r\n                <Grid container justify=\"center\" spacing={24}>\r\n                    <Grid item>\r\n                        <Button\r\n                            // className={classes.btnCancel}\r\n                            label=\"ยกเลิก\"\r\n                            // color=\"black\"\r\n                            onClick={onClickBack}\r\n                        />\r\n                    </Grid>\r\n                    <Grid item>\r\n                        <Button type=\"submit\" label=\"ค้นหา\" />\r\n                    </Grid>\r\n                </Grid>\r\n            </form>\r\n        </Grid>\r\n    );\r\n};\r\n\r\nexport default withStyles((theme) => ({\r\n    rootFormSearch: {\r\n        height: \"300px\",\r\n    },\r\n    form: {\r\n        width: \"100%\",\r\n    },\r\n    btnCancel: {\r\n        marginLeft: \"10px\",\r\n    },\r\n}))(FormSearchLandView);\r\n","import React from 'react';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport ListItem from '@material-ui/core/ListItem';\r\nimport classnames from 'classnames';\r\nimport { Scrollbars } from \"react-custom-scrollbars\";\r\nimport { TYPE_SEARCH_LAND_INFORMATION } from '../../../../../../Constants/Constants';\r\n\r\nconst renderListResult = ({ classes, results, resultActive, typeSearch, onClickResult }) => {\r\n    return results.map((itm, index) => {\r\n        let resultDisplay = null;\r\n        let resultDisplayLine2 = null\r\n        switch (typeSearch) {\r\n            case TYPE_SEARCH_LAND_INFORMATION.DISTRICT:\r\n                resultDisplay = `เลขโฉนดที่ดิน : ${itm.main}`\r\n                resultDisplayLine2 = `เขต : ${itm.detail}`\r\n                break;\r\n            case TYPE_SEARCH_LAND_INFORMATION.SURVEY_NO:\r\n                resultDisplay = `เลขโฉนดที่ดิน : ${itm.main}`\r\n                resultDisplayLine2 = `หน้าสำรวจ : ${itm.detail}`\r\n                break;\r\n            case TYPE_SEARCH_LAND_INFORMATION.SHEET_NO:\r\n                resultDisplay = `เลขที่ดิน : ${itm.main}`\r\n                resultDisplayLine2 = `ระวาง : ${itm.detail}`\r\n                break;\r\n            default:\r\n                break;\r\n        }\r\n\r\n        return <ListItem\r\n            button\r\n            key={`resultsearchlandinfo-${itm.main}-${index}`}\r\n            divider={true}\r\n            className={classnames(classes.item, { [classes.itemActive]: itm.main === resultActive })}\r\n            classes={{ gutters: classes.guttersItem }}\r\n            onClick={onClickResult(itm)}>\r\n            {resultDisplay}<br/>\r\n            {resultDisplayLine2}\r\n        </ListItem>\r\n    })\r\n}\r\n\r\nconst ResultSearchLandInfoView = ({\r\n    classes,\r\n    isScrollbars = true,\r\n    results,\r\n    typeSearch,\r\n    resultActive,\r\n    onClickResult\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root}>\r\n            <Grid item xs={12} className={classes.header}>\r\n                {`ผลลัพธ์จำนวน ${results.length} รายการ`}\r\n            </Grid>\r\n\r\n            <Grid item xs={12} className={classes.body}>\r\n                {isScrollbars ? (\r\n                <Scrollbars>\r\n                    {results.length === 0 ? <div className={classes.noData}>ไม่พบข้อมูล</div> : renderListResult({ classes, results, resultActive, typeSearch, onClickResult })}\r\n                </Scrollbars> ):(\r\n                     results.length === 0 ? <div className={classes.noData}>ไม่พบข้อมูล</div> : renderListResult({ classes, results, resultActive, typeSearch, onClickResult }))\r\n                     }\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        height: 'calc(100% - 350px)',\r\n        // height:'100%'\r\n    },\r\n    header: {\r\n        height: '25px',\r\n        lineHeight: '25px',\r\n        width: '100%',\r\n        backgroundColor: theme.mainTheme.color3,\r\n        color: theme.mainTheme.color2,\r\n        textAlign: 'center',\r\n        fontSize: theme.textSize.subtitle\r\n    },\r\n    body: {\r\n        height: 'calc(100% - 25px)'\r\n    },\r\n    noData: {\r\n        margin: '18px'\r\n    },\r\n    item: {\r\n        '&:focus': {\r\n            backgroundColor: theme.mainTheme.color2\r\n        },\r\n        '&:hover': {\r\n            backgroundColor: theme.mainTheme.colorAH.colorHover,\r\n            color: theme.mainTheme.colorAH.colorTextHover\r\n        }\r\n    },\r\n    itemActive: {\r\n        backgroundColor: theme.mainTheme.colorAH.colorActive,\r\n        color: theme.mainTheme.colorAH.colorTextActive,\r\n        '&:focus': {\r\n            backgroundColor: theme.mainTheme.colorAH.colorActive\r\n        },\r\n    },\r\n    guttersItem: {\r\n        paddingTop: '5px',\r\n        paddingBottom: '5px'\r\n    }\r\n}))(ResultSearchLandInfoView)\r\n","import React, { Component } from 'react';\r\nimport { bindActionCreators } from \"redux\";\r\nimport { connect } from \"react-redux\";\r\n\r\n//import actions \r\nimport * as MapAction from '../../../../../../Actions/Web/Maps/MapAction';\r\nimport * as MapFunction from '../../../../../../Map/MapFunctions';\r\n\r\n//import service - utils\r\nimport * as LocatorUtil from '../../../../../../Utilities/LocatorUtil';\r\n\r\n//import component\r\nimport ResultSearchLandInfoView from '../../../../../../Presentationals/Web/Panel/Menu/MenuContent/SearchLandInfo/ResultSearchLandInfoView';\r\n\r\nexport class ResultSearchLandInfo extends Component {\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.state = {\r\n\t\t\tresultActive: null\r\n\t\t}\r\n\t}\r\n\r\n\tcomponentDidMount() {\r\n\t\tconst { refResultSearcLandInfo } = this.props;\r\n\t\tif(refResultSearcLandInfo){\r\n\t\t\trefResultSearcLandInfo(this)\r\n\t\t}\r\n\t}\r\n\r\n\thandleClickResult = value => evt => {\r\n\t\tconst {mapAction, isKeepGraphic} = this.props\r\n\t\tmapAction.bindMapCommand(MapFunction.zoomLandplot, {\r\n\t\t\trings: this.makeLocatorRingsExtent(value.envelope),\r\n\t\t\tdrawRings: LocatorUtil.makeLocatorRings(value.shape),\r\n\t\t\ttype: value.type,\r\n\t\t\tcallbackFn: this.handleCallbackGetGeometry,\r\n\t\t\tlandNo:value.main,\r\n\t\t\tisKeepGraphic: isKeepGraphic\r\n\t\t});\r\n\t}\r\n\r\n\thandleCallbackGetGeometry=(geometry)=>{\r\n\t\tconst {onClickResult} = this.props\r\n\t\tif(onClickResult){ //ฟังก์ชั่นสำหรับcallbackกลับไปหน้า LandPlot\r\n\t\t\tonClickResult(geometry)\r\n\t\t}\r\n\t}\r\n\r\n\tmakeLocatorRingsExtent = (str) => {\r\n\t\tlet tmpString = str;\r\n\t\tlet listPoint = [];\r\n\t\ttmpString = tmpString.replace(\"POLYGON (( \", \"\").replace(\"))\", \"\");\r\n\t\tconst listPointString = tmpString.split(',');\r\n\t\tlistPoint = listPointString.map(item => {\r\n\t\t\tconst listXY = item.trim().split(' ');\r\n\t\t\tconst x = parseFloat(listXY[0]);\r\n\t\t\tconst y = parseFloat(listXY[1]);\r\n\t\t\treturn [x, y];\r\n\t\t})\r\n\t\treturn listPoint\r\n\t}\r\n\r\n\tclaerResultActive = () => {\r\n\t\tthis.setState({\r\n\t\t\tresultActive: null\r\n\t\t})\r\n\t}\r\n\r\n\trender() {\r\n\t\tconst { isScrollbars, results, typeSearch } = this.props;\r\n\t\tconst { resultActive } = this.state;\r\n\r\n\t\treturn (\r\n\t\t\t<ResultSearchLandInfoView\r\n\t\t\t\tisScrollbars={isScrollbars}\r\n\t\t\t\tresults={results}\r\n\t\t\t\ttypeSearch={typeSearch}\r\n\t\t\t\tresultActive={resultActive}\r\n\t\t\t\tonClickResult={this.handleClickResult}\r\n\t\t\t/>\r\n\t\t)\r\n\t}\r\n}\r\n\r\n\r\nconst mapStateToProps = state => ({\r\n  });\r\n  \r\nconst mapDispatchToProps = dispatch => ({\r\n\tmapAction: bindActionCreators(MapAction, dispatch),\r\n});\r\n  \r\nexport default connect(\r\n\tmapStateToProps,\r\n\tmapDispatchToProps\r\n)(ResultSearchLandInfo);\r\n","import React from 'react';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport ExpansionPanel from '@material-ui/core/ExpansionPanel';\r\nimport ExpansionPanelSummary from '@material-ui/core/ExpansionPanelSummary';\r\nimport ExpansionPanelDetails from '@material-ui/core/ExpansionPanelDetails';\r\nimport ExpandMoreIcon from '@material-ui/icons/ExpandMore';\r\nimport Grid from '@material-ui/core/Grid';\r\n// import SelectField from '../../../../../../Controls/Containers/SelectField';\r\n// import { SPECIFY_COORDINATE_MODE,TYPE_SEARCH_LAND_INFORMATION } from '../../../../../Constants/Constants';\r\n// import FormDmsView from './SpecifyCoordinate/FormDmsView';\r\n// import FormLatLongView from './SpecifyCoordinate/FormLatLongView';\r\n// import FormUtmView from './SpecifyCoordinate/FormUtmView';\r\n// import ResultSearchLandInfo from '../../../../../Containers/Panel/MenuContent/SearchLandInfo/ResultSearchLandInfo';\r\n\r\n\r\n\r\nconst LandPlotView = ({\r\n    classes,\r\n    isActive,\r\n    name,\r\n    modes,\r\n    modeActive,\r\n    onClick,\r\n    onSubmit,\r\n    onChangeMode,\r\n    children\r\n}) => {\r\n    // const renderSwitch = () => {\r\n    //     switch (modeActive) {\r\n    //         case SPECIFY_COORDINATE_MODE.LAT_LONG.id:\r\n    //             return <FormLatLongView onSubmit={onSubmit} />\r\n    //         case SPECIFY_COORDINATE_MODE.DMS.id:\r\n    //             return <FormDmsView onSubmit={onSubmit} />\r\n    //         case SPECIFY_COORDINATE_MODE.UTM.id:\r\n    //             return <FormUtmView onSubmit={onSubmit} />\r\n    //         default:\r\n    //             break;\r\n    //     }\r\n    // }\r\n\r\n    return (\r\n        <ExpansionPanel\r\n            classes={{\r\n                root: classes.expandedEx\r\n            }}\r\n            expanded={isActive}\r\n        >\r\n            <ExpansionPanelSummary\r\n                expandIcon={<ExpandMoreIcon />}\r\n                className={`${isActive ? classes.rootExSummaryActive : classes.rootExSummary}`}\r\n                onClick={onClick}\r\n            >\r\n                <div className={classes.heading}>{name}</div>\r\n            </ExpansionPanelSummary>\r\n            <ExpansionPanelDetails>\r\n                <Grid container>\r\n                    <Grid xs={12} item>\r\n                        {children[0]}\r\n                    </Grid>\r\n                    <Grid xs={12} item className={classes.result}>\r\n                        {children[1]}\r\n                    </Grid>\r\n                </Grid>\r\n            </ExpansionPanelDetails>\r\n        </ExpansionPanel>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        width: '100%',\r\n    },\r\n    rootExSummary: {\r\n        padding: \"0px 24px 0 15px\",\r\n        '&:focus': {\r\n            backgroundColor: theme.mainTheme.color2\r\n        },\r\n        '&:hover': {\r\n            backgroundColor: theme.mainTheme.colorAH.colorHover,\r\n            color: theme.mainTheme.colorAH.colorTextHover\r\n        },\r\n        minHeight: \"unset !important\",\r\n        height: \"48px\"\r\n    },\r\n    rootExSummaryActive: {\r\n        padding: \"0px 24px 0 15px\",\r\n        backgroundColor: theme.mainTheme.colorAH.colorActive,\r\n        color: theme.mainTheme.colorAH.colorTextActive,\r\n        '&:hover': {\r\n            color: theme.mainTheme.colorAH.colorTextHover\r\n        },\r\n        minHeight: \"unset !important\",\r\n        height: \"48px\"\r\n    },\r\n    expandedEx: {\r\n        margin: \"0px\",\r\n        width: '100%',\r\n        boxShadow: 'none',\r\n        borderStyle: 'solid',\r\n        borderWidth: '0px 0px 1px 0px',\r\n        borderColor: '#E0E0E0',\r\n        position: \"initial\"\r\n    },\r\n    result:{\r\n        paddingTop:\"20px\"\r\n    }\r\n}))(LandPlotView)\r\n","import React, { Component } from 'react'\r\nimport { reduxForm , formValueSelector} from 'redux-form';\r\nimport { compose } from \"recompose\";\r\nimport { connect } from \"react-redux\";\r\nimport { bindActionCreators } from \"redux\";\r\nimport { fetchGet_ } from '../../../../../../Utilities/ServiceUtils';\r\nimport WithAlertMessage from '../../../../../../HOC/WithAlertMessage';\r\nimport * as MapAction from '../../../../../../Actions/Web/Maps/MapAction';\r\nimport * as MapFunction from '../../../../../../Map/MapFunctions';\r\nimport FormSearchLandView from '../../../../../../Presentationals/Web/Panel/Menu/MenuContent/SearchLandInfo/FormSearchLandView' //ใช้viewเดียวกันกับหน้าค้นหาที่ดิน\r\nimport ResultSearchLandInfo from '../SearchLandInfo/ResultSearchLandInfo';\r\nimport LandPlotView from '../../../../../../Presentationals/Web/Panel/Menu/MenuContent/AskTheCityPlan/LandPlotView'\r\nimport { TYPE_SEARCH_LAND_INFORMATION } from '../../../../../../Constants/Constants';\r\nimport { validateSearchLandInfo } from '../../../../../../Utilities/Validate';\r\nimport * as AskTheCityPlanAction from '../../../../../../Actions/Web/Panel/AskTheCityPlanAction';\r\nexport class LandPlot extends Component {\r\n\r\n    constructor() {\r\n        super();\r\n        this.state = {\r\n            luDistrict: [],\r\n            result: [],\r\n            typeSearch: null,\r\n            isShowResult:false\r\n        }\r\n    }\r\n\r\n    componentDidMount() {\r\n        this.callServiceDistrict();\r\n    }\r\n\r\n    callServiceDistrict = () => {\r\n        fetchGet_(`${process.env.REACT_APP_LU_DISTRICT}?provinceid=10`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(data => {\r\n                this.setState({\r\n                    luDistrict: data.result\r\n                })\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceDistric', ex)\r\n            })\r\n    }\r\n    onClickSubmit=(value)=>{\r\n\r\n        let Url = null;\r\n\r\n        if(value.type === TYPE_SEARCH_LAND_INFORMATION.DISTRICT){\r\n            Url = `${process.env.REACT_APP_PARCEL_DISTRICT}?parcelNo=${value.parcelNo}&district=${value.district}` \r\n        }else if(value.type === TYPE_SEARCH_LAND_INFORMATION.SURVEY_NO){\r\n            Url = `${process.env.REACT_APP_PARCEL_SURVEY}?parcelNo=${value.parcelNo}&surveyNo=${value.surveyNo}` \r\n        }else if(value.type === TYPE_SEARCH_LAND_INFORMATION.SHEET_NO){\r\n            Url = `${process.env.REACT_APP_LANDMAP}?landNo=${value.landNo}&map1k=${value.sheetNo}` \r\n        }\r\n        fetchGet_(Url)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(data => {\r\n            \r\n               if(data){\r\n                   this.setState({\r\n                    result: data.Result,\r\n                    typeSearch: value.type,\r\n                    isShowResult: true\r\n                })\r\n               }else{\r\n                this.setState({\r\n                    result: [],\r\n                    typeSearch: value.type,\r\n                    isShowResult: true\r\n                })\r\n               }\r\n               \r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceFindLandPlot', ex)\r\n            })\r\n        \r\n        \r\n    }\r\n\r\n    handleClickResult=(geometry)=>{\r\n        const {mapAction} = this.props\r\n        mapAction.bindMapCommand(MapFunction.IdentifyComprehensivePlanCMP, {\r\n            geometry: geometry,\r\n            callbackFn: this.callbackIdentifyComprehensivePlanResult\r\n        })\r\n\r\n    }\r\n\r\n     callbackIdentifyComprehensivePlanResult = (result,geometry) => {\r\n        const {callbackIdentify} = this.props\r\n        if (callbackIdentify) {\r\n\t\t\tcallbackIdentify(result,geometry)\r\n\t\t}\r\n    }\r\n\r\n    handleCancel = () => {\r\n        this.setState({\r\n            results: [],\r\n            typeSearch: null,\r\n            isShowResult: false\r\n\r\n        })\r\n        this.props.initialize({ \"type\": TYPE_SEARCH_LAND_INFORMATION.DISTRICT })\r\n    }\r\n\r\n\r\n  render() {\r\n      const {luDistrict,result,typeSearch,isShowResult} = this.state\r\n      const {formRdc,handleSubmit,onClick,isActive,name, isKeepGraphic} = this.props\r\n\r\n    return (\r\n      <div>\r\n          <LandPlotView name={name}\r\n                        onClick={onClick}\r\n                        isActive={isActive}>\r\n                \r\n                <FormSearchLandView onSubmit={this.onClickSubmit}\r\n                                    handleSubmit = {handleSubmit}\r\n                                    luDistrict = {luDistrict}\r\n                                    type= {formRdc.type} \r\n                                    onClickCancel = {this.handleCancel}/>\r\n\r\n                {isShowResult && <ResultSearchLandInfo \r\n                            isScrollbars = {false}\r\n                            results={result}\r\n                            typeSearch={typeSearch}\r\n                            onClickResult={this.handleClickResult}\r\n                            isKeepGraphic={isKeepGraphic}\r\n                            />}\r\n                \r\n          </LandPlotView>\r\n        {/* <FormSearchLandView onSubmit={this.handleSubmit}\r\n                            handleSubmit = {this.onHandleSubmit}/> */}\r\n      </div>\r\n    )\r\n  }\r\n}\r\n\r\nconst selector = formValueSelector('LandPlot')\r\n\r\nconst reduxFormParameter = {\r\n\tform: \"LandPlot\",\r\n    validate: validateSearchLandInfo,\r\n    initialValues: {\r\n        type: TYPE_SEARCH_LAND_INFORMATION.DISTRICT\r\n    }\r\n};\r\n\r\nconst mapStateToProps = state => ({\r\n    // submitPmrRdc: state.submitPmr,\r\n    formRdc: selector(state, \"type\", \"\"),\r\n})\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    mapAction: bindActionCreators(MapAction, dispatch),\r\n    askTheCityPlanAction: bindActionCreators(AskTheCityPlanAction, dispatch)\r\n});\r\nconst enhance = compose(\r\n\tconnect(\r\n\t\tmapStateToProps,\r\n\t\tmapDispatchToProps\r\n\t),\r\n\treduxForm(reduxFormParameter)\r\n);\r\n\r\nexport default WithAlertMessage(enhance(LandPlot));\r\n","import React, { Fragment } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport ListItem from '@material-ui/core/ListItem';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport classNames from 'classnames';\r\nimport SpecifyCoordinate from '../../../../../../Containers/Web/Panel/Menu/MenuContent/AskTheCityPlan/SpecifyCoordinate';\r\nimport LandPlot from '../../../../../../Containers/Web/Panel/Menu/MenuContent/AskTheCityPlan/LandPlot';\r\nimport { ASK_THE_CITY_PLAN } from '../../../../../../Constants/MenuConstants';\r\nimport {ACTIVE_FUNCTION} from '../../../../../../Constants/Constants';\r\n\r\nconst FunctionMenuView = ({\r\n    classes,\r\n    listMenu,\r\n    onMenuItemClick,\r\n    hideResult,\r\n    callbackIdentify,\r\n    activeFunction\r\n}) => {\r\n    const generateListItem = () => {\r\n        let elementMenu;\r\n        return listMenu.map((itm, index) => {\r\n\r\n            if (itm.id === ASK_THE_CITY_PLAN.specifyCoordinate.id) {\r\n                elementMenu = <SpecifyCoordinate\r\n                    isActive={itm.isActive}\r\n                    name={itm.name}\r\n                    onClick={onMenuItemClick(itm)}\r\n                    hideResult={hideResult}\r\n                    callbackIdentify={callbackIdentify}\r\n                />\r\n            } else if (itm.id === ASK_THE_CITY_PLAN.specifyLandArea.id) {\r\n                elementMenu = <LandPlot\r\n                    isActive={itm.isActive}\r\n                    name={itm.name}\r\n                    onClick={onMenuItemClick(itm)}\r\n                    hideResult={hideResult}\r\n                    callbackIdentify={callbackIdentify}\r\n                />\r\n            }else if(itm.id === ASK_THE_CITY_PLAN.clickOnMapPoint.id){\r\n                const isActive = activeFunction === ACTIVE_FUNCTION.ASK_PNT \r\n                elementMenu = <ListItem\r\n                    button\r\n                    divider={true}\r\n                    className={classNames(classes.menu_item, { [classes.manu_item_active]: isActive })}\r\n                    onClick={onMenuItemClick(itm)}>\r\n                    {itm.name}\r\n                </ListItem>\r\n            }else if(itm.id === ASK_THE_CITY_PLAN.clickOnMapPolygon.id){\r\n                const isActive = activeFunction === ACTIVE_FUNCTION.ASK_POLYGON \r\n                elementMenu = <ListItem\r\n                    button\r\n                    divider={true}\r\n                    className={classNames(classes.menu_item, { [classes.manu_item_active]: isActive })}\r\n                    onClick={onMenuItemClick(itm)}>\r\n                    {itm.name}\r\n                </ListItem>\r\n            } else {\r\n                elementMenu = <ListItem\r\n                    button\r\n                    divider={true}\r\n                    className={classNames(classes.menu_item, { [classes.manu_item_active]: itm.isActive })}\r\n                    onClick={onMenuItemClick(itm)}>\r\n                    {itm.name}\r\n                </ListItem>\r\n            }\r\n\r\n            return (\r\n                <Fragment key={`askTheCityPlanMenu_${index}`}>\r\n\r\n                    {elementMenu}\r\n\r\n                </Fragment >);\r\n        })\r\n    }\r\n\r\n    return (\r\n        <Grid container>\r\n            <Grid item xs={12} >\r\n                {generateListItem()}\r\n            </Grid>\r\n        </Grid>)\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    menu_header: {\r\n        height: '25px',\r\n        lineHeight: '25px',\r\n        width: '100%',\r\n        backgroundColor: theme.mainTheme.color3,\r\n        color: theme.mainTheme.color2,\r\n        textAlign: 'center',\r\n        fontSize: theme.textSize.subtitle\r\n    },\r\n    menu_item: {\r\n        '&:focus': {\r\n            backgroundColor: theme.mainTheme.color2\r\n        },\r\n        '&:hover': {\r\n            backgroundColor: theme.mainTheme.colorAH.colorHover,\r\n            color: theme.mainTheme.colorAH.colorTextHover,\r\n        }\r\n    },\r\n    manu_item_active: {\r\n        color: theme.mainTheme.colorAH.colorTextActive,\r\n        backgroundColor: theme.mainTheme.colorAH.colorActive,\r\n        '&:focus': {\r\n            backgroundColor: theme.mainTheme.colorAH.colorActive,\r\n        },\r\n    }\r\n}))(FunctionMenuView);\r\n\r\nFunctionMenuView.defaultProps = {\r\n    listMenu: []\r\n}\r\n\r\nFunctionMenuView.propTypes = {\r\n    listMenu: PropTypes.arrayOf(PropTypes.shape({\r\n        id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\r\n        name: PropTypes.string,\r\n        isActive: PropTypes.bool\r\n    }))\r\n}","import React, { useState, useEffect } from 'react';\r\n\r\nimport * as MenuConstants from '../../../../../../Constants/MenuConstants'\r\nimport FunctionMenuView from '../../../../../../Presentationals/Web/Panel/Menu/MenuContent/AskTheCityPlan/FunctionMenuView';\r\n\r\nconst FunctionMenu = ({\r\n    onMenuItemClick,\r\n    callbackIdentify,\r\n    hideResult,\r\n    isShowConfirm,\r\n    showAlert,\r\n    hideAlert,\r\n    activeFunction\r\n}) => {\r\n\r\n    const [menu, setMenu] = useState([]);\r\n\r\n    //componentDidMount\r\n    useEffect(() => {\r\n        const listMenu = Object.keys(MenuConstants.ASK_THE_CITY_PLAN).map(key => {\r\n            return {\r\n                id: MenuConstants.ASK_THE_CITY_PLAN[key].id,\r\n                name: MenuConstants.ASK_THE_CITY_PLAN[key].name,\r\n                isActive: false\r\n            }\r\n        })\r\n        setMenu(listMenu);\r\n    }, []);\r\n\r\n    const manageMenuDisplay = (id) => {\r\n        const tmpMenu = [...menu];\r\n        tmpMenu.forEach(itm => {\r\n            if (itm.id === id) {\r\n                itm.isActive = !itm.isActive;\r\n            }\r\n            else {\r\n                itm.isActive = false\r\n            }\r\n        });\r\n        setMenu(tmpMenu);\r\n    }\r\n\r\n    const callBackConfirmChangeMenu = (itm) => (evt) => {\r\n        manageMenuDisplay(itm.id);\r\n        hideAlert();\r\n        if (onMenuItemClick) {\r\n            onMenuItemClick(itm);\r\n        }\r\n    }\r\n\r\n    const handleMenuItemClick = (itm) => (evt) => {\r\n        if (isShowConfirm) {\r\n            showAlert({\r\n                altMsg: \"กิจกรรมที่ขอตรวจสอบยังไม่ถูกจัดเก็บ คุณต้องการเปลี่ยนเมนู ?\",\r\n                altType: 2,\r\n                callbackCancel: hideAlert,\r\n                callbackConfirm: callBackConfirmChangeMenu(itm)\r\n            })\r\n        } else {\r\n            manageMenuDisplay(itm.id);\r\n            if (onMenuItemClick) {\r\n                onMenuItemClick(itm);\r\n            }\r\n        }\r\n    }\r\n\r\n    return <FunctionMenuView\r\n        listMenu={menu}\r\n        onMenuItemClick={handleMenuItemClick}\r\n        callbackIdentify={callbackIdentify}\r\n        hideResult={hideResult}\r\n        activeFunction={activeFunction}\r\n    />\r\n}\r\nexport default FunctionMenu;","import React, { Component,Fragment } from 'react'\r\nimport Button from '../../../../../../Controls/Containers/Button';\r\nimport { Field } from \"redux-form\";\r\nimport SelectField from '../../../../../../Controls/Containers/SelectFieldRedux';\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\nimport Grid from '@material-ui/core/Grid';\r\n\r\nexport class AskForBusinessView extends Component {\r\n  render() {    \r\n    const {\r\n        handleSubmit,\r\n        onSubmit,\r\n        classes,\r\n        luActivity,\r\n    } = this.props\r\n    return (\r\n        <Fragment >\r\n            <Grid item xs={12} className={classes.result_header}>\r\n                จัดเก็บกิจกรรมที่ขอตรวจสอบ\r\n            </Grid>\r\n            <Grid container className={classes.content_in} >\r\n                <Field\r\n                    name=\"luActivity\"\r\n                    component={SelectField}\r\n                    data={luActivity}\r\n                    keyData={{value:\"value\",label:\"name\"}}\r\n                    label=\"กิจกรรมที่ขอตรวจสอบ\"\r\n                    required\r\n                />\r\n            </Grid>\r\n            <Grid container justify='center' >\r\n                <Grid item>\r\n                    <Button\r\n                        label='บันทึก'\r\n                        onClick={handleSubmit(onSubmit)}\r\n                    />\r\n                </Grid>\r\n            </Grid>\r\n            <Grid container style={{height: '10px'}} />\r\n        </Fragment>\r\n    )\r\n  }\r\n}\r\n\r\nconst styles = theme => ({\r\n    result_header: {\r\n        height: '25px',\r\n        lineHeight: '25px',\r\n        width: '100%',\r\n        background: theme.mainTheme.color3,\r\n        color: theme.mainTheme.color2,\r\n        textAlign: 'center',\r\n        fontSize: theme.textSize.subtitle,\r\n        position: 'relative',\r\n        // bottom: '10px'\r\n    },\r\n    content_in: {\r\n        // height: '100%',\r\n        paddingTop: '0px',\r\n        paddingLeft: '5px',\r\n        paddingRight: '5px',\r\n        paddingBottom: '5px',\r\n    },\r\n});\r\n\r\nexport default withStyles(styles)(AskForBusinessView);\r\n","import React, { Component, Fragment } from 'react'\r\nimport { compose } from \"recompose\";\r\nimport { connect } from \"react-redux\";\r\nimport { bindActionCreators } from \"redux\";\r\nimport { reduxForm } from \"redux-form\";\r\nimport { fetchGet_ } from '../../../../../../Utilities/ServiceUtils';\r\nimport WithAlertMessage from \"../../../../../../HOC/WithAlertMessage\";\r\nimport * as Mapfunction from '../../../../../../Map/MapFunctions';\r\nimport * as MapAction from \"../../../../../../Actions/Web/Maps/MapAction\";\r\nimport { validateAskForBusiness } from '../../../../../../Utilities/Validate';\r\nimport AskForBusinessView from '../../../../../../Presentationals/Web/Panel/Menu/MenuContent/AskTheCityPlan/AskForBusinessView'\r\nimport AlertMessage from '../../../../../../Controls/Containers/AlertMessage'\r\n\r\nexport class AskForBusiness extends Component {\r\n\r\n    constructor() {\r\n        super()\r\n        this.state = {\r\n            luActivity: [] //เพื่อกิจการ\r\n        }\r\n    }\r\n\r\n    componentDidMount() {\r\n\r\n        this.callServiceGetLutActivity()\r\n    }\r\n\r\n    callServiceGetLutActivity = () => {\r\n        fetchGet_(process.env.REACT_APP_LU_ACTIVITY)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(data => {\r\n                this.setState({\r\n                    luActivity: data.result\r\n                })\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceDistric', ex)\r\n            })\r\n    }\r\n\r\n    handleSubmit = async (value) => {\r\n        const { mapAction, authenRdc, geometry } = this.props;\r\n\r\n        if (geometry && geometry.type) {\r\n            switch (geometry.type) {\r\n                case \"point\":\r\n                    mapAction.bindMapCommand(Mapfunction.addShapeAskForBusiness, {\r\n                        url: `${window.CPUDD_QUERY_PLAN_FEATURE_LAYER_PNT}`,\r\n                        geometry: geometry,\r\n                        type: geometry.type,\r\n                        activity: value.luActivity,\r\n                        userId: authenRdc.profile.userID,\r\n                        callback: this.handleAddshapeSucess\r\n                    })\r\n\r\n                    break;\r\n                case \"polygon\":\r\n                    mapAction.bindMapCommand(Mapfunction.addShapeAskForBusiness, {\r\n                        url: `${window.CPUDD_QUERY_PLAN_FEATURE_LAYER_POLYGON}`,\r\n                        geometry: geometry,\r\n                        type: geometry.type,\r\n                        activity: value.luActivity,\r\n                        userId: authenRdc.profile.userID,\r\n                        callback: this.handleAddshapeSucess\r\n                    })\r\n\r\n                    break;\r\n                default:\r\n                    break;\r\n            }\r\n        }\r\n    }\r\n\r\n    AlertMessageForBusiness = (statusCode) => {\r\n        const { showAlert } = this.props;\r\n        if (statusCode) {\r\n            showAlert({\r\n                altMsg: \"บันทึกสำเร็จ\",\r\n                altType: 1,\r\n                callbackClose: this.handleCloseAlertMsg,\r\n            })\r\n        } else {\r\n            showAlert({\r\n                altMsg: \"บันทึกไม่สำเร็จ\",\r\n                altType: 1,\r\n                callbackClose: this.handleCloseAlertMsg,\r\n            })\r\n        }\r\n    }\r\n\r\n    handleAddshapeSucess = (callbackParam) => {\r\n        const { setSaveAskForBusiness } = this.props\r\n        if (callbackParam) {\r\n            setSaveAskForBusiness(true) //ส่งไปบอกหน้า AskTheCityPlan ว่ากดบันทึกกิจกรรมที่ขอตรวจสอบแล้ว\r\n            this.AlertMessageForBusiness(true)\r\n        } else {\r\n            this.AlertMessageForBusiness(false)\r\n        }\r\n\r\n\r\n    }\r\n\r\n    handleCloseAlertMsg = () => {\r\n        const { hideAlert } = this.props;\r\n        hideAlert();\r\n    }\r\n\r\n    render() {\r\n        const { handleSubmit, onClickClearResult,\r\n            altType, isShowAlt,\r\n            altTitle, altMsg,\r\n            callbackClose,\r\n            onBackClick\r\n        } = this.props;\r\n        const { luActivity } = this.state\r\n\r\n        luActivity.forEach(itm => {\r\n            itm.id = itm.ID\r\n        })\r\n\r\n        return (\r\n            <Fragment>\r\n                <AskForBusinessView\r\n                    handleSubmit={handleSubmit}\r\n                    onSubmit={this.handleSubmit}\r\n                    luActivity={luActivity}\r\n                    onClickClearResult={onClickClearResult}\r\n                    onBackClick = {onBackClick}\r\n                    // onClickPrintMap = { this.handleClickPrintMap }\r\n                />\r\n                <AlertMessage\r\n                    title={altTitle}\r\n                    text={altMsg}\r\n                    type={altType}\r\n                    showAlert={isShowAlt}\r\n                    btnCloseName=\"ปิด\"\r\n                    onCancel={callbackClose}\r\n                />\r\n            </Fragment>\r\n        )\r\n    }\r\n}\r\n\r\n\r\nconst reduxFormParameter = {\r\n    form: \"AskForBusiness\",\r\n    validate: validateAskForBusiness\r\n};\r\n\r\nconst mapStateToProps = state => ({\r\n    // submitPmrRdc: state.submitPmr,\r\n    authenRdc: state.authen,\r\n    mapRdc: state.map\r\n})\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    mapAction: bindActionCreators(MapAction, dispatch)\r\n    // authenAction: bindActionCreators(AuthenAction, dispatch),\r\n    // SatisfactionAndStatisticAction: bindActionCreators(SatisfactionAndStatisticAction, dispatch)\r\n});\r\n\r\nconst enhance = compose(\r\n    connect(\r\n        mapStateToProps,\r\n        mapDispatchToProps,\r\n    ),\r\n    reduxForm(reduxFormParameter)\r\n)\r\n\r\nexport default WithAlertMessage(enhance(AskForBusiness));\r\n\r\n// export default reduxForm(reduxFormParameter)(AskForBusiness)\r\n","// import React from 'react'\r\n// import { withStyles } from '@material-ui/core';\r\n// import { Scrollbars } from 'react-custom-scrollbars';\r\n// import ArrowLeft from '@material-ui/icons/KeyboardArrowLeft';\r\n// import ArrowRight from '@material-ui/icons/KeyboardArrowRight';\r\n// import AppBar from '@material-ui/core/AppBar';\r\n// import Toolbar from '@material-ui/core/Toolbar';\r\n// import IconButton from '@material-ui/core/IconButton';\r\n\r\n// const SubPanelLayoutView = ({\r\n//     isOpen,\r\n//     classes,\r\n//     children,\r\n//     title,\r\n//     onHideClick,\r\n//     onHideClickModile,\r\n//     subPanelTitle,\r\n//     onBackClick\r\n// }) => {\r\n//     const getArrow = () => {\r\n//         return (isOpen && <ArrowLeft className={classes.arrowIcon} />) || <ArrowRight className={classes.arrowIcon} />\r\n//     }\r\n\r\n//     return (\r\n//         <div className={`${isOpen ? classes.root : classes.rootHide}`} >\r\n//             {/* ///WEB/// */}\r\n//             <div className={classes.rootWeb}>\r\n//                 <div className={classes.btnClose} onClick={onHideClick} >\r\n//                     {getArrow()}\r\n//                 </div>\r\n//                 <div>\r\n//                     <AppBar position=\"relative\" className={classes.headerAppbar}>\r\n//                         <Toolbar className={classes.headerToobar}>\r\n//                             <IconButton\r\n//                             className={classes.arrowIconButtonToolbar}\r\n//                             onClick={onBackClick}\r\n//                             style={(onBackClick)?{display:\"block\"}:{display:\"none\"}}\r\n//                             >\r\n//                             <ArrowLeft className={classes.arrowIconToolbar} />\r\n//                             </IconButton>\r\n//                             <div className={classes.headerText}>{subPanelTitle}</div>\r\n//                         </Toolbar>\r\n//                     </AppBar>\r\n//                 </div>\r\n//                 <Scrollbars style={{ height: '100%' }} autoHeightMax={`calc(100vh - 150px)`} autoHeight>\r\n//                         {children}\r\n//                 </Scrollbars>\r\n//             </div>\r\n\r\n//                 {/* /////MObile */}\r\n//             <div className={classes.rootMobile}>\r\n//                 <AppBar position=\"relative\" className={classes.headerAppbar}>\r\n//                     <Toolbar className={classes.headerToobar}>\r\n//                         <IconButton className={classes.arrowIconButtonToolbar} onClick={onHideClickModile}>\r\n//                             <ArrowLeft className={classes.arrowIconToolbar} />\r\n//                         </IconButton>\r\n//                         <div className={classes.headerText}>\r\n//                             {title}\r\n//                         </div>\r\n//                     </Toolbar>\r\n//                 </AppBar>\r\n\r\n//                 <Scrollbars style={{ height: '100%' }} autoHeightMax={`calc(100vh - 170px)`} autoHeight>\r\n//                         {children}\r\n//                 </Scrollbars>\r\n//             </div>\r\n//         </div >\r\n//     )\r\n// }\r\n\r\n// export default withStyles(theme => ({\r\n//     root: {\r\n//         transition: 'transform 1s ease',\r\n//         height: '100%',\r\n//         width: '400px',\r\n//         // minWidth: '400px',\r\n//         minHeight: ' 400px',\r\n//         maxHeight: 'calc(100% - 70px)',\r\n//         backgroundColor: theme.mainTheme.color2,\r\n//         zIndex: theme.zIndex.drawer + 1,\r\n//         position: 'fixed',\r\n//         left: '350px',\r\n//         top: '70px',\r\n//         fontSize:theme.textSize.subtitleHeader,\r\n//         // bottom:\"480px\",\r\n//         boxShadow: \"2px 1px 5px 0px rgba(0,0,0,0.75)\",\r\n//         [theme.breakpoints.down('sm')]: {\r\n//             height: 'calc(100% - 124px)',\r\n//             width: '100%',\r\n//             top: '70px',\r\n//             left: '0px',\r\n//         }\r\n//     },\r\n//     rootHide: {\r\n//         transform: 'translateX(calc(-100% - 1000px))',\r\n//         // transition: 'transform 5s ease',\r\n//         height: 'auto',\r\n//         width: 'auto',\r\n//         minWidth: '400px',\r\n//         minHeight: ' 400px',\r\n//         maxHeight: 'calc(100% - 95px)',\r\n//         backgroundColor: theme.mainTheme.color2,\r\n//         zIndex: theme.zIndex.drawer + 1,\r\n//         position: 'fixed',\r\n//         left: '350px',\r\n//         top: '0px',      \r\n//     },\r\n//     rootWeb: {\r\n//         [theme.breakpoints.down('sm')]: {\r\n//             display: 'none'\r\n//         }\r\n//     },\r\n//     rootMobile: {\r\n//         display: 'none',\r\n//         [theme.breakpoints.down('sm')]: {\r\n//             display: 'block'\r\n//         }\r\n//     },\r\n//     headerAppbar: {\r\n//         height: '45px',\r\n//         lineHeight: '45px',\r\n//         [theme.breakpoints.down('sm')]: {\r\n//             fontSize: '13px',\r\n//         },\r\n//         fontSize: theme.textSize.normal,\r\n//         textAlign: 'center',\r\n//     },\r\n//     headerToobar: {\r\n//         minHeight: '100%'\r\n//     },\r\n//     btnClose: {\r\n//         position: 'absolute',\r\n//         width: '25px',\r\n//         height: '45px',\r\n//         background: theme.mainTheme.color2,\r\n//         zIndex: 1,\r\n//         right: '-28px',\r\n//         boxShadow: '3px 3px 10px 0px rgba(0,0,0,0.63)',\r\n//         cursor: 'pointer',\r\n//         '&:hover': {\r\n//             background: theme.mainTheme.color3,\r\n//             color: theme.mainTheme.color2\r\n//         },\r\n\r\n//         [theme.breakpoints.down('sm')]: {\r\n//             display: 'none',\r\n//         }\r\n//     },\r\n//     headerText: {\r\n//         width: '100%',\r\n//         paddingRight: '18px',\r\n\r\n//         [theme.breakpoints.down('sm')]: {\r\n//             paddingRight: 0\r\n//         }\r\n//     },\r\n//     arrowIconToolbar: {\r\n//         position: 'absolute',\r\n//         fontSize: '32px',\r\n//     },\r\n//     arrowIconButtonToolbar: {\r\n//         padding: '20px',\r\n//         left: '-14px',\r\n//     },\r\n//     arrowIcon: {\r\n//         fontSize: '32px',\r\n//         position: 'absolute',\r\n//         right: '-4px',\r\n//         top: '7px',\r\n//         [theme.breakpoints.down('sm')]: {\r\n//             display: 'none',\r\n//         }\r\n//     }\r\n// }))(SubPanelLayoutView);\r\n\r\nimport React from 'react'\r\nimport { withStyles } from '@material-ui/core';\r\n// import { Scrollbars } from 'react-custom-scrollbars';\r\nimport ArrowLeft from '@material-ui/icons/KeyboardArrowLeft';\r\nimport ArrowRight from '@material-ui/icons/KeyboardArrowRight';\r\nimport AppBar from '@material-ui/core/AppBar';\r\nimport Toolbar from '@material-ui/core/Toolbar';\r\nimport IconButton from '@material-ui/core/IconButton';\r\n\r\nconst SubPanelLayoutView = ({\r\n    isOpen,\r\n    classes,\r\n    children,\r\n    title,\r\n    onHideClick,\r\n    onHideClickModile,\r\n    subPanelTitle,\r\n    onBackClick,\r\n    onHideClickPanel\r\n}) => {\r\n    \r\n    const getArrow = () => {\r\n        return (isOpen && <ArrowLeft className={classes.arrowIcon} />) || <ArrowRight className={classes.arrowIcon} />\r\n    }\r\n\r\n    return (\r\n        <div className={`${isOpen ? classes.root : classes.rootHide}`} >\r\n            {/* ///WEB/// */}\r\n            <div className={classes.rootWeb}>\r\n                <div className={classes.btnClose} onClick={onHideClick} >\r\n                    {getArrow()}\r\n                </div>\r\n                <div>\r\n                    <AppBar position=\"relative\" className={classes.headerAppbar}>\r\n                        <Toolbar className={classes.headerToobar}>\r\n                            <IconButton\r\n                                className={classes.arrowIconButtonToolbar}\r\n                                onClick={onBackClick}\r\n                                style={(onBackClick) ? { display: \"block\" } : { display: \"none\" }}\r\n                            >\r\n                                <ArrowLeft className={classes.arrowIconToolbar} />\r\n                            </IconButton>\r\n                            {onHideClickPanel && <IconButton className={classes.arrowIconButtonToolbar} onClick={onHideClickPanel}>\r\n                                <ArrowLeft className={classes.arrowIconToolbar} />\r\n                            </IconButton>}\r\n                            <div className={classes.headerTextWeb}>{subPanelTitle}</div>\r\n                        </Toolbar>\r\n                    </AppBar>\r\n                </div>\r\n                <div style={{ height: 'calc(100vh - 115px)' }}>\r\n                    {children}\r\n                </div>\r\n            </div>\r\n\r\n            {/* /////MObile */}\r\n            <div className={classes.rootMobile}>\r\n                <AppBar position=\"relative\" className={classes.headerAppbar}>\r\n                    <Toolbar className={classes.headerToobar}>\r\n                        <IconButton className={classes.arrowIconButtonToolbar} onClick={onHideClickModile}>\r\n                            <ArrowLeft className={classes.arrowIconToolbar} />\r\n                        </IconButton>\r\n                        <div className={classes.headerText}>\r\n                            {title}\r\n                        </div>\r\n                    </Toolbar>\r\n                </AppBar>\r\n\r\n                <div style={{ height: 'calc(100vh - 170px)' }}>\r\n                    {children}\r\n                </div>\r\n            </div>\r\n        </div >\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        transition: 'transform 1s ease',\r\n        height: '100%',\r\n        width: '350px',\r\n        // minWidth: '400px',\r\n        minHeight: ' 400px',\r\n        maxHeight: 'calc(100% - 70px)',\r\n        backgroundColor: theme.mainTheme.color2,\r\n        zIndex: theme.zIndex.drawer + 1,\r\n        position: 'fixed',\r\n        // left: '350px',\r\n        top: '70px',\r\n        fontSize: theme.textSize.subtitleHeader,\r\n        // bottom:\"480px\",\r\n        boxShadow: \"2px 1px 5px 0px rgba(0,0,0,0.75)\",\r\n        [theme.breakpoints.down('sm')]: {\r\n            height: 'calc(100% - 124px)',\r\n            width: '100%',\r\n            top: '70px',\r\n            left: '0px',\r\n        }\r\n    },\r\n    rootHide: {\r\n        transform: 'translateX(calc(-100% - 1000px))',\r\n        // transition: 'transform 5s ease',\r\n        height: 'auto',\r\n        width: 'auto',\r\n        minWidth: '400px',\r\n        minHeight: ' 400px',\r\n        maxHeight: 'calc(100% - 95px)',\r\n        backgroundColor: theme.mainTheme.color2,\r\n        zIndex: theme.zIndex.drawer + 1,\r\n        position: 'fixed',\r\n        left: '350px',\r\n        top: '0px',\r\n    },\r\n    rootWeb: {\r\n        [theme.breakpoints.down('sm')]: {\r\n            display: 'none'\r\n        }\r\n    },\r\n    rootMobile: {\r\n        display: 'none',\r\n        [theme.breakpoints.down('sm')]: {\r\n            display: 'block'\r\n        }\r\n    },\r\n    headerAppbar: {\r\n        height: '45px',\r\n        lineHeight: '45px',\r\n        [theme.breakpoints.down('sm')]: {\r\n            fontSize: '13px',\r\n        },\r\n        fontSize: theme.textSize.normal,\r\n        textAlign: 'center',\r\n    },\r\n    headerToobar: {\r\n        minHeight: '100%'\r\n    },\r\n    btnClose: {\r\n        position: 'absolute',\r\n        width: '25px',\r\n        height: '45px',\r\n        background: theme.mainTheme.color2,\r\n        zIndex: 1,\r\n        right: '-28px',\r\n        boxShadow: '3px 3px 10px 0px rgba(0,0,0,0.63)',\r\n        cursor: 'pointer',\r\n        '&:hover': {\r\n            background: theme.mainTheme.color3,\r\n            color: theme.mainTheme.color2\r\n        },\r\n\r\n        [theme.breakpoints.down('sm')]: {\r\n            display: 'none',\r\n        }\r\n    },\r\n    headerTextWeb: {\r\n        width: '100%',\r\n        paddingRight: '0px',\r\n        fontSize: '14px'\r\n    },\r\n    headerText: {\r\n        width: '100%',\r\n        paddingRight: '18px',\r\n\r\n        [theme.breakpoints.down('sm')]: {\r\n            paddingRight: 0\r\n        }\r\n    },\r\n    arrowIconToolbar: {\r\n        position: 'absolute',\r\n        fontSize: '32px',\r\n    },\r\n    arrowIconButtonToolbar: {\r\n        // padding: '20px',\r\n        // left: '-14px',\r\n        padding: \"0px\",\r\n        position: 'relative',\r\n        left: '0%'\r\n    },\r\n    arrowIcon: {\r\n        fontSize: '32px',\r\n        position: 'absolute',\r\n        right: '-4px',\r\n        top: '7px',\r\n        [theme.breakpoints.down('sm')]: {\r\n            display: 'none',\r\n        }\r\n    }\r\n}))(SubPanelLayoutView);\r\n","import React, { Component } from 'react'\r\nimport { bindActionCreators } from \"redux\";\r\nimport { connect } from \"react-redux\";\r\nimport withWidth from '@material-ui/core/withWidth';\r\nimport * as MenuAction from '../../../Actions/Web/MenuAction';\r\nimport SubPanelLayoutView from '../../../Presentationals/Web/Panel/SubPanelLayoutView';\r\n\r\nexport class SubPanelLayout extends Component {\r\n\tconstructor(props) {\r\n\t\tsuper(props)\r\n\t\tthis.state = {\r\n\t\t\tisSelected: null,\r\n\t\t}\r\n\t}\r\n\r\n\thandleHideClick = () => {\r\n\t\tconst { menuRdc, menuAction } = this.props\r\n\t\tif (menuRdc.Panel) {\r\n\t\t\tmenuAction.closeMenuPanel()\r\n\t\t} else {\r\n\t\t\tmenuAction.openMenuPanel()\r\n\t\t}\r\n\t}\r\n\r\n\trender() {\r\n\t\tconst { isOpen, children, onHideClickModile, menuRdc, width, title, subPanelTitle, onBackClick, onHideClickPanel } = this.props\r\n\r\n\t\treturn (\r\n\t\t\t<SubPanelLayoutView\r\n\t\t\t\tisOpen={width === 'sm' || width === 'xs' ? isOpen : menuRdc.Panel}\r\n\t\t\t\tchildren={children}\r\n\t\t\t\ttitle={title}\r\n\t\t\t\tonHideClickModile={onHideClickModile}\r\n\t\t\t\tonHideClickPanel={onHideClickPanel}\r\n\t\t\t\tonHideClick={this.handleHideClick}\r\n\t\t\t\tsubPanelTitle={subPanelTitle}\r\n\t\t\t\tonBackClick={onBackClick}\r\n\t\t\t/>\r\n\t\t)\r\n\t}\r\n}\r\n\r\nconst mapStateToProps = state => ({\r\n\tmenuRdc: state.menu\r\n});\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n\tmenuAction: bindActionCreators(MenuAction, dispatch)\r\n});\r\n\r\nexport default connect(\r\n\tmapStateToProps,\r\n\tmapDispatchToProps,\r\n)(withWidth()(SubPanelLayout));\r\n\r\n\r\n\r\n\r\n\r\n","import React, { Component } from 'react'\r\nimport PropTypes from 'prop-types';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Snackbar from '@material-ui/core/Snackbar';\r\nimport IconButton from '@material-ui/core/IconButton';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\n// import Button from '@material-ui/core/Button';\r\n\r\nconst styles = theme => ({\r\n    close: {\r\n      padding: theme.spacing.unit / 2,\r\n    },\r\n    itemSnackBar: {\r\n      bottom: '53px'\r\n    },\r\n    // MsgClass: {\r\n    //   [theme.breakpoints.down('sm')]: {\r\n    //     position: 'relative',\r\n        \r\n    //   }\r\n    // }\r\n  });\r\n  \r\nexport class SnackBarView extends Component {\r\n\r\n  render() {\r\n    const { classes,onClose,isShow,message } = this.props;\r\n    return (\r\n      <div>\r\n        <Snackbar\r\n          anchorOrigin={{\r\n            vertical: 'bottom',\r\n            horizontal: 'center',\r\n          }}\r\n          open={isShow}\r\n          autoHideDuration={5000}\r\n          onClose={onClose}\r\n          ContentProps={{\r\n            'aria-describedby': 'message-id',\r\n          }}\r\n          className={classes.itemSnackBar}\r\n          message={<span id=\"message-id\" className={classes.MsgClass}>{message}</span>}\r\n          action={[\r\n            // <Button key=\"undo\" color=\"secondary\" size=\"small\" onClick={onClose}>\r\n            //   UNDO\r\n            // </Button>,\r\n            <IconButton\r\n              key=\"close\"\r\n              aria-label=\"Close\"\r\n              color=\"inherit\"\r\n              className={classes.close}\r\n              onClick={onClose}\r\n            >\r\n              <CloseIcon />\r\n            </IconButton>,\r\n          ]}\r\n        />\r\n      </div>\r\n    )\r\n  }\r\n}\r\nSnackBarView.propTypes = {\r\n  classes: PropTypes.object.isRequired,\r\n};\r\nexport default withStyles(styles)(SnackBarView)\r\n","import React, { Component } from 'react'\r\nimport SnackBarView from '../Presentationals/SnackBarView'\r\nexport class SnackBar extends Component {\r\n  \r\n  render() {\r\n      const {onHandleSnackbarClose,isShow,message} = this.props\r\n      \r\n    return (\r\n      <SnackBarView \r\n            isShow={isShow}\r\n            onClose={onHandleSnackbarClose}\r\n            message={message}\r\n      />\r\n    )\r\n  }\r\n}\r\n\r\nexport default SnackBar\r\n","import React, { Component, Fragment } from \"react\";\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\nimport { Scrollbars } from \"react-custom-scrollbars\";\r\n// import AppBar from \"@material-ui/core/AppBar\";\r\n// import Toolbar from \"@material-ui/core/Toolbar\";\r\n// import IconButton from \"@material-ui/core/IconButton\";\r\n// import ArrowLeft from \"@material-ui/icons/KeyboardArrowLeft\";\r\nimport Grid from \"@material-ui/core/Grid\";\r\nimport Divider from \"@material-ui/core/Divider\";\r\nimport Snackbar from '../../../../../../../Controls/Containers/SnackBar'\r\n\r\nexport class TermsOfUseView extends Component {\r\n  \r\n  getCommandMentItem = (classes, data, onValueClick,noDataMessage) => {\r\n    if(noDataMessage){\r\n      return <div className={classes.detailContainer}>\r\n                  <div className={classes.detailContent}>{noDataMessage}</div>\r\n              </div>\r\n    }else{\r\n      return data.map((itm, index) => {\r\n        return (\r\n          <Fragment key={`TermsOfUse_${index}`}>\r\n            <div className={classes.detailContainer}>\r\n              <div className={classes.detailContent}>{itm.name}</div>\r\n              <div className={classes.detailContentValue} >\r\n              <span \r\n                onClick={onValueClick(itm)}  \r\n                style={ itm.condition !== null ?{color: \"blue\", cursor: \"pointer\", textDecoration: \"underline\"}:{cursor: \"default\"}}>\r\n                {itm.value}\r\n                </span>\r\n              </div>\r\n            </div>\r\n            <div className={classes.borderBottom}>\r\n              <Divider/>\r\n            </div>\r\n            \r\n          </Fragment>\r\n        );\r\n      });\r\n    }\r\n      \r\n    \r\n    \r\n\r\n  };\r\n\r\n  render() {\r\n    const {\r\n      classes,\r\n      commandMentData,\r\n      termsOfUseId,\r\n      onValueClick,\r\n      isShowSnackbar,\r\n      snackbarMessage,\r\n      onHandleSnackbarClose,\r\n      noDataMessage\r\n    } = this.props;\r\n    \r\n    const commandMentItem = this.getCommandMentItem(classes, commandMentData,onValueClick,noDataMessage);\r\n    return (\r\n    \r\n      <Grid container className={classes.root}>\r\n          <div className={classes.content_header} >\r\n            <div className={classes.content_header_alignment} >\r\n              <div className={classes.content_title} >\r\n                <div className={classes.content_left_title} >การใช้ประโยชน์ที่ดินประเภท { termsOfUseId } </div>\r\n\r\n                <div className={classes.content_right_title} >เงื่อนไข</div>\r\n              </div>\r\n            </div>\r\n          </div>\r\n        <div className={classes.content} >\r\n          <Scrollbars >\r\n            {commandMentItem}\r\n          </Scrollbars>\r\n        </div>\r\n        <div>\r\n          <Snackbar   isShow={isShowSnackbar}\r\n                      message={snackbarMessage}\r\n                      onHandleSnackbarClose={onHandleSnackbarClose}/>\r\n        </div>\r\n\r\n      </Grid>\r\n    );\r\n  }\r\n}\r\nexport default withStyles(theme => ({\r\n  root: {\r\n    display: \"flex\",\r\n    width: \"100%\",\r\n    // height: \"calc(100% - 25px)\",\r\n    [theme.breakpoints.down(\"sm\")]: {\r\n      width: \"100%\"\r\n    }\r\n  },\r\n  content_header:{\r\n    width: \"100%\", height: \"40px\", backgroundColor: \"#eaeaee\",display: \"table\"\r\n  },\r\n  content_header_alignment:{\r\n    width: \"100%\",display: \"table-cell\",verticalAlign: \"middle\"\r\n  },\r\n  content_title:{display:\"flex\"},\r\n  content_left_title:{width:\"85%\", paddingLeft: \"5px\"},\r\n  content_right_title:{\r\n    width:\"15%\",\r\n    textAlign: \"center\"\r\n  },\r\n  content: {\r\n    display: \"flex\",\r\n    flexDirection: \"column\",\r\n    padding: \"5px\",\r\n    width: \"100%\",\r\n    top: \"80px\",\r\n    position: \"absolute\",\r\n    height: \"calc(100% - 90px)\"\r\n  },\r\n  header_appbar: {\r\n    height: \"45px\",\r\n    lineHeight: \"45px\"\r\n    // fontSize: theme.textSize.title,\r\n    // textAlign: \"center\",\r\n    // [theme.breakpoints.down(\"sm\")]: {\r\n    //   display: \"none\"\r\n    // }\r\n  },\r\n  header_toobar: {\r\n    minHeight: \"100%\"\r\n  },\r\n  detailContainer: {\r\n    fontSize:\"14px\",\r\n    display: \"flex\",\r\n    padding: \"10px\"\r\n  },\r\n  detailContent: {\r\n    width: \"85%\"\r\n  },\r\n  detailContentValue: {\r\n    width: \"15%\",\r\n    textAlign: \"center\",\r\n    color: \"blue\"\r\n  },\r\n  borderBottom:{\r\n    marginLeft: \"10px\",\r\n    marginRight:\"10px\"\r\n  }\r\n}))(TermsOfUseView);\r\n","import React, { Component } from \"react\";\r\nimport TermsOfUseView from \"../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/AskTheCityPlan/Detail/TermsOfUseView\";\r\nimport { fetchGet_ } from '../../../../../../../Utilities/ServiceUtils';\r\n\r\nexport default class TermsOfUse extends Component {\r\n\r\n\tconstructor() {\r\n\t\tsuper()\r\n\t\tthis.state = {\r\n\t\t\tcommandMentData: [],\r\n\t\t\tisShowSnackbar: false,\r\n\t\t\tsnackbarMessage: null,\r\n\t\t\tnoDataMessage: null\r\n\t\t}\r\n\t}\r\n\r\n\tcomponentDidMount() {\r\n\t\tconst { termsOfUseId } = this.props\r\n\t\tthis.getCommandMent(termsOfUseId)\r\n\t}\r\n\tgetCommandMent = (termsOfUseId) => {\r\n\t\tfetchGet_(`${process.env.REACT_APP_GET_COMMANDMENT}?zone=${termsOfUseId}`)\r\n\t\t\t.then(res => {\r\n\t\t\t\tif (!res.ok) {\r\n\t\t\t\t\tthrow res.status;\r\n\t\t\t\t}\r\n\t\t\t\treturn res.json();\r\n\t\t\t})\r\n\t\t\t.then(result => {\r\n\t\t\t\t// console.log(\"result>>>\", result)\r\n\t\t\t\tif (result) { //มี data\r\n\t\t\t\t\tthis.setState({\r\n\t\t\t\t\t\tcommandMentData: result.commandMent\r\n\t\t\t\t\t})\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.setState({\r\n\t\t\t\t\t\tnoDataMessage: \"ไม่พบข้อมูล\"\r\n\t\t\t\t\t})\r\n\t\t\t\t}\r\n\r\n\t\t\t})\r\n\t\t\t.catch(ex => {\r\n\t\t\t\tconsole.log('ex getCommandMent', ex)\r\n\t\t\t})\r\n\t}\r\n\r\n\thandleValueClick = (value) => e => { //เปิด Snackbar\r\n\t\t//console.log(value)\r\n\t\tif (value.condition) {\r\n\t\t\tthis.setState({\r\n\t\t\t\tisShowSnackbar: true,\r\n\t\t\t\tsnackbarMessage: value.value + \" = \" + value.condition\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t}\r\n\thandleSnackbarClose = () => { //ปิด Snackbar\r\n\t\tthis.setState({\r\n\t\t\tisShowSnackbar: false,\r\n\t\t\tsnackbarMessage: null\r\n\t\t})\r\n\t}\r\n\r\n\trender() {\r\n\t\tconst { commandMentData, isShowSnackbar, snackbarMessage, noDataMessage } = this.state;\r\n\t\tconst { termsOfUseId } = this.props;\r\n\t\t\r\n\t\treturn <TermsOfUseView\r\n\t\t\tcommandMentData={commandMentData}\r\n\t\t\ttermsOfUseId={termsOfUseId}\r\n\t\t\tonValueClick={this.handleValueClick}\r\n\t\t\tisShowSnackbar={isShowSnackbar}\r\n\t\t\tsnackbarMessage={snackbarMessage}\r\n\t\t\tonHandleSnackbarClose={this.handleSnackbarClose}\r\n\t\t\tnoDataMessage={noDataMessage}\r\n\t\t/>;\r\n\t}\r\n}\r\n","import React, { Component, Fragment } from \"react\";\r\nimport { Scrollbars } from \"react-custom-scrollbars\";\r\n\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\nimport Grid from \"@material-ui/core/Grid\";\r\nimport Divider from \"@material-ui/core/Divider\";\r\nimport Collapse from \"@material-ui/core/Collapse\";\r\nimport ExpandLess from \"@material-ui/icons/ExpandLess\";\r\nimport ExpandMore from \"@material-ui/icons/ExpandMore\";\r\n\r\nimport Button from \"../../../../../../../Controls/Containers/Button\";\r\n\r\nclass LandusePlanView extends Component {\r\n    getLandusePlanItem = (\r\n        data,\r\n        classes,\r\n        handleClick,\r\n        landUseDataLength,\r\n        isSelected,\r\n        onClickPDF,\r\n        onClickTermsOfUse,\r\n        onClickToExtent,\r\n        onClickDownloadReqPDF,\r\n        onClickDrawGraphic\r\n    ) => {\r\n        return data.map((itm, index) => {\r\n            return (\r\n                <Fragment key={`LandusePlan_${index}`}>\r\n                    <div\r\n                        onClick={\r\n                            landUseDataLength > 1 ? handleClick(index) : null\r\n                        }\r\n                        className={classes.content}\r\n                        style={\r\n                            landUseDataLength > 1\r\n                                ? { cursor: \"pointer\" }\r\n                                : { cursor: \"default\" }\r\n                        }>\r\n                        <div style={{ width: \"99%\" }}>\r\n                            <div>\r\n                                <div className={classes.detailContainer}>\r\n                                    <div className={classes.firstDetail}>\r\n                                        พื้นที่การใช้ประโยชน์ที่ดิน\r\n                                    </div>\r\n                                    <div className={classes.firstDetail}>\r\n                                        {itm.feature.attributes.LUP_USE}\r\n                                    </div>\r\n                                </div>\r\n                                <div className={classes.detailContainer}>\r\n                                    <div\r\n                                        className={classes.firstDetail}\r\n                                        style={{ display: \"flex\" }}>\r\n                                        <div style={{ width: \"60%\" }}>\r\n                                            บริเวณ\r\n                                        </div>\r\n                                        <div style={{ width: \"40%\" }}>\r\n                                            {itm.feature.attributes.LUP_ZONE}\r\n                                        </div>\r\n                                    </div>\r\n                                    <div\r\n                                        className={classes.firstDetail}\r\n                                        style={{ display: \"flex\" }}>\r\n                                        <div style={{ width: \"60%\" }}>\r\n                                            หมายเลขบริเวณ\r\n                                        </div>\r\n                                        <div\r\n                                            style={{\r\n                                                width: \"40%\",\r\n                                                color: \"blue\",\r\n                                                cursor: \"pointer\",\r\n                                                textDecoration: \"underline\",\r\n                                            }}\r\n                                            onClick={onClickDrawGraphic(\r\n                                                itm,\r\n                                                itm.feature.attributes\r\n                                                    .LUP_SUBZONE\r\n                                            )}>\r\n                                            {itm.feature.attributes.LUP_SUBZONE}\r\n                                        </div>\r\n                                    </div>\r\n                                </div>\r\n                            </div>\r\n                            <Collapse\r\n                                in={\r\n                                    isSelected == index ||\r\n                                    landUseDataLength <= 1\r\n                                        ? true\r\n                                        : false\r\n                                }\r\n                                timeout=\"auto\"\r\n                                unmountOnExit>\r\n                                <div className={classes.detailContainer}>\r\n                                    <div style={{ width: \"80%\" }}>\r\n                                        อัตราส่วนอาคารต่อพื้นที่ดิน(FAR)\r\n                                    </div>\r\n                                    <div style={{ width: \"20%\" }}>\r\n                                        {itm.feature.attributes.LUP_FAR}\r\n                                    </div>\r\n                                </div>\r\n\r\n                                <div className={classes.detailContainer}>\r\n                                    <div style={{ width: \"80%\" }}>\r\n                                        อัตราส่วนพื้นที่ว่างต่อพื้นที่อาคารรวม(OSR)\r\n                                    </div>\r\n                                    <div style={{ width: \"20%\" }}>\r\n                                        {itm.feature.attributes.LUP_OSR}\r\n                                    </div>\r\n                                </div>\r\n                            </Collapse>\r\n                        </div>\r\n\r\n                        <div\r\n                            style={\r\n                                landUseDataLength > 1\r\n                                    ? { cursor: \"pointer\" }\r\n                                    : { display: \"none\" }\r\n                            }>\r\n                            {isSelected == index || landUseDataLength <= 1 ? (\r\n                                <ExpandLess />\r\n                            ) : (\r\n                                <ExpandMore />\r\n                            )}\r\n                        </div>\r\n                    </div>\r\n\r\n                    <Collapse\r\n                        in={\r\n                            isSelected == index || landUseDataLength <= 1\r\n                                ? true\r\n                                : false\r\n                        }\r\n                        timeout=\"auto\"\r\n                        unmountOnExit>\r\n                        <div className={classes.buttonDiv}>\r\n                            <div\r\n                                style={{\r\n                                    paddingRight: \"10px\",\r\n                                    textSize: \"5px\",\r\n                                }}>\r\n                                <Button\r\n                                    className={classes.buttonStyle}\r\n                                    label={\"ข้อกำหนดฉบับย่อ\"}\r\n                                    onClick={onClickTermsOfUse(itm)}\r\n                                />\r\n                            </div>\r\n                            <div style={{ paddingRight: \"10px\" }}>\r\n                                <Button\r\n                                    className={classes.buttonStyle}\r\n                                    label={\"ข้อกำหนดฉบับเต็ม\"}\r\n                                    onClick={onClickDownloadReqPDF(itm)}\r\n                                />\r\n                            </div>\r\n                            <div>\r\n                                <Button\r\n                                    className={classes.buttonStyle}\r\n                                    label={\"ตารางข้อกำหนด\"}\r\n                                    onClick={onClickPDF}\r\n                                />\r\n                            </div>\r\n                        </div>\r\n                    </Collapse>\r\n\r\n                    <div style={{ margin: \" 2px\" }}>\r\n                        <Divider />\r\n                    </div>\r\n                </Fragment>\r\n            );\r\n        });\r\n    };\r\n\r\n    getTrainItem = (data, classes, onClickDrawGraphic) => {\r\n        return data.map((itm, index) => {\r\n            return (\r\n                <Fragment key={`LandusePlan_${index}`}>\r\n                    <div style={{ padding: \"5px\", display: \"flex\" }}>\r\n                        <div style={{ width: \"25%\" }}>\r\n                            {itm.feature.attributes.STA_TYPE}\r\n                        </div>\r\n                        <div\r\n                            onClick={onClickDrawGraphic(\r\n                                itm,\r\n                                itm.feature.attributes.STA_NAME\r\n                            )}\r\n                            style={{\r\n                                color: \"blue\",\r\n                                cursor: \"pointer\",\r\n                                textDecoration: \"underline\",\r\n                            }}>\r\n                            {itm.feature.attributes.STA_NAME}\r\n                        </div>\r\n                    </div>\r\n                    <div style={{ margin: \" 2px\" }}>\r\n                        <Divider />\r\n                    </div>\r\n                </Fragment>\r\n            );\r\n        });\r\n    };\r\n    getCommunicationAndtransportationItem = (\r\n        data,\r\n        classes,\r\n        onClickDrawGraphic\r\n    ) => {\r\n        return data.map((itm, index) => {\r\n            return (\r\n                <Fragment key={`LandusePlan_${index}`}>\r\n                    <div className={classes.communicationAndtransportation}>\r\n                        <div style={{ width: \"50%\" }}>โครงการหลัก</div>\r\n                        <div>{itm.feature.attributes.TRANSP_PRJ_TYPE}</div>\r\n                    </div>\r\n                    <div className={classes.communicationAndtransportation}>\r\n                        <div style={{ width: \"50%\" }}>\r\n                            แบบหรือโครงการคมนาคมขนส่ง\r\n                        </div>\r\n                        <div\r\n                            onClick={onClickDrawGraphic(\r\n                                itm,\r\n                                itm.feature.attributes.TRANSP_PRJ\r\n                            )}\r\n                            style={{\r\n                                color: \"blue\",\r\n                                cursor: \"pointer\",\r\n                                textDecoration: \"underline\",\r\n                            }}>\r\n                            {itm.feature.attributes.TRANSP_PRJ}\r\n                        </div>\r\n                    </div>\r\n                    <div className={classes.communicationAndtransportation}>\r\n                        <div style={{ width: \"50%\" }}>ความกว้างของเขตทาง</div>\r\n                        <div>\r\n                            {itm.feature.attributes.TRANSP_WIDTH\r\n                                ? itm.feature.attributes.TRANSP_WIDTH\r\n                                : \"-\"}{\" \"}\r\n                            เมตร\r\n                        </div>\r\n                    </div>\r\n\r\n                    <div>\r\n                        <Divider />\r\n                    </div>\r\n                </Fragment>\r\n            );\r\n        });\r\n    };\r\n\r\n    render() {\r\n        const {\r\n            classes,\r\n            onListClick,\r\n            onClickPDF,\r\n            onClickTermsOfUse,\r\n            onClickDownloadReqPDF,\r\n            isSelected,\r\n            landUseData,\r\n            communicationAndtransportationData,\r\n            trainData,\r\n            onClickToExtent,\r\n            onClickDrawGraphic,\r\n            shortcut,\r\n        } = this.props;\r\n        // const mockData = [{ useArea: \"พาณิชยกรรม\" }, { useArea: \"พาณิชยกรรม2\" }];\r\n        const landUseDataLength = landUseData.length;\r\n        const landusePlanItem = this.getLandusePlanItem(\r\n            landUseData,\r\n            classes,\r\n            onListClick,\r\n            landUseDataLength,\r\n            isSelected,\r\n            onClickPDF,\r\n            onClickTermsOfUse,\r\n            onClickToExtent,\r\n            onClickDownloadReqPDF,\r\n            onClickDrawGraphic\r\n        );\r\n        const communicationAndtransportationItem = this.getCommunicationAndtransportationItem(\r\n            communicationAndtransportationData,\r\n            classes,\r\n            onClickDrawGraphic\r\n        );\r\n        const trainItem = this.getTrainItem(\r\n            trainData,\r\n            classes,\r\n            onClickDrawGraphic\r\n        );\r\n\r\n        return (\r\n            <Grid\r\n                container\r\n                className={shortcut ? classes.rootMobile : classes.root}>\r\n                <Scrollbars autoHide={true}>\r\n                    <div className={classes.contentContainer}>\r\n                        {landusePlanItem}\r\n                        {communicationAndtransportationItem}\r\n                        <div\r\n                            style={\r\n                                trainData.length > 0\r\n                                    ? { padding: \"5px\", display: \"flex\" }\r\n                                    : { display: \"none\" }\r\n                            }>\r\n                            <div style={{ width: \"25%\" }}>อยู่ในระยะ</div>\r\n                            <div>{window.TRAIN_RANGE}</div>\r\n                        </div>\r\n                        {trainItem}\r\n                    </div>\r\n                </Scrollbars>\r\n            </Grid>\r\n        );\r\n    }\r\n}\r\n\r\nexport default withStyles((theme) => ({\r\n    root: {\r\n        display: \"flex\",\r\n        width: \"100%\",\r\n        height: \"100%\",\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            width: \"100%\",\r\n        },\r\n    },\r\n    rootMobile: {\r\n        display: \"flex\",\r\n        width: \"100%\",\r\n        \"& > div > div\": {\r\n            position: \"unset !important\",\r\n            overflow: \"unset !important\",\r\n        },\r\n    },\r\n    buttonStyle: {\r\n        fontSize: \"12px\",\r\n    },\r\n    communicationAndtransportation: {\r\n        display: \"flex\",\r\n        padding: \"5px\",\r\n    },\r\n    header_appbar: {\r\n        height: \"45px\",\r\n        lineHeight: \"45px\",\r\n        // fontSize: theme.textSize.mini,\r\n        textAlign: \"center\",\r\n    },\r\n    header_toobar: {\r\n        minHeight: \"100%\",\r\n    },\r\n    header_text: {\r\n        width: \"100%\",\r\n        paddingRight: \"18px\",\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            paddingRight: 0,\r\n        },\r\n    },\r\n    content: {\r\n        display: \"flex\",\r\n        justifyContent: \"space-between\",\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            // borderBottom: '1px solid #f3f3f3'\r\n        },\r\n    },\r\n    contentContainer: {\r\n        display: \"flex\",\r\n        flexDirection: \"column\",\r\n        padding: \"10px\",\r\n        // width: \"100%\"\r\n        width: \"calc(100% - 20px)\",\r\n    },\r\n\r\n    arrowIcon: {\r\n        position: \"absolute\",\r\n        fontSize: \"32px\",\r\n    },\r\n    arrowIcon_button: {\r\n        padding: \"20px\",\r\n        left: \"-14px\",\r\n        // [theme.breakpoints.down('sm')]: {\r\n        //     display: 'none',\r\n        // }\r\n    },\r\n    detailContainer: {\r\n        display: \"flex\",\r\n        justifyContent: \"space-between\",\r\n        padding: \"5px\",\r\n    },\r\n    buttonDiv: {\r\n        display: \"flex\",\r\n        justifyContent: \"flex-end\",\r\n        paddingRight: \"10px\",\r\n        paddingBottom: \"10px\",\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            margin: \"10px\",\r\n            justifyContent: \"center\",\r\n        },\r\n    },\r\n    firstDetail: {\r\n        width: \"50%\",\r\n    },\r\n}))(LandusePlanView);\r\n","import React, { Component } from \"react\";\r\nimport { bindActionCreators } from \"redux\";\r\nimport { connect } from \"react-redux\";\r\nimport SubPanelLayout from \"../../../../SubPanelLayout\";\r\nimport TermsOfUse from './TermsOfUse';\r\nimport * as MapAction from \"../../../../../../../Actions/Web/Maps/MapAction\";\r\nimport * as MapFunctions from \"../../../../../../../Map/MapFunctions\";\r\nimport { fetchGet_ } from '../../../../../../../Utilities/ServiceUtils';\r\nimport LandusePlanView from \"../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/AskTheCityPlan/Detail/LandusePlanView\";\r\nimport WithLoading from '../../../../../../../HOC/WithLoading';\r\nimport Loading from '../../../../../../../Controls/Containers/Loading';\r\n\r\nclass LandusePlan extends Component {\r\n\r\n\tconstructor(props) {\r\n\t\tsuper(props)\r\n\t\tthis.state = {\r\n\t\t\tisSelected: null,\r\n\t\t\tisOpenTermsOfUse: false,\r\n\t\t\ttermsOfUseId: null\r\n\r\n\t\t}\r\n\t}\r\n\r\n\thandleClick = index => e => {\r\n\t\tif (index == this.state.isSelected) {\r\n\t\t\t//กรณีเลือกตัวเดิมจะเป็นการปิด\r\n\t\t\tthis.setState(state => ({\r\n\t\t\t\tisSelected: null\r\n\t\t\t}));\r\n\t\t} else {\r\n\t\t\tthis.setState(state => ({\r\n\t\t\t\tisSelected: index\r\n\t\t\t}));\r\n\t\t}\r\n\t};\r\n\r\n\thandleClickPDF = () => {\r\n\t\twindow.open(window.CONFIG_URL_LANDUSEPLAN_PDF, \"DownloadPDF\");\r\n\t}\r\n\r\n\thandleClickTermsOfUse = (value) => e => {\r\n\r\n\t\tthis.setState({\r\n\t\t\tisOpenTermsOfUse: true,\r\n\t\t\ttermsOfUseId: value.feature.attributes.LUP_ZONE\r\n\t\t})\r\n\t}\r\n\thandleClickTermsOfUseBack = () => {\r\n\t\tthis.setState({\r\n\t\t\tisOpenTermsOfUse: false\r\n\t\t})\r\n\t}\r\n\thandleClickExtent = (item) => evt => {\r\n\t\tevt.stopPropagation();\r\n\t\tconst { mapAction } = this.props\r\n\t\tmapAction.bindMapCommand(MapFunctions.landuseExtent, item.feature.geometry);\r\n\t}\r\n\r\n\thandleClickDownloadReqPDF = (val) => e => {\r\n\t\tfetchGet_(`${process.env.REACT_APP_GET_REQ_PDF}?zone=${val.value}`)\r\n\t\t\t.then(res => {\r\n\t\t\t\tif (!res.ok) {\r\n\t\t\t\t\tthrow res.status;\r\n\t\t\t\t}\r\n\t\t\t\treturn res.json();\r\n\t\t\t})\r\n\t\t\t.then(result => {\r\n\t\t\t\twindow.open(result.url)\r\n\r\n\t\t\t})\r\n\t\t\t.catch(ex => {\r\n\t\t\t\tconsole.log('ex getReqPDF', ex)\r\n\t\t\t})\r\n\t}\r\n\r\n\thandleClickDrawGraphic = (val, displayText=\"\") => async e => {\r\n\t\te.stopPropagation();\r\n\t\tval.displayText = displayText;\r\n\t\tconst { mapAction } = this.props;\r\n\t\tawait mapAction.bindMapCommand(MapFunctions.drawGraphicCityPlan, \t                 \r\n\t\t{\r\n\t\t\tobj: val,\r\n\t\t\tloadingFunction: {\r\n\t\t\t\tshowLoading: this.props.showLoading, \r\n\t\t\t\thideLoading: this.props.hideLoading\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tmapAction.bindClearMapCommand();\r\n\t}\r\n\r\n\r\n\trender() {\r\n\t\tconst { data, isOpen, handleBackDetail, headerName, onHideClickPanel } = this.props\r\n\t\tconst { isOpenTermsOfUse, termsOfUseId } = this.state\r\n\t\t//พวก id เดี๋ยวอาจจะใส่เป็นconfig\r\n\t\tconst landUseData = data.filter(itm => itm.layerId == 11) //ข้อมูลพื้นที่การใช้ประโยชน์ที่ดิน\r\n\t\tconst communicationAndtransportationData = data.filter(itm => itm.layerId === 9 || itm.layerId === 10)  //ข้อมูลโครงการหลัก(กรณีพบผังคมนาคมขนส่ง ทั้ง line และ polygon)\r\n\t\tconst trainData = data.filter(itm => itm.layerId == 1) //ข้อมูลรถไฟฟ้าในระยะ500เมตร\r\n\r\n\t\tlandUseData.forEach(itm => {\r\n\r\n\t\t\tif (itm.feature.attributes.LUP_USE === null || itm.feature.attributes.LUP_USE === \"\" || itm.feature.attributes.LUP_USE === undefined || itm.feature.attributes.LUP_USE === \"Null\") {\r\n\r\n\t\t\t\titm.feature.attributes.LUP_USE = \"-\"\r\n\t\t\t}\r\n\t\t\tif (itm.feature.attributes.LUP_ZONE === null || itm.feature.attributes.LUP_ZONE === \"\" || itm.feature.attributes.LUP_ZONE === undefined || itm.feature.attributes.LUP_ZONE === \"Null\") {\r\n\t\t\t\titm.feature.attributes.LUP_ZONE = \"-\"\r\n\t\t\t}\r\n\t\t\tif (itm.feature.attributes.LUP_SUBZONE === null || itm.feature.attributes.LUP_SUBZONE === \"\" || itm.feature.attributes.LUP_SUBZONE === undefined || itm.feature.attributes.LUP_SUBZONE === \"Null\") {\r\n\t\t\t\titm.feature.attributes.LUP_SUBZONE = \"-\"\r\n\t\t\t}\r\n\t\t});\r\n\t\tconst landUsePlanViewElement =\r\n\t\t\t<SubPanelLayout isOpen={isOpen} onHideClickPanel={onHideClickPanel} onHideClickModile={handleBackDetail} title={headerName} subPanelTitle={headerName}>\r\n\t\t\t\t<LandusePlanView\r\n\t\t\t\t\tlandUseData={landUseData}\r\n\t\t\t\t\tcommunicationAndtransportationData={communicationAndtransportationData}\r\n\t\t\t\t\ttrainData={trainData}\r\n\t\t\t\t\tonListClick={this.handleClick}\r\n\t\t\t\t\tisSelected={this.state.isSelected}\r\n\t\t\t\t\tonClickPDF={this.handleClickPDF}\r\n\t\t\t\t\tonClickTermsOfUse={this.handleClickTermsOfUse}\r\n\t\t\t\t\t// onClickToExtent={this.handleClickExtent}\r\n\t\t\t\t\tonClickDownloadReqPDF={this.handleClickDownloadReqPDF}\r\n\t\t\t\t\tonClickDrawGraphic={this.handleClickDrawGraphic}\r\n\t\t\t\t/>\r\n\t\t\t</SubPanelLayout>\r\n\t\tconst termsOfUseElement =\r\n\t\t\t<SubPanelLayout isOpen={isOpen}  onHideClickModile={this.handleClickTermsOfUseBack} title={\"ข้อกำหนดการใช้ประโยชน์\"} subPanelTitle={\"ข้อกำหนดการใช้ประโยชน์\"} onBackClick={this.handleClickTermsOfUseBack}>\r\n\t\t\t\t<TermsOfUse termsOfUseId={termsOfUseId} />\r\n\t\t\t</SubPanelLayout>\r\n\r\n\t\treturn (\r\n\t\t\t<div>\r\n\t\t\t\t<Loading isShowLoading={this.props.isShowLoading}/>\r\n\t\t\t\t{(isOpenTermsOfUse) ? termsOfUseElement : landUsePlanViewElement}\r\n\t\t\t</div>\r\n\t\t);\r\n\t}\r\n}\r\n\r\n// const mapStateToProps = state => ({\r\n//   // mapRdc: state.map,\r\n//   // menuRdc: state.menu\r\n// });\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n\tmapAction: bindActionCreators(MapAction, dispatch),\r\n\t// MenuAction: bindActionCreators(MenuAction, dispatch),\r\n});\r\n\r\n// export default connect(\r\n//   mapStateToProps,\r\n// const mapDispatchToProps = dispatch => ({\r\n//   mapAction: bindActionCreators(MapAction, dispatch)\r\n// });\r\n\r\nexport default WithLoading(connect(\r\n\tnull,\r\n\tmapDispatchToProps\r\n)(LandusePlan));\r\n","import React, { Component, Fragment } from \"react\";\r\nimport { Scrollbars } from \"react-custom-scrollbars\";\r\n\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\nimport Divider from \"@material-ui/core/Divider\";\r\nimport Grid from \"@material-ui/core/Grid\";\r\n\r\nexport class OtherPlanView extends Component {\r\n    getPublicUtilityPlan = (\r\n        classes,\r\n        publicUtilityPlanData,\r\n        onClickDrawGraphic\r\n    ) => {\r\n        return publicUtilityPlanData.map((itm, index) => {\r\n            return (\r\n                <Fragment key={`LandusePlan_${index}`}>\r\n                    <div className={classes.detailContainer}>\r\n                        <div className={classes.detailContent}>\r\n                            รหัสประเภทโครงการ\r\n                        </div>\r\n                        <div className={classes.detailContent}>\r\n                            {itm.feature.attributes.PUP_PRJ_TYPE}\r\n                        </div>\r\n                    </div>\r\n                    <div className={classes.detailContainer}>\r\n                        <div className={classes.detailContent}>รหัสโครงการ</div>\r\n                        <div\r\n                            className={classes.detailContent}\r\n                            onClick={onClickDrawGraphic(\r\n                                itm,\r\n                                itm.feature.attributes.PUP_PRJ\r\n                            )}\r\n                            style={{\r\n                                color: \"blue\",\r\n                                cursor: \"pointer\",\r\n                                textDecoration: \"underline\",\r\n                            }}>\r\n                            {itm.feature.attributes.PUP_PRJ}\r\n                        </div>\r\n                    </div>\r\n                    <div className={classes.detailContainer}>\r\n                        <div className={classes.detailContent}>ชื่อโครงการ</div>\r\n                        <div className={classes.detailContent}>\r\n                            {itm.feature.attributes.PUP_NAME}\r\n                        </div>\r\n                    </div>\r\n\r\n                    <div>\r\n                        <Divider />\r\n                    </div>\r\n                </Fragment>\r\n            );\r\n        });\r\n    };\r\n    getWasteWaterTreatment = (\r\n        classes,\r\n        wasteWaterTreatmentData,\r\n        onClickDrawGraphic\r\n    ) => {\r\n        return wasteWaterTreatmentData.map((itm, index) => {\r\n            return (\r\n                <Fragment key={`LandusePlan_${index}`}>\r\n                    <div className={classes.detailContainer}>\r\n                        <div className={classes.detailContent}>รหัสโครงการ</div>\r\n                        <div\r\n                            className={classes.detailContent}\r\n                            onClick={onClickDrawGraphic(\r\n                                itm,\r\n                                itm.feature.attributes.PUP_PRJ\r\n                            )}\r\n                            style={{\r\n                                color: \"blue\",\r\n                                cursor: \"pointer\",\r\n                                textDecoration: \"underline\",\r\n                            }}>\r\n                            {itm.feature.attributes.PUP_PRJ}\r\n                        </div>\r\n                    </div>\r\n                    <div className={classes.detailContainer}>\r\n                        <div className={classes.detailContent}>ชื่อโครงการ</div>\r\n                        <div className={classes.detailContent}>\r\n                            {itm.feature.attributes.PUP_PRJ_NAME}\r\n                        </div>\r\n                    </div>\r\n\r\n                    <div>\r\n                        <Divider />\r\n                    </div>\r\n                </Fragment>\r\n            );\r\n        });\r\n    };\r\n    getOpenSpace = (classes, openSpaceData, onClickDrawGraphic) => {\r\n        return openSpaceData.map((itm, index) => {\r\n            return (\r\n                <Fragment key={`LandusePlan_${index}`}>\r\n                    <div className={classes.detailContainer}>\r\n                        <div className={classes.detailContent}>\r\n                            ประเภทที่โล่ง\r\n                        </div>\r\n                        <div className={classes.detailContent}>\r\n                            {itm.feature.attributes.OPS_ZONE}\r\n                        </div>\r\n                    </div>\r\n                    <div className={classes.detailContainer}>\r\n                        <div className={classes.detailContent}>บริเวณ</div>\r\n                        <div\r\n                            className={classes.detailContent}\r\n                            onClick={onClickDrawGraphic(\r\n                                itm,\r\n                                itm.feature.attributes.OPS_SUBZONE\r\n                            )}\r\n                            style={{\r\n                                color: \"blue\",\r\n                                cursor: \"pointer\",\r\n                                textDecoration: \"underline\",\r\n                            }}>\r\n                            {itm.feature.attributes.OPS_SUBZONE}\r\n                        </div>\r\n                    </div>\r\n                    <div className={classes.detailContainer}>\r\n                        <div className={classes.detailContent}>ชื่อที่โล่ง</div>\r\n                        <div className={classes.detailContent}>\r\n                            {itm.feature.attributes.OPS_NAME}\r\n                        </div>\r\n                    </div>\r\n\r\n                    <div>\r\n                        <Divider />\r\n                    </div>\r\n                </Fragment>\r\n            );\r\n        });\r\n    };\r\n\r\n    render() {\r\n        const {\r\n            publicUtilityPlanData,\r\n            wasteWaterTreatmentData,\r\n            openSpaceData,\r\n            classes,\r\n            onClickDrawGraphic,\r\n            shortcut,\r\n        } = this.props;\r\n        const publicUtilityPlanItem = this.getPublicUtilityPlan(\r\n            classes,\r\n            publicUtilityPlanData,\r\n            onClickDrawGraphic\r\n        );\r\n        const wasteWaterTreatmentItem = this.getWasteWaterTreatment(\r\n            classes,\r\n            wasteWaterTreatmentData,\r\n            onClickDrawGraphic\r\n        );\r\n\r\n        const openSpaceItem = this.getOpenSpace(\r\n            classes,\r\n            openSpaceData,\r\n            onClickDrawGraphic\r\n        );\r\n\r\n        return (\r\n            <Grid\r\n                container\r\n                className={shortcut ? classes.rootMobile : classes.root}\r\n                // style={shortcut ? { height: \"90px\" } : \"inherit\"}\r\n            >\r\n                <Scrollbars autoHide={true}>\r\n                    <div className={classes.content}>\r\n                        {publicUtilityPlanItem}\r\n                        {wasteWaterTreatmentItem}\r\n                        {openSpaceItem}\r\n                    </div>\r\n                </Scrollbars>\r\n            </Grid>\r\n        );\r\n    }\r\n}\r\n\r\nexport default withStyles((theme) => ({\r\n    root: {\r\n        display: \"flex\",\r\n        width: \"100%\",\r\n        // height: \"calc(100% - 25px)\",\r\n        height: \"100%\",\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            width: \"100%\",\r\n        },\r\n    },\r\n    rootMobile: {\r\n        display: \"flex\",\r\n        width: \"100%\",\r\n        \"& > div > div\": {\r\n            position: \"unset !important\",\r\n            overflow: \"unset !important\",\r\n        },\r\n    },\r\n    content: {\r\n        display: \"flex\",\r\n        flexDirection: \"column\",\r\n        padding: \"10px\",\r\n        // width: \"100%\"\r\n        width: \"calc(100% - 20px)\",\r\n    },\r\n    detailContainer: {\r\n        display: \"flex\",\r\n        padding: \"5px\",\r\n    },\r\n    detailContent: {\r\n        width: \"50%\",\r\n    },\r\n}))(OtherPlanView);\r\n","import React, { Component } from \"react\";\r\nimport OtherPlanView from \"../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/AskTheCityPlan/Detail/OtherPlanView\";\r\nimport SubPanelLayout from \"../../../../SubPanelLayout\";\r\nexport default class OtherPlan extends Component {\r\n    render() {\r\n        const {\r\n            data,\r\n            isOpen,\r\n            handleBackDetail,\r\n            headerName,\r\n            onClickDrawGraphic,\r\n            onHideClickPanel,\r\n        } = this.props;\r\n        const publicUtilityPlanData = data.filter(\r\n            (itm) => itm.layerId === 3 || itm.layerId === 4 || itm.layerId === 5\r\n        ); //ข้อมูลผังสาธารณูประโภค\r\n        const wasteWaterTreatmentData = data.filter((itm) => itm.layerId === 6); //ข้อมูลพื้นที่บำบัดน้ำเสีย\r\n        const openSpaceData = data.filter((itm) => itm.layerId === 7); //ข้อมูลผังที่โล่ง\r\n\r\n        publicUtilityPlanData.forEach((itm) => {\r\n            if (\r\n                itm.feature.attributes.PUP_PRJ_TYPE === null ||\r\n                itm.feature.attributes.PUP_PRJ_TYPE === \"\" ||\r\n                itm.feature.attributes.PUP_PRJ_TYPE === undefined ||\r\n                itm.feature.attributes.PUP_PRJ_TYPE === \"Null\"\r\n            ) {\r\n                itm.feature.attributes.PUP_PRJ_TYPE = \"-\";\r\n            }\r\n            if (\r\n                itm.feature.attributes.PUP_PRJ === null ||\r\n                itm.feature.attributes.PUP_PRJ === \"\" ||\r\n                itm.feature.attributes.PUP_PRJ === undefined ||\r\n                itm.feature.attributes.PUP_PRJ === \"Null\"\r\n            ) {\r\n                itm.feature.attributes.PUP_PRJ = \"-\";\r\n            }\r\n            if (\r\n                itm.feature.attributes.PUP_NAME === null ||\r\n                itm.feature.attributes.PUP_NAME === \"\" ||\r\n                itm.feature.attributes.PUP_NAME === undefined ||\r\n                itm.feature.attributes.PUP_NAME === \"Null\"\r\n            ) {\r\n                itm.feature.attributes.PUP_NAME = \"-\";\r\n            }\r\n        });\r\n\r\n        wasteWaterTreatmentData.forEach((itm) => {\r\n            if (\r\n                itm.feature.attributes.PUP_PRJ === null ||\r\n                itm.feature.attributes.PUP_PRJ === \"\" ||\r\n                itm.feature.attributes.PUP_PRJ === undefined ||\r\n                itm.feature.attributes.PUP_PRJ === \"Null\"\r\n            ) {\r\n                itm.feature.attributes.PUP_PRJ = \"-\";\r\n            }\r\n            if (\r\n                itm.feature.attributes.PUP_PRJ_NAME === null ||\r\n                itm.feature.attributes.PUP_PRJ_NAME === \"\" ||\r\n                itm.feature.attributes.PUP_PRJ_NAME === undefined ||\r\n                itm.feature.attributes.PUP_PRJ_NAME === \"Null\"\r\n            ) {\r\n                itm.feature.attributes.PUP_PRJ_NAME = \"-\";\r\n            }\r\n        });\r\n        openSpaceData.forEach((itm) => {\r\n            if (\r\n                itm.feature.attributes.OPS_ZONE === null ||\r\n                itm.feature.attributes.OPS_ZONE === \" \" ||\r\n                itm.feature.attributes.OPS_ZONE === undefined ||\r\n                itm.feature.attributes.OPS_ZONE === \"Null\"\r\n            ) {\r\n                itm.feature.attributes.OPS_ZONE = \"-\";\r\n            }\r\n            if (\r\n                itm.feature.attributes.OPS_SUBZONE === null ||\r\n                itm.feature.attributes.OPS_SUBZONE === \" \" ||\r\n                itm.feature.attributes.OPS_SUBZONE === undefined ||\r\n                itm.feature.attributes.OPS_SUBZONE === \"Null\"\r\n            ) {\r\n                itm.feature.attributes.OPS_SUBZONE = \"-\";\r\n            }\r\n            if (\r\n                itm.feature.attributes.OPS_NAME === null ||\r\n                itm.feature.attributes.OPS_NAME === \" \" ||\r\n                itm.feature.attributes.OPS_NAME === undefined ||\r\n                itm.feature.attributes.OPS_NAME === \"Null\"\r\n            ) {\r\n                itm.feature.attributes.OPS_NAME = \"-\";\r\n            }\r\n        });\r\n\r\n        return (\r\n            <SubPanelLayout\r\n                isOpen={isOpen}\r\n                onHideClickModile={handleBackDetail}\r\n                subPanelTitle={headerName}\r\n                title={headerName}\r\n                onHideClickPanel={onHideClickPanel}>\r\n                <OtherPlanView\r\n                    publicUtilityPlanData={publicUtilityPlanData}\r\n                    wasteWaterTreatmentData={wasteWaterTreatmentData}\r\n                    openSpaceData={openSpaceData}\r\n                    onClickDrawGraphic={onClickDrawGraphic}\r\n                />\r\n            </SubPanelLayout>\r\n        );\r\n    }\r\n}\r\n","import React, { Component, Fragment } from \"react\";\r\nimport { Scrollbars } from \"react-custom-scrollbars\";\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\nimport Divider from \"@material-ui/core/Divider\";\r\nimport Grid from \"@material-ui/core/Grid\";\r\n\r\nexport class BangkokCanonView extends Component {\r\n    getCanonItem = (classes, canonData, onPdfClick, onClickDrawGraphic) => {\r\n        return canonData.map((itm, index) => {\r\n            return (\r\n                <Fragment key={`LandusePlan_${index}`}>\r\n                    {/* <div className={classes.detailContainer}>\r\n                        <div className={classes.detailContent}>\r\n                            รหัสข้อบัญญัติ\r\n                        </div>\r\n                        <div className={classes.detailContent}>\r\n                            {itm.feature.attributes.BDCTL_CODE}\r\n                        </div>\r\n                    </div>\r\n                    <div className={classes.detailContainer}>\r\n                        <div className={classes.detailContent}>\r\n                            ประเภทข้อบัญญัติ\r\n                        </div>\r\n                        <div className={classes.detailContent}>\r\n                            {itm.feature.attributes.BDCTL_TYPE}\r\n                        </div>\r\n                    </div> */}\r\n\r\n                    <div className={classes.detailContainer}>\r\n                        <div className={classes.detailContent}>\r\n                            ชื่อข้อบัญญัติ\r\n                        </div>\r\n                        <div className={classes.detailContent}>\r\n                            {itm.feature.attributes.BDCTL_NAME}\r\n                        </div>\r\n                    </div>\r\n\r\n                    <div className={classes.detailContainer}>\r\n                        <div className={classes.detailContent}>\r\n                            หมายเลขพื้นที่\r\n                        </div>\r\n                        <div\r\n                            className={classes.detailContent}\r\n                            onClick={onClickDrawGraphic(\r\n                                itm,\r\n                                itm.feature.attributes.AREA_ZONE\r\n                            )}\r\n                            style={{\r\n                                color: \"blue\",\r\n                                cursor: \"pointer\",\r\n                                textDecoration: \"underline\",\r\n                            }}>\r\n                            {itm.feature.attributes.AREA_ZONE}\r\n                        </div>\r\n                    </div>\r\n                    {itm.feature.attributes.BDCTL_URL && (\r\n                        <div className={classes.detailContainer}>\r\n                            <div\r\n                                className={classes.pdfLink}\r\n                                onClick={onPdfClick(itm)}>\r\n                                รายละเอียดข้อบัญญัติ\r\n                            </div>\r\n                            {/* <div className={classes.detailContent} >\r\n                            <span\r\n                                className={classes.pdfLink}\r\n                                onClick={onPdfClick(itm)}>\r\n                                <u>{itm.feature.attributes.BDCTL_URL}</u>\r\n                            </span>\r\n                        </div> */}\r\n                        </div>\r\n                    )}\r\n\r\n                    <div>\r\n                        <Divider />\r\n                    </div>\r\n                </Fragment>\r\n            );\r\n        });\r\n    };\r\n    render() {\r\n        const {\r\n            classes,\r\n            canonData,\r\n            onPdfClick,\r\n            onClickDrawGraphic,\r\n            shortcut,\r\n        } = this.props;\r\n        const canonItem = this.getCanonItem(\r\n            classes,\r\n            canonData,\r\n            onPdfClick,\r\n            onClickDrawGraphic\r\n        );\r\n        return (\r\n            <Grid\r\n                container\r\n                className={shortcut ? classes.rootMobile : classes.root}>\r\n                <Scrollbars autoHide={true}>\r\n                    <div className={classes.content}>{canonItem}</div>\r\n                </Scrollbars>\r\n            </Grid>\r\n        );\r\n    }\r\n}\r\n\r\nexport default withStyles((theme) => ({\r\n    root: {\r\n        display: \"flex\",\r\n        width: \"100%\",\r\n        // height: \"calc(100% - 25px)\",\r\n        height: \"100%\",\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            width: \"100%\",\r\n        },\r\n    },\r\n    rootMobile: {\r\n        display: \"flex\",\r\n        width: \"100%\",\r\n        \"& > div > div\": {\r\n            position: \"unset !important\",\r\n            overflow: \"unset !important\",\r\n        },\r\n    },\r\n    content: {\r\n        display: \"flex\",\r\n        flexDirection: \"column\",\r\n        padding: \"10px\",\r\n        // width: \"100%\"\r\n        width: \"calc(100% - 20px)\",\r\n    },\r\n    detailContainer: {\r\n        display: \"flex\",\r\n        padding: \"5px\",\r\n    },\r\n    detailContent: {\r\n        width: \"50%\",\r\n    },\r\n    pdfLink: {\r\n        cursor: \"pointer\",\r\n        color: \"blue\",\r\n        textDecoration: \"underline\",\r\n    },\r\n}))(BangkokCanonView);\r\n","import React, { Component } from \"react\";\r\nimport BangkokCanonView from \"../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/AskTheCityPlan/Detail/BangkokCanonView\";\r\nimport SubPanelLayout from \"../../../../SubPanelLayout\";\r\nexport default class BangkokCanon extends Component {\r\n\r\n  handlePdfClick = value => e => {\r\n    window.open(`${window.CONFIG_URL_BANGKOK_CANON_PDF}${value.feature.attributes.BDCTL_URL}`, \"DownloadBangkokCanonPDF\");\r\n  };\r\n  render() {\r\n    const { data,isOpen,handleBackDetail,headerName, onClickDrawGraphic, onHideClickPanel } = this.props;\r\n    const canonData = data;\r\n    \r\n    canonData.forEach(itm => {\r\n      \r\n      if(itm.feature.attributes.BDCTL_CODE === null || itm.feature.attributes.BDCTL_CODE === \" \" || itm.feature.attributes.BDCTL_CODE === undefined || itm.feature.attributes.BDCTL_CODE === \"Null\"){\r\n        itm.feature.attributes.BDCTL_CODE = \"-\"\r\n      }\r\n      if(itm.feature.attributes.BDCTL_TYPE === null || itm.feature.attributes.BDCTL_TYPE === \" \" || itm.feature.attributes.BDCTL_TYPE === undefined || itm.feature.attributes.BDCTL_TYPE === \"Null\"){\r\n        itm.feature.attributes.BDCTL_TYPE = \"-\"\r\n      }\r\n      if(itm.feature.attributes.AREA_ZONE === null || itm.feature.attributes.AREA_ZONE === \" \" || itm.feature.attributes.AREA_ZONE === undefined ||  itm.feature.attributes.AREA_ZONE === \"Null\"){\r\n        itm.feature.attributes.AREA_ZONE = \"-\"\r\n      }\r\n\r\n      if(itm.feature.attributes.BDCTL_NAME === null || itm.feature.attributes.BDCTL_NAME === \" \" || itm.feature.attributes.BDCTL_NAME === undefined || itm.feature.attributes.BDCTL_NAME === \"Null\"){\r\n        itm.feature.attributes.BDCTL_NAME = \"-\"\r\n      }\r\n      if(itm.feature.attributes.BDCTL_URL === null || itm.feature.attributes.BDCTL_URL === \" \" || itm.feature.attributes.BDCTL_URL === undefined || itm.feature.attributes.BDCTL_URL === \"Null\"){\r\n        itm.feature.attributes.BDCTL_URL = \"-\"\r\n      }\r\n      \r\n    });\r\n\r\n    return (\r\n      <SubPanelLayout onHideClickPanel={onHideClickPanel} isOpen={isOpen} onHideClickModile={handleBackDetail} subPanelTitle={headerName} title={headerName} >\r\n        <BangkokCanonView\r\n          canonData={canonData}\r\n          onPdfClick={this.handlePdfClick}\r\n          onClickDrawGraphic={onClickDrawGraphic}\r\n        />\r\n      </SubPanelLayout>\r\n    );\r\n  }\r\n}\r\n","import React, { Fragment } from 'react'\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\nimport { Field } from \"redux-form\";\r\nimport Grid from '@material-ui/core/Grid';\r\n\r\n//import comprnent\r\nimport Button from '../../../../../../Controls/Containers/Button'\r\nimport SelectField from '../../../../../../Controls/Containers/SelectFieldRedux'\r\n\r\nconst PrintMapAskView = (props) => {\r\n    const {\r\n        classes,\r\n        luPrintMap=[],\r\n        onClickPrintMap\r\n    } = props\r\n\r\n    return (\r\n        <Fragment>\r\n            <Grid container className={classes.content}>\r\n                <Field \r\n                    // label=\"พิมพ์แผนที่\"\r\n                    label=\"เทมเพลต\"\r\n                    name='printMap'\r\n                    component={SelectField}\r\n                    data={luPrintMap}\r\n                    required\r\n                />\r\n            </Grid>\r\n            <Grid container justify='center' className={classes.footer}>\r\n                <Grid item>\r\n                    <Button \r\n                        label=\"ตกลง\"\r\n                        onClick={onClickPrintMap}\r\n                    />\r\n                </Grid>\r\n            </Grid>\r\n        </Fragment>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    content: {\r\n        padding: '10px 5px 5px 5px',\r\n        // paddingTop: '0px'\r\n    },\r\n    footer: {\r\n        marginBottom: '15px'\r\n    }\r\n}))(PrintMapAskView)\r\n\r\n","import React, { Fragment } from 'react'\r\nimport { connect } from 'react-redux'\r\nimport { reduxForm, getFormValues } from \"redux-form\";\r\nimport { compose } from \"recompose\";\r\nimport { bindActionCreators } from 'redux';\r\n\r\n//import component\r\nimport PrintMapAskView from '../../../../../../Presentationals/Web/Panel/Menu/MenuContent/AskTheCityPlan/PrintMapAskView'\r\nimport Loading from '../../../../../../Controls/Containers/Loading';\r\nimport WithLoading from '../../../../../../HOC/WithLoading';\r\nimport AlertMessageSuper from '../../../../../../Controls/Containers/AlertMessageSuper';\r\nimport WithAlertMessage from '../../../../../../HOC/WithAlertMessage'\r\n\r\n//import constants\r\nimport { RESOURCEWORDS } from '../../../../../../Constants/Constants'\r\n\r\n//import action\r\nimport * as MapActions from '../../../../../../Actions/Web/Maps/MapAction'\r\nimport * as MapFunctions from '../../../../../../Map/MapFunctions'\r\n\r\nconst TEMPLATE = [\r\n    // {id:\"CPUDD_ComPlanQuery_Map_A4_Landscape\",name:\"พิมพ์ภาพแนวนอน\"},\r\n    // {id:\"CPUDD_ComPlanQuery_Map_A4_Portrait\",name:\"พิมพ์ภาพแนวตั้ง\"},\r\n\r\n    {id:\"CPUDD_ComPlanQuery_A4_Landscape\",name:\"พิมพ์ภาพแนวนอน\"},\r\n    {id:\"CPUDD_ComPlanQuery_A4_Portrait\",name:\"พิมพ์ภาพแนวตั้ง\"},\r\n]\r\n\r\nconst PrintMapAsk = (props) => {\r\n    const {\r\n        handleSubmit,\r\n        showLoading,\r\n        hideLoading,\r\n        isShowLoading,\r\n        mapAction,\r\n        askTheCityPlan\r\n    } = props;\r\n\r\n    const handleClickPrintMapAsk = async (values) => {\r\n        showLoading();\r\n        const params = {\r\n            format: 'PDF',\r\n            paperSize: values.printMap,\r\n            mapDescription: 'สอบถามผังเมืองรวม กรุงเทพมหานคร',\r\n            mapName: 'สอบถามผังเมืองรวม กรุงเทพมหานคร'\r\n        }\r\n        const lup = await makeDataLupAskTheCityPlan();\r\n        const station = await makeStationAskTheCityPlan();\r\n        const transp = await makeTranspAskTheCityPlan();\r\n        const canon = await makeCanonAskTheCityPlan();\r\n        const opsName = await makeDataOpsNameAskTheCityPlan();\r\n\r\n        await mapAction.bindMapCommand(MapFunctions.printMapForComPlanQuery, {\r\n            param: params,\r\n            callback: callBackPrintMap,\r\n            lup: lup,\r\n            station: station,\r\n            transp: transp,\r\n            canon: canon,\r\n            opsName: opsName\r\n        })\r\n    }\r\n\r\n    const makeDataLupAskTheCityPlan = () => {\r\n        const { landUse } = askTheCityPlan;\r\n        const lup = [];\r\n\r\n        if(landUse) {\r\n            const landUseFilter = landUse.filter(item => {\r\n                return item.layerId === 11\r\n            })\r\n\r\n            landUseFilter.forEach(item => {\r\n                if(lup.length <= 5) {\r\n                    lup.push({\r\n                        zone: item.feature.attributes.LUP_ZONE,\r\n\t\t\t\t\t\tfar: item.feature.attributes.LUP_FAR,\r\n\t\t\t\t\t\tosr: item.feature.attributes.LUP_OSR\r\n                    })\r\n                }\r\n            })\r\n        }\r\n\r\n        return lup\r\n    }\r\n\r\n    const makeStationAskTheCityPlan = () => {\r\n        const { landUse } = askTheCityPlan;\r\n        const stationName = [];\r\n\r\n        if (landUse) {\r\n\t\t\tconst landUseFilter = landUse.filter(itm => itm.layerId === 1);\r\n\t\t\tlandUseFilter.forEach(itm => {\r\n\t\t\t\tstationName.push(`${itm.feature.attributes.STA_TYPE} ${itm.feature.attributes.STA_NAME}`)\r\n\t\t\t})\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tbuffer: window.STATION_BUFFER.toString(),\r\n\t\t\tname: stationName.length > 0 ? stationName.toString() : \"-\"\r\n\t\t}\r\n    }\r\n\r\n    const makeTranspAskTheCityPlan = () => {\r\n        const { landUse } = askTheCityPlan;\r\n        const dataTransp = {\r\n            prj: \"-\",\r\n\t\t\twidth: \"-\"\r\n        }\r\n\r\n        if (landUse) {\r\n\t\t\tconst landUseFilter = landUse.filter(itm => itm.layerId === 9);\r\n\t\t\tif (landUseFilter.length > 0) {\r\n\t\t\t\tdataTransp.prj = landUseFilter[0].feature.attributes.TRANSP_PRJ;\r\n\t\t\t\tdataTransp.width = landUseFilter[0].feature.attributes.TRANSP_WIDTH;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn dataTransp\r\n    }\r\n\r\n    const makeCanonAskTheCityPlan = () => {\r\n\t\tconst { canon } = askTheCityPlan;\r\n\t\tconst dataCanon = {\r\n\t\t\tzone: \"-\",\r\n\t\t\tcode: \"-\",\r\n\t\t\tname: \"-\"\r\n\t\t}\r\n\r\n\t\tif (canon && canon.length > 0) {\r\n\t\t\tdataCanon.zone = canon[0].feature.attributes.AREA_ZONE !== \" \" ? canon[0].feature.attributes.AREA_ZONE : \"-\"\r\n\t\t\tdataCanon.code = canon[0].feature.attributes.BDCTL_CODE !== \" \" ? canon[0].feature.attributes.BDCTL_CODE : \"-\";\r\n\t\t\tdataCanon.name = canon[0].feature.attributes.BDCTL_NAME !== \" \" ? canon[0].feature.attributes.BDCTL_NAME : \"-\";\r\n\t\t}\r\n\r\n\t\treturn dataCanon\r\n    }\r\n    \r\n    const makeDataOpsNameAskTheCityPlan = () => {\r\n\t\tconst { other } = askTheCityPlan;\r\n\t\tlet opsName = \"-\"\r\n\r\n\t\tif (other) {\r\n\t\t\tconst otherFilter = other.filter(itm => itm.layerId === 7);\r\n\t\t\tif (otherFilter.length > 0 && otherFilter[0].value !== \" \") {\r\n\t\t\t\topsName = otherFilter[0].value;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn opsName\r\n\t}\r\n\r\n    const callBackPrintMap = () => {\r\n        mapAction.bindClearMapCommand();\r\n        hideLoading();\r\n    }\r\n\r\n    return (\r\n        <Fragment>\r\n            <PrintMapAskView \r\n                onClickPrintMap = { handleSubmit(handleClickPrintMapAsk) }\r\n                luPrintMap = { TEMPLATE }\r\n            />\r\n            <AlertMessageSuper {...props} />\r\n            <Loading isShowLoading = { isShowLoading } />\r\n        </Fragment>\r\n    )\r\n}\r\n\r\nconst PrintMapValidate = (values) => {\r\n    const errors = {};\r\n\r\n    if(!values.printMap) {\r\n        errors.printMap = RESOURCEWORDS.ERROR_TEXT.NO_EMPTY;\r\n    }\r\n\r\n    return errors;\r\n}\r\n\r\nconst mapStateToProps = state => ({\r\n    _values: getFormValues('PrintMapAsk')(state),\r\n    askTheCityPlan: state.AskTheCityPlanData\r\n})\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    mapAction: bindActionCreators(MapActions, dispatch),\r\n})\r\n\r\nconst reduxFormParameter = {\r\n    form: 'PrintMapAsk',\r\n    validate: PrintMapValidate\r\n};\r\n\r\nexport default compose(\r\n    connect(mapStateToProps, mapDispatchToProps),\r\n    reduxForm(reduxFormParameter),\r\n    WithAlertMessage,\r\n    WithLoading\r\n)(PrintMapAsk);","import React, { Fragment } from 'react';\r\nimport ListItem from '@material-ui/core/ListItem';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Button from '../../../../../../Controls/Containers/Button';\r\nimport PrintMapAsk from '../../../../../../Containers/Web/Panel/Menu/MenuContent/AskTheCityPlan/PrintMapAsk'\r\n\r\nconst ResultView = ({\r\n    classes,\r\n    // isMenuActive,\r\n    isFindData,\r\n    resultActive,\r\n    listResult,\r\n    onClickListResult,\r\n    onClickClearResult,\r\n    isPeople\r\n}) => {\r\n    const renderResult = () => {\r\n        if (listResult.length === 0 && isFindData) {\r\n            return <div className={classes.div_noData}>ไม่พบข้อมูล</div>\r\n        }\r\n        return (<Grid item xs={12}>\r\n            {listResult.map((itm, ind) =>\r\n                <ListItem\r\n                    key={`result-${itm.name}`}\r\n                    button\r\n                    divider={true}\r\n                    className={itm.name === resultActive ? classes.manu_item_active : classes.menu_item}\r\n                    onClick={onClickListResult(itm.name)}\r\n                >\r\n                    {`${ind + 1}. ${itm.name}`}\r\n                </ListItem>\r\n            )}\r\n            <div style={isPeople ? { display: \"block\" } : { display: \"none\" }}>\r\n                <div className={classes.divBtnClear} >\r\n                    <Button\r\n                        label=\"ล้างค่า\"\r\n                        onClick={onClickClearResult}\r\n                        className={classes.btnClear}\r\n                    />\r\n                </div>\r\n            </div>\r\n        </Grid>)\r\n    }\r\n\r\n    return (<Grid container >\r\n        <Grid item xs={12} className={classes.result_header}>\r\n            ผลลัพธ์\r\n        </Grid>\r\n\r\n        <Grid container>\r\n            <Grid item xs={12}>\r\n                {/* {!isMenuActive ? \"\" : renderResult()} */}\r\n                {renderResult()}\r\n            </Grid>\r\n        </Grid>\r\n\r\n        {listResult.length > 0 && <Fragment>\r\n            <Grid item xs={12} className={classes.result_header}>พิมพ์แผนที่</Grid>\r\n            <PrintMapAsk />\r\n        </Fragment>}\r\n    </Grid>)\r\n}\r\n\r\nconst styles = theme => ({\r\n    hide: {\r\n        display: 'none'\r\n    },\r\n    block: {\r\n        display: 'block'\r\n    },\r\n    result_header: {\r\n        height: '25px',\r\n        lineHeight: '25px',\r\n        width: '100%',\r\n        background: theme.mainTheme.color3,\r\n        color: theme.mainTheme.color2,\r\n        textAlign: 'center',\r\n        fontSize: theme.textSize.subtitle,\r\n\r\n    },\r\n    div_noData: {\r\n        width: '100%',\r\n        padding: '18px'\r\n    },\r\n    menu_item: {\r\n        '&:focus': {\r\n            backgroundColor: theme.mainTheme.color2\r\n        },\r\n        '&:hover': {\r\n            backgroundColor: theme.mainTheme.colorAH.colorHover,\r\n            color: theme.mainTheme.colorAH.colorTextHover\r\n        }\r\n    },\r\n    manu_item_active: {\r\n        backgroundColor: theme.mainTheme.colorAH.colorActive,\r\n        color: theme.mainTheme.colorAH.colorTextActive\r\n    },\r\n    divBtnClear: {\r\n        width: '100%',\r\n        marginTop: '40px',\r\n        display: 'flex',\r\n        justifyContent: 'flex-end',\r\n    },\r\n    btnClear: {\r\n        marginRight: '20px'\r\n    }\r\n})\r\n\r\n\r\nexport default withStyles(styles)(ResultView);","import React, { useState, Fragment } from \"react\";\r\nimport { bindActionCreators } from \"redux\";\r\nimport { connect } from \"react-redux\";\r\nimport LandusePlan from \"./Deatail/LandusePlan\";\r\nimport OtherPlan from \"./Deatail/OtherPlan\";\r\nimport BangkokCanon from \"./Deatail/BangkokCanon\";\r\nimport * as MapFunctions from \"../../../../../../Map/MapFunctions\";\r\nimport * as MapAction from \"../../../../../../Actions/Web/Maps/MapAction\";\r\nimport * as SatisfactionAndStatisticAction from \"../../../../../../Actions/Web/Panel/SatisfactionAndStatisticAction\";\r\nimport * as AuthenAction from \"../../../../../../Actions/Authentications/AuthenAction\";\r\nimport { fetchPost_ } from \"../../../../../../Utilities/ServiceUtils\";\r\nimport WithLoading from \"../../../../../../HOC/WithLoading\";\r\nimport Loading from \"../../../../../../Controls/Containers/Loading\";\r\nimport ResultView from \"../../../../../../Presentationals/Web/Panel/Menu/MenuContent/AskTheCityPlan/ResultView\";\r\n\r\nconst Result = ({\r\n    isMenuActive,\r\n    isFindData,\r\n    result,\r\n    // onRefFunctionClear,\r\n    onClickClearResult,\r\n    mapAction,\r\n    SatisfactionAndStatisticAction,\r\n    satisfactionAndStatisticRdc,\r\n    authenRdc,\r\n    isPeople,\r\n    showLoading,\r\n    hideLoading,\r\n    isShowLoading,\r\n}) => {\r\n    const [resultActive, setResultActive] = useState(\"\");\r\n    const [indetail, setInDetail] = useState(false);\r\n    const layerSequence = window.CONFIG_COMPREHENSIVE_PLAN.LAYER_SEQUENCE;\r\n\r\n    const checkShowResult = () => {\r\n        const listResult = [];\r\n        \r\n        Object.keys(layerSequence)\r\n            .filter((itm) => result[itm].length > 0)\r\n            .forEach((itm) => {\r\n                listResult.push(layerSequence[itm]);\r\n            });\r\n\r\n        if (listResult.length !== 0) {\r\n            //หากมีผลลัพธ์คืนมาให้ไปเก็บสถิติและผลประเมิน\r\n            saveStatisticAndSatisfaction();\r\n        }\r\n\r\n        return listResult;\r\n    };\r\n\r\n    const saveStatisticAndSatisfaction = () => {\r\n        //ฟังก์ชันสำหรับเก็บสถิติและผลประเมิน\r\n        if (!satisfactionAndStatisticRdc.statisticStatus) {\r\n            let params;\r\n            SatisfactionAndStatisticAction.updateStatisticStatus(true);\r\n\r\n            if (authenRdc.profile.userID) {\r\n                //เจ้าหน้าที่\r\n                params = {\r\n                    userid: authenRdc.profile.userID,\r\n                };\r\n            } else {\r\n                //ประชาชน\r\n                params = {\r\n                    peoplecode: satisfactionAndStatisticRdc.sessionId,\r\n                };\r\n            }\r\n\r\n            fetchPost_(process.env.REACT_APP_SAVE_STATISTIC, params)\r\n                .then((res) => {\r\n                    if (!res.ok) {\r\n                        throw res.status;\r\n                    }\r\n                    return res.json();\r\n                })\r\n                .then((status) => {\r\n                    return status;\r\n                })\r\n                .catch((ex) => {\r\n                    console.log(\"ex save statistic\", ex);\r\n                });\r\n        }\r\n    };\r\n\r\n    const handleBackDetail = () => {\r\n        setInDetail(false);\r\n    };\r\n\r\n    const handleClickClosePanel = () => {\r\n        setInDetail(false);\r\n        setResultActive(\"\");\r\n    };\r\n\r\n    const handleClickResult = (name) => (evt) => {\r\n        setResultActive(name);\r\n        setInDetail(true);\r\n    };\r\n\r\n    const clearResultActive = () => {\r\n        setResultActive(\"\");\r\n    };\r\n\r\n    const handleClickDrawGraphic = (val, displayText = \"\") => async (evt) => {\r\n        val.displayText = displayText;\r\n        await mapAction.bindMapCommand(MapFunctions.drawGraphicCityPlan, {\r\n            obj: val,\r\n            loadingFunction: {\r\n                showLoading: showLoading,\r\n                hideLoading: hideLoading,\r\n            },\r\n        });\r\n        mapAction.bindClearMapCommand();\r\n    };\r\n\r\n    const checkRenderSubPanelLayout = () => {\r\n        if (\r\n            result.canon.length !== 0 ||\r\n            result.landUse.length !== 0 ||\r\n            result.other.length !== 0\r\n        ) {\r\n            //กรณีคลิ๊กเมนูอื่น resultที่ถูกส่งมาจะถูกเคลียไปหมด แล้วจะทำให้ไม่เข้าเข้าifนี้(ผลลัพธ์คือเมื่อมีการเปิดsub panelอยู่แล้วกดเลือกเมนูอื่นจะทำให้sub panelที่เปิดอยู่ถูกปิด)\r\n            switch (resultActive) {\r\n                case layerSequence.landUse.name:\r\n                    // console.log(\"layerSequence.landUse.name\",layerSequence.landUse.name)\r\n                    return (\r\n                        <LandusePlan\r\n                            data={result.landUse}\r\n                            isOpen={indetail}\r\n                            handleBackDetail={handleBackDetail}\r\n                            headerName={layerSequence.landUse.name}\r\n                            onHideClickPanel={handleClickClosePanel}\r\n                        />\r\n                    );\r\n\r\n                // break;\r\n                case layerSequence.other.name:\r\n                    //for other\r\n                    return (\r\n                        <OtherPlan\r\n                            data={result.other}\r\n                            isOpen={indetail}\r\n                            handleBackDetail={handleBackDetail}\r\n                            headerName={layerSequence.other.name}\r\n                            onClickDrawGraphic={handleClickDrawGraphic}\r\n                            onHideClickPanel={handleClickClosePanel}\r\n                        />\r\n                    );\r\n\r\n                // break;\r\n                case layerSequence.canon.name:\r\n                    //for canon\r\n                    return (\r\n                        <BangkokCanon\r\n                            data={result.canon}\r\n                            isOpen={indetail}\r\n                            handleBackDetail={handleBackDetail}\r\n                            headerName={layerSequence.canon.name}\r\n                            onClickDrawGraphic={handleClickDrawGraphic}\r\n                            onHideClickPanel={handleClickClosePanel}\r\n                        />\r\n                    );\r\n                    // break;\r\n                    // case \"พิมพ์แผนที่\":\r\n                    //     return <Printmap isOpen={indetail} isPrintmapClick={handleBackDetail}/>\r\n                    break;\r\n                default:\r\n                    break;\r\n            }\r\n        }\r\n    };\r\n\r\n    const handleClickClearResult = () => {\r\n        clearResultActive();\r\n        if (onClickClearResult) {\r\n            onClickClearResult();\r\n        }\r\n    };\r\n\r\n    return (\r\n        <Fragment>\r\n            <Loading isShowLoading={isShowLoading} />\r\n            <ResultView\r\n                isFindData={isFindData}\r\n                isMenuActive={isMenuActive}\r\n                resultActive={resultActive}\r\n                listResult={checkShowResult()}\r\n                onClickListResult={handleClickResult}\r\n                onClickClearResult={handleClickClearResult}\r\n                isPeople={isPeople}\r\n            />\r\n            {checkRenderSubPanelLayout()}\r\n        </Fragment>\r\n    );\r\n};\r\nconst mapStateToProps = (state) => ({\r\n    // submitPmrRdc: state.submitPmr,\r\n    authenRdc: state.authen,\r\n    satisfactionAndStatisticRdc: state.SatisfactionAndStatisticReducer,\r\n});\r\nconst mapDispatchToProps = (dispatch) => ({\r\n    authenAction: bindActionCreators(AuthenAction, dispatch),\r\n    mapAction: bindActionCreators(MapAction, dispatch),\r\n    SatisfactionAndStatisticAction: bindActionCreators(\r\n        SatisfactionAndStatisticAction,\r\n        dispatch\r\n    ),\r\n});\r\n\r\nexport default WithLoading(\r\n    connect(\r\n        mapStateToProps,\r\n        mapDispatchToProps\r\n    )(Result)\r\n);\r\n","import React, { useState, useEffect } from \"react\";\r\nimport { connect } from \"react-redux\";\r\nimport { bindActionCreators } from \"redux\";\r\nimport { compose } from \"recompose\";\r\nimport withWidth from \"@material-ui/core/withWidth\";\r\nimport PropTypes from \"prop-types\";\r\n\r\nimport * as MenuConstants from \"../../../../../../Constants/MenuConstants\";\r\nimport * as Mapfunction from \"../../../../../../Map/MapFunctions\";\r\nimport * as MenuAction from \"../../../../../../Actions/Web/MenuAction\";\r\nimport {\r\n    LISTGRAPHICLAYER,\r\n    ACTIVE_FUNCTION,\r\n} from \"../../../../../../Constants/Constants\";\r\nimport { CONFIG_MENU } from \"../../../../../../Constants/MenuConstants\";\r\nimport { checkPermission } from \"../../../../../../Utilities/AuthenUtil\";\r\nimport WithAskTheCityPlanReducer from \"../../../../../../HOC/ConnectReducer/WithAskTheCityPlanReducer\";\r\nimport WithPanelContentReducer from \"../../../../../../HOC/ConnectReducer/WithPanelContentReducer\";\r\nimport AskTheCityPlanView from \"../../../../../../Presentationals/Web/Panel/Menu/MenuContent/AskTheCityPlan/AskTheCityPlanView\";\r\nimport FunctionMenu from \"./FunctionMenu\";\r\nimport AskForBusiness from \"./AskForBusiness\";\r\nimport Result from \"./Result\";\r\nimport AlertMessage from \"../../../../../../Controls/Containers/AlertMessage\";\r\nimport WithAlertMessage from \"../../../../../../HOC/WithAlertMessage\";\r\n\r\n//จัดเก็บเป็น global เอาไว้ เนื่องจากตัว callback จาก mapfunction มองไม่เห็นค่า stete จาก hook ที่ทำการอัพเดท\r\nlet isShowAskForBusiness = false;\r\nlet isSaveAskForBusinessGlobal = false;\r\n\r\nconst AskTheCityPlan = ({\r\n    altTitle,\r\n    altMsg,\r\n    altType,\r\n    isShowAlt,\r\n    callbackConfirm,\r\n    callbackCancel,\r\n    showAlert,\r\n    hideAlert,\r\n\r\n    title = \"title\",\r\n    AskTheCityPlanReducer,\r\n    onBackClick,\r\n    width,\r\n    menuAction,\r\n    authenRdc,\r\n    menuRdc,\r\n}) => {\r\n    // eslint-disable-next-line\r\n    const [isMenuActive, setMunuActive] = useState(false);\r\n    const [isFindData, setFindData] = useState(false); //เอาไว้เช็คเมื่อค้นหาแล้วไม่พบข้อมูล\r\n    const [isSaveAskForBusiness, setSaveAskForBusinessLocal] = useState(false);\r\n    const [geometry, setGeometry] = useState(null);\r\n    const { state, mapAction, askTheCityPlanAction } = AskTheCityPlanReducer;\r\n    const isResultNull =\r\n        state.canon.length !== 0 ||\r\n        state.landUse.length !== 0 ||\r\n        state.other.length !== 0;\r\n    const isOfficer = checkPermission(\r\n        authenRdc.profile.functions[authenRdc.system],\r\n        CONFIG_MENU.FCN08.ID\r\n    );\r\n    isShowAskForBusiness = isFindData && isOfficer && isResultNull;\r\n\r\n    useEffect(() => {\r\n        return () => {\r\n            //componentWillUnmount\r\n            isShowAskForBusiness = false;\r\n            isSaveAskForBusinessGlobal = false;\r\n        };\r\n    }, []);\r\n\r\n    useEffect(() => {\r\n        if (menuRdc.MobileView && menuRdc.Shortcut) {\r\n            setTimeout(() => {\r\n                genCurrentOnClick(MenuConstants.MODE_DRAW.POINT);\r\n            }, 5000);\r\n        }\r\n    }, []);\r\n\r\n    const resetDrawer = () => {\r\n        mapAction.bindMapCommand(Mapfunction.resetDrawAskTheCityPlan);\r\n    };\r\n\r\n    const setSaveAskForBusiness = (bool) => {\r\n        setSaveAskForBusinessLocal(bool);\r\n        isSaveAskForBusinessGlobal = bool;\r\n    };\r\n\r\n    const handleMenuItemClick = async (itm) => {\r\n        askTheCityPlanAction.clearDataAskTheCityPlan();\r\n        // setMunuActive(itm.isActive)\r\n        await menuAction.closeBtnPrintmap();\r\n        setFindData(false);\r\n        setSaveAskForBusiness(false);\r\n\r\n        switch (itm.id) {\r\n            case MenuConstants.ASK_THE_CITY_PLAN.clickOnMapPoint.id:\r\n                // if (itm.isActive) {\r\n                //     createDrawer(MenuConstants.MODE_DRAW.POINT);\r\n                //     if (width === 'sm' || width === 'xs') {\r\n                //         menuAction.closeMenuPanel();\r\n                //     }\r\n                // } else {\r\n                //     resetDrawer()\r\n                // }\r\n                if (menuRdc.ActiveFunction === ACTIVE_FUNCTION.ASK_PNT) {\r\n                    await menuAction.activeFunction(null);\r\n                    resetDrawer();\r\n                } else {\r\n                    menuAction.activeFunction(ACTIVE_FUNCTION.ASK_PNT);\r\n                    width === \"sm\" ||\r\n                        (width === \"xs\" && menuAction.closeMenuPanel());\r\n                    setTimeout(() => {\r\n                        // set timeout เพื่อแก้ปัญหา willunmount ของ maptool clear event draw\r\n                        createDrawer(MenuConstants.MODE_DRAW.POINT);\r\n                    }, 50);\r\n                }\r\n\r\n                break;\r\n            case MenuConstants.ASK_THE_CITY_PLAN.clickOnMapPolygon.id:\r\n                // if (itm.isActive) {\r\n                //     createDrawer(MenuConstants.MODE_DRAW.POLYGON);\r\n                //     if (width === 'sm' || width === 'xs') {\r\n                //         menuAction.closeMenuPanel();\r\n                //     }\r\n                // } else {\r\n                //     resetDrawer()\r\n                // }\r\n                if (menuRdc.ActiveFunction === ACTIVE_FUNCTION.ASK_POLYGON) {\r\n                    await menuAction.activeFunction(null);\r\n                    resetDrawer();\r\n                } else {\r\n                    menuAction.activeFunction(ACTIVE_FUNCTION.ASK_POLYGON);\r\n                    width === \"sm\" ||\r\n                        (width === \"xs\" && menuAction.closeMenuPanel());\r\n                    setTimeout(() => {\r\n                        // set timeout เพื่อแก้ปัญหา willunmount ของ maptool clear event draw\r\n                        createDrawer(MenuConstants.MODE_DRAW.POLYGON);\r\n                    }, 50);\r\n                }\r\n                break;\r\n            case MenuConstants.ASK_THE_CITY_PLAN.currentLocation.id:\r\n                if (menuRdc.ActiveFunction !== null) {\r\n                    menuAction.activeFunction(null);\r\n                }\r\n                itm.isActive\r\n                    ? genCurrentOnClick(MenuConstants.MODE_DRAW.POINT)\r\n                    : resetDrawer();\r\n                break;\r\n            default:\r\n                if (menuRdc.ActiveFunction !== null) {\r\n                    await menuAction.activeFunction(null);\r\n                }\r\n                resetDrawer();\r\n                break;\r\n        }\r\n    };\r\n\r\n    const genCurrentOnClick = (type) => {\r\n        mapAction.bindMapCommand(Mapfunction.getResultCurrent, {\r\n            callback: handleDrawMapComplete,\r\n            type: type,\r\n        });\r\n    };\r\n\r\n    const createDrawer = (type) => {\r\n        mapAction.bindMapCommand(Mapfunction.createDrawAskTheCityPlan, {\r\n            callback: callbackDrawAskTheCityplan,\r\n            type: type,\r\n            showAlert,\r\n        });\r\n    };\r\n\r\n    const callbackDrawAskTheCityplan = (evt) => {\r\n        if (evt) {\r\n            if (isShowAskForBusiness && !isSaveAskForBusinessGlobal) {\r\n                showAlert({\r\n                    altMsg:\r\n                        \"กิจกรรมที่ขอตรวจสอบยังไม่ถูกจัดเก็บ คุณต้องการกำหนดตำแหน่งใหม่ ?\",\r\n                    altType: 2,\r\n                    callbackCancel: hideAlert,\r\n                    callbackConfirm: callBackConfirmDrawAskTheCityplan(evt),\r\n                });\r\n            } else {\r\n                mapAction.bindMapCommand(\r\n                    Mapfunction.addGraphicDrawAskTheCityPlan,\r\n                    {\r\n                        callback: handleDrawMapComplete,\r\n                        evt,\r\n                    }\r\n                );\r\n            }\r\n        }\r\n    };\r\n\r\n    const callBackConfirmDrawAskTheCityplan = (evtDraw) => (evt) => {\r\n        hideAlert();\r\n        mapAction.bindMapCommand(Mapfunction.addGraphicDrawAskTheCityPlan, {\r\n            callback: handleDrawMapComplete,\r\n            evt: evtDraw,\r\n        });\r\n    };\r\n\r\n    const callbackIdentifyComprehensivePlanResult = (result, geometry) => {\r\n        mapAction.bindClearMapCommand();\r\n        menuAction.openBtnPrintmap();\r\n        askTheCityPlanAction.saveDatatAskTheCityPlan(makeDataResult(result));\r\n        setGeometry(geometry);\r\n        setFindData(true);\r\n    };\r\n\r\n    const makeDataResult = (result) => {\r\n        const layerSequence = window.CONFIG_COMPREHENSIVE_PLAN.LAYER_SEQUENCE;\r\n        const canon = [],\r\n            landUse = [],\r\n            other = [];\r\n\r\n        result.forEach((itm) => {\r\n            if (layerSequence.canon.layerID.indexOf(itm.layerId) !== -1) {\r\n                canon.push(itm);\r\n            } else if (\r\n                layerSequence.landUse.layerID.indexOf(itm.layerId) !== -1\r\n            ) {\r\n                landUse.push(itm);\r\n            } else if (\r\n                layerSequence.other.layerID.indexOf(itm.layerId) !== -1\r\n            ) {\r\n                other.push(itm);\r\n            }\r\n        });\r\n        return { canon, landUse, other };\r\n    };\r\n\r\n    const handleDrawMapComplete = (evt) => {\r\n        setFindData(false);\r\n        setSaveAskForBusiness(false);\r\n        mapAction.bindClearMapCommand();\r\n\r\n        if (evt) {\r\n            mapAction.bindMapCommand(Mapfunction.IdentifyComprehensivePlanCMP, {\r\n                geometry: evt.geometry,\r\n                callbackFn: callbackIdentifyComprehensivePlanResult,\r\n            });\r\n            menuAction.openMenuPanel();\r\n        }\r\n    };\r\n\r\n    const confirmClearResult = () => {\r\n        showAlert({\r\n            altMsg:\r\n                \"กิจกรรมที่ขอตรวจสอบยังไม่ถูกจัดเก็บ คุณต้องการเคลียร์ข้อมูล ?\",\r\n            altType: 2,\r\n            callbackCancel: hideAlert,\r\n            callbackConfirm: handleClickClearResult,\r\n        });\r\n    };\r\n\r\n    const handleClickClearResult = () => {\r\n        askTheCityPlanAction.clearDataAskTheCityPlan();\r\n        menuRdc.BtnPrintmapVisible && menuAction.closeBtnPrintmap();\r\n        mapAction.bindMapCommand(Mapfunction.clearGraphic, [\r\n            LISTGRAPHICLAYER.GRAPHICLAYER_ASK_THE_CITY_PLAN,\r\n            LISTGRAPHICLAYER.GRAPHICLAYER_CITY_PLAN,\r\n            LISTGRAPHICLAYER.GRAPHICLAYER_CITY_PLAN_TEXT,\r\n        ]);\r\n        setFindData(false);\r\n        setSaveAskForBusiness(false);\r\n        hideAlert();\r\n    };\r\n\r\n    const hideResult = () => {\r\n        setFindData(false);\r\n    };\r\n\r\n    const confirmClickBack = () => {\r\n        showAlert({\r\n            altMsg: \"กิจกรรมที่ขอตรวจสอบยังไม่ถูกจัดเก็บ คุณต้องการย้อนกลับ ?\",\r\n            altType: 2,\r\n            callbackCancel: hideAlert,\r\n            callbackConfirm: handleBackClick,\r\n        });\r\n    };\r\n\r\n    const handleBackClick = () => {\r\n        onBackClick();\r\n        menuAction.activeFunction(null);\r\n        menuRdc.BtnPrintmapVisible && menuAction.closeBtnPrintmap();\r\n    };\r\n\r\n    return (\r\n        <AskTheCityPlanView\r\n            title={title}\r\n            onBackClick={\r\n                isShowAskForBusiness && !isSaveAskForBusiness\r\n                    ? confirmClickBack\r\n                    : handleBackClick\r\n            }>\r\n            <FunctionMenu\r\n                // onMenuItemClick={handleMenuItemClick}\r\n                showAlert={showAlert}\r\n                hideAlert={hideAlert}\r\n                isShowConfirm={isShowAskForBusiness && !isSaveAskForBusiness}\r\n                onMenuItemClick={handleMenuItemClick}\r\n                callbackIdentify={callbackIdentifyComprehensivePlanResult}\r\n                hideResult={hideResult}\r\n                activeFunction={menuRdc.ActiveFunction}\r\n            />\r\n            {isFindData && (\r\n                <Result\r\n                    result={state}\r\n                    isMenuActive={isMenuActive}\r\n                    isFindData={isFindData}\r\n                    onClickClearResult={handleClickClearResult}\r\n                    isPeople={authenRdc.profile ? false : true} //เช็คว่าเป็นประชาชนหรือเจ้าหน้าที่\r\n                />\r\n            )}\r\n            {isShowAskForBusiness && (\r\n                <AskForBusiness\r\n                    geometry={geometry}\r\n                    setSaveAskForBusiness={setSaveAskForBusiness}\r\n                    onClickClearResult={\r\n                        !isSaveAskForBusiness && isShowAskForBusiness\r\n                            ? confirmClearResult\r\n                            : handleClickClearResult\r\n                    }\r\n                    onBackClick={\r\n                        isShowAskForBusiness && !isSaveAskForBusiness\r\n                            ? confirmClickBack\r\n                            : handleBackClick\r\n                    }\r\n                />\r\n            )}\r\n            <AlertMessage\r\n                title={altTitle}\r\n                text={altMsg}\r\n                type={altType}\r\n                showAlert={isShowAlt}\r\n                onSubmit={callbackConfirm}\r\n                onCancel={callbackCancel}\r\n            />\r\n        </AskTheCityPlanView>\r\n    );\r\n};\r\n\r\nAskTheCityPlan.propTypes = {\r\n    width: PropTypes.string.isRequired,\r\n};\r\n\r\nconst mapStateToProps = (state) => ({\r\n    // menuRdc: state.menu,\r\n    authenRdc: state.authen,\r\n    menuRdc: state.menu,\r\n});\r\n\r\nconst mapDispatchToProps = (dispatch) => ({\r\n    menuAction: bindActionCreators(MenuAction, dispatch),\r\n});\r\n\r\nconst enhance = compose(\r\n    connect(\r\n        mapStateToProps,\r\n        mapDispatchToProps\r\n    ),\r\n    WithPanelContentReducer,\r\n    WithAskTheCityPlanReducer,\r\n    withWidth()\r\n);\r\n\r\nexport default WithAlertMessage(enhance(AskTheCityPlan));\r\n","import React from 'react';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { withStyles } from '@material-ui/styles';\r\nimport AppBarHeaderView from '../../../AppBarHeaderView';\r\nimport FormSearchLandView from './FormSearchLandView';\r\n\r\nconst SearchLandInfoView = ({\r\n    classes,\r\n    children,\r\n    title,\r\n    type,\r\n    luDistrict,\r\n    handleSubmit,\r\n    onSubmit,\r\n    onBackClick,\r\n    // onClickCancel\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root}>\r\n            <AppBarHeaderView\r\n                title={title}\r\n                onClickBack={onBackClick}\r\n            />\r\n\r\n            {/*########### FORM ###########*/}\r\n            <Grid container className={classes.rootForm}>\r\n                <FormSearchLandView\r\n                    type={type} \r\n                    luDistrict={luDistrict}\r\n                    handleSubmit={handleSubmit}\r\n                    onSubmit={onSubmit}\r\n                    onClickBack={onBackClick} //ถ้าไม่ส่งจะไม่แสดงปุ่มยกเลิก\r\n                />\r\n            </Grid>\r\n\r\n            {/*########### RESULT ###########*/}\r\n            <Grid container className={classes.containerResult}>\r\n                {/* <Grid item xs={12}></Grid> */}\r\n                {children}\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        width: '100%',\r\n        height: '100%',\r\n        position:'relative'\r\n    },\r\n    rootForm: {\r\n        padding: '10px',\r\n        height:'305px',\r\n        width:'100%',\r\n        position:'relative'\r\n    },\r\n    containerResult: {\r\n        // height: 'calc(100% - 350px)', // + 45px ของ appbar\r\n        width:'100%',\r\n        position: 'relative',\r\n        height: '100%'\r\n    },\r\n    form: {\r\n        width: '100%'\r\n    },\r\n    btnCancel: {\r\n        marginLeft: '10px',\r\n    },\r\n}))(SearchLandInfoView)\r\n","import React, { Component, Fragment } from 'react';\r\nimport { reduxForm, formValueSelector } from \"redux-form\";\r\nimport { compose } from \"recompose\";\r\nimport { connect } from \"react-redux\";\r\n\r\n//import constants\r\nimport { TYPE_SEARCH_LAND_INFORMATION } from '../../../../../../Constants/Constants';\r\n\r\n//import service - utils\r\nimport { fetchGet_ } from '../../../../../../Utilities/ServiceUtils';\r\nimport { validateSearchLandInfo } from '../../../../../../Utilities/Validate';\r\n\r\n//import component\r\nimport SearchLandInfoView from '../../../../../../Presentationals/Web/Panel/Menu/MenuContent/SearchLandInfo/SearchLandInfoView';\r\nimport ResultSearchLandInfo from './ResultSearchLandInfo';\r\nimport Loading from '../../../../../../Controls/Containers/Loading'\r\nimport WithLoading from '../../../../../../HOC/WithLoading';\r\n\r\nclass SearchLandInfo extends Component {\r\n    constructor() {\r\n        super();\r\n        this.state = {\r\n            luDistrict: [],\r\n            results: null,\r\n            typeSearch: null\r\n        }\r\n        this.refResultSearcLandInfo = null;\r\n    }\r\n\r\n    componentDidMount() {\r\n        this.callServiceDistrict();\r\n    }\r\n\r\n    callServiceDistrict = () => {\r\n        fetchGet_(`${process.env.REACT_APP_LU_DISTRICT}?provinceid=10`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(data => {\r\n                this.setState({\r\n                    luDistrict: data.result\r\n                })\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceDistric', ex)\r\n            })\r\n    }\r\n\r\n    handleSubmit = (values) => {\r\n        const { showLoading, hideLoading } = this.props;\r\n        showLoading();\r\n        if (this.refResultSearcLandInfo) {\r\n            this.refResultSearcLandInfo.claerResultActive();\r\n        }\r\n\r\n        let promiseGetResult = null\r\n        switch (values.type) {\r\n            case TYPE_SEARCH_LAND_INFORMATION.DISTRICT:\r\n                promiseGetResult = this.callServiceGetParcelDistrict(values.parcelNo, values.district)\r\n                break;\r\n            case TYPE_SEARCH_LAND_INFORMATION.SHEET_NO:\r\n                promiseGetResult = this.callServiceGetLandMap(values.landNo, values.sheetNo)\r\n                break;\r\n            case TYPE_SEARCH_LAND_INFORMATION.SURVEY_NO:\r\n                promiseGetResult = this.callServiceGetParcelSurvey(values.parcelNo, values.surveyNo)\r\n                break;\r\n            default:\r\n                break;\r\n        }\r\n\r\n        promiseGetResult.then(res => {\r\n            if (res) {\r\n                this.setState({\r\n                    results: res.Result,\r\n                    typeSearch: values.type\r\n                })\r\n            } else {\r\n                this.setState({\r\n                    results: [],\r\n                    typeSearch: values.type\r\n                })\r\n            }\r\n            hideLoading();\r\n        })\r\n    }\r\n\r\n    callServiceGetParcelDistrict = (parcelNo, district) => {\r\n        return fetchGet_(`${process.env.REACT_APP_PARCEL_DISTRICT}?parcelNo=${parcelNo}&district=${district}`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json()\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceGetParcelDistrict ', ex)\r\n            })\r\n    }\r\n\r\n    callServiceGetParcelSurvey = (parcelNo, surveyNo) => {\r\n        return fetchGet_(`${process.env.REACT_APP_PARCEL_SURVEY}?parcelNo=${parcelNo}&surveyNo=${surveyNo}`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json()\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceGetParcelSurvey ', ex)\r\n            })\r\n    }\r\n\r\n    callServiceGetLandMap = (landNo, map1k) => {\r\n        return fetchGet_(`${process.env.REACT_APP_LANDMAP}?landNo=${landNo}&map1k=${map1k}`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json()\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceGetLandMap ', ex)\r\n            })\r\n    }\r\n\r\n\r\n    handleRefResultSearcLandInfo = node => {\r\n        this.refResultSearcLandInfo = node;\r\n    }\r\n\r\n    handleCancel = () => {\r\n        this.setState({\r\n            results: null,\r\n            typeSearch: null\r\n        })\r\n        this.props.initialize({ \"type\": TYPE_SEARCH_LAND_INFORMATION.DISTRICT })\r\n    }\r\n\r\n    render() {\r\n        const { luDistrict, results, typeSearch } = this.state;\r\n        const { title, formRdc, onBackClick, handleSubmit, isShowLoading } = this.props;\r\n\r\n        return (\r\n            <Fragment>\r\n                <SearchLandInfoView\r\n                    title={title}\r\n                    luDistrict={luDistrict}\r\n                    type={formRdc.type}\r\n                    handleSubmit={handleSubmit}\r\n                    onSubmit={this.handleSubmit}\r\n                    onBackClick={onBackClick}\r\n                    onClickCancel={this.handleCancel}\r\n                >\r\n                    {results && <ResultSearchLandInfo\r\n                        results={results}\r\n                        typeSearch={typeSearch}\r\n                        refResultSearcLandInfo={this.handleRefResultSearcLandInfo}\r\n                    />}\r\n                </SearchLandInfoView>\r\n                <Loading isShowLoading={isShowLoading} />\r\n            </Fragment>\r\n        )\r\n    }\r\n}\r\n\r\nconst reduxFormParameter = {\r\n    form: \"searchLandInfo\",\r\n    validate: validateSearchLandInfo,\r\n    initialValues: {\r\n        type: TYPE_SEARCH_LAND_INFORMATION.DISTRICT\r\n    }\r\n};\r\n\r\nconst mapStateToProps = state => ({\r\n    // submitPmrRdc: state.submitPmr,\r\n    formRdc: selector(state, \"type\", \"\"),\r\n})\r\n\r\nconst selector = formValueSelector('searchLandInfo')\r\n\r\nconst enhance = compose(\r\n    connect(\r\n        mapStateToProps,\r\n        null\r\n    ),\r\n    reduxForm(reduxFormParameter),\r\n    WithLoading\r\n);\r\n\r\n\r\nexport default enhance(SearchLandInfo)\r\n","import React from 'react';\r\nimport {PieChart, Pie, Cell} from 'recharts';\r\n\r\nconst RADIAN = Math.PI / 180;\r\nconst renderCustomizedLabel = ({\r\n  cx, cy, midAngle, innerRadius, outerRadius, percent, index, fill, textAnchor\r\n}) => {\r\n  \r\n  const radius = 25 + innerRadius + (outerRadius - innerRadius);\r\n  const x = cx + radius * Math.cos(-midAngle * RADIAN);\r\n  const y = cy + radius * Math.sin(-midAngle * RADIAN);\r\n\r\n  let valuePercent = parseInt((percent * 100).toFixed(0), 10);\r\n\r\n  return (\r\n    <text x={x} y={y} textAnchor={x > cx ? 'start' : 'end'} fontSize=\"1em\" dominantBaseline=\"central\">\r\n      {`${valuePercent}%`}\r\n    </text>\r\n  );\r\n};\r\n\r\nconst StatisticPieChart = props => {\r\n    const {\r\n      pieRef,\r\n      data=[]\r\n    } = props;\r\n    return (\r\n    <PieChart width={600} height={600} wrapperStyle={{marginLeft: '10px'}} ref={pieRef}>\r\n     {/* <PieChart width={500} height={500} ref={pieRef}> */}\r\n      <Pie data={data} dataKey=\"value\" nameKey=\"name\" cx=\"50%\" cy=\"50%\" fill=\"#8884d8\" label={renderCustomizedLabel}>\r\n        {\r\n          data.map((entry, index)=> (<Cell key={`pie_${index}`} fill={entry.color} stroke={'black'}/>))\r\n        }\r\n      </Pie>\r\n    </PieChart>)\r\n}\r\n\r\nexport default StatisticPieChart;","import React from 'react';\r\nimport StopLegend from '@material-ui/icons/Stop';\r\nconst StatisticComprehensiveLegend =  ({\r\n    legendRef,\r\n    data=[]\r\n}) => {\r\n    return (\r\n    <div ref={legendRef}>\r\n        {\r\n            data.map(itm => <StopLegend key={`legend_${itm.id}`} id={itm.id} data-name={itm.name} style={{fill: itm.color}}/>)\r\n        }\r\n    </div>)\r\n}\r\n\r\nexport default StatisticComprehensiveLegend;","import React from 'react';\r\nimport { Scrollbars } from 'react-custom-scrollbars';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport classnames from 'classnames';\r\nimport { Field } from \"redux-form\";\r\nimport Button from '../../../../../../../Controls/Containers/Button';\r\nimport ReduxFormDatePickerThai from '../../../../../../../Controls/Containers/Picker/ReduxFormDatePickerThai';\r\nimport StatisticPieChart from '../../../../../../../Containers/Web/Panel/Menu/MenuContent/Report/StatisticCheckComprehensive/StatisticPieChart';\r\nimport StatisticComprehensiveLegend from '../../../../../../../Containers/Web/Panel/Menu/MenuContent/Report/StatisticCheckComprehensive/StatisticComprehensiveLegend';\r\nimport AppBarHeaderView from '../../../../AppBarHeaderView';\r\n\r\nconst StatisticCheckComprehensiveView = ({\r\n    classes,\r\n    pieRef,\r\n    title,\r\n    legendRef,\r\n    pieChartData = [],\r\n    startDate,\r\n    endDate,\r\n    onBackClick,\r\n    onSubmit,\r\n    onStartDateChange,\r\n    onEndDateChange\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root}>\r\n            <AppBarHeaderView\r\n                title={title}\r\n                onClickBack={onBackClick}\r\n            />\r\n            <Grid container className={classnames(classes.content)}>\r\n                <Scrollbars\r\n                    autoHide={false}\r\n                    universal={true}>\r\n\r\n                    <Grid item xs={12} className={classes.content_in}>\r\n                        <Field\r\n                            name={'startDate'}\r\n                            component={ReduxFormDatePickerThai}\r\n                            label={'ช่วงวันที่'}\r\n                            onChange={onStartDateChange}\r\n                            maxDate={endDate}\r\n                            required\r\n                        />\r\n                        <Field\r\n                            name={'endDate'}\r\n                            component={ReduxFormDatePickerThai}\r\n                            label={'ถึงวันที่'}\r\n                            onChange={onEndDateChange}\r\n                            minDate={startDate}\r\n                            required\r\n                        />\r\n\r\n\r\n                        <Grid container justify=\"center\" spacing={24} className={classes.divFooter}>\r\n                            <Grid item>\r\n                                <Button\r\n                                    label=\"ยกเลิก\"\r\n                                    onClick={onBackClick}\r\n                                />\r\n                            </Grid>\r\n                            <Grid item>\r\n                                <Button\r\n                                    type=\"submit\"\r\n                                    label=\"ค้นหา\"\r\n                                    onClick={onSubmit}\r\n                                />\r\n                            </Grid>\r\n                        </Grid>\r\n                        <Grid container style={{ display: 'none' }}>{/*สำหรับนำไปสร้าง PDF*/}\r\n                            <StatisticPieChart pieRef={pieRef} data={pieChartData} />\r\n                            <StatisticComprehensiveLegend legendRef={legendRef} data={pieChartData} />\r\n                        </Grid>\r\n                    </Grid>\r\n                </Scrollbars>\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    _hide: {\r\n        display: 'none'\r\n    },\r\n    root: {\r\n        position: 'absolute',\r\n        top: 0,\r\n        bottom: 0,\r\n        right: 0,\r\n        left: 0\r\n    },\r\n    content: {\r\n        position: 'relative',\r\n        height: 'calc(100% - 45px)'\r\n    },\r\n    content_in: {\r\n        // height: '100%',\r\n        // paddingTop: '10px',\r\n        // paddingLeft: '5px',\r\n        // paddingRight: '5px',\r\n        // paddingBottom: '5px'\r\n        padding:\"10px\",\r\n        width:\"100%\"\r\n    },\r\n    divFooter:{\r\n        marginTop:\"10px\",\r\n        marginBottom:\"10px\"\r\n    }\r\n}))(StatisticCheckComprehensiveView);","import {numberWithCommas} from '../../../../../../../Utilities/Utils'\r\nimport pdfMake from \"pdfmake/build/pdfmake\";\r\nimport pdfFonts from \"pdfmake/build/vfs_fonts\";\r\nimport { FOOTER_REPORT } from '../../../../../../../Constants/Constants'\r\n\r\npdfMake.vfs = pdfFonts.pdfMake.vfs;\r\npdfMake.fonts = {\r\n    THSarabun: {\r\n        normal: 'THSarabun.ttf',\r\n        bold: 'THSarabun-Bold.ttf',\r\n        italics: 'THSarabun-Italic.ttf',\r\n        bolditalics: 'THSarabun-BoldItalic.ttf'\r\n    },\r\n    Roboto: {\r\n        normal: 'Roboto-Regular.ttf',\r\n        bold: 'Roboto-Medium.ttf',\r\n        italics: 'Roboto-Italic.ttf',\r\n        bolditalics: 'Roboto-MediumItalic.ttf'\r\n    }\r\n}\r\n\r\nconst configPage = {\r\n    pageSize: 'A4',\r\n    pageOrientation: 'landscape',//portrait\r\n    info: {\r\n        title: 'รายงานสถิติการรับบริการตรวจสอบผังเมือง',\r\n        subject: 'รายงานสถิติการรับบริการตรวจสอบผังเมือง',\r\n        keywords: 'รายงานสถิติการรับบริการตรวจสอบผังเมือง',\r\n    }\r\n}\r\n\r\n\r\nconst fontStyle = {\r\n    fontHeading: {\r\n        fontSize: 18\r\n    },\r\n    fontTitle: {\r\n        fontSize: 16\r\n    },\r\n    fontSubheading: {\r\n        fontSize: 14\r\n    },\r\n    fontBody: {\r\n        fontSize: 12\r\n    }\r\n}\r\n\r\nconst tableStyle = {\r\n    rowNumber: {\r\n        alignment: 'right'\r\n    },\r\n    rowHeaderColor: {\r\n        fillColor: '#5E9A50'\r\n    },\r\n    rowFooterColor: {\r\n        fillColor: '#5E9A50'\r\n    },\r\n    rowOtherColor1: {\r\n        fillColor: '#D0EFDA'\r\n    },\r\n    rowOtherColor2: {\r\n        fillColor: '#E5F6E8'\r\n    }\r\n}\r\n\r\nconst SubmaryRow = data => {\r\n    const totalMonth = data.map(itm => itm.summary).reduce((accumulator, currentValue) => accumulator + currentValue);\r\n    const row = data.map(itm => {\r\n        return [\r\n            {\r\n                text: itm.activity,\r\n                style: ['fontTitle', 'rowOtherColor1'],\r\n                bold:true\r\n            },\r\n            {\r\n                text: numberWithCommas(itm.summary),\r\n                style: ['fontTitle', 'rowNumber', 'rowOtherColor1'],\r\n                bold:true\r\n            }\r\n        ]\r\n    })\r\n    return [\r\n        ...row,\r\n        [\r\n            {\r\n                text: 'รวม',\r\n                style: ['fontTitle', 'rowFooterColor'],\r\n                bold:true\r\n            },\r\n            {\r\n                text: numberWithCommas(totalMonth),\r\n                style: ['fontTitle', 'rowNumber', 'rowFooterColor'],\r\n                bold:true\r\n            }\r\n        ]\r\n    ]\r\n}\r\n\r\nconst SummaryTable = ({datasource}) => {\r\n    return [\r\n        {\r\n            margin: [-25,0,0,0],//[left, top, right, bottom]\r\n            columns: [\r\n                // { width: '*', text: '' },\r\n                {\r\n                    // width: 'auto',\r\n                    table: {\r\n                        // headers are automatically repeated if the table spans over multiple pages\r\n                        // you can declare how many rows should be treated as headers\r\n                        headerRows: 1,\r\n                        widths: [ 200, 100],\r\n                        body: [\r\n\r\n                            // Table Header\r\n                            [\r\n                                {text: 'กิจกรรมที่ขอตรวจสอบ', style: ['fontTitle', 'rowHeaderColor'], bold:true},\r\n                                {text: 'จำนวน', style: ['fontTitle', 'alignmentRight', 'rowHeaderColor'], bold:true},\r\n                            ],\r\n                            ...SubmaryRow(datasource)\r\n                        ]\r\n                    }\r\n                },\r\n                // { width: '*', text: '' }\r\n            ]\r\n        }\r\n    ]\r\n}\r\n\r\nconst LegendChart = (legendData=[]) => {\r\n    return {\r\n        margin: [70,0,0,20],//[left, top, right, bottom]\r\n        columns:[\r\n            {\r\n                stack: legendData.map(itm => (\r\n                    {\r\n                        margin: [0,0,10,0],\r\n                        columnGap: 10,\r\n                        columns:[{\r\n                            image: itm.image, \r\n                            alignment: 'left',\r\n                            width: 25\r\n                        },\r\n                        {\r\n                            text: itm.name,\r\n                            style: ['fontSubheading', 'rowHeaderColor'],\r\n                            bold:true,\r\n                            width: 100,\r\n                            margin: [0,10,0,0]//[left, top, right, bottom]\r\n                        }]\r\n                    }\r\n                ))\r\n            }\r\n        ]\r\n    }\r\n}\r\n\r\nconst Chart = (chartPNGBase64, legendData) => {\r\n    return [\r\n        {\r\n            margin: [-75,0,-20,0],//[left, top, right, bottom]\r\n            columns: [\r\n                {\r\n                    alignment:'left',\r\n                    table: {\r\n                        body: [\r\n                            [\r\n                                {\r\n                                    columns:[\r\n                                        {\r\n                                            image: chartPNGBase64,\r\n                                            alignment: 'left',\r\n                                            margin: [20,10,0,20],//[left, top, right, bottom]\r\n                                            width: 240\r\n                                        },\r\n                                        LegendChart(legendData)\r\n                                    ]\r\n                                }\r\n                            ]\r\n                        ]\r\n                    }\r\n                },\r\n            ]\r\n        }\r\n    ]\r\n}\r\n\r\nconst StatisticComprehensiveExportPDF = (data, chartPNGBase64, mapPNGBase64) => {\r\n    const docDefinition = {\r\n        ...configPage,\r\n        // footer: {\r\n        //     columns: [\r\n        //         { \r\n        //             text: FOOTER_REPORT,\r\n        //             alignment: 'right',\r\n        //             margin: [0,20,35,0],\r\n        //             fontSize: 10\r\n        //         }\r\n        //     ]\r\n        // },\r\n        footer: function(currentPage, pageCount,pageSize) {\r\n            if(currentPage !== pageCount) {\r\n                return [\r\n                    { \r\n                        text: FOOTER_REPORT,\r\n                        alignment: 'right',\r\n                        margin: [0,0,35,0],\r\n                        fontSize: 10\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        content: [\r\n            {\r\n                text: 'สถิติการขอรับบริการตรวจสอบการใช้ประโยชน์ที่ดินตามผังเมืองรวมกรุงเทพมหานคร', \r\n                style: [ 'fontTitle', 'header','alignmentCenter'],\r\n                width: '*',\r\n                noWrap: true\r\n            },\r\n            {\r\n                margin: [0,15,0,0],//[left, top, right, bottom]\r\n                columns:[\r\n                    {\r\n                        text: `ตั้งแต่ ${data.startDate}`, \r\n                        style: [ 'fontTitle', 'header','alignmentRight'],\r\n                        width: '*',\r\n                        noWrap: true\r\n                    },\r\n                    {\r\n                        text: `ถึง ${data.endDate}`, \r\n                        style: [ 'fontTitle', 'header'],\r\n                        width: '*',\r\n                        noWrap: true\r\n                    }\r\n                ]\r\n            },\r\n            {\r\n                margin: [20,15,0,0],//[left, top, right, bottom]\r\n                columnGap: 0,\r\n                columns:[\r\n                    ...SummaryTable(data),\r\n                    ...Chart(chartPNGBase64, data.pngLegendList)\r\n                ]\r\n            },\r\n            {\r\n                text: '',\r\n                pageOrientation: 'landscape',\r\n                pageBreak: 'after'\r\n            },\r\n            {\r\n                image: mapPNGBase64,\r\n                alignment: 'left',\r\n                width:825,\r\n                height:575,\r\n                margin: [-30,-30,0,0],//[left, top, right, bottom]\r\n                // margin: [-50,-50,0,0],//[left, top, right, bottom]\r\n            }\r\n            \r\n        ],\r\n        styles: {\r\n            ...fontStyle,\r\n            ...tableStyle,\r\n            header: {\r\n                bold: true\r\n            },\r\n            alignmentCenter: {\r\n                alignment: 'center'\r\n            },\r\n            alignmentRight: {\r\n                alignment: 'right'\r\n            }\r\n        },\r\n        defaultStyle: {\r\n            font: \"THSarabun\",\r\n            columnGap: 10,\r\n        }\r\n    };\r\n    // pdfMake.createPdf(docDefinition).open()\r\n    pdfMake.createPdf(docDefinition).download('รายงานสถิติการรับบริการตรวจสอบผังเมือง.pdf'); \r\n}\r\n\r\nexport default StatisticComprehensiveExportPDF;","import React, {Fragment, useState, useEffect, useRef} from 'react';\r\nimport { \r\n    reduxForm, \r\n    formValueSelector\r\n} from \"redux-form\";\r\nimport {connect} from 'react-redux';\r\nimport {bindActionCreators} from 'redux';\r\nimport { compose } from \"recompose\";\r\nimport {\r\n    isAfter,\r\n    format,\r\n    getYear,\r\n\t// addDays\r\n} from \"date-fns\";\r\nimport enLocale from \"date-fns/locale/en-US\";\r\nimport thLocale from \"date-fns/locale/th\";\r\n\r\n//import component\r\nimport Loading from '../../../../../../../Controls/Containers/Loading';\r\nimport AlertMessageSuper from '../../../../../../../Controls/Containers/AlertMessageSuper';\r\nimport WithAlertMessage from '../../../../../../../HOC/WithAlertMessage';\r\nimport StatisticCheckComprehensiveView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/Report/StatisticCheckComprehensive/StatisticCheckComprehensiveView';\r\nimport StatisticComprehensiveExportPDF from './StatisticComprehensiveExportPDF';\r\n\r\n//import service - utils\r\nimport * as Util from '../../../../../../../Utilities/Utils';\r\nimport * as ServiceUtil from '../../../../../../../Utilities/ServiceUtils';\r\n\r\n//import actions\r\nimport * as MapAction from '../../../../../../../Actions/Web/Maps/MapAction';\r\nimport * as MapFunction from '../../../../../../../Map/MapFunctions';\r\n\r\n//import constants\r\nimport * as Constants from '../../../../../../../Constants/Constants';\r\n\r\nconst StatisticCheckComprehensive = (props) => {\r\n    const {\r\n        onBackClick,\r\n        handleSubmit,\r\n        FormData,\r\n        mapAction,\r\n        title,\r\n        change,\r\n        showAlert,\r\n        hideAlert,\r\n    } = props;\r\n\r\n    const pieRef = useRef(null);\r\n    const legendRef = useRef(null);\r\n    const [pieChartData, setPieChartData] = useState([]);\r\n    const [isLoading, setLoading] = useState(false);\r\n    const [startDate, setStartDate] = useState(new Date());\r\n    const [endDate, setEndDate] = useState(new Date());\r\n\r\n    // const willUnmountComponent = async () => {\r\n    //     await mapAction.bindMapCommand(MapFunction.mapRemoveLayer, Constants.LAYER_ID.CPUDD_QUERY_PLAN);\r\n    //     console.log('un')\r\n    // }\r\n\r\n    useEffect(() => {\r\n        mapAction.bindMapCommand(MapFunction.addLayerCPUDDQueryPlan);\r\n        defaultDateField();\r\n        // return willUnmountComponent\r\n    }, []);\r\n\r\n    const defaultDateField = () => {\r\n        change('startDate', new Date());\r\n        change('endDate', new Date());\r\n    }\r\n    \r\n    const checkDate = () => {\r\n        let isValid = true;\r\n        if(FormData.startDate && FormData.endDate){\r\n            if(isAfter(FormData.startDate, FormData.endDate)){\r\n                showAlert({ altMsg: \"วันเริ่มต้นมากกว่าวันสิ้นสุด\" , callbackClose: hideAlert})\r\n                isValid = false;\r\n            }\r\n        }\r\n\r\n        return isValid;\r\n    }\r\n\r\n    const toDataURL = url => fetch(url)\r\n    .then(response => response.blob())\r\n    .then(blob => new Promise((resolve, reject) => {\r\n        const reader = new FileReader()\r\n        reader.onloadend = () => resolve(reader.result)\r\n        reader.onerror = reject\r\n        reader.readAsDataURL(blob)\r\n    }))\r\n\r\n    const getExportData = async (startDate, endDate) => {\r\n        let result = [];\r\n        try{\r\n            const response = await ServiceUtil.fetchGet_(`${process.env.REACT_APP_GET_STATISTIC_COMPREHENSIVE_CMP}?datebegin=${startDate}&dateend=${endDate}`)\r\n            const responseJson = await response.json();\r\n            if(responseJson){\r\n                const serviceResult = responseJson.result;\r\n                const pieChartDetail = [];\r\n                serviceResult.forEach(itm => {\r\n                    if(itm.summary > 0){\r\n                        result.push(itm);\r\n                        pieChartDetail.push({\r\n                            id: itm.ID,\r\n                            name: itm.activity,\r\n                            value: itm.summary,\r\n                            color: itm.color ? itm.color : 'black'\r\n                        })\r\n                    }\r\n                });\r\n                setPieChartData(pieChartDetail);\r\n            }\r\n            else{//กรณีที่ค่าจาก service null\r\n                setLoading(false);\r\n                showAlert({ altMsg: \"ไม่พบข้อมูลสำหรับออกรายงาน\" , callbackClose: hideAlert})\r\n            }\r\n        }\r\n        catch(err){\r\n            setLoading(false);\r\n            showAlert({ altMsg: Constants.ALERT_MESSAGE.POPUP.SYSTEM_ERROR , callbackClose: hideAlert})\r\n        }\r\n        return result;\r\n    }\r\n\r\n    const svgLegendToPNG = (domNodeSVG) => {\r\n        return new Promise((resolv, reject) => {\r\n            try{\r\n                const svgURL = new XMLSerializer().serializeToString(domNodeSVG);\r\n                const svgBlob = new Blob([svgURL], {type: \"image/svg+xml;charset=utf-8\"});\r\n                const url = URL.createObjectURL(svgBlob);\r\n                const img = new Image();\r\n                const canvas = document.createElement(\"canvas\")\r\n                canvas.width = 350;\r\n                canvas.height = 350;\r\n                const ctx = canvas.getContext(\"2d\");\r\n                img.onload = function() {\r\n                    ctx.drawImage(img, 0, 0, img.width, img.height,  0, 0, canvas.width, canvas.height);\r\n                    var png = canvas.toDataURL(\"image/png\");\r\n                    resolv({\r\n                        id: domNodeSVG.id,\r\n                        name: domNodeSVG.dataset.name,\r\n                        image: png\r\n                    })\r\n                    URL.revokeObjectURL(png);\r\n                };\r\n                img.src = url;\r\n            }\r\n            catch(err){\r\n                reject(null)\r\n            }\r\n        })\r\n    }\r\n\r\n    const getPNGLegend = async () => {\r\n        const listNodeLegend  = legendRef.current.childNodes;\r\n        let listPromiseLegend = [];\r\n        listNodeLegend.forEach(node => {\r\n            listPromiseLegend.push(svgLegendToPNG(node))\r\n        })\r\n        const listPNGLegend = await Promise.all(listPromiseLegend);\r\n        return listPNGLegend;\r\n    }\r\n\r\n    const waitRender = () => {\r\n        return new Promise(resolv => {\r\n            setTimeout(()=>{\r\n                resolv(null);\r\n            }, 5000)//5s\r\n        })\r\n    }\r\n\r\n    const printMapCallback = (url, attribute) => {\r\n        // console.log('===>>> printMapCallback');\r\n        const displayStartDate = `${toDateString(attribute.startDate, `d MMMM`, thLocale)} ${getYear(attribute.startDate) + 543}`;\r\n        const displayEndDate = `${toDateString(attribute.endDate, `d MMMM`, thLocale)} ${getYear(attribute.endDate) + 543}`;\r\n        if(url){\r\n            toDataURL(url)\r\n            .then(async mapPNGBase64 => {\r\n                const nodeBarChart = pieRef.current.container.children[0];\r\n                const pngChart = await Util.svg2pngBase64(nodeBarChart, 400, 400);\r\n                const pngLegendList = await getPNGLegend();\r\n\r\n                waitRender().then(()=>{\r\n                    setLoading(false);\r\n                    //Export to PDF\r\n                    StatisticComprehensiveExportPDF({\r\n                        startDate: displayStartDate,\r\n                        endDate: displayEndDate,\r\n                        datasource: attribute.exportData,\r\n                        pngLegendList: pngLegendList\r\n                    }, pngChart, mapPNGBase64);\r\n                })\r\n            })\r\n        }\r\n        else{//generate map ไม่ได้\r\n            setLoading(false);\r\n        }\r\n        \r\n    }\r\n    const handleSubmitForm = async values => {\r\n        if(checkDate()){\r\n            setLoading(true);\r\n            const serviceStartDate =  `${toDateString(values.startDate, `yyyy/MM/dd`)} 00:00:00`;\r\n            const serviceEndDate = `${toDateString(values.endDate, `yyyy/MM/dd`)} 23:59:59`\r\n            const exportData = await getExportData(serviceStartDate, serviceEndDate);\r\n            if(exportData.length > 0){\r\n                await mapAction.bindMapCommand(MapFunction.printMapForReport, {attribute:{\r\n                    exportData,\r\n                    startDate: values.startDate,\r\n                    endDate: values.endDate\r\n                }, callback: printMapCallback});\r\n                mapAction.bindClearMapCommand();\r\n            }\r\n            else{//กรณีที่ตัวเลขเป็น 0 หมดเลย\r\n                setLoading(false);\r\n                showAlert({ altMsg: \"ไม่พบข้อมูลสำหรับออกรายงาน\" , callbackClose: hideAlert})\r\n            }\r\n        }  \r\n    }\r\n\r\n    const toDateString = (date, formatDate=`yyyy-MM-dd`, locale=enLocale) => {\r\n        const strDate = format(date, formatDate, { locale: locale})\r\n        return strDate\r\n    }\r\n\r\n    const filterCPUDDQueryPlan = (strStartDate, strEndDate) => {\r\n        mapAction.bindMapCommand(MapFunction.filterCPUDDQueryPlan, {\r\n            startDate: strStartDate,\r\n            endDate: strEndDate\r\n        });\r\n    }\r\n\r\n    const handleChangeStartDate = date => {\r\n        setStartDate(date)\r\n        const startDate = toDateString(date);\r\n        if(FormData.endDate){\r\n            const endDate = toDateString(FormData.endDate);\r\n            filterCPUDDQueryPlan(startDate, endDate)\r\n        }\r\n    }\r\n\r\n    const handleChangeEndDate = date => {\r\n        setEndDate(date)\r\n        const endDate = toDateString(date);\r\n        if(FormData.startDate){\r\n            const startDate = toDateString(FormData.startDate);\r\n            filterCPUDDQueryPlan(startDate, endDate)\r\n        }\r\n    }\r\n\r\n    const handleClickBack = () =>{\r\n        mapAction.bindMapCommand(MapFunction.mapRemoveLayer, Constants.LAYER_ID.CPUDD_QUERY_PLAN);\r\n        onBackClick()\r\n    }\r\n\r\n    return <Fragment>\r\n        <StatisticCheckComprehensiveView \r\n        title={title}\r\n        legendRef={legendRef}\r\n        pieRef={pieRef}\r\n        pieChartData={pieChartData}\r\n        startDate={startDate}\r\n        endDate={endDate}\r\n        onStartDateChange={handleChangeStartDate}\r\n        onEndDateChange={handleChangeEndDate}\r\n        onBackClick={handleClickBack}\r\n        onSubmit={handleSubmit(handleSubmitForm)}/>\r\n        <Loading isShowLoading={isLoading}/>\r\n        <AlertMessageSuper {...props} />\r\n    </Fragment>\r\n}\r\n\r\nconst Validate = (values) => {\r\n    const errors = {};\r\n    if (!values.startDate) {\r\n        errors.startDate = 'กรุณาระบุเริ่มต้น';\r\n    }\r\n    if (!values.endDate) {\r\n        errors.endDate = 'กรุณาระบุวันที่สิ้นสุด';\r\n    }\r\n    return errors;\r\n};\r\n\r\n\r\nconst formName =  \"StatisticCheckComprehensiveForm\";\r\nconst selector = formValueSelector(formName)\r\nconst reduxFormParameter = {\r\n    form: formName,\r\n    validate: Validate\r\n};\r\nconst mapStateToProps = state => {\r\n    return {\r\n        FormData: {\r\n            startDate: selector(state, \"startDate\"),\r\n            endDate: selector(state, \"endDate\"),\r\n        }\r\n    }\r\n}\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    mapAction: bindActionCreators(MapAction, dispatch)\r\n})\r\nexport default compose(\r\n    connect(mapStateToProps, mapDispatchToProps),\r\n    reduxForm(reduxFormParameter),\r\n    WithAlertMessage\r\n)(StatisticCheckComprehensive);","import React from 'react';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Add from \"@material-ui/icons/Add\";\r\nimport Fab from '@material-ui/core/Fab';\r\nimport { Scrollbars } from 'react-custom-scrollbars';\r\nimport BreadCrumb from '../../../../../../../Controls/Containers/BreadCrumb';\r\nimport Tooltip from '../../../../../../../Controls/Containers/Tooltip';\r\nimport classnames from 'classnames';\r\n\r\nconst FormConstructionLicenseView = ({\r\n    classes,\r\n    children,\r\n    formStep,\r\n    onClickAddBuildings,\r\n    onDraw,\r\n    isActiveDraw,\r\n    onEdit,\r\n    isActiveEdit\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root}>\r\n            <Grid item xs={12} className={classes.header}>\r\n                <BreadCrumb\r\n                    stepActive={formStep}\r\n                    listStep={[1, 2]}\r\n                />\r\n            </Grid>\r\n            <Grid item xs={12}>\r\n                <div className={classes.title}>\r\n                    <Grid item xs={12}>\r\n                        <label>ข้อมูลใบอนุญาตก่อสร้าง (อ.1) </label>\r\n                    </Grid>\r\n                        <Grid container justify=\"flex-end\" className={classes.rootBtnDraft} >\r\n                            <Tooltip title=\"วาดตำแหน่งใหม่\" placement=\"bottom\">\r\n                                <div onClick={onDraw} className={classnames(classes.btnManageGraphic, { [classes.btnAreaNormal]: !isActiveDraw }, { [classes.btnAreaSelected]: isActiveDraw })}></div>\r\n                            </Tooltip>\r\n                            <Tooltip title=\"แก้ไขตำแหน่ง\" placement=\"bottom\">\r\n                                <div onClick={onEdit} className={classnames(classes.btnManageGraphic, { [classes.btnEditNormal]: !isActiveEdit }, { [classes.btnEditSelected]: isActiveEdit })}></div>\r\n                            </Tooltip>\r\n                            {formStep === 2 && \r\n                            <Tooltip title=\"เพิ่มอาคาร\" placement=\"bottom\" >\r\n                                <Fab\r\n                                    color=\"primary\"\r\n                                    aria-label=\"Add\"\r\n                                    className={classes.btnRightTitle}\r\n                                    onClick={onClickAddBuildings}\r\n                                >\r\n                                    <Add />\r\n                                </Fab>\r\n                            </Tooltip>}\r\n                        </Grid>\r\n                </div>\r\n            </Grid>\r\n            <Grid item xs={12} className={classes.body}>\r\n                <Scrollbars autoHide>\r\n                    {children}\r\n                </Scrollbars>\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        height: '100%',\r\n    },\r\n    header: {\r\n        height: '70px',\r\n    },\r\n    title: {\r\n        color: theme.mainTheme.color1,\r\n        textAlign: 'center',\r\n        fontSize: theme.textSize.title,\r\n        marginBottom: '15px',\r\n        marginTop: '10px'\r\n    },\r\n    btnRightTitle: {\r\n        position: 'absolute',\r\n        right: '111px',\r\n        top: '174px',\r\n        width: '35px',\r\n        height: '35px'\r\n    },\r\n    body: {\r\n        height: 'calc(100% - 200px)',\r\n        // backgroundColor: '#f2f2f2'\r\n    },\r\n    rootBtnDraft: {\r\n        height: \"50px\",\r\n        width: \"100%\",\r\n        marginTop: \"15px\",\r\n        marginBottom : '20px'\r\n    },\r\n    btnManageGraphic: {\r\n        width: \"40px\",\r\n        minHeight: \"40px\",\r\n        margin: \"5px\",\r\n        display: \"block\",\r\n        padding: 0,\r\n        backgroundSize: \"40px 40px\",\r\n        backgroundRepeat: \"no-repeat\",\r\n        backgroundPosition: \"center\"\r\n    },\r\n    \r\n    btnAreaNormal: {\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_add_normal@2x.png)`,\r\n        \"&:Hover\": {\r\n            backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_add_selected@2x.png)`\r\n        },\r\n        cursor: 'pointer'\r\n    },\r\n    btnAreaSelected: {\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_add_selected@2x.png)`,\r\n        cursor: 'pointer'\r\n    },\r\n    btnEditNormal: {\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_edit_normal@2x.png)`,\r\n        \"&:Hover\": {\r\n            backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_edit_selected@2x.png)`\r\n        },\r\n        cursor: 'pointer'\r\n    },\r\n    btnEditSelected: {\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_edit_selected@2x.png)`,\r\n        cursor: 'pointer'\r\n    },\r\n}))(FormConstructionLicenseView)\r\n\r\n","import * as actionType from '../../../Constants/ActionTypes';\r\nimport { fetchGet_ } from '../../../Utilities/ServiceUtils';\r\n\r\nexport const saveFormStepOne = (data) => ({\r\n    type: actionType.SET_CONSTRUCTION_LICENSE_STEP_ONE,\r\n    data\r\n})\r\n\r\nexport const saveFormStepTwo = (data) => ({\r\n    type: actionType.SET_CONSTRUCTION_LICENSE_STEP_TWO,\r\n    data\r\n})\r\n\r\nexport const saveValueFromPmr = (data) => ({\r\n    \r\n    type: actionType.SAVE_VALUE_FROM_PMR,\r\n    data\r\n})\r\n\r\nexport const saveGeometry = (geometry) => ({\r\n    type: actionType.SET_CONSTRUCTION_LICENSE_GEOMETRY,\r\n    geometry\r\n})\r\n\r\nexport const saveAdminPoly = ({ districtID, subDistrictID }) => ({\r\n    type: actionType.SET_CONSTRUCTION_LICENSE_ADMINPOLY,\r\n    districtID,\r\n    subDistrictID\r\n})\r\n\r\nexport const setDefaultForm = ({ geometry, stepOne, stepTwo }) => ({ //สำหรับ set ค่า default เพื่อ edit\r\n    type: actionType.SET_DEFAULT_CONSTRUCTION_LICENSE,\r\n    geometry,\r\n    stepOne,\r\n    stepTwo\r\n})\r\n\r\nexport const clearFormStep = () => ({\r\n    type: actionType.CLEAR_FORM_CONSTRUCTION_LICENSE\r\n})\r\n\r\n\r\nexport const getLuApplicationType = () => dispatch => {\r\n    fetchGet_(process.env.REACT_APP_CAH_GET_APPLICATION_TYPE)\r\n        .then(res => {\r\n            if (!res.ok) {\r\n                throw res.statues\r\n            }\r\n            return res.json();\r\n        })\r\n        .then(data => {\r\n            if (data && data.result) {\r\n                dispatch({\r\n                    type: actionType.SAVE_LU_APPLICATION_TYPE,\r\n                    applicationType: data.result\r\n                })\r\n            }\r\n        })\r\n        .catch(ex => {\r\n            console.log('ex getLuApplicationType', ex)\r\n        })\r\n}\r\n\r\nexport const getLuConstructType = () => dispatch => {\r\n    fetchGet_(process.env.REACT_APP_CAH_GET_CONSTRUCT_TYPE)\r\n        .then(res => {\r\n            if (!res.ok) {\r\n                throw res.statues\r\n            }\r\n            return res.json();\r\n        })\r\n        .then(data => {\r\n            if (data && data.result) {\r\n                dispatch({\r\n                    type: actionType.SAVE_LU_CONSTRUCT_TYPE,\r\n                    constructType: data.result\r\n                })\r\n            }\r\n        })\r\n        .catch(ex => {\r\n            console.log('ex getLuConstructType', ex)\r\n        })\r\n}\r\n\r\nexport const getLuBldgMaterial = () => dispatch => {\r\n    fetchGet_(process.env.REACT_APP_CAH_GET_BLDG_MARERIAL)\r\n        .then(res => {\r\n            if (!res.ok) {\r\n                throw res.statues\r\n            }\r\n            return res.json();\r\n        })\r\n        .then(data => {\r\n            if (data && data.result) {\r\n                dispatch({\r\n                    type: actionType.SAVE_LU_BLDG_MATERIAL,\r\n                    bldgMarerial: data.result\r\n                })\r\n            }\r\n        })\r\n        .catch(ex => {\r\n            console.log('ex getLuBldgMaterial', ex)\r\n        })\r\n}\r\n\r\nexport const getLuActivity = () => dispatch => {\r\n    fetchGet_(process.env.REACT_APP_CAH_GET_OBJECTIVE)\r\n        .then(res => {\r\n            if (!res.ok) {\r\n                throw res.statues\r\n            }\r\n            return res.json();\r\n        })\r\n        .then(data => {\r\n            if (data && data.result) {\r\n                dispatch({\r\n                    type: actionType.SAVE_LU_ACTIVITY,\r\n                    activity: data.result\r\n                })\r\n            }\r\n        })\r\n        .catch(ex => {\r\n            console.log('ex getLuActivity', ex)\r\n        })\r\n}","import React from 'react';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { Field } from 'redux-form';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport TextFieldRedux from '../../../../../../../Controls/Containers/TextFieldRedux';\r\nimport SelectFieldRedux from '../../../../../../../Controls/Containers/SelectFieldRedux';\r\nimport Button from '../../../../../../../Controls/Containers/Button';\r\nimport ReduxFormDatePickerThai from '../../../../../../../Controls/Containers/Picker/ReduxFormDatePickerThai';\r\nimport { normalizeInteger,normalizePositiveInteger } from '../../../../../../../Utilities/Validate';\r\nimport ErrorSubmit from '../../../../../../../Controls/Containers/ErrorSubmit'\r\n\r\nconst FormStepOneView = ({\r\n    classes,\r\n    luDistrict,\r\n    luSubDistrict,\r\n    luApplicationType,\r\n    luConstructType,\r\n    haveHouse,\r\n\r\n    onChangeAdminPoly,\r\n    onSubmit,\r\n    onClickCancel,\r\n    onBlurPmr1ID,\r\n    isSubmitError\r\n}) => {\r\n    return (\r\n\r\n        <Grid container className={classes.root}>\r\n            <Field\r\n                name=\"pmr1ID\"\r\n                label={'รหัสคำร้อง ผมร.1'}\r\n                onBlur={onBlurPmr1ID}\r\n                component={TextFieldRedux}\r\n                maxLength={100}\r\n            />\r\n            <Field\r\n                name=\"constructID\"\r\n                label={'เลขรับโยธา'}\r\n                component={TextFieldRedux}\r\n                maxLength={10}\r\n            />\r\n            <Field\r\n                name={'applicationDate'}\r\n                // label={'วันที่ขออนุญาต / วันที่แจ้งความประสงค์'}\r\n                label={'วันรับโยธา'}\r\n                component={ReduxFormDatePickerThai}\r\n                maxDate={new Date()}\r\n            />\r\n            <Field\r\n                name=\"applicationType\"\r\n                // label={'ประเภทใบอนุญาต/ใบรับแจ้ง'}\r\n                label={'ประเภทเอกสารอนุญาตก่อสร้าง'}\r\n                component={SelectFieldRedux}\r\n                data={luApplicationType}\r\n                keyData={{ value: \"value\", label: \"name\" }}\r\n                required\r\n            />\r\n            <Field // APPLICANT_NAME\r\n                name=\"name\"\r\n                // label={'ชื่อผู้ขออนุญาต'}\r\n                label={'ชื่อผู้ยื่นคำขอ'}\r\n                component={TextFieldRedux}\r\n                maxLength={100}\r\n            />\r\n            <Field // new\r\n                name=\"applicantTelNo\"\r\n                label={'เบอร์โทรผู้ยื่นคำขอ'}\r\n                component={TextFieldRedux}\r\n                maxLength={30}\r\n            />\r\n            <Field\r\n                name=\"permissionID\"\r\n                label={'เลขที่ใบอนุญาต/ใบรับแจ้ง'}\r\n                component={TextFieldRedux}\r\n                disabled={haveHouse}\r\n                maxLength={20}\r\n                required\r\n            />\r\n            <Field\r\n                name={'permissionDate'}\r\n                label={'วันที่ได้รับอนุญาต'}\r\n                maxDate={new Date()}\r\n                component={ReduxFormDatePickerThai}\r\n            />\r\n            <Field\r\n                name=\"constructType\"\r\n                label={'ประเภทกิจกรรมการขออนุญาต'}\r\n                component={SelectFieldRedux}\r\n                data={luConstructType}\r\n                keyData={{ value: \"value\", label: \"name\" }}\r\n            />\r\n            <Field // new\r\n                name={'ownerName'}\r\n                label={'ชื่อผู้ได้รับอนุญาต'}\r\n                component={TextFieldRedux}\r\n                maxLength={100}\r\n            />\r\n            <Field\r\n                name=\"houseNo\"\r\n                label={'บ้านเลขที่'}\r\n                component={TextFieldRedux}\r\n                maxLength={20}\r\n            />\r\n            <Field\r\n                name=\"moo\"\r\n                label={'หมู่ที่'}\r\n                normalize={normalizeInteger}\r\n                component={TextFieldRedux}\r\n                maxLength={3}\r\n            />\r\n            <Field // new\r\n                name=\"trok\"\r\n                label={'ตรอก'}\r\n                component={TextFieldRedux}\r\n                maxLength={100}\r\n            />\r\n            <Field\r\n                name=\"soi\"\r\n                label={'ซอย'}\r\n                component={TextFieldRedux}\r\n                maxLength={100}\r\n            />\r\n            <Field\r\n                name=\"road\"\r\n                label={'ถนน'}\r\n                component={TextFieldRedux}\r\n                maxLength={100}\r\n            />\r\n            <Field\r\n                name=\"province\"\r\n                label={'จังหวัด'}\r\n                component={TextFieldRedux}\r\n                disabled\r\n\r\n            />\r\n            <Field\r\n                name=\"districtID\"\r\n                label={'เขต'}\r\n                component={SelectFieldRedux}\r\n                onChangeValue={onChangeAdminPoly(\"district\")}\r\n                data={luDistrict}\r\n                keyData={{ value: \"value\", label: \"name\" }}\r\n            />\r\n            <Field\r\n                name=\"subDistrictID\"\r\n                label={'แขวง'}\r\n                component={SelectFieldRedux}\r\n                onChangeValue={onChangeAdminPoly(\"subDistrict\")}\r\n                data={luSubDistrict}\r\n                keyData={{ value: \"value\", label: \"name\" }}\r\n            />\r\n            <Field // new\r\n                name=\"numBLDG\"\r\n                label={'จำนวนอาคาร/สิ่งก่อสร้าง'}\r\n                normalize={normalizePositiveInteger}\r\n                component={TextFieldRedux}\r\n            />\r\n            <Field // new\r\n                name=\"chanodeNO\"\r\n                label={'เลขที่โฉนด'}\r\n                component={TextFieldRedux}\r\n                maxLength={1000}\r\n            />\r\n            <Field // new\r\n                name=\"landNo\"\r\n                label={'เลขที่ดิน'}\r\n                component={TextFieldRedux}\r\n                maxLength={1000}\r\n            />\r\n             <Field // new\r\n                name=\"remark\"\r\n                label={'หมายเหตุ'}\r\n                component={TextFieldRedux}\r\n                multiline\r\n                rows={2}\r\n                maxLength={100}\r\n            />\r\n            <Grid container justify=\"center\" spacing={24} className={classes.row}>\r\n                {(isSubmitError) &&\r\n                    <Grid item xs={12}>\r\n                        <Field\r\n                            name=\"errorForm\"\r\n                            component={ErrorSubmit}\r\n                        />\r\n                    </Grid>}\r\n                <Grid item>\r\n                    <Button\r\n                        label=\"ยกเลิก\"\r\n                        onClick={onClickCancel}\r\n                    />\r\n                </Grid>\r\n                <Grid item>\r\n                    <Button\r\n                        type=\"submit\"\r\n                        label=\"หน้าต่อไป\"\r\n                        onClick={onSubmit}\r\n                    />\r\n                </Grid>\r\n            </Grid>\r\n        </Grid>\r\n\r\n    )\r\n\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        padding: '10px',\r\n        width: \"100%\"\r\n    },\r\n\r\n    row: {\r\n        height: \"50px\",\r\n        width: \"100%\",\r\n        marginTop: \"15px\",\r\n    },\r\n    btnSearch: {\r\n        marginTop: '10px',\r\n        color: 'black'\r\n    }\r\n}))(FormStepOneView)\r\n","import React, { Component } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { bindActionCreators } from 'redux';\r\nimport { compose } from 'recompose';\r\nimport { reduxForm, getFormValues } from 'redux-form';\r\n\r\n//import component\r\nimport FormStepOneView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/ConstructionLicense/Form/FormStepOneView'\r\n\r\n//import service - utils\r\nimport { formConstructStepOneValidate } from '../../../../../../../Utilities/Validate';\r\nimport { fetchGet_ } from '../../../../../../../Utilities/ServiceUtils';\r\n\r\n//import action\r\nimport * as ConstructAction from '../../../../../../../Actions/Web/Panel/ConstructAction';\r\n\r\n//import constants\r\nimport { ALERT_MESSAGE } from '../../../../../../../Constants/Constants'\r\n\r\nclass FormStepOne extends Component {\r\n    constructor() {\r\n        super();\r\n        this.isAdminpolyInconsistent = false;//ใช้เป็นตัวดักให้แจ้งเตือนแสดงครั้งเดียว\r\n        this.currentAdminpoly = {//เก็บ adminpoly ที่เปลี่ยนไป\r\n            districtCode: null,\r\n            subdistrictCode: null\r\n        };\r\n        this.prevCurrentAdminpolyDistrictCode = null;//เก็บค่าใน selectbox ก่อนที่จะเปลี่ยนแปลง\r\n        this.prevCurrentAdminpolySubdistrictCode = null;//เก็บค่าใน selectbox ก่อนที่จะเปลี่ยนแปลง\r\n\r\n        this.state = {\r\n            luProvince: [],\r\n            luDistrict: [],\r\n            luSubDistrict: [],\r\n            isMatchGeometryWithAdminPoly: true,\r\n            isSubmitError: false\r\n        }\r\n    }\r\n\r\n    componentDidMount() {\r\n        const { constructionRdc, change } = this.props;\r\n        // change(\"province\",\"กรุงเทพมหานคร\")\r\n        this.callServiceDistrict()\r\n        if (constructionRdc.stepOne.districtID) {\r\n            this.callServiceSubDistrict(constructionRdc.stepOne.districtID);\r\n        } else {\r\n            change('permissionDate', new Date())\r\n        }\r\n    }\r\n\r\n    componentWillReceiveProps(nextProps) {\r\n        const { constructionRdc, change } = this.props;\r\n\r\n        if (constructionRdc.stepOne.districtID !== nextProps.constructionRdc.stepOne.districtID) {\r\n            const districtID = nextProps.constructionRdc.stepOne.districtID;\r\n            change(\"districtID\", districtID)\r\n            this.callServiceSubDistrict(districtID)\r\n\r\n            this.currentAdminpoly.districtCode = districtID;\r\n            this.isAdminpolyInconsistent = false;\r\n        }\r\n\r\n        if (constructionRdc.stepOne.subDistrictID !== nextProps.constructionRdc.stepOne.subDistrictID) {\r\n            const subDistrictID = nextProps.constructionRdc.stepOne.subDistrictID;\r\n            change(\"subDistrictID\", subDistrictID)\r\n            this.currentAdminpoly.subdistrictCode = subDistrictID;\r\n            this.isAdminpolyInconsistent = false;\r\n        }\r\n    }\r\n\r\n    callServiceDistrict = () => {\r\n        fetchGet_(`${process.env.REACT_APP_LU_DISTRICT}?provinceid=10`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(data => {\r\n                this.setState({\r\n                    luDistrict: data && data.result ? data.result : []\r\n                })\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceDistric', ex)\r\n            })\r\n    }\r\n\r\n    callServiceSubDistrict = (districtID) => {\r\n        fetchGet_(`${process.env.REACT_APP_LU_SUBDISTRICT}?provinceid=10&districtid=${districtID}`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(data => {\r\n                this.setState({\r\n                    luSubDistrict: data && data.result ? data.result : []\r\n                })\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceSubDistric', ex)\r\n            })\r\n    }\r\n\r\n    callServiceGetDetailPmr1 = (pmr1ID) => {\r\n        return fetchGet_(`${process.env.REACT_APP_CAH_GET_PMR1_DETAIL}?pmr1id=${pmr1ID}`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status;\r\n                }\r\n                return res.json()\r\n            })\r\n            .then(result => {\r\n                return result\r\n            })\r\n            .catch(ex => {\r\n                console.log(\"ex callServiceGetDetailPmr1 \", ex)\r\n            })\r\n    }\r\n\r\n    callServiceCheckPMR1ID = (pmr1ID) => {\r\n        return fetchGet_(`${process.env.REACT_APP_CAH_CHECK_PMR_ID}?pmr1id=${pmr1ID}`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status;\r\n                }\r\n                return res.json()\r\n            })\r\n            .then(result => {\r\n                return result\r\n            })\r\n            .catch(ex => {\r\n                console.log(\"ex callServiceCheckPMR1ID \", ex)\r\n            })\r\n    }\r\n\r\n    fetchDataPmr = (pmr1ID) => {\r\n        const { _values, showAlert, hideAlert, hideLoading } = this.props;\r\n\r\n        this.callServiceGetDetailPmr1(pmr1ID).then(result => {\r\n            if (result) {\r\n                if (Object.keys(_values).length > 2) { //กรณี form ใส่ข้อมูลแล้ว\r\n                    const { stepOne } = this.props.constructionRdc;\r\n                    let altMsg = \"คุณต้องการแทนที่ข้อมูลภายในฟอร์ม ?\";\r\n\r\n                    if (stepOne.districtID !== result.districtID || stepOne.subDistrictID !== result.subDistrictID) {\r\n                        altMsg = \"คุณต้องการแทนที่ข้อมูลภายในฟอร์มด้วยเขตและแขวงที่ไม่สอดคล้องกับตำแหน่งหรือไม่ ?\";\r\n                    }\r\n                    showAlert({\r\n                        altMsg: altMsg,\r\n                        altType: 2,\r\n                        callbackConfirm: this.setDefaultForm,\r\n                        callbackCancel: hideAlert,\r\n                        param: result\r\n                    })\r\n                } else {\r\n                    this.setDefaultForm(result)\r\n                }\r\n            } else {\r\n                showAlert({\r\n                    altMsg: `ไม่พบข้อมูลตามรหัสคำร้อง : ${pmr1ID}`, callbackClose: () => {\r\n                        this.props.hideAlert();\r\n                        this.props.change(\"pmr1ID\", null)\r\n                    }\r\n                })\r\n            }\r\n        }).finally(() => {\r\n            hideLoading();\r\n        })\r\n    }\r\n\r\n    handleBlurPmr1ID = async evt => {\r\n        const { constructionRdc, showAlert, showLoading, hideLoading } = this.props;\r\n        // กรณีแก้ไขจะไม่เช็คซ้ำถ้าเป็น pmr1ID เดิม\r\n        if (evt.target.value && (!constructionRdc.stepOne.pmr1IDInitial || constructionRdc.stepOne.pmr1IDInitial !== evt.target.value)) {\r\n            showLoading();\r\n            const resultCheckPMR1ID = await this.callServiceCheckPMR1ID(evt.target.value)\r\n            if (resultCheckPMR1ID && resultCheckPMR1ID.statusCode && resultCheckPMR1ID.statusCode === 1) { // เช็คว่ารหัส pmr เคยถูกใช้ยัง\r\n                this.fetchDataPmr(evt.target.value)\r\n            } else {\r\n                hideLoading();\r\n                showAlert({\r\n                    altMsg: `รหัสคำร้อง ผมร.1 ${evt.target.value} ถูกใช้งานแล้ว`, callbackClose: () => {\r\n                        this.props.hideAlert();\r\n                        this.props.change(\"pmr1ID\", null)\r\n                    }\r\n                })\r\n            }\r\n        }\r\n    }\r\n\r\n    setDefaultForm = value => {\r\n        const { initialize, hideAlert, constructAction, _values } = this.props;\r\n        value.districtID && this.callServiceSubDistrict(value.districtID)\r\n        hideAlert();\r\n        initialize({\r\n            ..._values,\r\n            pmr1ID: value.pmr1ID,\r\n            permissionDate: new Date,\r\n            provinceID: value.provinceID,\r\n            districtID: value.districtID,\r\n            subDistrictID: value.subDistrictID,\r\n            houseNo: value.houseNo,\r\n            moo: value.moo,\r\n            name: value.name,\r\n            road: value.road,\r\n            soi: value.soi,\r\n            province: \"กรุงเทพมหานคร\",\r\n            ownerName: value.name,\r\n            numBLDG: value.numberBuilding,\r\n            chanodeNO: value.chanodeNo,\r\n            landNo: value.landNo\r\n        })\r\n        constructAction.saveValueFromPmr(value);\r\n    }\r\n\r\n    confirmChangeDistrict = (districtCode) => {\r\n        this.isAdminpolyInconsistent = true;\r\n        this.currentAdminpoly.districtCode = districtCode;\r\n\r\n        const { change, hideAlert } = this.props;\r\n        this.callServiceSubDistrict(districtCode);\r\n        change(\"subDistrictID\", null);\r\n        hideAlert();\r\n    }\r\n    confirmChangeSubdistrict = (subdistrictCode) => {\r\n        this.isAdminpolyInconsistent = true;\r\n        this.currentAdminpoly.subdistrictCode = subdistrictCode;\r\n        const { change, hideAlert } = this.props;\r\n\r\n        change(\"subDistrictID\", subdistrictCode);\r\n        hideAlert();\r\n    }\r\n\r\n    cancleChangeAdminpoly = () => {\r\n        const { change, hideAlert, constructionRdc } = this.props;\r\n        if (this.currentAdminpoly.districtCode) {\r\n            change(\"districtID\", this.currentAdminpoly.districtCode);\r\n            change(\"subDistrictID\", this.currentAdminpoly.subdistrictCode);\r\n        }\r\n        else {\r\n            change(\"districtID\", constructionRdc.stepOne.districtID);\r\n            change(\"subDistrictID\", constructionRdc.stepOne.subDistrictID);\r\n        }\r\n\r\n        hideAlert();\r\n    }\r\n\r\n    handleChangeAdminPoly = (type) => (evt) => {\r\n        const codeAdminpoly = evt.target.value;\r\n        const { showAlert, constructionRdc } = this.props;\r\n        switch (type) {\r\n            case \"district\":\r\n                const isInconsistentDistrict = ((this.currentAdminpoly.districtCode || constructionRdc.stepOne.districtID !== codeAdminpoly) && (this.currentAdminpoly.districtCode !== codeAdminpoly));\r\n                if (codeAdminpoly && isInconsistentDistrict) {//ข้อมูลไม่สอดคล้องกับตำแหน่งบนแผนที่\r\n                    if (!this.isAdminpolyInconsistent) {\r\n                        showAlert({\r\n                            altMsg: ALERT_MESSAGE.QUESTION.WARNING_POINT,\r\n                            altType: 2,\r\n                            callbackConfirm: this.confirmChangeDistrict,\r\n                            callbackCancel: this.cancleChangeAdminpoly,\r\n                            param: codeAdminpoly\r\n                        })\r\n                    }\r\n                    else {\r\n                        this.confirmChangeDistrict(codeAdminpoly)\r\n                    }\r\n                }\r\n                break;\r\n            case \"subDistrict\":\r\n                const isInconsistentSubdistrict = ((this.currentAdminpoly.subdistrictCode || constructionRdc.stepOne.subDistrictID !== codeAdminpoly) && (this.currentAdminpoly.subdistrictCode !== codeAdminpoly));\r\n                if (codeAdminpoly && isInconsistentSubdistrict) {//ข้อมูลไม่สอดคล้องกับตำแหน่งบนแผนที่\r\n                    if (!this.isAdminpolyInconsistent) {\r\n                        showAlert({\r\n                            altMsg: ALERT_MESSAGE.QUESTION.WARNING_POINT,\r\n                            altType: 2,\r\n                            callbackConfirm: this.confirmChangeSubdistrict,\r\n                            callbackCancel: this.cancleChangeAdminpoly,\r\n                            param: codeAdminpoly\r\n                        })\r\n                    } else {\r\n                        this.confirmChangeSubdistrict(codeAdminpoly)\r\n                    }\r\n                }\r\n                break;\r\n            default:\r\n                break;\r\n        }\r\n    }\r\n\r\n    handleSubmit = values => {\r\n        const { constructAction, onChangeStep } = this.props;\r\n        constructAction.saveFormStepOne(values);\r\n        onChangeStep && onChangeStep(2)\r\n    }\r\n\r\n    handleCancel = () => {\r\n        const { onCloseForm, showAlert, hideAlert } = this.props;\r\n        showAlert({\r\n            altMsg: ALERT_MESSAGE.QUESTION.CANCEL_FORM,\r\n            altType: 2,\r\n            callbackConfirm: onCloseForm,\r\n            callbackCancel: hideAlert\r\n        })\r\n    }\r\n    handleSubmitValidate = () => {\r\n        const { handleSubmit, _values } = this.props;\r\n        formConstructStepOneValidate(_values)\r\n        handleSubmit(this.handleSubmit)()\r\n        this.setState({ isSubmitError: true })\r\n    }\r\n\r\n    render() {\r\n        const { constructionRdc } = this.props;\r\n        const { luDistrict, luSubDistrict, isSubmitError } = this.state;\r\n\r\n        return (\r\n            <FormStepOneView\r\n                luDistrict={luDistrict}\r\n                luSubDistrict={luSubDistrict}\r\n                luApplicationType={constructionRdc.luApplicationType}\r\n                luConstructType={constructionRdc.luConstructType}\r\n                haveHouse={constructionRdc.stepOne.haveHouse}\r\n\r\n                onSubmit={this.handleSubmitValidate}\r\n                onChangeAdminPoly={this.handleChangeAdminPoly}\r\n                onClickSearch={this.handleClickSearch}\r\n                onClickCancel={this.handleCancel}\r\n                onBlurPmr1ID={this.handleBlurPmr1ID}\r\n                isSubmitError={isSubmitError}\r\n            />\r\n        )\r\n    }\r\n}\r\n\r\nconst reduxFormParameter = {\r\n    form: \"constructionStepOne\",\r\n    validate: formConstructStepOneValidate\r\n};\r\n\r\nconst mapStateToProps = state => ({\r\n    constructionRdc: state.construct,\r\n    _values: getFormValues('constructionStepOne')(state),\r\n    initialValues: {\r\n        ...state.construct.stepOne,\r\n        province: \"กรุงเทพมหานคร\",\r\n        permissionDate: state.construct.stepOne.permissionID ? state.construct.stepOne.permissionDate : new Date()\r\n    }\r\n})\r\n\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    constructAction: bindActionCreators(ConstructAction, dispatch)\r\n})\r\n\r\nconst enhance = compose(\r\n    connect(mapStateToProps, mapDispatchToProps),\r\n    reduxForm(reduxFormParameter)\r\n)\r\n\r\nexport default enhance(FormStepOne)","import React from 'react';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { Field, FieldArray } from 'redux-form';\r\nimport IconButton from \"@material-ui/core/IconButton\";\r\nimport Delete from \"@material-ui/icons/Delete\";\r\nimport TextFieldRedux from '../../../../../../../Controls/Containers/TextFieldRedux';\r\nimport SelectFieldRedux from '../../../../../../../Controls/Containers/SelectFieldRedux';\r\nimport Button from '../../../../../../../Controls/Containers/Button';\r\nimport Tooltip from '../../../../../../../Controls/Containers/Tooltip';\r\nimport { normalizeInteger, normalizePositiveFloat } from '../../../../../../../Utilities/Validate';\r\nimport { BTN } from '../../../../../../../Constants/Constants'\r\nimport ErrorSubmit from '../../../../../../../Controls/Containers/ErrorSubmit'\r\nconst renderFormBuildings = ({ classes, fields, luBldgMaterial, luActivity }) => {\r\n    return (\r\n        <Grid container >\r\n            {fields.map((buildings, index) => (\r\n                <Grid container key={`buildings-form-${index}`} className={classes.rootForm}>\r\n\r\n                    <Field\r\n                        name={`${buildings}.objective`}\r\n                        label={'เพื่อใช้เป็น'}\r\n                        component={SelectFieldRedux}\r\n                        data={luActivity}\r\n                        keyData={{ value: \"value\", label: \"name\" }}\r\n                        required\r\n                    />\r\n\r\n                    <Field\r\n                        name={`${buildings}.material`}\r\n                        label={'โครงสร้างอาคาร'}\r\n                        component={SelectFieldRedux}\r\n                        data={luBldgMaterial}\r\n                        keyData={{ value: \"value\", label: \"name\" }}\r\n                    />\r\n                    <Field\r\n                        name={`${buildings}.numberbuilding`}\r\n                        label={'จำนวนอาคารที่ก่อสร้าง(อาคาร)'}\r\n                        component={TextFieldRedux}\r\n                        normalize={normalizeInteger}\r\n                        required\r\n                    />\r\n                    <Field\r\n                        name={`${buildings}.numberfloor`}\r\n                        label={'จำนวนชั้น(ชั้น)'}\r\n                        component={TextFieldRedux}\r\n                        normalize={normalizeInteger}\r\n                    />\r\n                    <Field\r\n                        name={`${buildings}.buildingarea`}\r\n                        label={'พื้นที่(ตร.ม.)'}\r\n                        component={TextFieldRedux}\r\n                        normalize={normalizePositiveFloat}\r\n                        required\r\n                    />\r\n                    <Field\r\n                        name={`${buildings}.carparkarea`}\r\n                        label={'พื้นที่จอดรถ(ตร.ม.)'}\r\n                        component={TextFieldRedux}\r\n                        normalize={normalizePositiveFloat}\r\n                    />\r\n\r\n\r\n                    {\r\n                        fields.length > 1 && (\r\n                            <Grid container justify=\"flex-end\">\r\n                                <Grid item>\r\n                                    <Tooltip title=\"ลบอาคาร\" placement=\"right-end\">\r\n                                        <IconButton\r\n                                            onClick={() => {\r\n                                                if (fields.length > 1) {\r\n                                                    fields.remove(index)\r\n                                                }\r\n                                            }}\r\n                                        >\r\n                                            <Delete />\r\n                                        </IconButton>\r\n                                    </Tooltip>\r\n                                </Grid>\r\n                            </Grid>\r\n                        )\r\n                    }\r\n                </Grid>\r\n            ))}\r\n        </Grid>\r\n    )\r\n}\r\n\r\nconst FormStepTwoView = ({\r\n    classes,\r\n    luBldgMaterial,\r\n    luActivity,\r\n\r\n    handleSubmit,\r\n    onSubmit,\r\n    onClickPrev,\r\n    onClickCancel,\r\n    isSubmitError\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root}>\r\n\r\n            <Field\r\n                name=\"landuseArea\"\r\n                label={'พื้นที่การใช้ประโยชน์(ตร.ม.)'}\r\n                component={TextFieldRedux}\r\n                normalize={normalizePositiveFloat}\r\n            />\r\n\r\n            <FieldArray\r\n                name=\"buildings\"\r\n                component={renderFormBuildings}\r\n                classes={classes}\r\n                luBldgMaterial={luBldgMaterial}\r\n                luActivity={luActivity}\r\n            />\r\n\r\n            <Grid container justify=\"center\" className={classes.footer} spacing={24} >\r\n            {(isSubmitError) &&\r\n                    <Grid item xs={12}>\r\n                        <Field\r\n                            name=\"errorForm\"\r\n                            component={ErrorSubmit}\r\n                        />\r\n                    </Grid>}\r\n                <Grid item>\r\n                    <Button\r\n                        // color=\"black\"\r\n                        label={BTN.TH.CANCEL}\r\n                        onClick={onClickCancel}\r\n                    />\r\n                </Grid>\r\n\r\n                <Grid item>\r\n                    <Button\r\n                        // color=\"black\"\r\n                        label={BTN.TH.BACK}\r\n                        onClick={onClickPrev}\r\n                    />\r\n                </Grid>\r\n                <Grid item>\r\n                    <Button\r\n                        type=\"submit\"\r\n                        label={BTN.TH.SAVE}\r\n                        onClick={onSubmit}\r\n                    />\r\n                </Grid>\r\n\r\n            </Grid>\r\n\r\n        </Grid>\r\n    )\r\n\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        padding: '10px',\r\n        width: \"100%\"\r\n    },\r\n    footer: {\r\n        marginTop: '25px'\r\n    },\r\n    rootForm: {\r\n        borderWidth: '1px',\r\n        borderStyle: 'solid',\r\n        borderColor: 'black',\r\n        backgroundColor: \"#d9d9d9\",\r\n        padding: '10px',\r\n        marginTop: '10px'\r\n    },\r\n}))(FormStepTwoView)","import React, { Component } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { bindActionCreators } from 'redux';\r\nimport { compose } from 'recompose';\r\nimport { reduxForm, getFormValues } from 'redux-form';\r\n\r\n//import component\r\nimport FormStepTwoView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/ConstructionLicense/Form/FormStepTwoView';\r\n\r\n//import service - utils\r\nimport { formConstructStepTwoValidate } from '../../../../../../../Utilities/Validate';\r\nimport { convertDatetimeToCallService } from '../../../../../../../Utilities/DateTimeUtil';\r\n\r\n//import action\r\nimport * as ConstructAction from '../../../../../../../Actions/Web/Panel/ConstructAction';\r\n\r\n//import constants\r\nimport { ALERT_MESSAGE } from '../../../../../../../Constants/Constants'\r\n\r\n//import action\r\nimport * as MapFunctions from '../../../../../../../Map/MapFunctions';\r\nimport * as MapAction from '../../../../../../../Actions/Web/Maps/MapAction';\r\n\r\nclass FormStepTwo extends Component {\r\n\r\n    constructor() {\r\n        super();\r\n   \r\n        this.state = {\r\n         \r\n            isSubmitError:false\r\n        }\r\n    }\r\n    componentDidMount() {\r\n        const { refFormStepTwo, constructRdc } = this.props;\r\n        const { landArea ,highestStorey ,activity,buildArea,numberBuilding} = this.props.constructRdc.valueFormPmr\r\n        if (refFormStepTwo) {\r\n            refFormStepTwo(this)\r\n        }\r\n        if(constructRdc.isFirstStepTwo){\r\n            const objectEmpty = !Object.keys(this.props.constructRdc.valueFormPmr).length; //เช็คว่า obj ว่าง\r\n            if(!objectEmpty){\r\n                this.props.initialize({ buildings: [{objective:activity ,numberfloor:highestStorey,buildingarea:buildArea,numberbuilding:numberBuilding}] ,landuseArea: landArea})\r\n            }\r\n        }\r\n    }\r\n\r\n    handleAddBuildings = () => {\r\n        const { change, _values } = this.props\r\n        change(\"buildings\", [..._values.buildings, {}]);\r\n    }\r\n\r\n    handleSubmit = values => {\r\n        const { isNotBKK, alertIsNotBKKFn, callBackSaveForm, constructRdc } = this.props;\r\n        if(isNotBKK){//นอกกรุงเทพ\r\n            alertIsNotBKKFn();\r\n        } else {\r\n            let buildings = values.buildings\r\n\r\n            if (buildings.length === 1 && Object.keys(buildings[0]).length === 0) {// ดักเคส buildings มีค่าเป็น [{}]\r\n                buildings = []\r\n            }\r\n            callBackSaveForm({\r\n                ...constructRdc.stepOne,\r\n                applicationDate: convertDatetimeToCallService(constructRdc.stepOne.applicationDate),\r\n                permissionDate: convertDatetimeToCallService(constructRdc.stepOne.permissionDate),\r\n                landuseArea:values.landuseArea,\r\n                buildings: buildings,\r\n                geometry: constructRdc.geometry\r\n            })\r\n        }\r\n    }\r\n\r\n    handlePrevStep = () => {\r\n        const { _values, onChangeStep, constructAction } = this.props;\r\n        constructAction.saveFormStepTwo(_values);\r\n        onChangeStep && onChangeStep(1);\r\n    }\r\n\r\n    handleCancel = () => {\r\n        const { showAlert, hideAlert } = this.props;\r\n        showAlert({ \r\n            altMsg: ALERT_MESSAGE.QUESTION.CANCEL_FORM, \r\n            altType: 2, \r\n            callbackConfirm: this.handleClearForm, \r\n            callbackCancel: hideAlert \r\n        })\r\n    }\r\n\r\n    handleClearForm = () => {\r\n        const { hideAlert, onCloseForm } = this.props;\r\n        hideAlert();\r\n        onCloseForm();\r\n    }\r\n    handleSubmitValidate = () =>{\r\n        const {  constructRdc ,mapAction} = this.props;\r\n        mapAction.bindMapCommand(MapFunctions.checkPermissionPointOnMap, {\r\n            geometry: constructRdc.geometry,\r\n            callback: this.callBackCheckPermissionPointOnMap\r\n    \r\n        })\r\n\r\n    }\r\n    callBackCheckPermissionPointOnMap = (isOnDistrict) =>{\r\n        const { handleSubmit,_values, showAlert } = this.props;\r\n      \r\n        if(isOnDistrict){\r\n            formConstructStepTwoValidate(_values)\r\n            handleSubmit(this.handleSubmit)()\r\n            this.setState({isSubmitError:true})\r\n        }else{\r\n            \r\n            showAlert({ \r\n                altMsg: ALERT_MESSAGE.POPUP.POINT_OUT_OF_PERMISSION, \r\n                altType: 1, \r\n            })\r\n        }\r\n        \r\n    }\r\n\r\n    render() {\r\n        const { constructRdc } = this.props;\r\n        const {isSubmitError} = this.state\r\n        return (\r\n            <FormStepTwoView\r\n                luBldgMaterial={constructRdc.luBldgMaterial}\r\n                luActivity={constructRdc.luActivity}\r\n                onSubmit={this.handleSubmitValidate}\r\n                onClickPrev={this.handlePrevStep}\r\n                onClickAddBuildings={this.handleAddBuildings}\r\n                onClickCancel={this.handleCancel}\r\n                isSubmitError={isSubmitError}\r\n            />\r\n        )\r\n    }\r\n}\r\n\r\nconst reduxFormParameter = {\r\n    form: \"constructionStepTwo\",\r\n    validate: formConstructStepTwoValidate\r\n};\r\n\r\nconst mapStateToProps = state => ({\r\n    constructRdc: state.construct,\r\n    _values: getFormValues('constructionStepTwo')(state),\r\n    initialValues: state.construct.stepTwo\r\n})\r\n\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    constructAction: bindActionCreators(ConstructAction, dispatch),\r\n    mapAction: bindActionCreators(MapAction, dispatch),\r\n})\r\n\r\nconst enhance = compose(\r\n    connect(mapStateToProps, mapDispatchToProps),\r\n    reduxForm(reduxFormParameter)\r\n)\r\n\r\nexport default enhance(FormStepTwo)\r\n","import React, { Component, Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { bindActionCreators } from 'redux';\r\nimport { compose } from 'recompose';\r\n\r\n//import component\r\nimport WithAlertMessage from '../../../../../../../HOC/WithAlertMessage';\r\nimport WithLoading from '../../../../../../../HOC/WithLoading';\r\nimport Loading from '../../../../../../../Controls/Containers/Loading';\r\nimport AlertMessageSuper from '../../../../../../../Controls/Containers/AlertMessageSuper'\r\nimport FormConstructionLicenseView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/ConstructionLicense/Form/FormConstructionLicenseView';\r\n\r\n//import action\r\nimport * as ConstructionAction from '../../../../../../../Actions/Web/Panel/ConstructAction';\r\nimport FormStepOne from './FormStepOne';\r\nimport FormStepTwo from './FormStepTwo';\r\n\r\nclass FormConstructionLicense extends Component {\r\n    constructor() {\r\n        super();\r\n        this.state = {\r\n            formStep: 1,\r\n        }\r\n        this.refFormStepTwo = null;\r\n    }\r\n\r\n    componentDidMount() {\r\n        const { constructionAction, constructionRdc } = this.props;\r\n        !constructionRdc.luActivity.length && constructionAction.getLuActivity();\r\n        !constructionRdc.luApplicationType.length && constructionAction.getLuApplicationType();\r\n        !constructionRdc.luBldgMaterial.length && constructionAction.getLuBldgMaterial();\r\n        !constructionRdc.luConstructType.length && constructionAction.getLuConstructType();\r\n    }\r\n\r\n    handleRefFormStepTwo = node => {\r\n        this.refFormStepTwo = node;\r\n    }\r\n\r\n    handleAddBuildings = () => {\r\n        if (this.refFormStepTwo) {\r\n            this.refFormStepTwo.handleAddBuildings();\r\n        }\r\n    }\r\n\r\n    handleChangeStep = (step) => {\r\n        this.setState({\r\n            formStep: step\r\n        })\r\n    }\r\n\r\n    handleCloseForm = () => {\r\n        const { constructionAction, onCloseForm } = this.props;\r\n        constructionAction.clearFormStep();\r\n        onCloseForm();\r\n    }\r\n\r\n    renderChildren = () => {\r\n        const { formStep } = this.state;\r\n        const {\r\n            isNotBKK,\r\n            showAlert,\r\n            hideAlert,\r\n            callBackSaveForm,\r\n            alertIsNotBKKFn,\r\n            showLoading,\r\n            hideLoading\r\n        } = this.props\r\n\r\n        switch (formStep) {\r\n            case 1:\r\n                return <FormStepOne\r\n                    showAlert={showAlert}\r\n                    hideAlert={hideAlert}\r\n                    isNotBKK={isNotBKK}\r\n                    onCloseForm={this.handleCloseForm}\r\n                    onChangeStep={this.handleChangeStep}\r\n                    showLoading={showLoading}\r\n                    hideLoading={hideLoading}\r\n                />\r\n            case 2:\r\n                return <FormStepTwo\r\n                    refFormStepTwo={this.handleRefFormStepTwo}\r\n                    showAlert={showAlert}\r\n                    hideAlert={hideAlert}\r\n                    alertIsNotBKKFn={alertIsNotBKKFn}\r\n                    isNotBKK={isNotBKK}\r\n                    onCloseForm={this.handleCloseForm}\r\n                    onChangeStep={this.handleChangeStep}\r\n                    callBackSaveForm={callBackSaveForm}\r\n                />\r\n            default:\r\n                break;\r\n        }\r\n    }\r\n\r\n    render() {\r\n        const { formStep } = this.state;\r\n        const {\r\n            isActiveDraw,\r\n            isActiveEdit,\r\n            isShowLoading,\r\n            onEdit,\r\n            onDraw\r\n        } = this.props;\r\n\r\n        return (\r\n            <Fragment>\r\n                <FormConstructionLicenseView\r\n                    formStep={formStep}\r\n                    onClickAddBuildings={this.handleAddBuildings}\r\n                    onDraw={onDraw}\r\n                    onEdit={onEdit}\r\n                    isActiveDraw={isActiveDraw}\r\n                    isActiveEdit={isActiveEdit}\r\n                >\r\n                    {this.renderChildren()}\r\n                </FormConstructionLicenseView>\r\n                <AlertMessageSuper {...this.props} />\r\n                <Loading isShowLoading={isShowLoading} />\r\n            </Fragment>\r\n        )\r\n    }\r\n}\r\nconst mapStateToProps = state => ({\r\n    constructionRdc: state.construct\r\n})\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    constructionAction: bindActionCreators(ConstructionAction, dispatch)\r\n})\r\n\r\n// export default WithAlertMessage(connect(mapStateToProps, mapDispatchToProps)(FormConstructionLicense))\r\n\r\nexport default compose(\r\n    connect(mapStateToProps, mapDispatchToProps),\r\n    WithAlertMessage,\r\n    WithLoading\r\n)(FormConstructionLicense)","import React, { Fragment } from 'react'\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport ListItem from '@material-ui/core/ListItem';\r\nimport classNames from 'classnames';\r\nimport { LISTGRAPHICLAYER, MENU_CONSTRUCTION_LICENSE } from '../../../../../../Constants/Constants';\r\nimport SpecifyCoordinate from '../../../../../../Containers/Web/Panel/Menu/MenuContent/SpecifyCoordinate/SpecifyCoordinate';\r\n\r\nconst MenuConstructionView = ({\r\n    classes,\r\n    isActiveDraw,\r\n    listMenu,\r\n    onMenuItemClick,\r\n    callBackDrawGraphic,\r\n}) => {\r\n    const generateListItem = () => {\r\n        return listMenu.map((itm, index) => {\r\n            let element = null\r\n            if (itm.id === MENU_CONSTRUCTION_LICENSE.specifyCoordinate.id) {\r\n                element = <SpecifyCoordinate\r\n                    isActive={itm.isActive}\r\n                    name={itm.name}\r\n                    layerName={LISTGRAPHICLAYER.GRAPHICLAYER_CONSTRUCTION_LICENSE}\r\n                    onClick={onMenuItemClick(itm)}\r\n                    callBackDrawGraphic={callBackDrawGraphic}\r\n                />\r\n            } else {\r\n                const isActive = itm.id === MENU_CONSTRUCTION_LICENSE.clickMap.id ? isActiveDraw : itm.isActive\r\n                element = <ListItem\r\n                    button\r\n                    key={`generateListItem-${itm.id}`}\r\n                    divider={true}\r\n                    className={classNames(classes.menu_item, { [classes.manu_item_active]: isActive })}\r\n                    onClick={onMenuItemClick(itm)}>\r\n                    {itm.name}\r\n                </ListItem>\r\n            }\r\n\r\n            return (\r\n                <Fragment key={`MenuConstruction_${index}`}>\r\n                    {element}\r\n                </Fragment >);\r\n        })\r\n    }\r\n\r\n    return (\r\n        <Fragment>\r\n            {generateListItem()}\r\n        </Fragment>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    menu_item: {\r\n        '&:focus': {\r\n            backgroundColor: theme.mainTheme.colorAH.colorHover,\r\n        },\r\n        '&:hover': {\r\n            backgroundColor: theme.mainTheme.colorAH.colorHover,\r\n            color: theme.mainTheme.colorAH.colorTextHover\r\n        }\r\n    },\r\n    manu_item_active: {\r\n        backgroundColor: theme.mainTheme.colorAH.colorActive,\r\n        color: theme.mainTheme.colorAH.colorTextActive,\r\n        '&:focus': {\r\n            backgroundColor: theme.mainTheme.colorAH.colorActive\r\n        },\r\n    }\r\n}))(MenuConstructionView)\r\n","import React from 'react';\r\nimport AppBarHeaderView from '../../../../AppBarHeaderView';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { withStyles } from '@material-ui/core/styles';\r\n\r\nconst AddConstructionLicenseView = ({\r\n    classes,\r\n    title,\r\n    children,\r\n    onClickBack\r\n}) => {\r\n    \r\n    return (\r\n        <Grid container className={classes.root}>\r\n            <AppBarHeaderView\r\n                // title=\"เพิ่มตำแหน่งขออนุญาตก่อสร้าง\"\r\n                title={title}\r\n                onClickBack={onClickBack}\r\n            />\r\n            <Grid item xs={12} className={classes.body}>\r\n                {children}\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        height: '100%',\r\n    },\r\n    body: {\r\n        height: 'calc(100% - 45px)',\r\n    }\r\n}))(AddConstructionLicenseView)\r\n","import React, { Component, Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { bindActionCreators } from 'redux';\r\nimport withWidth from '@material-ui/core/withWidth';\r\nimport { compose } from 'recompose';\r\n\r\n//import component\r\nimport FormConstructionLicense from '../Form/FormConstructionLicense';\r\nimport MenuConstructionView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/ConstructionLicense/MenuConstructionView';\r\nimport AddConstructionLicenseView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/ConstructionLicense/Add/AddConstructionLicenseView';\r\nimport WithAlertMessage from '../../../../../../../HOC/WithAlertMessage';\r\nimport AlertMessageSuper from '../../../../../../../Controls/Containers/AlertMessageSuper'\r\nimport Loading from '../../../../../../../Controls/Containers/Loading';\r\nimport WithLoading from '../../../../../../../HOC/WithLoading';\r\n\r\n//import service - utils\r\nimport { fetchPost_, fetchGet_ } from '../../../../../../../Utilities/ServiceUtils';\r\nimport * as DatetimeUtil from '../../../../../../../Utilities/DateTimeUtil';\r\n\r\n//import actions\r\nimport * as MapFunctions from '../../../../../../../Map/MapFunctions';\r\nimport * as MapAction from '../../../../../../../Actions/Web/Maps/MapAction';\r\nimport * as MenuAction from '../../../../../../../Actions/Web/MenuAction';\r\nimport * as ConstructAction from '../../../../../../../Actions/Web/Panel/ConstructAction';\r\n\r\n//import constants\r\nimport { TABLE_MAPSHEET1K, ALERT_MESSAGE, MENU_CONSTRUCTION_LICENSE,ACTIVE_FUNCTION } from '../../../../../../../Constants/Constants';\r\n\r\nconst LIST_MENU = Object.keys(MENU_CONSTRUCTION_LICENSE).map(key => ({\r\n    id: MENU_CONSTRUCTION_LICENSE[key].id,\r\n    name: MENU_CONSTRUCTION_LICENSE[key].name,\r\n    isActive: false\r\n}))\r\n\r\nclass AddConstructionLicense extends Component {\r\n    constructor() {\r\n        super();\r\n        this.state = {\r\n            listMenu: LIST_MENU,\r\n            isOpenForm: false,\r\n            isNotBKK: false,\r\n            isActiveDraw: false,\r\n            isActiveEdit: false,\r\n            graphic: null\r\n        }\r\n    }\r\n\r\n    manageModeDisplay = (id) => {\r\n        const { listMenu } = this.state;\r\n\r\n        const tmpListMode = listMenu.map((itm) => {\r\n            if (itm.id === id) {\r\n                return { ...itm, isActive: !itm.isActive }\r\n            } else {\r\n                return { ...itm, isActive: false }\r\n            }\r\n        })\r\n\r\n        this.setState({\r\n            listMenu: tmpListMode\r\n        })\r\n    }\r\n\r\n    handleMenuItemClick = (itm) =>async (evt) => {\r\n        const {menuRdc, menuAction,mapAction } = this.props;\r\n\r\n        this.manageModeDisplay(itm.id);\r\n        if(menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM){\r\n            await menuAction.activeFunction(null)\r\n            await mapAction.bindMapCommand(MapFunctions.clearGraphicConstructionLicense)\r\n        }\r\n\r\n        switch (itm.id) {\r\n            case MENU_CONSTRUCTION_LICENSE.clickMap.id:\r\n                const isActive = menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM\r\n                this.manageClickMap(!isActive)\r\n                break;\r\n            case MENU_CONSTRUCTION_LICENSE.currentLocation.id:\r\n                this.manageCurrentLocation();\r\n                break;\r\n            default:\r\n                break;\r\n        }\r\n\r\n    }\r\n\r\n    manageClickMap = async (isActive) => {\r\n        const { mapAction, showAlert, menuAction } = this.props;\r\n\r\n        // if (isActive) {\r\n        //     mapAction.bindMapCommand(MapFunctions.drawPointConstructionLicense, {\r\n        //         callback: this.callBackDrawGraphic,\r\n        //         showAlert: showAlert\r\n        //     })\r\n        //     this.managePanelForMobile(true, \"ClickMap\")\r\n        // } else {\r\n        //     await mapAction.bindMapCommand(MapFunctions.clearGraphicConstructionLicense)\r\n        //     mapAction.bindClearMapCommand()\r\n        // }\r\n\r\n        if(isActive){\r\n            menuAction.activeFunction(ACTIVE_FUNCTION.ADD_GP_FORM)\r\n            setTimeout(()=>{ // set timeout เพื่อแก้ปัญหา willunmount ของ maptool clear event draw\r\n                mapAction.bindMapCommand(MapFunctions.drawPointConstructionLicense, {\r\n                    callback: this.callBackDrawGraphic,\r\n                    showAlert: showAlert\r\n                })\r\n            },50)\r\n            this.managePanelForMobile(true, \"ClickMap\")\r\n        }\r\n    }\r\n\r\n    managePanelForMobile = async (isDraw, func) => {\r\n        const { menuAction, width } = this.props;\r\n        if (width === 'sm' || width === 'xs') {\r\n            switch (func) {\r\n                case \"ClickMap\":\r\n                    if (isDraw) {\r\n                        await menuAction.closeMenuPanel();\r\n                        await menuAction.openMenuMap();\r\n                    } else {\r\n                        await menuAction.openMenuPanel();\r\n                        await menuAction.closeMenuMap();\r\n                    }\r\n                    break;\r\n                default:\r\n                    break;\r\n            }\r\n        }\r\n    }\r\n\r\n    manageCurrentLocation = () => {\r\n        const { mapAction } = this.props;\r\n        mapAction.bindMapCommand(MapFunctions.currentLocationConstructionLicense, {\r\n            callback: this.callBackDrawGraphic\r\n        })\r\n    }\r\n\r\n    callBackDrawGraphic = async (evt, graphic) => {\r\n        this.setState({\r\n            isOpenForm: true,\r\n            graphic: graphic\r\n        })\r\n\r\n        if (evt) {\r\n            const { menuAction, mapAction, constructAction } = this.props;\r\n            menuAction.activeFunction(null)\r\n            constructAction.saveGeometry(evt.geometry)\r\n            await mapAction.bindMapCommand(MapFunctions.clearEvtDrawMap)\r\n\r\n            this.managePanelForMobile(false, \"ClickMap\");\r\n            // this.setState({ isActiveDraw: false })\r\n            await mapAction.bindMapCommand(MapFunctions.getDistrictAndSubDistrictFormPoint, { // save sub-district code\r\n                geometry: evt.geometry,\r\n                callbackFn: this.callbackGetDistrictAndSubDistrict\r\n            })\r\n        }\r\n    }\r\n\r\n    callbackGetDistrictAndSubDistrict = (values) => {\r\n        if (values) {\r\n            const { constructAction } = this.props\r\n            const { SUBDISTRICT_ID, DISTRICT_ID } = values;\r\n            const subDistrictCode = SUBDISTRICT_ID//SUBDISTRICT_ID.slice(SUBDISTRICT_ID.length - 2, SUBDISTRICT_ID.length);\r\n            const districtCode = DISTRICT_ID//DISTRICT_ID.slice(DISTRICT_ID.length - 2, DISTRICT_ID.length)\r\n            this.setState({ isNotBKK: false });\r\n            constructAction.saveAdminPoly({ districtID: districtCode, subDistrictID: subDistrictCode })\r\n        } else {//นอกเขต กทม.\r\n            this.setState({ isNotBKK: true });\r\n            this.alertIsOutBKK();\r\n        }\r\n    }\r\n\r\n    callbackEditGrphic = (geometry, graphic) => {\r\n        const { constructAction, mapAction } = this.props;\r\n        this.setState({ graphic: graphic })\r\n        geometry && constructAction.saveGeometry(geometry);\r\n        geometry && mapAction.bindMapCommand(MapFunctions.getDistrictAndSubDistrictFormPoint, { // save sub-district code\r\n            geometry: geometry,\r\n            callbackFn: this.callbackGetDistrictAndSubDistrict\r\n        })\r\n    }\r\n\r\n    handleClickDrawGraphic = async () => {\r\n        const { mapAction , menuAction, menuRdc} = this.props;\r\n        // const { isActiveDraw, isActiveEdit } = this.state\r\n\r\n        // if (isActiveDraw) { // ปิดการวาด\r\n        //     this.setState({ isActiveDraw: false })\r\n        //     mapAction.bindMapCommand(MapFunctions.deActivateConstruct)\r\n        // } else { // เปิดการวาด\r\n        //     if (isActiveEdit) {\r\n        //         this.setState({ isActiveEdit: false })\r\n        //     }\r\n        //     this.managePanelForMobile(true)\r\n        //     this.setState({ isActiveDraw: true })\r\n        //     this.manageClickMap(true)\r\n        // }\r\n\r\n        if(menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM){\r\n            menuAction.activeFunction(null)\r\n            mapAction.bindMapCommand(MapFunctions.deActivateConstruct)\r\n        }else{\r\n            menuRdc.ActiveFunction === ACTIVE_FUNCTION.EDIT_GP_FORM && await mapAction.bindMapCommand(MapFunctions.clearEditConstruct)\r\n            menuAction.activeFunction(ACTIVE_FUNCTION.ADD_GP_FORM)\r\n            this.managePanelForMobile(true)\r\n            this.manageClickMap(true)\r\n        }\r\n    }\r\n\r\n    handleClickEditGraphic = async () => {\r\n        const { graphic } = this.state;\r\n        const { mapAction, showAlert, menuRdc, menuAction } = this.props;\r\n\r\n        if (graphic) {\r\n            // if (isActiveEdit) { // ปิดการแก้ไข\r\n            //     mapAction.bindMapCommand(MapFunctions.clearEditConstruct)\r\n            //     this.setState({ isActiveEdit: false })\r\n            // } else { // เปิดการแก้ไข\r\n            //     if (isActiveDraw) {\r\n            //         this.setState({ isActiveDraw: false })\r\n            //         await mapAction.bindMapCommand(MapFunctions.deActivateConstruct)\r\n            //     }\r\n            //     this.managePanelForMobile(true)\r\n            //     mapAction.bindMapCommand(\r\n            //         MapFunctions.editGraphicConstructionLicense,\r\n            //         { graphic, callback: this.callbackEditGrphic, showAlert: showAlert, callbackEditFail: this.editOutOfBKK },\r\n\r\n            //     )\r\n            //     this.setState({ isActiveEdit: true })\r\n            // }\r\n            if(menuRdc.ActiveFunction === ACTIVE_FUNCTION.EDIT_GP_FORM){\r\n                menuAction.activeFunction(null)\r\n                mapAction.bindMapCommand(MapFunctions.clearEditConstruct)\r\n            }else{\r\n                menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM && await mapAction.bindMapCommand(MapFunctions.deActivateConstruct)\r\n                this.managePanelForMobile(true)\r\n                menuAction.activeFunction(ACTIVE_FUNCTION.EDIT_GP_FORM)\r\n                mapAction.bindMapCommand(\r\n                    MapFunctions.editGraphicConstructionLicense,\r\n                    { graphic, callback: this.callbackEditGrphic, showAlert: showAlert, callbackEditFail: this.editOutOfBKK },\r\n                )\r\n            }\r\n        } else {\r\n            showAlert({ altMsg: ALERT_MESSAGE.POPUP.REQUEST_PIN_MAP })\r\n        }\r\n    }\r\n\r\n    callBackSaveForm = (value) => {\r\n        const { showAlert, authenRdc, showLoading, hideLoading } = this.props;\r\n        let createDateTimeStamp = DatetimeUtil.convertDatetimeToCallService(new Date())\r\n        showLoading()\r\n        this.callServiceCheckPermissionID(value.permissionID).then(result => {\r\n            if (result && result.statusCode) {\r\n                if (result.statusCode === 1) {\r\n                    MapFunctions.addConstructionLicense({\r\n                        ...value,\r\n                        createDate: createDateTimeStamp,\r\n                        userID: authenRdc.profile.userID,\r\n                        callback: this.callBackSaveFormMapService\r\n                    })\r\n                } else {\r\n\r\n                    showAlert({ altMsg: `เลขที่ : ${value.permissionID} ถูกใช้ในการยื่นใบขออนุญาตก่อสร้างแล้ว` })\r\n                    hideLoading()\r\n                }\r\n            } else {\r\n                showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR })\r\n                hideLoading()\r\n            }\r\n        });\r\n    }\r\n\r\n    callServiceCheckConstructID = constructID => {\r\n        return fetchGet_(`${process.env.REACT_APP_CAH_CHECK_CONSTRUCT_ID}?constructid=${constructID}`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceCheckConstructID', ex)\r\n            })\r\n    }\r\n\r\n    callServiceCheckPermissionID = permissionID => {\r\n        return fetchGet_(`${process.env.REACT_APP_CAH_CHECK_PERMISSION_ID}?permissionID=${permissionID}`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceCheckPermissionID', ex)\r\n            })\r\n    }\r\n\r\n    callServiceSaveBuildings = (objectid, buildings) => {\r\n        return fetchPost_(process.env.REACT_APP_CAH_SAVE_CONSTRUCT_FORM, {\r\n            objectid: objectid,\r\n            building: buildings\r\n        })\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status();\r\n                }\r\n                return res.json();\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceSaveBuildings', ex)\r\n            })\r\n    }\r\n\r\n    callServiceUpdateSubZone = (objectID) => {\r\n        return fetchGet_(`${process.env.REACT_APP_CAH_UPDATE_CONSTRUCT_LUP_ZONE}?objectid=${objectID}`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status();\r\n                }\r\n                return res.json();\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceSaveBuildings', ex)\r\n            })\r\n    }\r\n\r\n    callBackSaveFormMapService = async (param) => {\r\n        const { showAlert, hideLoading, mapAction } = this.props;\r\n        if (param && param.success && param.objectId) {\r\n            const resultUpdateSubZone = await this.callServiceUpdateSubZone(param.objectId)\r\n            await mapAction.bindMapCommand(MapFunctions.refreshMap, { //สั่ง refresh layer\r\n                layerID: window.TOC_LAYER_NAME.CONSTRUCT\r\n            });\r\n            if (resultUpdateSubZone && resultUpdateSubZone.statusCode && resultUpdateSubZone.statusCode === 1) {\r\n                const resultSaveBuilding = await this.callServiceSaveBuildings(param.objectId, param.buildings)\r\n                if (resultSaveBuilding && resultSaveBuilding.statusCode && resultSaveBuilding.statusCode === 1) {\r\n                    await this.callServiceMapsheet1K(param.objectId)\r\n                } else {\r\n                    showAlert({ altMsg: ALERT_MESSAGE.POPUP.SAVE_FAIL })\r\n                    hideLoading()\r\n                }\r\n            } else {\r\n                showAlert({ altMsg: ALERT_MESSAGE.POPUP.SAVE_FAIL })\r\n                hideLoading()\r\n            }\r\n        } else {\r\n            showAlert({ altMsg: ALERT_MESSAGE.POPUP.SAVE_FAIL })\r\n            hideLoading()\r\n        }\r\n    }\r\n\r\n    callServiceMapsheet1K = (objectID) => {\r\n        const { showAlert, hideLoading } = this.props;\r\n        fetchGet_(`${process.env.REACT_APP_UPDATE_MAPSHEET1K}?objectid=${objectID}&tablename=${TABLE_MAPSHEET1K.CONSTRUCT_PNT}&isupdate=true`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(values => {\r\n                if (values && values.statusCode === 1) {\r\n                    // showAlert({ altMsg: ALERT_MESSAGE.POPUP.SAVE_SUCCESS, callbackCancel: this.handleCloseForm })\r\n                    showAlert({ altMsg: ALERT_MESSAGE.POPUP.SAVE_SUCCESS, callbackClose: this.handleCloseForm })\r\n                } else {\r\n                    showAlert({ altMsg: ALERT_MESSAGE.POPUP.SAVE_FAIL })\r\n                }\r\n            })\r\n            .catch(ex => {\r\n                showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR })\r\n                console.log('ex callServiceSaveForm', ex)\r\n            })\r\n            .finally(() => {\r\n                hideLoading();\r\n            })\r\n    }\r\n\r\n    handleClickBackPanel = () => {\r\n        const { showAlert } = this.props;\r\n        const { isOpenForm } = this.state;\r\n\r\n        if (isOpenForm) {\r\n            showAlert({ altMsg: ALERT_MESSAGE.QUESTION.CANCEL_FORM, altType: 2, callbackConfirm: this.handleCloseForm, })\r\n        } else {\r\n            this.handleCloseForm();\r\n        }\r\n    }\r\n\r\n    handleCloseForm = () => {\r\n        const { onClickBack, mapAction, constructAction, menuAction } = this.props;\r\n        onClickBack();\r\n        mapAction.bindMapCommand(MapFunctions.clearGraphicConstructionLicense);\r\n        constructAction.clearFormStep();\r\n        menuAction.activeFunction(null)\r\n    }\r\n\r\n    alertIsOutBKK = () => {\r\n        const { showAlert } = this.props;\r\n        showAlert({ altMsg: ALERT_MESSAGE.POPUP.OUT_OF_BKK })\r\n    }\r\n    editOutOfBKK = () => {\r\n        // this.setState({\r\n        //     isActiveDraw: true,\r\n        //     isActiveEdit: false,\r\n        // });\r\n        this.managePanelForMobile(true);\r\n        this.manageClickMap(true)\r\n    }\r\n\r\n    renderChildren = () => {\r\n        const { isOpenForm, listMenu, isNotBKK } = this.state;\r\n        const { menuRdc } = this.props;\r\n\r\n        if (isOpenForm) {\r\n            return <FormConstructionLicense\r\n                onCloseForm={this.handleCloseForm}\r\n                callBackSaveForm={this.callBackSaveForm}\r\n                isNotBKK={isNotBKK}\r\n                alertIsNotBKKFn={this.alertIsOutBKK}\r\n                onEdit={this.handleClickEditGraphic}\r\n                onDraw={this.handleClickDrawGraphic}\r\n                isActiveDraw={menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM}\r\n                isActiveEdit={menuRdc.ActiveFunction === ACTIVE_FUNCTION.EDIT_GP_FORM}\r\n            />;\r\n        } else {\r\n            return <MenuConstructionView\r\n                listMenu={listMenu}\r\n                onMenuItemClick={this.handleMenuItemClick}\r\n                callBackDrawGraphic={this.callBackDrawGraphic}\r\n                isActiveDraw={menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM}\r\n            />\r\n        }\r\n    }\r\n\r\n    render() {\r\n        const { title, isShowLoading } = this.props;\r\n\r\n        return (\r\n            <Fragment>\r\n                <AddConstructionLicenseView title={title} onClickBack={this.handleClickBackPanel} >\r\n                    {this.renderChildren()}\r\n                </AddConstructionLicenseView>\r\n                <AlertMessageSuper {...this.props} />\r\n                <Loading isShowLoading={isShowLoading} />\r\n            </Fragment >\r\n        )\r\n    }\r\n}\r\n\r\nconst mapStateToProps = state => ({\r\n    authenRdc: state.authen,\r\n    menuRdc: state.menu\r\n})\r\n\r\nconst mapDispatchToProp = dispatch => ({\r\n    mapAction: bindActionCreators(MapAction, dispatch),\r\n    menuAction: bindActionCreators(MenuAction, dispatch),\r\n    constructAction: bindActionCreators(ConstructAction, dispatch)\r\n})\r\n\r\nconst enhance = compose(\r\n    connect(mapStateToProps, mapDispatchToProp),\r\n    withWidth(), //จะได้ props width มา,\r\n    WithLoading\r\n)\r\n\r\nexport default WithAlertMessage(enhance(AddConstructionLicense))\r\n","import React from 'react';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport AppBarHeaderView from '../../../../AppBarHeaderView';\r\n\r\nconst SearchConstructView = ({\r\n    classes,\r\n    // page,\r\n    title,\r\n    children,\r\n    onClickBack\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root}>\r\n            <AppBarHeaderView\r\n                // title={page}\r\n                title={title}\r\n                onClickBack={onClickBack}\r\n            />\r\n            <Grid item xs={12} className={classes.body}>\r\n                {children}\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        height: '100%',\r\n    },\r\n    body: {\r\n        height: 'calc(100% - 45px)',\r\n    }\r\n}))(SearchConstructView)\r\n","import React, { Fragment } from \"react\";\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport { Field } from 'redux-form';\r\nimport classnames from 'classnames'\r\nimport Grid from '@material-ui/core/Grid';\r\nimport TextFieldRedux from '../../../../../../../Controls/Containers/TextFieldRedux';\r\nimport SelectFieldRedux from '../../../../../../../Controls/Containers/SelectFieldRedux';\r\nimport Button from '../../../../../../../Controls/Containers/Button';\r\nimport { BTN } from '../../../../../../../Constants/Constants'\r\n\r\nconst Form = ({\r\n    classes,\r\n    isActiveSpatialSearch,\r\n    luDistrict,\r\n    luSubDistrict,\r\n    handleSubmit,\r\n    onChangeDistrict,\r\n    onSubmit,\r\n    onCancel,\r\n    onClickSpatialSearch\r\n}) => (\r\n        <Fragment>\r\n            <Field\r\n                name=\"permissionID\"\r\n                label={`เลขที่ใบอนุญาต(อ.1/ยผ.4)`}\r\n                component={TextFieldRedux}\r\n                maxLength={20}\r\n            />\r\n            <Field\r\n                name=\"districtID\"\r\n                label={'เขต'}\r\n                component={SelectFieldRedux}\r\n                onChangeValue={onChangeDistrict}\r\n                data={luDistrict}\r\n                keyData={{ value: \"value\", label: \"name\" }}\r\n            />\r\n            <Field\r\n                name=\"subDistrictID\"\r\n                label={'แขวง'}\r\n                component={SelectFieldRedux}\r\n                data={luSubDistrict}\r\n                keyData={{ value: \"value\", label: \"name\" }}\r\n            />\r\n\r\n            <Grid container justify=\"center\" spacing={24} className={classes.footer}>\r\n            <Grid item>\r\n                    <Button\r\n                        label={BTN.TH.CANCEL}\r\n                        // color=\"black\"\r\n                        onClick={onCancel}\r\n                    />\r\n                </Grid>\r\n                <Grid item>\r\n                    <Button\r\n                        type=\"submit\"\r\n                        label={BTN.TH.SEARCH}\r\n                        onClick={handleSubmit(onSubmit)}\r\n                    />\r\n                </Grid>\r\n                \r\n                <Grid item>\r\n                    <Button\r\n                        label=\"เลือกบนแผนที่\"\r\n                        // color=\"black\"\r\n                        color={isActiveSpatialSearch ? \"black\" : \"green\"}\r\n                        onClick={onClickSpatialSearch}\r\n\r\n                    />\r\n                </Grid>\r\n            </Grid>\r\n        </Fragment>\r\n    )\r\n\r\nconst FormSearchConstructView = ({\r\n    classes,\r\n    children,\r\n    isActiveSpatialSearch,\r\n    isDisplay,\r\n    luDistrict,\r\n    luSubDistrict,\r\n    handleSubmit,\r\n    onChangeDistrict,\r\n    onSubmit,\r\n    onCancel,\r\n    onClickSpatialSearch\r\n}) => {\r\n    return (\r\n        <Grid container className={classnames(classes.root, { [classes.hide]: !isDisplay })}>\r\n            <Grid item xs={12} className={classes.rootForm}>\r\n                <Form\r\n                    classes={classes}\r\n                    isActiveSpatialSearch={isActiveSpatialSearch}\r\n                    luDistrict={luDistrict}\r\n                    luSubDistrict={luSubDistrict}\r\n                    handleSubmit={handleSubmit}\r\n                    onChangeDistrict={onChangeDistrict}\r\n                    onSubmit={onSubmit}\r\n                    onCancel={onCancel}\r\n                    onClickSpatialSearch={onClickSpatialSearch}\r\n                />\r\n            </Grid>\r\n            <Grid item xs={12} className={classes.rootResult}>\r\n                {children}\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        height: '100%'\r\n    },\r\n    rootForm: {\r\n        padding: '10px',\r\n        // height: '290px',\r\n        height: '335px'\r\n    },\r\n    rootResult: {\r\n        height: 'calc(100% - 335px)'\r\n    },\r\n    footer: {\r\n        marginTop: '10px',\r\n        marginBottom:\"10px\"\r\n    },\r\n    hide: {\r\n        display: 'none'\r\n    }\r\n}))(FormSearchConstructView)\r\n\r\n\r\n// {/* <Field\r\n// name=\"permissionID\"\r\n// label={`เลขที่ใบอนุญาต(อ.1/ยผ.4)`}\r\n// component={TextFieldRedux}\r\n// maxLength={20}\r\n// />\r\n// <Field\r\n// name=\"districtID\"\r\n// label={'เขต'}\r\n// component={SelectFieldRedux}\r\n// onChangeValue={onChangeDistrict}\r\n// data={luDistrict}\r\n// keyData={{ value: \"value\", label: \"name\" }}\r\n// />\r\n// <Field\r\n// name=\"subDistrictID\"\r\n// label={'แขวง'}\r\n// component={SelectFieldRedux}\r\n// data={luSubDistrict}\r\n// keyData={{ value: \"value\", label: \"name\" }}\r\n// /> */}","import React from 'react';\r\nimport { Scrollbars } from 'react-custom-scrollbars';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport ListItem from '@material-ui/core/ListItem';\r\nimport Delete from \"@material-ui/icons/Delete\";\r\nimport Edit from \"@material-ui/icons/Edit\";\r\nimport IconButton from '@material-ui/core/IconButton';\r\nimport classnames from 'classnames'\r\n\r\n//import Tooltip\r\nimport Tooltip from '../../../../../../../Controls/Containers/Tooltip'\r\n\r\nconst ListResult = ({\r\n    classes,\r\n    listResult,\r\n    onClickListResult,\r\n    onClickEdit,\r\n    onClickDelete,\r\n    isOnlySearch,\r\n    userID\r\n}) => {\r\n    if (listResult.length === 0) {\r\n        return <div className={classes.div_noData}>ไม่พบข้อมูล</div>\r\n    }\r\n    return (\r\n        <Grid container className={classes.result}>\r\n            {listResult.map((result, index)  =>  \r\n                \r\n                <ListItem\r\n                    key={`result-${result.permissionID}-${index}`}\r\n                    button\r\n                    divider={true}\r\n                    className={classes.menu_item}\r\n                    classes={{ gutters: classes.guttersItem }}\r\n                    onClick={onClickListResult(result)}\r\n                >\r\n                    <Grid container justify=\"space-between\">\r\n                        <Grid item  className={classes.containerTxtResult} >\r\n                            <label className={classes.txtResult}>{`เลขที่ใบอนุญาต : ${result.permissionID ? result.permissionID : \"\"}`}</label><br />\r\n                            <label className={classes.txtResult}>{`วันที่ : ${result.permissionDateForDisplay ? result.permissionDateForDisplay : \"\"}`}</label>\r\n                        </Grid>\r\n                        {!isOnlySearch && (userID == result.updater ) && //เพิ่มเงื่อนไขว่าต้องเป็นจุดอ.1ของตัวเองเท่านั้นถึงจะมีปุ่ม edit,delete ขึ้นมา\r\n                            <Grid item >\r\n                                <Tooltip title='แก้ไข' placement='bottom'>\r\n                                <IconButton className={classnames(classes.iconButton, { [classes.marginIcon]: result.haveHouse })} onClick={onClickEdit(result)} >\r\n                                    <Edit className={classes.icon} />\r\n                                </IconButton>\r\n                                </Tooltip>\r\n                                \r\n                                {!result.haveHouse && \r\n                                    <Tooltip title='ลบ' placement='bottom'>\r\n                                        <IconButton className={classes.iconButton} onClick={onClickDelete(result)} >\r\n                                            <Delete className={classes.icon} />\r\n                                        </IconButton>\r\n                                    </Tooltip>\r\n                                }\r\n                                \r\n                            </Grid>\r\n                        }\r\n                    </Grid>\r\n                </ListItem>\r\n            )}\r\n        </Grid>\r\n    )\r\n}\r\n\r\nconst ResultSearchConstructView = ({\r\n    classes,\r\n    listResult,\r\n    onClickListResult,\r\n    onClickEdit,\r\n    onClickDelete,\r\n    isOnlySearch,\r\n    userID\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root}>\r\n            <Grid item xs={12} className={classes.header}>\r\n                {`ผลลัพธ์จำนวน ${listResult.length} รายการ`}\r\n            </Grid>\r\n            <Grid item xs={12} className={classes.rootResult} >\r\n                <Scrollbars autoHide>\r\n                    <ListResult\r\n                        classes={classes}\r\n                        listResult={listResult}\r\n                        onClickListResult={onClickListResult}\r\n                        onClickEdit={onClickEdit}\r\n                        onClickDelete={onClickDelete}\r\n                        isOnlySearch={isOnlySearch}\r\n                        userID={userID}\r\n                    />\r\n                </Scrollbars >\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        width: '100%',\r\n        height: '100%'\r\n    },\r\n    rootResult: {\r\n        height: 'calc(100% - 25px)',\r\n        // [theme.breakpoints.down(\"sm\")]: {\r\n        //     [`& input`]: {\r\n        //         height: 'calc(100% - 35px)',\r\n        //     },\r\n        // },\r\n    },\r\n    containerTxtResult: {\r\n        maxWidth: 'calc(100% - 70px)',\r\n        textOverflow: 'ellipsis',\r\n        whiteSpace: 'nowrap',\r\n        overflow: 'hidden',\r\n    },\r\n    result: {\r\n        marginBottom: '0px',\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            marginBottom: '20px',\r\n        },\r\n    },\r\n    header: {\r\n        height: '25px',\r\n        lineHeight: '25px',\r\n        width: '100%',\r\n        backgroundColor: theme.mainTheme.color3,\r\n        color: theme.mainTheme.color2,\r\n        textAlign: 'center',\r\n        fontSize: theme.textSize.subtitle\r\n    },\r\n    div_noData: {\r\n        width: '100%',\r\n        padding: '18px'\r\n    },\r\n    menu_item: {\r\n        '&:focus': {\r\n            backgroundColor: theme.mainTheme.color2\r\n        },\r\n        '&:hover': {\r\n            backgroundColor: theme.mainTheme.colorAH.colorHover,\r\n            color: theme.mainTheme.colorAH.colorTextHover\r\n        }\r\n    },\r\n    txtResult: {\r\n        fontSize: '14px',\r\n        margin: '0px',\r\n        lineHeight: '24px'\r\n    },\r\n    iconButton: {\r\n        height: \"35px\",\r\n        width: \"35px\",\r\n        marginTop: \"6px\"\r\n    },\r\n    icon: {\r\n        marginTop: '-6px'\r\n    },\r\n    guttersItem: {\r\n        padding: \"5px 10px\",\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            [`& input`]: {\r\n                padding: \"5px 20px\",\r\n            },\r\n        },\r\n    },\r\n    marginIcon: {\r\n        marginRight: '35px'\r\n    }\r\n}))(ResultSearchConstructView)\r\n","import React, { Component } from 'react';\r\nimport { reduxForm, getFormValues } from 'redux-form';\r\nimport { compose } from 'recompose';\r\nimport { connect } from 'react-redux';\r\nimport { bindActionCreators } from \"redux\";\r\n\r\n//import component\r\nimport FormSearchConstructView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/ConstructionLicense/Search/FormSearchConstructView';\r\nimport ResultSearchConstructView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/ConstructionLicense/Search/ResultSearchConstructView';\r\n\r\n//import service - utils\r\nimport { searchConstructValidate } from '../../../../../../../Utilities/Validate';\r\nimport { fetchGet_ } from '../../../../../../../Utilities/ServiceUtils';\r\nimport { dateThaiFormat } from '../../../../../../../Utilities/DateTimeUtil';\r\n\r\n//import actions\r\nimport * as MapFunction from \"../../../../../../../Map/MapFunctions\";\r\nimport * as MapAction from \"../../../../../../../Actions/Web/Maps/MapAction\";\r\n\r\n//import constants\r\n// import { SEARCH_CONSTRUCT } from '../../../../../../../Constants/Constants';\r\n\r\nexport class FormSearchConstruct extends Component {\r\n    constructor() {\r\n        super();\r\n        this.state = {\r\n            listResult: null,\r\n            luDistrict: [],\r\n            luSubDistrict: [],\r\n            spatialSearchData: [],\r\n            spatialSearchGeometry: {},\r\n            isActiveSpatialSearch: false\r\n        }\r\n    }\r\n\r\n    componentDidMount() {\r\n        const { refFuncRefreshResult } = this.props;\r\n        refFuncRefreshResult && refFuncRefreshResult(this.refreshResult)\r\n        this.callServiceDistrict();\r\n    }\r\n\r\n    callServiceDistrict = () => {\r\n        fetchGet_(`${process.env.REACT_APP_LU_DISTRICT}?provinceid=10`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(data => {\r\n                this.setState({\r\n                    luDistrict: data.result\r\n                })\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceDistric', ex)\r\n            })\r\n    }\r\n\r\n    callServiceSubDistrict = (districtID) => {\r\n        fetchGet_(`${process.env.REACT_APP_LU_SUBDISTRICT}?provinceid=10&districtid=${districtID}`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(data => {\r\n                this.setState({\r\n                    luSubDistrict: data.result\r\n                })\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceSubDistric', ex)\r\n            })\r\n    }\r\n\r\n    handleChangeDistrict = (evt) => {\r\n        this.callServiceSubDistrict(evt.target.value)\r\n        this.props.change(\"subDistrictID\", undefined)\r\n    }\r\n\r\n    callServiceSeachConstruct = ({ permissionID = \"\", districtID = \"\", subDistrictID = \"\", maxLat = \"\", maxLon = \"\", minLat = \"\", minLon = \"\" }) => {\r\n        return fetchGet_(`${process.env.REACT_APP_CAH_SEARCH_CONSTRUCT_FORM}?permissionid=${permissionID}&districtid=${districtID}&subdistrictid=${subDistrictID}&maxLat=${maxLat}&maxLon=${maxLon}&minLat=${minLat}&minLon=${minLon}`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(data => {\r\n                if (data && data.result) {\r\n                    data.result = data.result.map(result => {\r\n                        if (result.applicationDate) { //เปลื่ยน date เป็นไทย และตัดเวลาออก\r\n                            const applicationDateSplit = result.applicationDate.split(\" \")\r\n                            if (applicationDateSplit.length > 0) {\r\n                                const dateSplit = applicationDateSplit[0].split(\"/\");\r\n                                const date = new Date(dateSplit[2], dateSplit[0] - 1, dateSplit[1])\r\n                                result.date = date //เพิ่ม param นี้มาเพื่อใช้สำหรับ default ค่าใน form\r\n                                result.applicationDate = dateThaiFormat(date) //แปลงเป็น fotmat ไทย\r\n                            }\r\n                        }\r\n                        if (result.permissionDate) {\r\n                            const permissionDateSplit = result.permissionDate.split(\" \")\r\n\r\n                            if (permissionDateSplit.length > 0) {\r\n                                const dateSplit = permissionDateSplit[0].split(\"/\");\r\n                                const date = new Date(dateSplit[2], dateSplit[0] - 1, dateSplit[1])\r\n                                result.permissionDateForDefault = date //เพิ่ม param นี้มาเพื่อใช้สำหรับ default ค่าใน form\r\n                                result.permissionDateForDisplay = dateThaiFormat(date) //แปลงเป็น fotmat ไทย\r\n                            }\r\n                        }\r\n                        return result\r\n                    })\r\n                    return data.result\r\n                } else {\r\n                    return []\r\n                }\r\n            })\r\n            .catch(ex => {\r\n                console.log(\"ex callServiceSeachConstruct\", ex)\r\n                return []\r\n            })\r\n    }\r\n\r\n    handleSubmit = values => {\r\n        if (this.state.isActiveSpatialSearch) {\r\n            this.setState({isActiveSpatialSearch: false});\r\n            this.props.mapAction.bindMapCommand(MapFunction.cleardrawSpatialSearchOR1);\r\n        }\r\n\r\n        this.props.showLoading();\r\n        this.callServiceSeachConstruct({\r\n            permissionID: values.permissionID,\r\n            districtID: values.districtID,\r\n            subDistrictID: values.subDistrictID\r\n        }).then(result => {\r\n            this.setState({\r\n                listResult: result\r\n            })\r\n\r\n            this.props.hideLoading()\r\n        })\r\n    }\r\n\r\n    refreshResult = () => { //ref ไปยัวหน้า search construct เพื่อทำการ refresh result ใหม่\r\n        const { _values, showLoading, hideLoading } = this.props;\r\n\r\n        if (_values) {\r\n\r\n            showLoading();\r\n            this.callServiceSeachConstruct({\r\n                permissionID: _values.permissionID,\r\n                districtID: _values.districtID,\r\n                subDistrictID: _values.subDistrictID\r\n            }).then(result => {\r\n                this.setState({\r\n                    listResult: result\r\n                })\r\n                hideLoading()\r\n            })\r\n        } else { //กรณีเป็นการเลือกจาก spatial search จะเข้า else นี้\r\n\r\n            this.handleSpatialSearchCallback(this.state.spatialSearchData, this.state.spatialSearchGeometry)\r\n        }\r\n\r\n    }\r\n\r\n    // handleCancel = () => {\r\n    //     const { mapAction, onClickBack } = this.props\r\n    //     // this.props.initialize({\r\n    //     //     searchFrom: SEARCH_CONSTRUCT.SEARCH_FROM.CONSTRUCT_NO\r\n    //     // })\r\n    //     // this.setState({\r\n    //     //     listResult: null,\r\n    //     // })\r\n    //     onClickBack();\r\n    //     mapAction.bindMapCommand(MapFunction.cleardrawSpatialSearchOR1);\r\n    // }\r\n\r\n    handleClickListResult = detail => evt => {\r\n        const { onClickResult } = this.props;\r\n        onClickResult && onClickResult({ detail });\r\n    }\r\n\r\n    handleDelete = detail => evt => {\r\n        evt.stopPropagation()\r\n        const { onClickDelete } = this.props;\r\n        onClickDelete && onClickDelete(detail)\r\n    }\r\n\r\n    handleEdit = detail => evt => {\r\n        evt.stopPropagation()\r\n        const { onClickEdit } = this.props;\r\n        onClickEdit && onClickEdit(detail)\r\n    }\r\n    handleClickSpatialSearch = () => {\r\n        const { mapAction } = this.props\r\n        const { isActiveSpatialSearch } = this.state;\r\n\r\n        if (isActiveSpatialSearch) {\r\n            this.setState({isActiveSpatialSearch: false});\r\n            mapAction.bindMapCommand(MapFunction.cleardrawSpatialSearchOR1);\r\n        } else {\r\n            mapAction.bindMapCommand(MapFunction.drawGraphicSpatialSearch, {\r\n                menu: \"OR1\",\r\n                callback: this.handleSpatialSearchCallback,\r\n                loading: {\r\n                    show: this.props.showLoading,\r\n                    hide: this.props.hideLoading\r\n                }\r\n            });\r\n            this.setState({ isActiveSpatialSearch: true })\r\n        }\r\n    }\r\n\r\n    handleSpatialSearchCallback = async (res, geometry) => {\r\n        /////////////////////// find Min/Max Lat,Lon //////////////////////////////////// \r\n        // const { authenRdc, isOnlySearch } = this.props;\r\n        let max = geometry.rings[0].length;\r\n        let lstLat = [], lstLon = [];\r\n        for (let i = 0; i < max; i++) {\r\n            geometry.rings[0][i][0] = Number(geometry.rings[0][i][0].toFixed(6));\r\n            geometry.rings[0][i][1] = Number(geometry.rings[0][i][1].toFixed(6));\r\n\r\n            lstLon.push(Number(geometry.rings[0][i][0].toFixed(6)));\r\n            lstLat.push(Number(geometry.rings[0][i][1].toFixed(6)));\r\n        }\r\n\r\n        /* Find Min - Max of Latitude and Longitude */\r\n        lstLon = lstLon.sort(function (a, b) { return a - b });\r\n        lstLat = lstLat.sort(function (a, b) { return a - b });\r\n\r\n        let maxLatitude = lstLat[max - 1]\r\n        let minLatitude = lstLat[0]\r\n        let minLongitude = lstLon[0]\r\n        let maxLongitude = lstLon[max - 1]\r\n        ///////////////////////////////////////////////////////////////////////////////////\r\n\r\n        this.setState({\r\n            spatialSearchData: res,\r\n            spatialSearchGeometry: geometry,\r\n            isActiveSpatialSearch: false\r\n        })\r\n        this.props.showLoading();\r\n\r\n        this.callServiceSeachConstruct({\r\n            maxLat: maxLatitude,\r\n            minLat: minLatitude,\r\n            minLon: minLongitude,\r\n            maxLon: maxLongitude\r\n        }).then(result => {\r\n            this.setState({\r\n                listResult: result\r\n            })\r\n            this.props.hideLoading()\r\n        })\r\n    }\r\n\r\n    render() {\r\n        const { isDisplay, handleSubmit, isOnlySearch, onClickBack, authenRdc } = this.props;\r\n        const { listResult, luDistrict, luSubDistrict, isActiveSpatialSearch } = this.state;\r\n        return (\r\n            <FormSearchConstructView\r\n                isActiveSpatialSearch={isActiveSpatialSearch}\r\n                isDisplay={isDisplay}\r\n                luDistrict={luDistrict}\r\n                luSubDistrict={luSubDistrict}\r\n                handleSubmit={handleSubmit}\r\n                onSubmit={this.handleSubmit}\r\n                // onCancel={this.handleCancel}\r\n                onCancel={onClickBack}\r\n                onChangeDistrict={this.handleChangeDistrict}\r\n                onClickSpatialSearch={this.handleClickSpatialSearch}\r\n            >\r\n                {listResult && <ResultSearchConstructView\r\n                    listResult={listResult}\r\n                    onClickListResult={this.handleClickListResult}\r\n                    onClickEdit={this.handleEdit}\r\n                    onClickDelete={this.handleDelete}\r\n                    isOnlySearch={isOnlySearch}\r\n                    userID={(authenRdc.profile.userID) ? authenRdc.profile.userID : null}\r\n                />}\r\n            </FormSearchConstructView>\r\n        )\r\n    }\r\n}\r\n\r\nconst reduxFormParameter = {\r\n    form: \"searchConstruct\",\r\n    validate: searchConstructValidate\r\n};\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    mapAction: bindActionCreators(MapAction, dispatch)\r\n});\r\n\r\nconst mapStateToProps = state => ({\r\n    _values: getFormValues('searchConstruct')(state),\r\n    authenRdc: state.authen,\r\n})\r\n\r\nconst enhance = compose(\r\n    connect(mapStateToProps, mapDispatchToProps),\r\n    reduxForm(reduxFormParameter)\r\n)\r\n\r\nexport default enhance(FormSearchConstruct)\r\n","import React from 'react';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport BreadCrumb from '../../../../../../../../Controls/Containers/BreadCrumb';\r\nimport { Scrollbars } from 'react-custom-scrollbars';\r\n\r\nconst DetailConstructView = ({\r\n    classes,\r\n    children,\r\n    formStep,\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root}>\r\n            <Grid item xs={12} className={classes.header}>\r\n                <BreadCrumb\r\n                    stepActive={formStep}\r\n                    listStep={[1, 2]}\r\n                />\r\n            </Grid>\r\n            <Grid item xs={12}>\r\n                <div className={classes.title}>\r\n                    <label>ข้อมูลใบอนุญาตก่อสร้าง (อ.1) </label>\r\n                    {/* {formStep === 2 && <Tooltip title=\"เพิ่มอาคาร\" placement=\"right-end\" >\r\n                        <Fab\r\n                            color=\"secondary\"\r\n                            aria-label=\"Add\"\r\n                            className={classes.btnRightTitle}\r\n                            onClick={onClickAddBuildings}\r\n                        >\r\n                            <Add />\r\n                        </Fab>\r\n                    </Tooltip>} */}\r\n                </div>\r\n            </Grid>\r\n            <Grid item xs={12} className={classes.body}>\r\n                <Scrollbars autoHide>\r\n                    {children}\r\n                </Scrollbars>\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        height: '100%',\r\n    },\r\n    header: {\r\n        height: '70px',\r\n    },\r\n    title: {\r\n        color: theme.mainTheme.color1,\r\n        textAlign: 'center',\r\n        fontSize: theme.textSize.title,\r\n        marginBottom: '15px',\r\n        marginTop: '10px'\r\n    },\r\n    btnRightTitle: {\r\n        position: 'absolute',\r\n        right: '111px',\r\n        top: '155px',\r\n        width: '35px',\r\n        height: '35px'\r\n    },\r\n    body: {\r\n        height: 'calc(100% - 120px)',\r\n        backgroundColor: '#f2f2f2'\r\n    }\r\n}))(DetailConstructView)\r\n","import React from 'react';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport Button from '../../../../../../../../Controls/Containers/Button';\r\n\r\nconst RowDeail = ({\r\n    classes,\r\n    label,\r\n    value\r\n}) => (\r\n        <Grid container className={classes.row}>\r\n            <Grid item xs={5} className={classes.colLabel} >\r\n                {label}\r\n            </Grid>\r\n            <Grid item xs={7} className={classes.colValue}>\r\n                {value}\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n\r\n\r\nconst DetailConstructStepOneView = ({\r\n    classes,\r\n    detailConstruct,\r\n    onChangeStep,\r\n    onClickCancel\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root}>\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"รหัสคำร้อง ผมร.1\"\r\n                value={detailConstruct && detailConstruct.PMR1ID && detailConstruct.PMR1ID}\r\n            />\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"เลขรับโยธา\"\r\n                value={detailConstruct && detailConstruct.constructID && detailConstruct.constructID}\r\n            />\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"วันที่ขออนุญาต/วันที่แจ้งความประสงค์\"\r\n                value={detailConstruct && detailConstruct.applicationDate && detailConstruct.applicationDate}\r\n            />\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"ประเภทเอกสารขออนุญาตก่อสร้าง\"\r\n                value={detailConstruct && detailConstruct.applicationTypeDesc && detailConstruct.applicationTypeDesc}\r\n            />\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"ชื่อผู้ยื่นคำขอ\"\r\n                value={detailConstruct && detailConstruct.name && detailConstruct.name}\r\n            />\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"เบอร์โทรศัพท์ผู้ยื่นคำขอ\"\r\n                value={detailConstruct && detailConstruct.applicantTelNo && detailConstruct.applicantTelNo}\r\n            />\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"เลขที่ใบอนุญาต/ใบรับแจ้ง\"\r\n                value={detailConstruct && detailConstruct.permissionID && detailConstruct.permissionID}\r\n            />\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"วันที่ได้รับอนุญาต\"\r\n                value={detailConstruct && detailConstruct.permissionDateForDisplay && detailConstruct.permissionDateForDisplay}\r\n            />\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"ประเภทกิจกรรมการขออนุญาต\"\r\n                value={detailConstruct && detailConstruct.constructTypeDesc && detailConstruct.constructTypeDesc}\r\n            />\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"ชื่อผู้ได้รับอนุญาต\"\r\n                value={detailConstruct && detailConstruct.owerName && detailConstruct.owerName}\r\n            />\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"บ้านเลขที่\"\r\n                value={detailConstruct && detailConstruct.houseNo && detailConstruct.houseNo}\r\n            />\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"หมู่ที่\"\r\n                value={detailConstruct && detailConstruct.moo && detailConstruct.moo}\r\n            />\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"ตรอก\"\r\n                value={detailConstruct && detailConstruct.trok && detailConstruct.trok}\r\n            />\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"ซอย\"\r\n                value={detailConstruct && detailConstruct.soi && detailConstruct.soi}\r\n            />\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"ถนน\"\r\n                value={detailConstruct && detailConstruct.road && detailConstruct.road}\r\n            />\r\n             <RowDeail\r\n                classes={classes}\r\n                label=\"จังหวัด\"\r\n                value={detailConstruct && detailConstruct.provinceName && detailConstruct.provinceName}\r\n            />\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"เขต\"\r\n                value={detailConstruct && detailConstruct.districtName && detailConstruct.districtName}\r\n            />\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"แขวง\"\r\n                value={detailConstruct && detailConstruct.subDistrictName && detailConstruct.subDistrictName}\r\n            />\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"จำนวนอาคาร/สิ่งก่อสร้าง\"\r\n                value={detailConstruct && detailConstruct.numberBuilding && detailConstruct.numberBuilding}\r\n            />\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"เลขที่โฉนด\"\r\n                value={detailConstruct && detailConstruct.chanodeNo && detailConstruct.chanodeNo}\r\n            />\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"เลขที่ดิน\"\r\n                value={detailConstruct && detailConstruct.landNo && detailConstruct.landNo}\r\n            />\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"หมายเหตุ\"\r\n                value={detailConstruct && detailConstruct.remark && detailConstruct.remark}\r\n            />\r\n\r\n            {/* <RowDeail\r\n                classes={classes}\r\n                label=\"ประเภทใบอนุญาต/ใบรับแจ้ง\"\r\n                value={detailConstruct && detailConstruct.applicationTypeDesc && detailConstruct.applicationTypeDesc}\r\n            /> */}\r\n\r\n            <Grid container justify=\"center\" className={classes.footer} spacing={24} >\r\n                <Grid item>\r\n                    <Button\r\n                        label=\"ยกเลิก\"\r\n                        onClick={onClickCancel}\r\n                    />\r\n                </Grid>\r\n                <Grid item>\r\n                    <Button\r\n                        label=\"หน้าต่อไป\"\r\n                        onClick={onChangeStep(2)}\r\n                    />\r\n                </Grid>\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        padding: '0px 20px 20px 20px'\r\n    },\r\n    row: {\r\n        marginTop: '20px',\r\n        fontSize: '14px'\r\n    },\r\n    footer: {\r\n        marginTop: '20px'\r\n    },\r\n    colLabel: {\r\n        fontWeight: 'bold'\r\n    },\r\n    colValue: {\r\n        paddingLeft: '10px'\r\n    }\r\n}))(DetailConstructStepOneView)\r\n","import React, { Fragment } from 'react';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport Button from '../../../../../../../../Controls/Containers/Button';\r\n\r\nconst RowDeail = ({\r\n    classes,\r\n    label,\r\n    value,\r\n    unit,\r\n    isFirstRow,\r\n}) => (\r\n        <Grid container className={`${!isFirstRow && classes.row} `}>\r\n            <Grid item xs={5} className={classes.colLabel} >\r\n                {label}\r\n            </Grid>\r\n            {unit ? (<Fragment> <Grid item xs={4}> {value}</Grid><Grid item xs={3}>{unit}</Grid></Fragment>) : (< Grid item xs={7}> {value} </Grid>)}\r\n        </Grid >\r\n    )\r\n\r\nconst Building = ({\r\n    classes,\r\n    objective,\r\n    constMaterial,\r\n    numBldg,\r\n    numFloor,\r\n    bldgArea,\r\n    carparkArea,\r\n}) => (\r\n        <Grid container className={classes.rootBuilding}>\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"เพื่อใช้เป็น\"\r\n                value={objective}\r\n                isFirstRow={true}\r\n            />\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"โครงสร้างอาคาร\"\r\n                value={constMaterial}\r\n            />\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"จำนวนอาคารที่ก่อสร้าง\"\r\n                value={numBldg}\r\n                unit=\"อาคาร\"\r\n            />\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"จำนวนชั้น\"\r\n                value={numFloor}\r\n                unit=\"ชั้น\"\r\n            />\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"พื้นที่\"\r\n                value={bldgArea}\r\n                unit=\"ตารางเมตร\"\r\n            />\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"พื้นที่จอดรถ\"\r\n                value={carparkArea}\r\n                unit=\"ตารางเมตร\"\r\n            />\r\n\r\n            <Grid item xs={12} className={classes.row}>\r\n                <hr />\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n\r\nconst DetailConstructStepTwoView = ({\r\n    classes,\r\n    detailConstruct,\r\n    onChangeStep,\r\n    onClickCancel\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root}>\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"พื้นที่การใช้ประโยชน์\"\r\n                value={detailConstruct.useArea ? detailConstruct.useArea.toLocaleString() : \"\"}\r\n                unit=\"ตร.ม.\"\r\n                // isFirstRow={true}\r\n            />\r\n            <Grid item xs={12} className={classes.row}>\r\n                <hr />\r\n            </Grid>\r\n            {detailConstruct && detailConstruct.building && detailConstruct.building.map((building, index) => (\r\n                <Building\r\n                    // {console.log('building', building)}\r\n                    key={`detail-building-${index}`}\r\n                    classes={classes}\r\n                    objective={building.objectiveDesc}\r\n                    constMaterial={building.materialDesc}\r\n                    numBldg={building.numberBuilding}\r\n                    numFloor={building.numberFloor}\r\n                    bldgArea={building.buildingArea && parseFloat(building.buildingArea).toLocaleString()}\r\n                    carparkArea={building.carParkArea && parseFloat(building.carParkArea).toLocaleString()}\r\n                />\r\n            ))}\r\n\r\n            <Grid container justify=\"center\" className={classes.footer} spacing={24} >\r\n                <Grid item>\r\n                    <Button\r\n                        label=\"ยกเลิก\"\r\n                        onClick={onClickCancel}\r\n                    />\r\n                </Grid>\r\n                <Grid item>\r\n                    <Button\r\n                        label=\"ก่อนหน้า\"\r\n                        onClick={onChangeStep(1)}\r\n                    />\r\n                </Grid>\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        padding: '10px'\r\n    },\r\n    row: {\r\n        marginTop: '20px',\r\n    },\r\n    footer: {\r\n        marginTop: '20px'\r\n    },\r\n    colLabel: {\r\n        fontWeight: 'bold'\r\n    },\r\n    rootBuilding: {\r\n        fontSize: '14px',\r\n        padding: '10px'\r\n    }\r\n}))(DetailConstructStepTwoView)\r\n","import React, { Component } from 'react';\r\n\r\n//import component\r\nimport DetailConstructView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/ConstructionLicense/Detail/Construct/DetailConstructView';\r\nimport DetailConstructStepOneView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/ConstructionLicense/Detail/Construct/DetailConstructStepOneView';\r\nimport DetailConstructStepTwoView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/ConstructionLicense/Detail/Construct/DetailConstructStepTwoView';\r\n\r\nexport class DetailConstruct extends Component {\r\n    constructor() {\r\n        super();\r\n        this.state = {\r\n            formStep: 1,\r\n            detailConstruct: null\r\n        }\r\n    }\r\n\r\n    handleChangeStep = step => evt => {\r\n        this.setState({\r\n            formStep: step\r\n        })\r\n    }\r\n\r\n    renderChildren = () => {\r\n        const { formStep } = this.state;\r\n        const { detail, onClickCancel } = this.props;\r\n        switch (formStep) {\r\n            case 1:\r\n                return <DetailConstructStepOneView\r\n                    onChangeStep={this.handleChangeStep}\r\n                    detailConstruct={detail}\r\n                    onClickCancel={onClickCancel}\r\n                />\r\n            case 2:\r\n                return <DetailConstructStepTwoView\r\n                    onChangeStep={this.handleChangeStep}\r\n                    detailConstruct={detail}\r\n                    onClickCancel={onClickCancel}\r\n                />\r\n            default: break;\r\n        }\r\n    }\r\n\r\n    render() {\r\n        const { formStep } = this.state;\r\n\r\n        return (\r\n            <DetailConstructView formStep={formStep}>\r\n                {this.renderChildren()}\r\n            </DetailConstructView>\r\n\r\n        )\r\n    }\r\n}\r\n\r\nexport default DetailConstruct\r\n","import React from 'react';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { withStyles } from '@material-ui/core/styles';\r\n\r\nconst EditConstructionLicenseView = ({\r\n    children,\r\n    classes\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root}>\r\n            {children}\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        height: '100%'\r\n    }\r\n}))(EditConstructionLicenseView)\r\n","import React, { Component, Fragment } from \"react\";\r\nimport { connect } from \"react-redux\";\r\nimport { bindActionCreators } from \"redux\";\r\nimport { compose } from \"recompose\";\r\nimport withWidth from \"@material-ui/core/withWidth\";\r\n\r\n//import component\r\nimport FormConstructionLicense from \"../Form/FormConstructionLicense\";\r\nimport EditConstructionLicenseView from \"../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/ConstructionLicense/Edit/EditConstructionLicenseView\";\r\nimport WithLoading from \"../../../../../../../HOC/WithLoading\";\r\nimport Loading from \"../../../../../../../Controls/Containers/Loading\";\r\n\r\n//import service - utils\r\nimport * as DatetimeUtil from \"../../../../../../../Utilities/DateTimeUtil\";\r\nimport {\r\n    fetchPost_,\r\n    fetchGet_,\r\n} from \"../../../../../../../Utilities/ServiceUtils\";\r\n\r\n//import action\r\nimport * as MapAction from \"../../../../../../../Actions/Web/Maps/MapAction\";\r\nimport * as MapFunctions from \"../../../../../../../Map/MapFunctions\";\r\nimport * as ConstructAction from \"../../../../../../../Actions/Web/Panel/ConstructAction\";\r\nimport * as MenuAction from \"../../../../../../../Actions/Web/MenuAction\";\r\n\r\n//import Constants\r\nimport {\r\n    TABLE_MAPSHEET1K,\r\n    ALERT_MESSAGE,\r\n    ACTIVE_FUNCTION,\r\n} from \"../../../../../../../Constants/Constants\";\r\n\r\nclass EditConstructionLicense extends Component {\r\n    constructor() {\r\n        super();\r\n        this.state = {\r\n            isShowForm: false, //เพื่อให้ set default reducer ให้เสร็จก่อนจึงจะ render form\r\n            isNotBKK: false,\r\n            // isActiveDraw: false,\r\n            // isActiveEdit: false,\r\n            graphic: null,\r\n        };\r\n    }\r\n\r\n    componentDidMount = () => {\r\n        const {\r\n            detail,\r\n            mapAction,\r\n            showLoading,\r\n            refClearFormEditConstruct,\r\n        } = this.props;\r\n\r\n        if (detail.latitude && detail.longitude) {\r\n            showLoading();\r\n            mapAction.bindMapCommand(MapFunctions.creatGraphicPointConstruct, {\r\n                latitude: detail.latitude,\r\n                longitude: detail.longitude,\r\n                callback: this.callBackDrawGraphicFirst,\r\n            });\r\n        }\r\n        refClearFormEditConstruct && refClearFormEditConstruct(this.clearForm);\r\n    };\r\n\r\n    setDefaultForm = (geometry) => {\r\n        const { detail, constructAction, hideLoading } = this.props;\r\n        constructAction.setDefaultForm({\r\n            geometry: geometry,\r\n            stepOne: {\r\n                applicationDate: detail.date,\r\n                applicationType: detail.applicationType,\r\n                constructID: detail.constructID,\r\n                constructType: detail.constructType,\r\n                districtID: detail.districtID,\r\n                houseNo: detail.houseNo,\r\n                moo: detail.moo,\r\n                name: detail.name,\r\n                permissionID: detail.permissionID,\r\n                permissionDate: detail.permissionDateForDefault,\r\n                pmr1ID: detail.PMR1ID,\r\n                pmr1IDInitial: detail.PMR1ID,\r\n                provinceID: detail.provinceID,\r\n                road: detail.road,\r\n                soi: detail.soi,\r\n                subDistrictID: detail.subDistrictID,\r\n                haveHouse: detail.haveHouse,\r\n                applicantTelNo: detail.applicantTelNo,\r\n                ownerName: detail.owerName,\r\n                trok: detail.trok,\r\n                numBLDG: detail.numberBuilding,\r\n                chanodeNO: detail.chanodeNo,\r\n                landNo: detail.landNo,\r\n                remark: detail.remark,\r\n            },\r\n            stepTwo: {\r\n                landuseArea: detail.useArea,\r\n                buildings:\r\n                    detail.building &&\r\n                    detail.building.length &&\r\n                    detail.building.reverse().map((bldg) => ({\r\n                        buildingarea: bldg.buildingArea,\r\n                        carparkarea: bldg.carParkArea,\r\n                        material: bldg.material,\r\n                        numberbuilding: bldg.numberBuilding,\r\n                        numberfloor: bldg.numberFloor,\r\n                        objective: bldg.objective,\r\n                    })),\r\n            },\r\n        });\r\n        this.setState({ isShowForm: true });\r\n        hideLoading();\r\n    };\r\n\r\n    callBackDrawGraphicFirst = async (evt, graphic) => {\r\n        if (evt.geometry) {\r\n            const { mapAction } = this.props;\r\n            await mapAction.bindClearMapCommand();\r\n            this.setState({ graphic: graphic });\r\n            this.setDefaultForm(evt.geometry);\r\n        }\r\n    };\r\n\r\n    callBackDrawGraphic = async (evt, graphic) => {\r\n        this.setState({\r\n            isOpenForm: true,\r\n            graphic: graphic,\r\n        });\r\n\r\n        if (evt) {\r\n            const { mapAction, constructAction, menuAction } = this.props;\r\n            constructAction.saveGeometry(evt.geometry);\r\n            await mapAction.bindClearMapCommand();\r\n            this.managePanelForMobile(false);\r\n            // this.setState({ isActiveDraw: false })\r\n            menuAction.activeFunction(null);\r\n            await mapAction.bindMapCommand(\r\n                MapFunctions.getDistrictAndSubDistrictFormPoint,\r\n                {\r\n                    // save sub-district code\r\n                    geometry: evt.geometry,\r\n                    callbackFn: this.callbackGetDistrictAndSubDistrict,\r\n                }\r\n            );\r\n        }\r\n    };\r\n\r\n    callbackEditGrphic = (geometry, graphic) => {\r\n        const { constructAction, mapAction } = this.props;\r\n        this.setState({ graphic: graphic });\r\n        geometry && constructAction.saveGeometry(geometry);\r\n        geometry &&\r\n            mapAction.bindMapCommand(\r\n                MapFunctions.getDistrictAndSubDistrictFormPoint,\r\n                {\r\n                    // save sub-district code\r\n                    geometry: geometry,\r\n                    callbackFn: this.callbackGetDistrictAndSubDistrict,\r\n                }\r\n            );\r\n    };\r\n\r\n    callbackGetDistrictAndSubDistrict = (values) => {\r\n        if (values) {\r\n            const { constructAction } = this.props;\r\n            const { SUBDISTRICT_ID, DISTRICT_ID } = values;\r\n            const subDistrictCode = SUBDISTRICT_ID; //SUBDISTRICT_ID.slice(SUBDISTRICT_ID.length - 2, SUBDISTRICT_ID.length);\r\n            const districtCode = DISTRICT_ID; //DISTRICT_ID.slice(DISTRICT_ID.length - 2, DISTRICT_ID.length)\r\n            this.setState({ isNotBKK: false });\r\n            constructAction.saveAdminPoly({\r\n                districtID: districtCode,\r\n                subDistrictID: subDistrictCode,\r\n            });\r\n        } else {\r\n            this.setState({ isNotBKK: true });\r\n            this.alertIsOutBKK();\r\n        }\r\n    };\r\n\r\n    clearForm = async () => {\r\n        const {\r\n            mapAction,\r\n            constructAction,\r\n            onClickBack,\r\n            menuAction,\r\n        } = this.props;\r\n        await mapAction.bindMapCommand(\r\n            MapFunctions.clearGraphicConstructionLicense\r\n        );\r\n        await constructAction.clearFormStep();\r\n        menuAction.activeFunction(null);\r\n        onClickBack();\r\n    };\r\n\r\n    callBackSaveForm = (value) => {\r\n        const { detail, showAlert, hideAlert } = this.props;\r\n        showAlert({\r\n            altMsg: ALERT_MESSAGE.QUESTION.SAVE_IN_EDIT_MODE,\r\n            altType: 2,\r\n            callbackConfirm: () => {\r\n                hideAlert();\r\n                if (value.permissionID === detail.permissionID) {\r\n                    this.handleSaveConstruct(value);\r\n                } else {\r\n                    //กรณีมีการแก้ไข permissionID จะต้องเช็คก่อนว่าถูกใช้แล้วหรือไม่\r\n                    this.callServiceCheckPermissionID(value.permissionID).then(\r\n                        (result) => {\r\n                            if (result && result.statusCode) {\r\n                                if (result.statusCode === 1) {\r\n                                    this.handleSaveConstruct(value);\r\n                                } else {\r\n                                    showAlert({\r\n                                        altMsg: `เลขที่ : ${\r\n                                            value.permissionID\r\n                                        } ถูกใช้ในการยื่นใบขออนุญาตก่อสร้างแล้ว`,\r\n                                    });\r\n                                }\r\n                            } else {\r\n                                showAlert({\r\n                                    altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR,\r\n                                });\r\n                            }\r\n                        }\r\n                    );\r\n                }\r\n            },\r\n        });\r\n    };\r\n\r\n    handleClickDrawGraphic = async () => {\r\n        const { mapAction, menuRdc, menuAction } = this.props;\r\n        // const { isActiveDraw, isActiveEdit } = this.state\r\n        // if (isActiveDraw) { // ปิดการวาด\r\n        //     this.setState({ isActiveDraw: false })\r\n        //     mapAction.bindMapCommand(MapFunctions.deActivateConstruct)\r\n        // } else { // เปิดการวาด\r\n        //     if (isActiveEdit) {\r\n        //         this.setState({ isActiveEdit: false })\r\n        //     }\r\n        //     // this.managePanelForMobile(true)\r\n        //     this.setState({ isActiveDraw: true })\r\n        //     mapAction.bindMapCommand(MapFunctions.drawPointConstructionLicense, {\r\n        //         callback: this.callBackDrawGraphic\r\n        //     })\r\n        // }\r\n\r\n        if (menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM) {\r\n            menuAction.activeFunction(null);\r\n            mapAction.bindMapCommand(MapFunctions.deActivateConstruct);\r\n        } else {\r\n            menuRdc.ActiveFunction === ACTIVE_FUNCTION.EDIT_GP_FORM &&\r\n                (await mapAction.bindMapCommand(\r\n                    MapFunctions.clearEditConstruct\r\n                ));\r\n            this.managePanelForMobile(true);\r\n            menuAction.activeFunction(ACTIVE_FUNCTION.ADD_GP_FORM);\r\n            setTimeout(() => {\r\n                // set timeout เพื่อแก้ปัญหา willunmount ของ maptool clear event draw\r\n                mapAction.bindMapCommand(\r\n                    MapFunctions.drawPointConstructionLicense,\r\n                    {\r\n                        callback: this.callBackDrawGraphic,\r\n                    }\r\n                );\r\n            }, 50);\r\n        }\r\n    };\r\n\r\n    managePanelForMobile = async (isDraw, func) => {\r\n        const { menuAction, width } = this.props;\r\n        if (width === \"sm\" || width === \"xs\") {\r\n            if (isDraw) {\r\n                await menuAction.closeMenuPanel();\r\n                await menuAction.openMenuMap();\r\n            } else {\r\n                await menuAction.openMenuPanel();\r\n                await menuAction.closeMenuMap();\r\n            }\r\n        }\r\n    };\r\n\r\n    handleClickEditGraphic = async () => {\r\n        const { graphic } = this.state;\r\n        const { mapAction, showAlert, menuRdc, menuAction } = this.props;\r\n\r\n        if (graphic) {\r\n            // if (isActiveEdit) { // ปิดการแก้ไข\r\n            //     mapAction.bindMapCommand(MapFunctions.clearEditConstruct)\r\n            //     this.setState({ isActiveEdit: false })\r\n            // } else { // เปิดการแก้ไข\r\n            //     if (isActiveDraw) {\r\n            //         this.setState({ isActiveDraw: false })\r\n            //         await mapAction.bindMapCommand(MapFunctions.deActivateConstruct)\r\n            //     }\r\n\r\n            //     mapAction.bindMapCommand(\r\n            //         MapFunctions.editGraphicConstructionLicense,\r\n            //         { graphic, callback: this.callbackEditGrphic }\r\n            //     )\r\n            //     this.setState({ isActiveEdit: true })\r\n            // }\r\n            if (menuRdc.ActiveFunction === ACTIVE_FUNCTION.EDIT_GP_FORM) {\r\n                // ปิดการแก้ไข\r\n                menuAction.activeFunction(null);\r\n                mapAction.bindMapCommand(MapFunctions.clearEditConstruct);\r\n            } else {\r\n                // เปิดการแก้ไข\r\n                menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM &&\r\n                    (await mapAction.bindMapCommand(\r\n                        MapFunctions.deActivateConstruct\r\n                    ));\r\n                menuAction.activeFunction(ACTIVE_FUNCTION.EDIT_GP_FORM);\r\n                mapAction.bindMapCommand(\r\n                    MapFunctions.editGraphicConstructionLicense,\r\n                    { graphic, callback: this.callbackEditGrphic }\r\n                );\r\n            }\r\n        } else {\r\n            showAlert({ altMsg: ALERT_MESSAGE.POPUP.REQUEST_PIN_MAP });\r\n        }\r\n    };\r\n\r\n    handleSaveConstruct = (value) => {\r\n        const { detail, authenRdc, showLoading } = this.props;\r\n        let updateDateTimeStamp = DatetimeUtil.convertDatetimeToCallService(\r\n            new Date()\r\n        );\r\n        showLoading();\r\n        MapFunctions.updateConstructionLicense({\r\n            ...value,\r\n            objectID: detail.objectID,\r\n            geometryPrev: {\r\n                latitude: detail.latitude,\r\n                longitude: detail.longitude,\r\n            }, //เพื่อเอาไปเช็คว่ามีการแก้ไขตำแหน่งหรือไม่\r\n            userID: authenRdc.profile.userID,\r\n            updateDate: updateDateTimeStamp,\r\n            callback: this.callBackSaveFormMapService,\r\n        });\r\n    };\r\n\r\n    callServiceCheckPermissionID = (permissionID) => {\r\n        return fetchGet_(\r\n            `${\r\n                process.env.REACT_APP_CAH_CHECK_PERMISSION_ID\r\n            }?permissionID=${permissionID}`\r\n        )\r\n            .then((res) => {\r\n                if (!res.ok) {\r\n                    throw res.status;\r\n                }\r\n                return res.json();\r\n            })\r\n            .catch((ex) => {\r\n                console.log(\"ex callServiceCheckPermissionID\", ex);\r\n            });\r\n    };\r\n\r\n    callServiceUpdateSubZone = (objectID) => {\r\n        return fetchGet_(\r\n            `${\r\n                process.env.REACT_APP_CAH_UPDATE_CONSTRUCT_LUP_ZONE\r\n            }?objectid=${objectID}`\r\n        )\r\n            .then((res) => {\r\n                if (!res.ok) {\r\n                    throw res.status();\r\n                }\r\n                return res.json();\r\n            })\r\n            .catch((ex) => {\r\n                console.log(\"ex callServiceSaveBuildings\", ex);\r\n            });\r\n    };\r\n\r\n    callBackSaveFormMapService = async (param) => {\r\n        const { detail, showAlert, hideLoading, mapAction } = this.props;\r\n        if (param) {\r\n            const resultUpdateSubZone = await this.callServiceUpdateSubZone(\r\n                detail.objectID\r\n            );\r\n\r\n            await mapAction.bindMapCommand(MapFunctions.refreshMap, {\r\n                //สั่ง refresh layer\r\n                layerID: window.TOC_LAYER_NAME.CONSTRUCT,\r\n            });\r\n            if (\r\n                resultUpdateSubZone &&\r\n                resultUpdateSubZone.statusCode &&\r\n                resultUpdateSubZone.statusCode === 1\r\n            ) {\r\n                const resultUpdateBuilding = await this.callServiceUpdateBuildings(\r\n                    detail.constructRNo,\r\n                    param.buildings\r\n                );\r\n                if (\r\n                    resultUpdateBuilding &&\r\n                    resultUpdateBuilding.statusCode &&\r\n                    resultUpdateBuilding.statusCode === 1\r\n                ) {\r\n                    this.callServiceMapsheet1K();\r\n                } else {\r\n                    showAlert({ altMsg: ALERT_MESSAGE.POPUP.SAVE_FAIL });\r\n                    hideLoading();\r\n                }\r\n            } else {\r\n                showAlert({ altMsg: ALERT_MESSAGE.POPUP.SAVE_FAIL });\r\n                hideLoading();\r\n            }\r\n        } else {\r\n            showAlert({ altMsg: ALERT_MESSAGE.POPUP.SAVE_FAIL });\r\n            hideLoading();\r\n        }\r\n    };\r\n\r\n    callServiceUpdateBuildings = (constructRNo, buildings) => {\r\n        let paramFetch =  {\r\n            ConstructRNo: constructRNo,\r\n            Building: buildings.map((bldg) => ({\r\n                BuildingArea: bldg.buildingarea,\r\n                CarParkArea: bldg.carparkarea,\r\n                Material: bldg.material,\r\n                NumberBuilding: bldg.numberbuilding,\r\n                NumberFloor: bldg.numberfloor,\r\n                Objective: bldg.objective,\r\n            })),\r\n        }\r\n        return fetchPost_(process.env.REACT_APP_CAH_UPDATE_CONSTRUCT_FORM,paramFetch)\r\n            .then((res) => {\r\n                if (!res.ok) {\r\n                    throw res.status;\r\n                }\r\n                return res.json();\r\n            })\r\n            .catch((ex) => {\r\n                console.log(\"ex callServiceUpdateBuildings\", ex);\r\n            });\r\n    };\r\n\r\n    callServiceMapsheet1K = () => {\r\n        const { showAlert, hideLoading, hideAlert, detail } = this.props;\r\n        fetchGet_(\r\n            `${process.env.REACT_APP_UPDATE_MAPSHEET1K}?objectid=${\r\n                detail.objectID\r\n            }&tablename=${TABLE_MAPSHEET1K.CONSTRUCT_PNT}&isupdate=true`\r\n        )\r\n            .then((res) => {\r\n                if (!res.ok) {\r\n                    throw res;\r\n                }\r\n                return res.json();\r\n            })\r\n            .then((values) => {\r\n                if (values && values.statusCode === 1) {\r\n                    showAlert({\r\n                        altMsg: ALERT_MESSAGE.POPUP.SAVE_SUCCESS,\r\n                        callbackClose: () => {\r\n                            this.clearForm();\r\n                            hideAlert();\r\n                        },\r\n                    });\r\n                } else {\r\n                    showAlert({ altMsg: ALERT_MESSAGE.POPUP.SAVE_FAIL });\r\n                }\r\n            })\r\n            .catch((ex) => {\r\n                showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR });\r\n                console.log(\"ex callServiceSaveForm\", ex);\r\n            })\r\n            .finally(() => {\r\n                hideLoading();\r\n            });\r\n    };\r\n\r\n    alertIsOutBKK = () => {\r\n        const { showAlert } = this.props;\r\n        showAlert({ altMsg: ALERT_MESSAGE.POPUP.OUT_OF_BKK });\r\n    };\r\n\r\n    render() {\r\n        const { isShowForm, isNotBKK } = this.state;\r\n        const { isShowLoading, menuRdc } = this.props;\r\n\r\n        return (\r\n            <Fragment>\r\n                <EditConstructionLicenseView>\r\n                    {isShowForm && (\r\n                        <FormConstructionLicense\r\n                            onCloseForm={this.clearForm}\r\n                            callBackSaveForm={this.callBackSaveForm}\r\n                            isNotBKK={isNotBKK}\r\n                            alertIsNotBKKFn={this.alertIsOutBKK}\r\n                            onEdit={this.handleClickEditGraphic}\r\n                            onDraw={this.handleClickDrawGraphic}\r\n                            isActiveDraw={\r\n                                menuRdc.ActiveFunction ===\r\n                                ACTIVE_FUNCTION.ADD_GP_FORM\r\n                            }\r\n                            isActiveEdit={\r\n                                menuRdc.ActiveFunction ===\r\n                                ACTIVE_FUNCTION.EDIT_GP_FORM\r\n                            }\r\n                        />\r\n                    )}\r\n                </EditConstructionLicenseView>\r\n                <Loading isShowLoading={isShowLoading} />\r\n            </Fragment>\r\n        );\r\n    }\r\n}\r\n\r\nconst mapStateToProps = (state) => ({\r\n    authenRdc: state.authen,\r\n    menuRdc: state.menu,\r\n});\r\n\r\nconst mapDispatchToprops = (dispatch) => ({\r\n    constructAction: bindActionCreators(ConstructAction, dispatch),\r\n    mapAction: bindActionCreators(MapAction, dispatch),\r\n    menuAction: bindActionCreators(MenuAction, dispatch),\r\n});\r\n\r\nconst enhance = compose(\r\n    connect(\r\n        mapStateToProps,\r\n        mapDispatchToprops\r\n    ),\r\n    withWidth(), //จะได้ props width มา,\r\n    WithLoading\r\n);\r\n\r\nexport default enhance(EditConstructionLicense);\r\n","import React, { Component, Fragment } from 'react';\r\nimport { bindActionCreators } from 'redux';\r\nimport { connect } from 'react-redux';\r\nimport { compose } from 'recompose'\r\n\r\n//import component\r\nimport SearchConstructView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/ConstructionLicense/Search/SearchConstructView';\r\nimport FormSearchConstruct from './FormSearchConstruct';\r\nimport DetailConstruct from '../Detail/DetailConstruct';\r\nimport Loading from '../../../../../../../Controls/Containers/Loading';\r\nimport WithLoading from '../../../../../../../HOC/WithLoading';\r\nimport EditConstructionLicense from '../Edit/EditConstructionLicense';\r\nimport WithAlertMessage from '../../../../../../../HOC/WithAlertMessage';\r\nimport AlertMessageSuper from '../../../../../../../Controls/Containers/AlertMessageSuper';\r\n\r\n//import service - utils\r\nimport { fetchGet_ } from '../../../../../../../Utilities/ServiceUtils';\r\n\r\n//import actions\r\nimport * as MapAction from '../../../../../../../Actions/Web/Maps/MapAction';\r\nimport * as MapFunctions from '../../../../../../../Map/MapFunctions';\r\n\r\n//import constants\r\nimport { ALERT_MESSAGE } from '../../../../../../../Constants/Constants';\r\n\r\n//constants\r\nconst PAGE_VIEW_CONSTRUCT = {\r\n    SEARCH_CONSTRUCT: \"ค้นหา อ.1 หรือ ยผ.4\",\r\n    DETAIL_CONSTRUCT: \"ข้อมูลตำแหน่งขออนุญาตก่อสร้าง\",\r\n    EDIT_CONSTRUCT: \"แก้ไขตำแหน่งขออนุญาตก่อสร้าง\",\r\n}\r\n\r\nexport class SearchConstruct extends Component {\r\n    constructor() {\r\n        super();\r\n        this.state = {\r\n            page: PAGE_VIEW_CONSTRUCT.SEARCH_CONSTRUCT,\r\n            detailView: null,\r\n            detailEdit: null\r\n        }\r\n        this.refClearFormEditConstruct = null; // ref function clearForm ของ EditConstructionLicense\r\n        this.refFuncRefreshResult = null; // ref function refreshResult ของ FormSearchConstruct\r\n    }\r\n\r\n    //############################# SEARCH #############################\r\n    handleRefFuncRefreshResult = node => {\r\n        this.refFuncRefreshResult = node\r\n    }\r\n\r\n    handleClickResult = (value) => {\r\n        // console.log('values', value)\r\n        const { mapAction } = this.props;\r\n        value.detail && mapAction.bindMapCommand(MapFunctions.drawGraphicSearchConstruct, {\r\n            longitude: value.detail.longitude,\r\n            latitude: value.detail.latitude\r\n        })\r\n\r\n        this.setState({\r\n            page: PAGE_VIEW_CONSTRUCT.DETAIL_CONSTRUCT,\r\n            detailView: value.detail,\r\n            detailEdit: null,\r\n        })\r\n    }\r\n\r\n    handleClickEdit = (value) => {\r\n        this.setState({\r\n            page: PAGE_VIEW_CONSTRUCT.EDIT_CONSTRUCT,\r\n            detailEdit: value,\r\n            detailView: null\r\n        })\r\n    }\r\n\r\n    handleClickDelete = value => {\r\n        const { showAlert, hideAlert } = this.props;\r\n        showAlert({\r\n            altMsg: `${ALERT_MESSAGE.QUESTION.DELETE} ${value.permissionID} ?`,\r\n            altType: 2,\r\n            callbackConfirm: () => {\r\n                hideAlert();\r\n                this.deleteConstruct(value.constructRNo)\r\n            }\r\n        })\r\n    }\r\n\r\n    deleteConstruct = (constructRNo) => {\r\n        this.callServiceDeleteConstruct(constructRNo).then(result => {\r\n            const { showAlert, hideAlert } = this.props;\r\n            if (result && result.statusCode === 1) {\r\n                showAlert({\r\n                    altMsg: ALERT_MESSAGE.POPUP.DELETE_SUCCESS, callbackClose: () => {\r\n                        hideAlert()\r\n                        this.refFuncRefreshResult && this.refFuncRefreshResult();\r\n                    }\r\n                })\r\n            } else {\r\n                showAlert({ altMsg: ALERT_MESSAGE.POPUP.DELETE_FAIL })\r\n            }\r\n        })\r\n    }\r\n\r\n    callServiceDeleteConstruct = cosntructRNo => {\r\n        return fetchGet_(`${process.env.REACT_APP_CAH_DELETE_CONSTRUCT_FORM}?ConstructRNo=${cosntructRNo}`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceDeleteConstruct', ex)\r\n            })\r\n    }\r\n\r\n    //############################# DETAIL #############################\r\n    clearGraphic = () => {\r\n        this.props.mapAction.bindMapCommand(MapFunctions.clearGraphicSearchConstruct)\r\n    }\r\n\r\n    handleCancelDetail = () => {\r\n        this.setState({\r\n            page: PAGE_VIEW_CONSTRUCT.SEARCH_CONSTRUCT\r\n        })\r\n        // this.clearGraphic();\r\n    }\r\n\r\n    //############################# EDIT #############################\r\n\r\n    handleRefEditConstruct = node => { // ref function clearForm ของ EditConstructionLicense\r\n        this.refClearFormEditConstruct = node;\r\n    }\r\n\r\n    hadleCancelEdit = () => {\r\n        this.setState({ page: PAGE_VIEW_CONSTRUCT.SEARCH_CONSTRUCT })\r\n        this.refFuncRefreshResult && this.refFuncRefreshResult();\r\n    }\r\n\r\n    //################################################################\r\n\r\n    handleBackToMenu = async () => { //เข้าเมื่อกดปุ่ม < บน panel โดยที่หน้า search,detail,edit ใช้ panel เดียวกัน\r\n        const { page } = this.state;\r\n        const { showAlert, hideAlert, onClickBack,mapAction } = this.props;\r\n\r\n        switch (page) {\r\n            case PAGE_VIEW_CONSTRUCT.EDIT_CONSTRUCT:\r\n                showAlert({\r\n                    altMsg: ALERT_MESSAGE.QUESTION.CANCEL_FORM,\r\n                    altType: 2,\r\n                    callbackConfirm: () => {\r\n                        this.refClearFormEditConstruct();\r\n                        hideAlert();\r\n                    }\r\n                })\r\n                break;\r\n            case PAGE_VIEW_CONSTRUCT.DETAIL_CONSTRUCT:\r\n                // await this.clearGraphic();\r\n                this.setState({ page: PAGE_VIEW_CONSTRUCT.SEARCH_CONSTRUCT })\r\n                break;\r\n            default:\r\n                mapAction.bindMapCommand(MapFunctions.cleardrawSpatialSearchOR1);\r\n                onClickBack && onClickBack(); //back ไปยังหน้า menu\r\n                break;\r\n        }\r\n    }\r\n\r\n    renderChildren = () => {\r\n        const { page, detailView, detailEdit } = this.state;\r\n        const { isShowLoading, showLoading, hideLoading, showAlert, hideAlert, isOnlySearch, onClickBack } = this.props;\r\n        let elementDetail = null\r\n\r\n        if (page === PAGE_VIEW_CONSTRUCT.DETAIL_CONSTRUCT) {\r\n            elementDetail = <DetailConstruct detail={detailView} onClickCancel={this.handleCancelDetail} />\r\n        } else if (page === PAGE_VIEW_CONSTRUCT.EDIT_CONSTRUCT) {\r\n            elementDetail = <EditConstructionLicense\r\n                detail={detailEdit}\r\n                onClickBack={this.hadleCancelEdit}\r\n                refClearFormEditConstruct={this.handleRefEditConstruct}\r\n                showAlert={showAlert}\r\n                hideAlert={hideAlert}\r\n            />\r\n        }\r\n\r\n        return (\r\n            <Fragment>\r\n                <FormSearchConstruct\r\n                    isDisplay={page === PAGE_VIEW_CONSTRUCT.SEARCH_CONSTRUCT}\r\n                    showLoading={showLoading}\r\n                    hideLoading={hideLoading}\r\n                    onClickResult={this.handleClickResult}\r\n                    onClickEdit={this.handleClickEdit}\r\n                    onClickDelete={this.handleClickDelete}\r\n                    onClickBack={onClickBack}\r\n                    refFuncRefreshResult={this.handleRefFuncRefreshResult}\r\n                    isOnlySearch={isOnlySearch}\r\n                />\r\n                {elementDetail}\r\n                <Loading isShowLoading={isShowLoading} />\r\n            </Fragment>\r\n        )\r\n    }\r\n\r\n    render() {\r\n        const { title } = this.props;\r\n\r\n        return (\r\n            <Fragment>\r\n                <SearchConstructView title={title} onClickBack={this.handleBackToMenu}  >\r\n                    {this.renderChildren()}\r\n                </SearchConstructView>\r\n                <AlertMessageSuper {...this.props} />\r\n            </Fragment>\r\n        )\r\n    }\r\n}\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    mapAction: bindActionCreators(MapAction, dispatch)\r\n})\r\n\r\nconst enhance = compose(connect(null, mapDispatchToProps));\r\n\r\nexport default enhance(WithAlertMessage(WithLoading(SearchConstruct)));\r\n","import React from 'react';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport AppBarHeaderView from '../../../AppBarHeaderView';\r\n// import { Scrollbars } from 'react-custom-scrollbars';\r\n\r\nconst HouseNumberView = ({\r\n    classes,\r\n    title,\r\n    onClickBack,\r\n    children\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root}>\r\n            <AppBarHeaderView\r\n                // title=\"เพิ่มตำแหน่งบนแผนที่โดย\"\r\n                title={title}\r\n                onClickBack={onClickBack}\r\n            />\r\n            <Grid item xs={12} className={classes.body}>\r\n                {/* <Scrollbars autoHide> */}\r\n                    {children}\r\n                {/* </Scrollbars> */}\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        height: '100%',\r\n    },\r\n    body: {\r\n        height: 'calc(100% - 45px)',\r\n    }\r\n}))(HouseNumberView);","import React, { Fragment } from 'react'\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport ListItem from '@material-ui/core/ListItem';\r\nimport classNames from 'classnames';\r\nimport { LISTGRAPHICLAYER, MENU_HOUSENUMBER } from '../../../../../../Constants/Constants';\r\nimport SpecifyCoordinate from '../../../../../../Containers/Web/Panel/Menu/MenuContent/SpecifyCoordinate/SpecifyCoordinate';\r\nimport LandPlot from '../../../../../../Containers/Web/Panel/Menu/MenuContent/AskTheCityPlan/LandPlot'\r\n\r\nconst MenuListModeView = (props) => {\r\n    const {\r\n        classes,\r\n        isActiveDraw,\r\n        listMode,\r\n        onMenuItemClick,\r\n        callBackDrawGraphic,\r\n        hideResult,\r\n        callbackIdentify\r\n    } = props\r\n    \r\n    // const generateListItem = () => {\r\n    //     return listMode.map((itm, index) => {\r\n    //         return (\r\n    //             <Fragment key={`askTheCityPlanMenu_${index}`}>\r\n    //                 {itm.id === \"specifyCoordinate\" ?\r\n    //                     <SpecifyCoordinate\r\n    //                         isActive={itm.isActive}\r\n    //                         name={itm.name}\r\n    //                         onClick={onMenuItemClick(itm)}\r\n    //                         layerName={LISTGRAPHICLAYER.GRAPHICLAYER_CONSTRUCTION_LICENSE}\r\n    //                         callBackDrawGraphic={callBackDrawGraphic}\r\n    //                     /> :\r\n    //                     <ListItem\r\n    //                         button\r\n    //                         key={`generateListItem-${itm.id}`}\r\n    //                         divider={true}\r\n    //                         className={classNames(classes.menu_item, { [classes.manu_item_active]: itm.isActive })}\r\n    //                         onClick={onMenuItemClick(itm)}\r\n    //                     >\r\n    //                         {itm.name}\r\n    //                     </ListItem>\r\n    //                 }\r\n    //             </Fragment >);\r\n    //     })\r\n    // }\r\n   \r\n    const generateListItem = () => {\r\n        return listMode.map((itm, index) => {\r\n            let element = null\r\n            if(itm.id !== MENU_HOUSENUMBER.landPlot.id) {\r\n                if (itm.id === MENU_HOUSENUMBER.specifyCoordinate.id) {\r\n                    element = <SpecifyCoordinate\r\n                        isActive={itm.isActive}\r\n                        name={itm.name}\r\n                        layerName={LISTGRAPHICLAYER.GRAPHICLAYER_CONSTRUCTION_LICENSE}\r\n                        onClick={onMenuItemClick(itm)}\r\n                        callBackDrawGraphic={callBackDrawGraphic}\r\n                    />\r\n                } else {\r\n                    const isActive = itm.id === MENU_HOUSENUMBER.clickMap.id ? isActiveDraw : itm.isActive\r\n                    element = <ListItem\r\n                        button\r\n                        key={`generateListItem-${itm.id}`}\r\n                        divider={true}\r\n                        className={classNames(classes.menu_item, { [classes.manu_item_active]: isActive })}\r\n                        onClick={onMenuItemClick(itm)}>\r\n                        {itm.name}\r\n                    </ListItem>\r\n                }\r\n            }\r\n\r\n            return (\r\n                <Fragment key={`MenuListModeView_${index}`}>\r\n                    {element}\r\n                </Fragment >);\r\n        })\r\n    }\r\n\r\n    const generateListItemLandPlot = () => {\r\n        const landPlot = listMode.filter(itm => {\r\n            return itm.id === MENU_HOUSENUMBER.landPlot.id;\r\n        })\r\n\r\n        return landPlot.map(itm => {\r\n            return (\r\n                <LandPlot \r\n                    isActive={itm.isActive}\r\n                    name={itm.name}\r\n                    onClick={onMenuItemClick(itm)}\r\n                    hideResult={hideResult}\r\n                    callbackIdentify={callbackIdentify}\r\n                    isKeepGraphic={true}\r\n                    key={\"landplot\"}\r\n                />\r\n            )\r\n        })\r\n    }\r\n\r\n    return (\r\n        <Fragment>\r\n            {generateListItem()}\r\n            <div className={classes.landPlot}>\r\n                ค้นหาแปลงที่ดินเพื่อระบุตำแหน่ง\r\n            </div>\r\n            {generateListItemLandPlot()}\r\n        </Fragment>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    menu_item: {\r\n        '&:focus': {\r\n            backgroundColor: theme.mainTheme.color2\r\n        },\r\n        '&:hover': {\r\n            backgroundColor: theme.mainTheme.colorAH.colorHover,\r\n            color: theme.mainTheme.colorAH.colorTextHover\r\n        }\r\n    },\r\n    manu_item_active: {\r\n        backgroundColor: theme.mainTheme.colorAH.colorActive,\r\n        color: theme.mainTheme.colorAH.colorTextActive,\r\n        '&:focus': {\r\n            backgroundColor: theme.mainTheme.colorAH.colorActive\r\n        },\r\n    },\r\n    landPlot: {\r\n        width: \"100%\",\r\n        color: \"#FFFFFF\",\r\n        height: \"25px\",\r\n        fontSize: \"18px\",\r\n        background: \"#494949\",\r\n        textAlign: \"center\",\r\n        lineHeight: \"25px\"\r\n    }\r\n}))(MenuListModeView)\r\n","import React from 'react';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { Field } from 'redux-form';\r\nimport TextFieldRedux from '../../../../../../../Controls/Containers/TextFieldRedux';\r\nimport Button from '../../../../../../../Controls/Containers/Button';\r\n// import Moment from 'react-moment';\r\n// import Search from \"@material-ui/icons/Search\";\r\nimport 'moment/locale/th';\r\n// import FormControlLabel from '@material-ui/core/FormControlLabel';\r\nimport SelectFieldRedux from '../../../../../../../Controls/Containers/SelectFieldRedux';\r\nimport { BTN } from '../../../../../../../Constants/Constants'\r\nimport ErrorSubmit from '../../../../../../../Controls/Containers/ErrorSubmit'\r\nimport ReduxFormDatePickerThai from '../../../../../../../Controls/Containers/Picker/ReduxFormDatePickerThai';\r\n\r\nconst StepOneView = ({\r\n    classes,\r\n    // formId,\r\n    // date,\r\n    // nameTypes,\r\n    // radioGroupTwo,\r\n    // nameTypeSelect,\r\n    // onHandleSubmit,\r\n    onClickSubmit,\r\n    onClickBack,\r\n    // onChangeChkOther,\r\n    // selectRadio,\r\n    // checkboxOther,\r\n    // luProvince,\r\n    luDistrict,\r\n    luSubDistrict,\r\n    onChangeAdminPoly,\r\n    // isFormOne,\r\n    onBlurOr1ID,\r\n    isSubmitError,\r\n    houseTypeList,\r\n    houseMaterialList,\r\n    onChangehouseType,\r\n    isHouseTypeOther\r\n}) => {\r\n    return (\r\n        <Grid container spacing={0} className={classes.root}>\r\n\r\n             <Field\r\n                name=\"license\"\r\n                label={'เลขที่ใบอนุญาต(อ.1) หรือ เลขที่ใบรับแจ้งฯ(ยผ.4)'}\r\n                component={TextFieldRedux}\r\n                maxLength={20}\r\n                onBlur={onBlurOr1ID}\r\n            />\r\n\r\n            <Field\r\n                label={\"เลขที่คำขอ ทร.900\"}\r\n                name=\"TRrequest\"\r\n                component={TextFieldRedux}\r\n                required\r\n                maxLength={20}\r\n            />\r\n            <Field\r\n                label={\"วันที่รับเอกสารของทะเบียน\"}\r\n                name=\"regDate\"\r\n                component={ReduxFormDatePickerThai}\r\n                maxDate={new Date()}\r\n            />\r\n\r\n            <Field\r\n                label={\"ชื่อผู้ยื่นคำขอ\"}\r\n                name=\"applicantName\"\r\n                component={TextFieldRedux}\r\n                maxLength={100}\r\n            />\r\n\r\n            <Field\r\n                label={\"เบอร์โทรผู้ยื่นคำขอ\"}\r\n                name=\"applicantTelNo\"\r\n                component={TextFieldRedux}\r\n                maxLength={30}\r\n            />\r\n\r\n            <Field\r\n                label={\"เจ้าของบ้าน\"}\r\n                name=\"ownerName\"\r\n                component={TextFieldRedux}\r\n                maxLength={100}\r\n            />\r\n            <Field\r\n                label={\"ประเภทบ้าน\"}\r\n                name=\"houseType\"\r\n                component={SelectFieldRedux}\r\n                data={houseTypeList}\r\n                onChangeValue={onChangehouseType}\r\n                // keyData={{ value: \"value\", label: \"name\" }}\r\n                keyData={{ value: \"value\", label: \"name\" }}\r\n                // required\r\n\r\n            />\r\n\r\n            <Field\r\n                // label={\"อื่นๆ\"}\r\n                name=\"houseTypeDetail\"\r\n                placeholder=\"อื่นๆระบุ\"\r\n                component={TextFieldRedux}\r\n                disabled={isHouseTypeOther}\r\n                className={classes.noLabelField}\r\n                maxLength={100}\r\n\r\n            />\r\n            <Field\r\n                label={\"ลักษณะบ้าน\"}\r\n                name=\"houseMaterial\"\r\n                data={houseMaterialList}\r\n                keyData={{ value: \"value\", label: \"name\" }}\r\n                component={SelectFieldRedux}\r\n            />\r\n            <Field\r\n                label={\"จำนวนชั้น(เฉพาะที่สูงสุด)\"}\r\n                name=\"numFloor\"\r\n                component={TextFieldRedux}\r\n\r\n            />\r\n             <Field\r\n                label={\"พื้นที่รวมทุกอาคาร(ตร.ม.)\"}\r\n                name=\"bldgArea\"\r\n                component={TextFieldRedux}\r\n\r\n            />\r\n            <Field\r\n                name=\"TRnumber\"\r\n                label={'หมายเลขทร.31'}\r\n                component={TextFieldRedux}\r\n                // required\r\n                maxLength={10}\r\n            />\r\n           \r\n            <Field\r\n                label={\"เลขที่โฉนด\"}\r\n                name=\"chanodeNo\"\r\n                component={TextFieldRedux}\r\n                maxLength={1000}\r\n\r\n            />\r\n\r\n            <Field\r\n                label={\"เลขที่ดิน\"}\r\n                name=\"landNo\"\r\n                component={TextFieldRedux}\r\n                maxLength={1000}\r\n\r\n\r\n            />\r\n\r\n            <Field\r\n                name=\"moo\"\r\n                label={'หมู่ที่'}\r\n                component={TextFieldRedux}\r\n                maxLength={3}\r\n            />\r\n\r\n            <Field\r\n                name=\"soi\"\r\n                label={'ตรอก/ซอย'}\r\n                component={TextFieldRedux}\r\n                maxLength={100}\r\n            />\r\n            <Field\r\n                name=\"road\"\r\n                label={'ถนน'}\r\n                component={TextFieldRedux}\r\n                // required\r\n                maxLength={100}\r\n            />\r\n\r\n              <Field\r\n                label={\"หมายเหตุ\"}\r\n                name=\"remark\"\r\n                component={TextFieldRedux}\r\n                maxLength={100}\r\n            />\r\n\r\n            <Field\r\n                name=\"province\"\r\n                label={'จังหวัด'}\r\n                component={TextFieldRedux}\r\n                disabled\r\n\r\n            />\r\n\r\n            <Field\r\n                name=\"district\"\r\n                label={'เขต'}\r\n                component={SelectFieldRedux}\r\n                onChangeValue={onChangeAdminPoly(\"district\")}\r\n                data={luDistrict}\r\n                keyData={{ value: \"value\", label: \"name\" }}\r\n                val={0}\r\n                required\r\n            />\r\n\r\n            <Field\r\n                name=\"subDistrict\"\r\n                label={'แขวง'}\r\n                component={SelectFieldRedux}\r\n                onChangeValue={onChangeAdminPoly(\"subdistrict\")}\r\n                data={luSubDistrict}\r\n                keyData={{ value: \"value\", label: \"name\" }}\r\n                val={0}\r\n                required\r\n            />\r\n\r\n            <Grid container justify=\"center\" spacing={24} className={classes.divFooter}>\r\n                {(isSubmitError) &&\r\n                    <Grid item xs={12}>\r\n                        <Field\r\n                            name=\"errorForm\"\r\n                            component={ErrorSubmit}\r\n                        />\r\n                    </Grid>}\r\n\r\n\r\n                <Grid item>\r\n                    <Button\r\n                        label={BTN.TH.CANCEL}\r\n                        onClick={onClickBack}\r\n                    // className={classes.btnRegister}\r\n                    />\r\n                </Grid>\r\n                <Grid item>\r\n                    <Button\r\n                        type={BTN.TH.NEXT}\r\n                        // onClick={onHandleSubmit(onClickSubmit)}\r\n                        onClick={onClickSubmit}\r\n                        label=\"หน้าต่อไป\"\r\n                    // className={classes.btnLogin}\r\n                    />\r\n                </Grid>\r\n\r\n            </Grid>\r\n\r\n        </Grid>\r\n\r\n    )\r\n}\r\n\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        width: '100%',\r\n        padding: '10px',\r\n    },\r\n    divFooter: {\r\n        marginTop: '10px',\r\n        marginBottom: '10px'\r\n    },\r\n    btnSearch: {\r\n        marginTop: '10px',\r\n        color: 'black'\r\n    },\r\n    noLabelField:{\r\n        minHeight:\"0px\"\r\n    }\r\n}))(StepOneView)","import * as actionType from '../../../Constants/ActionTypes';\r\n\r\nexport const saveFormStepOne = (data) => ({\r\n    type: actionType.SAVE_HOUSE_NUMBER_STEP_ONE,\r\n    data:data\r\n})\r\n\r\nexport const saveFormStepTwo = (data) => ({\r\n    type: actionType.SAVE_HOUSE_NUMBER_STEP_TWO,\r\n    data:data\r\n})\r\n\r\nexport const clearFormStep = (data) => ({\r\n    type: actionType.CLEAR_FORM_HOUSE_NUMBER\r\n})\r\n\r\nexport const saveDistrictAndSubDistrict = (data) => {\r\n    return {\r\n    type: actionType.SAVE_DISTRICT_AND_SUBDISTRICT,\r\n    data: data\r\n}}\r\n\r\nexport const saveGeometry = (data) => ({\r\n    type: actionType.SAVE_GEOMETRY_TR900,\r\n    data: data\r\n})\r\n\r\nexport const saveDataForInitailEditForm = (data) => ({\r\n        type: actionType.SAVE_DATA_FOR_INITAIL_EDIT_FORM,\r\n        data: data\r\n})\r\n\r\n\r\n","import React, { useState, useEffect, Fragment, useRef } from 'react'\r\nimport { connect } from 'react-redux'\r\nimport { compose } from 'recompose'\r\nimport { reduxForm, isDirty , getFormValues} from \"redux-form\";\r\nimport { bindActionCreators } from 'redux';\r\n\r\n//import component\r\nimport WithAlertMessage from '../../../../../../../HOC/WithAlertMessage';\r\nimport AlertMessageSuper from '../../../../../../../Controls/Containers/AlertMessageSuper';\r\nimport StepOneView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/HouseNumber/HouseNumberFormStep/StepOneView'\r\n\r\n//import service - utils\r\nimport { fetchGet_ } from \"../../../../../../../Utilities/ServiceUtils\"\r\n\r\n//import actions\r\nimport * as HouseNumberAction from '../../../../../../../Actions/Web/Panel/HouseNumberAction'\r\n\r\n//import validate\r\nimport { stepOneValidate } from '../../../../../../../Utilities/Validate'\r\n\r\n//import constants\r\nimport { ALERT_MESSAGE } from '../../../../../../../Constants/Constants'\r\n\r\n// Hook\r\nconst usePrevious = value => {\r\n    const ref = useRef();\r\n    // Store current value in ref\r\n    useEffect(() => {\r\n        ref.current = value;\r\n    }, [value]); // Only re-run if value changes\r\n    // Return previous value (happens before update in useEffect above)\r\n    return ref.current;\r\n}\r\n\r\nconst StepOne = (props) => {\r\n    const {\r\n        handleSubmit,\r\n        onChangeStep,\r\n        houseNumberAction,\r\n        houseNumberRdc,\r\n        onClickBack,\r\n        dirty,\r\n        stepOneRdc,\r\n        showAlert,\r\n        hideAlert,\r\n        _values,\r\n        initialize,\r\n        isUpdate,//edit?\r\n        change\r\n    } = props;\r\n//#Mock HouseType,HouseMaterial\r\n// const houseTypeListMock=[{id:1,name:\"ตึกแถว\"},{id:2,name:\"บ้านเดี่ยว\"},{id:99,name:\"อื่นๆ\"}]\r\n\r\n// const houseMaterialListMock=[{id:1,name:\"คอนกรีต\"},{id:2,name:\"เหล็ก\"}]\r\n\r\n//#region ref session\r\n    const isAdminpolyInconsistent = useRef(false);//ใช้เป็นตัวดักให้แจ้งเตือนแสดงครั้งเดียว\r\n    const currentAdminpoly = useRef({//เก็บ adminpoly ที่เปลี่ยนไป\r\n        districtCode: null,\r\n        subdistrictCode: null\r\n    });\r\n//#endregion\r\n\r\n//#region State Session\r\n    const [luDistrict, setLuDistrict] = useState([]);\r\n    const [luSubDistrict, setLuSubDistrict] = useState([]);\r\n    const [isSubmitError,setIsSubmitError] = useState(false);\r\n    const [houseTypeList , setHouseTypeList] = useState([]);\r\n    const [houseMaterialList, setHouseMaterialList] = useState([]);\r\n    const [isHouseTypeOther , setIsHouseTypeOther] = useState(true)\r\n//#endregion\r\n\r\n//#region Previous session\r\n    const prevhouseNumberRdcDistrictID = usePrevious(houseNumberRdc.currentDistrictAndSubDistrict.districtID);\r\n    const prevhouseNumberRdcSubDistrictID = usePrevious(houseNumberRdc.currentDistrictAndSubDistrict.subDistrictID);\r\n    const preCurrentAdminpolyDistrictCode = usePrevious(currentAdminpoly.current.districtCode);\r\n    const preCurrentAdminpolySubDistrictCode = usePrevious(currentAdminpoly.current.subdistrictCode);\r\n//#endregion\r\n\r\n    useEffect(() => {\r\n        callServiceGetLutActivity(); //HouseType\r\n        callServiceGetLutHouseMaterial(); \r\n        callServiceDistrict();\r\n        // change(\"province\", 'กรุงเทพมหานคร')\r\n        if (stepOneRdc.district && stepOneRdc.subDistrict) {\r\n            callServiceSubDistrict(stepOneRdc.district);\r\n        }\r\n\r\n        if (stepOneRdc.houseType && (Number(stepOneRdc.houseType) === Number(window.OTHER_LOOKUP_TR900))) {\r\n            setIsHouseTypeOther(false)\r\n        }\r\n    }, [])\r\n\r\n    useEffect(() => {\r\n        if((!isUpdate || prevhouseNumberRdcDistrictID) && (prevhouseNumberRdcDistrictID !== houseNumberRdc.currentDistrictAndSubDistrict.districtID)){\r\n            change('district', houseNumberRdc.currentDistrictAndSubDistrict.districtID)\r\n            isAdminpolyInconsistent.current = false;\r\n            currentAdminpoly.current.districtCode = houseNumberRdc.currentDistrictAndSubDistrict.districtID;\r\n            callServiceSubDistrict(houseNumberRdc.currentDistrictAndSubDistrict.districtID);\r\n        }\r\n        if((!isUpdate || prevhouseNumberRdcSubDistrictID) && (prevhouseNumberRdcSubDistrictID !== houseNumberRdc.currentDistrictAndSubDistrict.subDistrictID)){\r\n            change('subDistrict', houseNumberRdc.currentDistrictAndSubDistrict.subDistrictID)\r\n            isAdminpolyInconsistent.current = false;\r\n            currentAdminpoly.current.subdistrictCode = houseNumberRdc.currentDistrictAndSubDistrict.subDistrictID;\r\n        }\r\n    }, [houseNumberRdc.currentDistrictAndSubDistrict.subDistrictID, houseNumberRdc.currentDistrictAndSubDistrict.districtID]);\r\n\r\n    const callServiceGetLutActivity = () => {\r\n        fetchGet_(process.env.REACT_APP_LU_ACTIVITY)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(data => {\r\n                setHouseTypeList(data.result)\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceDistric', ex)\r\n            })\r\n    }\r\n\r\n    const callServiceGetLutHouseMaterial = () => {\r\n        fetchGet_(process.env.REACT_APP_SURVEY_LU_HOUSE_MATERIAL)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(data => {\r\n                // setHouseTypeList(data.result)\r\n                setHouseMaterialList(data.result)\r\n\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceDistric', ex)\r\n            })\r\n    }\r\n\r\n\r\n    const callServiceDistrict = () => {\r\n        fetchGet_(`${process.env.REACT_APP_LU_DISTRICT}?provinceid=10`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(data => {\r\n                setLuDistrict(data.result)\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceDistrict', ex)\r\n            })\r\n    }\r\n\r\n    const callServiceSubDistrict = (districtID) => {\r\n        fetchGet_(`${process.env.REACT_APP_LU_SUBDISTRICT}?provinceid=10&districtid=${districtID}`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(data => {\r\n                setLuSubDistrict(data.result)\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceSubDistrict', ex)\r\n            })\r\n    }\r\n    const checkDuplicatHouseTRID=(TrID)=>{\r\n        \r\n    \r\n            return fetchGet_(`${process.env.REACT_APP_CAH_CHECK_DUP_HOUSE}?housetrid=${TrID}`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(data => {\r\n                return data\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceSubDistrict', ex)\r\n            })\r\n        \r\n        \r\n    }\r\n\r\n    const handleClickSubmit = (value) => {\r\n        if(isUpdate){ //เช็คก่อนว่าถ้าเข้ามาจากหน้า edit ไม่ต้องเช็คTRID ซ้ำ\r\n                houseNumberAction.saveFormStepOne(value);\r\n                onChangeStep(2);\r\n        }else{\r\n                let isDuplicatHouseTRID = checkDuplicatHouseTRID(value.TRrequest)\r\n                isDuplicatHouseTRID.then((res)=>{\r\n                if(res.statusCode === 1){\r\n                    houseNumberAction.saveFormStepOne(value);\r\n                    onChangeStep(2);\r\n                }else{\r\n                \r\n                    showAlert({\r\n                        altMsg: \"เลขที่คำขอ ทร.900 มีอยู่แล้วในระบบ\",\r\n                        altType: 1,\r\n                        callbackCancel: hideAlert,\r\n                        \r\n                    })\r\n                }\r\n            })\r\n        }\r\n\r\n\r\n    }\r\n\r\n    const handleCheckValidateSubmit = () =>{\r\n        stepOneValidate(_values)\r\n        handleSubmit(handleClickSubmit)()\r\n        setIsSubmitError(true)\r\n    }\r\n\r\n    const handleClickBack = () => {\r\n        onClickBack(dirty);\r\n    }\r\n\r\n    const confirmChangeDistrict = (districtCode) => {\r\n        isAdminpolyInconsistent.current = true;\r\n        currentAdminpoly.current.districtCode = districtCode;\r\n        callServiceSubDistrict(districtCode);\r\n        change(\"subDistrict\", null);\r\n        hideAlert();\r\n    }\r\n\r\n    const confirmChangeSubdistrict = (subdistrictCode) => {\r\n        isAdminpolyInconsistent.current = true;\r\n        currentAdminpoly.current.subdistrictCode = subdistrictCode;\r\n\r\n        change(\"subDistrict\", subdistrictCode);\r\n        hideAlert();\r\n    }\r\n\r\n    const cancleChangeAdminpoly = () => {\r\n        // console.log('currentAdminpoly :: ', currentAdminpoly.current);\r\n        if(currentAdminpoly.current.districtCode){\r\n            change(\"district\", currentAdminpoly.current.districtCode);\r\n            change(\"subDistrict\", currentAdminpoly.current.subdistrictCode);\r\n        }\r\n        else{\r\n            change(\"district\", houseNumberRdc.stepOne.district);\r\n            change(\"subDistrict\", houseNumberRdc.stepOne.subDistrict);\r\n        }\r\n        \r\n        hideAlert();\r\n    }\r\n\r\n    const handleChangeAdminPoly = (type) => (evt) => {\r\n        const codeAdminpoly = evt.target.value;\r\n\r\n        switch (type) {\r\n            case \"district\":\r\n                if((preCurrentAdminpolyDistrictCode || houseNumberRdc.stepOne.district !== codeAdminpoly) && preCurrentAdminpolyDistrictCode !== codeAdminpoly){//เลือกเขตใหม่\r\n                    const isInconsistentDistrict =  (currentAdminpoly.current.districtCode !== codeAdminpoly);\r\n                    if(!isAdminpolyInconsistent.current && (codeAdminpoly && isInconsistentDistrict)){//ข้อมูลไม่สอดคล้องกับตำแหน่งบนแผนที่\r\n                        showAlert({\r\n                            altMsg: ALERT_MESSAGE.QUESTION.WARNING_POINT,\r\n                            altType: 2,\r\n                            callbackConfirm: confirmChangeDistrict,\r\n                            callbackClose: cancleChangeAdminpoly,\r\n                            param: codeAdminpoly\r\n                        })\r\n                    }\r\n                    else{\r\n                        confirmChangeDistrict(codeAdminpoly)\r\n                    }\r\n                }\r\n                break;\r\n            case \"subdistrict\":\r\n                if((preCurrentAdminpolySubDistrictCode || houseNumberRdc.stepOne.subDistrict !== codeAdminpoly) && preCurrentAdminpolySubDistrictCode !== codeAdminpoly){//เลือกแขวงใหม่\r\n                    const isInconsistentSubdistrict =  (currentAdminpoly.current.subdistrictCode !== codeAdminpoly);\r\n                    if(!isAdminpolyInconsistent.current && (codeAdminpoly && isInconsistentSubdistrict)){//ข้อมูลไม่สอดคล้องกับตำแหน่งบนแผนที่\r\n                        showAlert({\r\n                            altMsg: ALERT_MESSAGE.QUESTION.WARNING_POINT,\r\n                            altType: 2,\r\n                            callbackConfirm: confirmChangeSubdistrict,\r\n                            callbackClose: cancleChangeAdminpoly,\r\n                            param: codeAdminpoly\r\n                        })\r\n                    }\r\n                    else{\r\n                        confirmChangeSubdistrict(codeAdminpoly)\r\n                    }\r\n                }\r\n                break;\r\n            default:\r\n                break;\r\n        }\r\n    }\r\n\r\n    const callServiceGetDetailOr1 = (or1ID) => {\r\n        \r\n        return fetchGet_(`${process.env.REACT_APP_CAH_GET_CONTRUCT_DETAIL}?permissionid=${or1ID}`) \r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status;\r\n                }\r\n                return res.json()\r\n            })\r\n            .then(result => {\r\n                result.or1ID = or1ID\r\n                return result\r\n            })\r\n            .catch(ex => {\r\n                console.log(\"ex callServiceGetDetailOr1 \", ex)\r\n            })\r\n    }\r\n    const handleBlurOr1ID = evt => {\r\n        if (evt.target.value) {\r\n            callServiceGetDetailOr1(evt.target.value).then(result => {\r\n                if (result) {\r\n                    if (Object.keys(_values).length > 2) { //กรณี form ใส่ข้อมูลแล้ว\r\n                        const { currentDistrictAndSubDistrict } = houseNumberRdc\r\n                        let altMsg = \"คุณต้องการแทนที่ข้อมูลภายในฟอร์ม ?\"\r\n                        \r\n                        if (currentDistrictAndSubDistrict.districtID !== result.districtID || currentDistrictAndSubDistrict.subDistrictID !== result.subDistrictID) {\r\n                            altMsg = \"คุณต้องการแทนที่ข้อมูลภายในฟอร์มด้วยเขตและแขวงที่ไม่สอดคล้องกับตำแหน่งหรือไม่ ?\";    \r\n                        }\r\n                        showAlert({\r\n                            altMsg: altMsg,\r\n                            altType: 2,\r\n                            callbackConfirm: setDefaultForm,\r\n                            callbackCancel: hideAlert,\r\n                            param: result\r\n                        })\r\n                    } else {\r\n                        setDefaultForm(result)\r\n                    }\r\n                } else {\r\n                    const constructID = evt.target.value\r\n                    showAlert({ altMsg: `ไม่พบข้อมูลตามรหัสคำร้องที่ : ${constructID}` })\r\n                    //change('license', \"\")\r\n                }\r\n            })\r\n        }\r\n    }\r\n\r\n    const setDefaultForm = async (value) => {\r\n        hideAlert();\r\n        // const { stepOneRdc } = props;\r\n        const stepOneTogether = { \r\n            // ...stepOneRdc,\r\n            ..._values,\r\n            ...value, \r\n            // \"license\": value.or1ID,\r\n            \"provinceID\": value.provinceID,\r\n            \"district\": value.districtID,\r\n            \"subDistrict\": value.subDistrictID,\r\n            \"bldgArea\": value.buildingArea\r\n            // \"moo\": value.moo,\r\n            // \"road\": value.road,\r\n            // \"soi\": value.soi,\r\n            // \"province\": 'กรุงเทพมหานคร'\r\n        }\r\n\r\n        await callServiceSubDistrict(value.districtID)\r\n        await initialize(stepOneTogether)\r\n\r\n        currentAdminpoly.current.districtCode = value.districtID;\r\n        currentAdminpoly.current.subdistrictCode = value.subDistrictID;\r\n\r\n        // houseNumberAction.saveFormStepTwo({}) //เคลียร์ค่า formTwo\r\n    }\r\n\r\n    const handleChangeHouseType = (evt) =>{\r\n\r\n        if(evt.target.value == Number(window.OTHER_LOOKUP_TR900)){\r\n            setIsHouseTypeOther(false)\r\n        }else{\r\n            change('houseTypeDetail', \"\")\r\n            setIsHouseTypeOther(true)\r\n        }\r\n    }\r\n    return (\r\n        <Fragment>\r\n        <StepOneView\r\n            onClickSubmit={handleCheckValidateSubmit}\r\n            onClickBack={handleClickBack}\r\n            onChangeAdminPoly={handleChangeAdminPoly}\r\n            luDistrict={luDistrict}\r\n            luSubDistrict={luSubDistrict}\r\n            onBlurOr1ID={handleBlurOr1ID}\r\n            isSubmitError={isSubmitError}\r\n            houseTypeList={houseTypeList}\r\n            houseMaterialList={houseMaterialList}\r\n            onChangehouseType={handleChangeHouseType}\r\n            isHouseTypeOther={isHouseTypeOther}\r\n        />\r\n        <AlertMessageSuper {...props} />\r\n        </Fragment>\r\n    )\r\n}\r\n\r\nconst mapStateToProps = state => ({\r\n    houseNumberRdc: state.houseNumberRdc,\r\n    dirty: isDirty('StepOne')(state),\r\n    initialValues: { ...state.houseNumberRdc.stepOne, province: 'กรุงเทพมหานคร'},\r\n    stepOneRdc: state.houseNumberRdc.stepOne,\r\n    _values:getFormValues('StepOne')(state)\r\n})\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    houseNumberAction: bindActionCreators(HouseNumberAction, dispatch)\r\n});\r\n\r\nconst reduxFormParameter = {\r\n    form: \"StepOne\",\r\n    validate: stepOneValidate,\r\n};\r\n\r\nconst enhance = compose(\r\n    connect(mapStateToProps, mapDispatchToProps),\r\n    reduxForm(reduxFormParameter)\r\n)\r\n\r\nexport default WithAlertMessage(enhance(StepOne))","import React from 'react';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { Field } from 'redux-form';\r\nimport TextFieldRedux from '../../../../../../../../Controls/Containers/TextFieldRedux';\r\nimport Button from '../../../../../../../../Controls/Containers/Button';\r\nimport 'moment/locale/th';\r\nimport { BTN } from '../../../../../../../../Constants/Constants'\r\nimport ErrorSubmit from '../../../../../../../../Controls/Containers/ErrorSubmit'\r\n\r\nconst StepTwoView = ({\r\n    classes,\r\n    onHandleSubmit,\r\n    onClickBack,\r\n    children,\r\n    onHouseNumberChange,\r\n    handleChangeStepBack,\r\n    isSubmitError\r\n}) => {\r\n\r\n    return (\r\n        <Grid container spacing={0} className={classes.formContainer} >\r\n            <Field\r\n                name=\"houseNum\"\r\n                label={\"จำนวนรหัสประจำบ้าน\"}\r\n                component={TextFieldRedux}\r\n                onChange = {onHouseNumberChange}\r\n                required\r\n            />\r\n\r\n            <hr style={{width:\"100%\"}}/>\r\n            <Grid className={classes.containnerRow} container>\r\n                <Grid xs={12} item className={classes.labelText}>\r\n                    {children}          \r\n                </Grid>\r\n\r\n                <Grid container justify=\"center\" spacing={24} className={classes.divFooter}>\r\n                    {\r\n                        (isSubmitError) &&\r\n                            <Grid item xs={12}>\r\n                                <Field\r\n                                    name=\"errorForm\"\r\n                                    component={ErrorSubmit}\r\n                                />\r\n                            </Grid>\r\n                    }\r\n\r\n                    <Grid item>\r\n                        <Button\r\n                            label={BTN.TH.CANCEL}\r\n                            onClick={onClickBack}\r\n                            className={classes.btnRegister}\r\n                        />\r\n                    </Grid>\r\n\r\n                    <Grid item>\r\n                        <Button\r\n                            label={BTN.TH.BACK}\r\n                            onClick={handleChangeStepBack}\r\n                            className={classes.btnRegister}\r\n                        />\r\n                    </Grid>\r\n\r\n                    <Grid item>\r\n                        <Button\r\n                            type=\"submit\"\r\n                            label={BTN.TH.SAVE}\r\n                            className={classes.btnLogin}\r\n                            onClick={onHandleSubmit}\r\n                        />\r\n                    </Grid>\r\n                </Grid>\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        width: '100%',\r\n        height: '100%',\r\n        position: 'relative'\r\n    },\r\n    labelText: {\r\n        display: 'flex',\r\n        alignItems: 'center',\r\n        fontSize:'14px'\r\n    },\r\n    divFooter: {\r\n        marginTop: '20px',\r\n        marginBottom: '10px'\r\n    },\r\n    containnerRow: {\r\n        height: '50px',\r\n        width: '100%',\r\n        marginBottom: '15px'\r\n    },\r\n    formContainer:{\r\n        padding:\"10px\",\r\n        width:'100%'\r\n    },\r\n}))(StepTwoView)","import React, { Fragment } from 'react';\r\nimport 'moment/locale/th';\r\nimport { Field, FieldArray } from 'redux-form';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport FormHelperText from '@material-ui/core/FormHelperText';\r\n\r\nimport TextFieldRedux from '../../../../../../../../Controls/Containers/TextFieldRedux';\r\nimport Button from '../../../../../../../../Controls/Containers/Button';\r\nimport SelectFieldRedux from '../../../../../../../../Controls/Containers/SelectFieldRedux';\r\nimport { normalizeHouseNo, normalizeNumber } from '../../../../../../../../Utilities/Validate';\r\n\r\nconst renderHouseNumber = ({ classes, fields, meta: { error }, onHouseIdTextFieldBlur }) => (\r\n    <Fragment>\r\n        {error && <FormHelperText className={classes.error}>{error}</FormHelperText>}\r\n        {fields.map((house, index) => (\r\n            <Grid container wrap=\"nowrap\" justify=\"flex-end\" className={classes.containnerRow} key={index}>\r\n                <Grid xs={1} item className={classes.labelText} >\r\n                    <label>{index + 1}.</label>\r\n                </Grid>\r\n                <Grid xs={4} item className={classes.labelText} >\r\n                    <Field\r\n                        name={`${house}.houseNo`}\r\n                        component={TextFieldRedux}\r\n                        normalize={normalizeHouseNo}\r\n                        className={classes.textFieldHouseNumber}\r\n                        required\r\n                    />\r\n                </Grid>\r\n                <Grid xs={7} item className={classes.labelHouseId} >\r\n                    <Field\r\n                        name={`${house}.houseId`}\r\n                        component={TextFieldRedux}\r\n                        normalize={normalizeNumber}\r\n                        onBlur={(evt) => onHouseIdTextFieldBlur(evt, `${house}.houseId`)}\r\n                        className={classes.textFieldHouseNumber}\r\n                        required\r\n                        maxLength={30}\r\n                    />\r\n                </Grid>\r\n            </Grid>\r\n        ))}\r\n    </Fragment>\r\n);\r\n\r\nconst StepTwoHouseOver10View = ({\r\n    classes,\r\n    onHandleSubmit,\r\n    onClickAutogenHouseNo,\r\n    dataSolutionRunHouse,\r\n    onHouseIdTextFieldBlur,\r\n    isShow,\r\n    clickAutogen,\r\n    showText\r\n}) => {\r\n    \r\n    return (\r\n        <Grid container spacing={0}  >\r\n            <Field\r\n                name=\"houseIdStart\"\r\n                label={\"รหัสประจำบ้านเริ่มต้น (กรมการปกครอง 11 หลัก)\"}\r\n                component={TextFieldRedux}\r\n                onBlur={(evt) => onHouseIdTextFieldBlur(evt, \"houseIdStart\")}\r\n                required\r\n                maxLength={11}\r\n            />\r\n            {showText && <span className={classes.styleWarning}>{`*หมายเหตุ หากรหัสประจำบ้านตำแหน่งที่ 5-10 รวมกับจำนวนรหัสประจำบ้านแล้วเกิน 999999 ระบบจะไม่คำนวณให้`}</span>}\r\n            <Field\r\n                name=\"houseNoStart\"\r\n                label={\"เลขที่บ้านเริ่มต้น\"}\r\n                component={TextFieldRedux}\r\n                normalize={normalizeHouseNo}\r\n                required\r\n            />\r\n            <Field\r\n                name=\"runHouseNo\"\r\n                label={\"วิธี Run เลขที่บ้าน\"}\r\n                component={SelectFieldRedux}\r\n                data={dataSolutionRunHouse}\r\n                val={1}\r\n                required\r\n            />\r\n\r\n            <Grid container justify=\"flex-end\" spacing={24} className={classes.divFooter}>\r\n                <Grid item>\r\n                    <Button\r\n                        label=\"สร้างเลขที่บ้านอัตโนมัติ\"\r\n                        onClick={isShow ? clickAutogen:onHandleSubmit(onClickAutogenHouseNo)}\r\n                        className={classes.btnLogin}\r\n                    />\r\n                </Grid>\r\n            </Grid>\r\n\r\n            <hr className={classes.hrStyle} />\r\n\r\n            {isShow && \r\n                <Fragment>\r\n                    <Grid item xs={12} >\r\n                        <span>{`ระบบจะคำนวณรหัสประจำบ้าน 10 หลักแรกให้อัตโนมัติ ผู้ใช้งานต้องระบุรหัสหลักที่ 11 ด้วยตนเอง`}<br/></span>\r\n                        <span className={classes.descritpTopic}>{`หมายเหตุ`}</span> \r\n                        <span>\r\n                            {` ผู้ใช้สามารถแก้ไขรหัสประจำบ้านทั้ง 11 หลักได้`}<br/> \r\n                        </span>\r\n                    </Grid>\r\n                    \r\n                    <hr className={classes.hrStyle} />\r\n\r\n                    <Grid container wrap=\"nowrap\" justify=\"flex-end\" className={classes.containnerRowTopic} >\r\n                        <Grid xs={1} item className={classes.labelText} >\r\n                            <label> </label>\r\n                        </Grid>\r\n                        <Grid xs={4} item className={classes.labelText} >\r\n                            <label>เลขที่บ้าน</label><label className={classes.asterisk}>*</label>\r\n                        </Grid>\r\n                        <Grid xs={7} item className={classes.labelHouseId} >\r\n                            <label>รหัสประจำบ้าน</label><label className={classes.asterisk}>*</label>\r\n                        </Grid>\r\n                    </Grid>\r\n\r\n                    <FieldArray name=\"houseList\" component={renderHouseNumber} classes={classes} onHouseIdTextFieldBlur={onHouseIdTextFieldBlur}/>\r\n                </Fragment>\r\n            }\r\n            \r\n        </Grid>\r\n    )\r\n}\r\n\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        width: '100%',\r\n        height: '100%',\r\n        position: 'relative'\r\n    },\r\n    labelText: {\r\n        // display: 'flex',\r\n        alignItems: 'center'\r\n    },\r\n    divFooter: {\r\n        marginTop: '20px',\r\n        marginBottom: '10px'\r\n    },\r\n    containnerRowTopic: {\r\n        width: '100%',\r\n    },\r\n    containnerRow: {\r\n        height: '50px !important',\r\n        width: '100%',\r\n        marginBottom: '15px'\r\n    },\r\n    labelHouseId: {\r\n        // display: 'flex',\r\n        alignItems: 'center',\r\n        paddingLeft: \"15px\"\r\n    },\r\n    error: {\r\n        color: 'red',\r\n        marginTop: theme.spacing.unit / 2,\r\n        marginBottom: theme.spacing.unit / 2,\r\n        marginLeft: 15\r\n    },\r\n    asterisk:{\r\n        color:\"red\"\r\n    },\r\n    hrStyle: {\r\n        width: '100%'\r\n    },\r\n    descritpTopic: {\r\n        fontSize: '16px',\r\n        textDecoration: 'underline',\r\n        color: '#ff0000'\r\n    },\r\n    descritpFocus: {\r\n        textDecoration: 'underline'\r\n    },\r\n    textFieldHouseNumber: {\r\n        minHeight: '50px'\r\n    },\r\n    styleWarning: {\r\n        color: '#ff0000',\r\n        fontSize: '12px'\r\n    }\r\n}))(StepTwoHouseOver10View)","import React from 'react';\r\nimport 'moment/locale/th';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { Field } from 'redux-form';\r\nimport TextFieldRedux from '../../../../../../../../Controls/Containers/TextFieldRedux';\r\nimport { normalizeHouseNo, normalizeNumber } from '../../../../../../../../Utilities/Validate';\r\n\r\nconst StepTwoHouseOver10View = ({\r\n    classes,\r\n    onNoStartBlur,\r\n    onIdStartBlur,\r\n    handleHouseIdBlur,\r\n    showText\r\n}) => {\r\n\r\n    return (\r\n        <Grid container spacing={0} className={classes.root}>\r\n            <Grid item xs={12} >\r\n                <span>{`ระบบจะคำนวณรหัสประจำบ้านสุดท้าย 10 หลักแรกให้อัตโนมัติ ผู้ใช้งานต้องระบุรหัสหลักที่ 11 ด้วยตนเอง`}<br/></span>\r\n                <span className={classes.descritpTopic}>{`หมายเหตุ`}</span> \r\n                <span>\r\n                    {` ผู้ใช้สามารถแก้ไขรหัสประจำบ้านทั้ง 11 หลักได้`}<br/> \r\n                </span>\r\n            </Grid>\r\n            <hr className={classes.root} />\r\n            <Field\r\n                name=\"idStart\"\r\n                label={'รหัสประจำบ้านเริ่มต้น (กรมการปกครอง 11 หลัก)'}\r\n                component={TextFieldRedux}\r\n                onBlur={onIdStartBlur}\r\n                normalize={normalizeNumber}\r\n                required\r\n                maxLength={11}\r\n            />\r\n            {showText && <span className={classes.styleWarning}>{`*หมายเหตุ หากรหัสประจำบ้านตำแหน่งที่ 5-10 รวมกับจำนวนรหัสประจำบ้านแล้วเกิน 999999 ระบบจะไม่คำนวณให้`}</span>}\r\n            <Field\r\n                name=\"idEnd\"\r\n                label={'รหัสประจำบ้านสุดท้าย (กรมการปกครอง 11 หลัก)'}\r\n                component={TextFieldRedux}\r\n                onBlur={(evt) => handleHouseIdBlur(evt, 'idEnd')}\r\n                normalize={normalizeNumber}\r\n                required\r\n                maxLength={11}\r\n            />\r\n            <Field\r\n                name=\"noStart\"\r\n                label={'เลขที่บ้านเริ่มต้น'}\r\n                component={TextFieldRedux}\r\n                onBlur={onNoStartBlur}\r\n                normalize={normalizeHouseNo}\r\n                required\r\n            />\r\n            <Field\r\n                name=\"noEnd\"\r\n                label={'เลขที่บ้านสุดท้าย'}\r\n                component={TextFieldRedux}\r\n                normalize={normalizeHouseNo}\r\n                required\r\n            />\r\n            <hr className={classes.root} />\r\n        </Grid>\r\n    )\r\n}\r\n\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        width: '100%',\r\n    },\r\n    descritpTopic: {\r\n        fontSize: '16px',\r\n        textDecoration: 'underline',\r\n        color: '#ff0000'\r\n    },\r\n    descritpFocus: {\r\n        textDecoration: 'underline'\r\n    },\r\n    styleWarning: {\r\n        color: '#ff0000',\r\n        fontSize: '12px'\r\n    }\r\n}))(StepTwoHouseOver10View)","import React, { useState, useEffect, Fragment } from 'react'\r\nimport { connect } from 'react-redux'\r\nimport { compose } from 'recompose'\r\nimport { reduxForm, formValueSelector, getFormValues } from \"redux-form\";\r\nimport { bindActionCreators } from \"redux\";\r\n\r\n//import view\r\nimport StepTwoView from '../../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/HouseNumber/HouseNumberFormStep/StepTwo/StepTwoView'\r\nimport StepTwoHouseUnder10View from '../../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/HouseNumber/HouseNumberFormStep/StepTwo/StepTwoHouseUnder10View'\r\nimport StepTwoHouseOver10View from '../../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/HouseNumber/HouseNumberFormStep/StepTwo/StepTwoHouseOver10View'\r\n\r\n//import service - utils\r\nimport { fetchGet_, fetchPost_ } from \"../../../../../../../../Utilities/ServiceUtils\";\r\n\r\n//import validate\r\nimport { stepTwoValidate } from '../../../../../../../../Utilities/Validate';\r\n\r\n//import alert\r\nimport AlertMessageSuper from '../../../../../../../../Controls/Containers/AlertMessageSuper';\r\nimport WithAlertMessage from '../../../../../../../../HOC/WithAlertMessage'\r\n\r\n//import action\r\nimport * as HouseNumberAction from '../../../../../../../../Actions/Web/Panel/HouseNumberAction'\r\nimport * as MapAction from \"../../../../../../../../Actions/Web/Maps/MapAction\";\r\nimport * as MapFunctions from \"../../../../../../../../Map/MapFunctions\";\r\nimport * as PanelContentAction from '../../../../../../../../Actions/Web/Panel/PanelContentAction'\r\n\r\n//import component\r\nimport * as DatetimeUtil from '../../../../../../../../Utilities/DateTimeUtil'\r\nimport { TABLE_MAPSHEET1K, RUN_HOUSE_NO_METHOD, ALERT_MESSAGE } from '../../../../../../../../Constants/Constants';\r\nimport Loading from '../../../../../../../../Controls/Containers/Loading';\r\nimport WithLoading from '../../../../../../../../HOC/WithLoading';\r\n\r\nconst StepTwo = (props) => {\r\n    const {\r\n        handleSubmit,\r\n        isNotBKK,\r\n        alertOutOfBKKFn,\r\n        showAlert,\r\n        hideAlert,\r\n        onClickBack,\r\n        handleChangeStepBack,\r\n        houseNumberRdc,\r\n        houseNumberAction,\r\n        StepTwoSelector,\r\n        mapAction,\r\n        panelContentAction,\r\n        submitUpdate,\r\n        authenRdc,\r\n        isShowLoading,\r\n        hideLoading,\r\n        showLoading,\r\n        _values,\r\n        change,\r\n        districtIdForHouseId\r\n    } = props;\r\n    \r\n    const dataOfRunHouseNumber = RUN_HOUSE_NO_METHOD\r\n    const [houseRequest, setHouseRequest] = useState(0);\r\n    const [isSubmitError, setIsSubmitError] = useState(false);\r\n    const [isShow, setIsShow] = useState(false)\r\n    const [showText, setShowText] = useState(false)\r\n    const [showTextOverTen, setshowTextOverTen] = useState(false)\r\n\r\n    useEffect(() => {\r\n        if (houseNumberRdc.stepTwo.houseNum || houseNumberRdc.stepTwo.houseNum !== undefined) { //set ค่าเริ่มต้นให้ตัวhouseRequestเพื่อใช้ในการเลือกเรนเดอร์ form house Over 10 หรือ under 10\r\n            setHouseRequest(houseNumberRdc.stepTwo.houseNum)\r\n        }\r\n        if (houseNumberRdc.stepTwo.houseNum <= 10) {\r\n            setIsShow(true)\r\n            const values = houseNumberRdc.stepTwo\r\n            if (values.houseNum < 11) {\r\n                props.initialize({ houseList: values.houseList, houseIdStart: values.houseIdStart, runHouseNo: values.runHouseNo, houseNoStart: values.houseNoStart, houseNum: values.houseNum })\r\n            }\r\n        } else if(houseNumberRdc.stepTwo.houseNum === undefined) {\r\n            change('houseIdStart', districtIdForHouseId);\r\n            change('idStart', districtIdForHouseId)\r\n            change('idEnd', districtIdForHouseId)\r\n        }\r\n    }, [])\r\n\r\n    const clickAutogen = async () => {\r\n        change('houseList', [])\r\n        \r\n        await setIsShow(false)\r\n        await handleSubmit(handleClickAutogenHouseNo)()\r\n    }\r\n\r\n    const handleClickAutogenHouseNo = async (value) => {\r\n        if(parseInt(value.houseNum) + parseInt(value.houseIdStart) > 100000000000 ){\r\n     \r\n            showAlert({ altMsg:\"รหัสประจำบ้านต้องไม่เกิน 99999999999\" })\r\n        }else{\r\n\r\n            let houseIdStartLength = value.houseIdStart.length\r\n            let houseNoStartSplit = value.houseNoStart.split(\"/\")\r\n            let houseNoStart = null\r\n            let houseNoStartFirstIndex = null // เลขที่บ้านข้างหน้า \"/\"\r\n    \r\n            if (houseNoStartSplit.length === 1) { //กรณีไม่มี \"/\"\r\n                houseNoStart = houseNoStartSplit[0]\r\n            } else if (houseNoStartSplit.length === 2) { //กรณีมี \"/\"\r\n                houseNoStart = houseNoStartSplit[1]\r\n                houseNoStartFirstIndex = houseNoStartSplit[0]\r\n            }\r\n    \r\n            let houseNoStartList = []\r\n            let houseNo = parseInt(houseNoStart)\r\n            let houseId = parseInt(value.houseIdStart)\r\n            const isCal = Number(houseId.toString().slice(4,10)) + Number(value.houseNum) < 999999\r\n\r\n            for (let i = 0; i < value.houseNum; i++) {\r\n                let currentHouseIdLength = houseId.toString().length //length ของ รหัสประจำบ้านที่ถูกgen\r\n                let zeroStr = (value.houseIdStart[0] == \"0\") ? \"0\" : \"\";\r\n    \r\n                for (let j = 1; j < houseIdStartLength - currentHouseIdLength; j++) { //เช็คเคส + 0 ข้างหน้า กรณีรหัสบ้านเริ่มต้นเป็น0\r\n                    zeroStr = zeroStr + \"0\"\r\n                }\r\n    \r\n                houseNoStartList.push({ houseNo: (houseNoStartFirstIndex) ? \r\n                    `${houseNoStartFirstIndex}/${houseNo}` : houseNo, \r\n                    houseId: isCal ?\r\n                    zeroStr + (houseId.toString()) : ''\r\n                })\r\n                if (value.runHouseNo === 1) {\r\n                    houseNo = houseNo += 1\r\n                } else {\r\n                    houseNo = houseNo += 2\r\n                }\r\n                \r\n                if(isCal){\r\n                    if(houseId.toString().length === 11) {\r\n                        houseId = Number(houseId.toString().slice(0,10)) + 1\r\n                    } else {\r\n                        houseId = houseId += 1\r\n                    }\r\n                }\r\n                \r\n            }\r\n            // setStepTwoUnder10Form(value)\r\n            props.initialize({ houseList: houseNoStartList, houseIdStart: value.houseIdStart, houseNoStart: value.houseNoStart, runHouseNo: value.runHouseNo, houseNum: value.houseNum })\r\n            setIsShow(true)\r\n        }\r\n       \r\n    }\r\n\r\n    const handleChangeHouseNumber = (value) => {\r\n        const pattern = new RegExp(/\\D/g); // true = มีตัวอักษร\r\n        const isNumber = pattern.test(value);\r\n\r\n        if (!value || isNumber) {\r\n            setHouseRequest(0)\r\n        } else {\r\n            setHouseRequest(value);\r\n        }\r\n    }\r\n\r\n    const checkDuplicateHouseId = async (values) => {\r\n        let houseIdList = [] //สำหรับส่งเข้า serviceตรวจสอบรหัสบ้านซ้ำ\r\n        let isNotDuplicate = false\r\n\r\n        if (values.houseNum <= 10) { //บ้านไม่เกิน10หลัง\r\n\r\n            values.houseList.forEach((itm) => {\r\n                houseIdList.push(itm.houseId)\r\n            })\r\n\r\n            await fetchGet_(`${process.env.REACT_APP_CAH_CHECK_DUPLICLATE_HOUSENO}?houseno=${houseIdList.join(\"|\")}`)\r\n                .then(res => {\r\n                    if (!res.ok) {\r\n                        throw res.status\r\n                    }\r\n                    return res.json();\r\n                })\r\n                .then(result => {\r\n                    switch (result.statusCode) {\r\n                        case 1:\r\n                            isNotDuplicate = true\r\n                            return true\r\n                        case 0:\r\n                            isNotDuplicate = false\r\n                            return true\r\n                        default:\r\n                            break;\r\n                    }\r\n\r\n                })\r\n                .catch(ex => {\r\n                    console.log('ex callServiceDistric', ex)\r\n                })\r\n        } else { //บ้านมากกว่า 10 หลัง\r\n            await fetchGet_(`${process.env.REACT_APP_CAH_CHECK_DUPLICLATE_HOUSENO}?houseno=${values.idEnd}|${values.idStart}`)\r\n                .then(res => {\r\n                    if (!res.ok) {\r\n                        throw res.status\r\n                    }\r\n                    return res.json();\r\n                })\r\n                .then(result => {\r\n                    switch (result.statusCode) {\r\n                        case 1:\r\n                            isNotDuplicate = true\r\n                            return true\r\n                        case 0:\r\n                            isNotDuplicate = false\r\n                            return true\r\n                        default:\r\n                            break;\r\n                    }\r\n                })\r\n                .catch(ex => {\r\n                    console.log('ex callServiceDistric', ex)\r\n                })\r\n        }\r\n        return isNotDuplicate\r\n    }\r\n\r\n    const handleSubmitValidate = () => {\r\n        stepTwoValidate(_values)\r\n        setIsSubmitError(true)\r\n\r\n        if (submitUpdate) {\r\n            handleSubmit(submitUpdate)()\r\n        } else {\r\n            mapAction.bindMapCommand(MapFunctions.checkPermissionPointOnMap, {\r\n                geometry: houseNumberRdc.geometry,\r\n                callback: checkPermissionOnMap\r\n            })\r\n\r\n        }\r\n    }\r\n\r\n    const checkPermissionOnMap = (isPerrmission) => {\r\n        if (isPerrmission) {\r\n            handleSubmit(handleSubmitHouseNumberForm)();\r\n        } else {\r\n            showAlert({ altMsg: ALERT_MESSAGE.POPUP.POINT_OUT_OF_PERMISSION })\r\n        }\r\n    }\r\n\r\n    const handleSubmitHouseNumberForm = (values) => {\r\n        if (isNotBKK) {\r\n            if (alertOutOfBKKFn) alertOutOfBKKFn();\r\n        }\r\n        else {\r\n            let createDateTimeStamp = DatetimeUtil.convertDatetimeToCallService(new Date())\r\n            let isDuplicateHouseId = checkDuplicateHouseId(values)\r\n            \r\n\r\n            isDuplicateHouseId.then((itm) => {\r\n                if (itm) { //รหัสประจำบ้านยังไม่มีอยู่ใน database\r\n                    const { TRnumber,\r\n                        TRrequest,\r\n                        district,\r\n                        license,\r\n                        road,\r\n                        soi,\r\n                        subDistrict,\r\n                        moo,\r\n                        regDate,\r\n                        applicantName,\r\n                        applicantTelNo,\r\n                        ownerName,\r\n                        houseType,\r\n                        houseTypeDetail,\r\n                        houseMaterial,\r\n                        numFloor,\r\n                        bldgArea,\r\n                        remark,\r\n                        chanodeNo,\r\n                        landNo\r\n                    } = houseNumberRdc.stepOne\r\n                    const numHouseRequest = parseInt(houseRequest);\r\n                    let regDateTimeStamp = DatetimeUtil.convertDatetimeToCallService(regDate)\r\n                    let params = {}\r\n                    showLoading();\r\n                    if (numHouseRequest <= 10) { //บ้านน้อยกว่า 10 หลัง\r\n                        params = {\r\n                            \"housetrid\": TRrequest,\r\n                            \"tr31id\": TRnumber,\r\n                            \"permissionid\": license,\r\n                            \"numberofhouse\": values.houseNum,\r\n                            \"soi\": soi,\r\n                            \"road\": road,\r\n                            \"subdistrictid\": subDistrict,\r\n                            \"districtid\": district,\r\n                            \"provinceid\": \"10\",\r\n                            \"moo\": moo,\r\n                            \"houseno\": values.houseList,\r\n                            \"regDate\": regDateTimeStamp,\r\n                            \"applicantName\": applicantName,\r\n                            \"applicantTelNo\": applicantTelNo,\r\n                            \"ownerName\": ownerName,\r\n                            \"houseType\": houseType,\r\n                            \"houseTypeDetail\": houseTypeDetail,\r\n                            \"houseMaterial\": houseMaterial,\r\n                            \"numFloor\": numFloor,\r\n                            \"bldgArea\": bldgArea,\r\n                            \"remark\": remark,\r\n                            \"chanodeNo\": chanodeNo,\r\n                            \"landNo\": landNo\r\n                        }\r\n                    } else { //บ้านมากกว่า 10 หลัง\r\n                        params = {\r\n                            \"housetrid\": TRrequest,\r\n                            \"tr31id\": TRnumber,\r\n                            \"permissionid\": license,\r\n                            \"numberofhouse\": values.houseNum,\r\n                            \"soi\": soi,\r\n                            \"road\": road,\r\n                            \"subdistrictid\": subDistrict,\r\n                            \"districtid\": district,\r\n                            \"provinceid\": \"10\",\r\n                            \"moo\": moo,\r\n                            \"houseno\": [\r\n                                {\r\n                                    \"houseno\": values.noStart,\r\n                                    \"houseid\": values.idStart\r\n                                },\r\n                                {\r\n                                    \"houseno\": values.noEnd,\r\n                                    \"houseid\": values.idEnd\r\n                                }\r\n                            ],\r\n                            \"regDate\": regDateTimeStamp,\r\n                            \"applicantName\": applicantName,\r\n                            \"applicantTelNo\": applicantTelNo,\r\n                            \"ownerName\": ownerName,\r\n                            \"houseType\": houseType,\r\n                            \"houseTypeDetail\": houseTypeDetail,\r\n                            \"houseMaterial\": houseMaterial,\r\n                            \"numFloor\": numFloor,\r\n                            \"bldgArea\": bldgArea,\r\n                            \"remark\": remark,\r\n                            \"chanodeNo\": chanodeNo,\r\n                            \"landNo\": landNo\r\n\r\n                        }\r\n                    }\r\n\r\n                    if (Object.values(params).length >= 1) { //params not empty\r\n                        mapAction.bindMapCommand(MapFunctions.addShapeTr900, {\r\n                            geometry: houseNumberRdc.geometry,\r\n                            stepTwo: params,\r\n                            url: `${window.CPUDD_OTHERS_FEATURE_LAYER}/2`,\r\n                            userID: authenRdc.profile.userID,\r\n                            createDate: createDateTimeStamp,\r\n                            callback: callbackAddPointTR900\r\n                        });\r\n                    }\r\n                } else {//รหัสประจำบ้านมีอยู่แล้วในระบบ\r\n                    showAlert({\r\n                        altMsg: \"รหัสประจำบ้านมีอยู่แล้วในระบบ\",\r\n                        altType: 1,\r\n                        callbackClose: handleCloseAlertMsg,\r\n                    })\r\n                }\r\n\r\n            })\r\n        }\r\n    }\r\n\r\n    const callbackAddPointTR900 = async (result) => {\r\n        let params = {\r\n            \"objectid\": result.objectId,\r\n            \"houseno\": result.stepTwo.houseno\r\n        }\r\n\r\n        await mapAction.bindMapCommand(MapFunctions.refreshMap, { //สั่ง refresh layer\r\n            layerID:  window.TOC_LAYER_NAME.HOUSE //hard code layerID ไว้ ??\r\n        });\r\n        await callServiceSaveHouseNumber(params)\r\n    }\r\n\r\n    const callServiceMapsheet1K = (objectID) => {\r\n        fetchGet_(`${process.env.REACT_APP_UPDATE_MAPSHEET1K}?objectid=${objectID}&tablename=${TABLE_MAPSHEET1K.HOUSE_PNT}&isupdate=true`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(values => {\r\n                if (values && values.statusCode === 1) {\r\n                    showAlert({ altMsg: ALERT_MESSAGE.POPUP.SAVE_SUCCESS, callbackClose: handleCloseSaveSuccessAlertMsg })\r\n                } else {\r\n                    showAlert({ altMsg: ALERT_MESSAGE.POPUP.SAVE_FAIL })\r\n                }\r\n            })\r\n            .catch(ex => {\r\n                showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR })\r\n                console.log('ex callServiceSaveForm', ex)\r\n            })\r\n            .finally(() => {\r\n                hideLoading();\r\n            })\r\n    }\r\n\r\n    const callServiceSaveHouseNumber = (params) => {\r\n\r\n        //save\r\n        fetchPost_(process.env.REACT_APP_CAH_SAVE_HOUSENO_FORM, params)\r\n            .then(res => {\r\n                return res.json()\r\n            }).then(value => {\r\n                if (value.statusCode === 1) {\r\n                    callServiceMapsheet1K(params.objectid)\r\n                } else {\r\n                    hideLoading();\r\n                    showAlert({ altMsg: ALERT_MESSAGE.POPUP.SAVE_FAIL })\r\n                }\r\n            })\r\n            .catch(ex => {\r\n                showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR })\r\n                hideLoading();\r\n                console.log('ex callServiceSave pmr', ex)\r\n            })\r\n    }\r\n\r\n    const handleCloseSaveSuccessAlertMsg = () => {\r\n        panelContentAction.setCurrentPage();\r\n        houseNumberAction.clearFormStep()\r\n        mapAction.bindMapCommand(MapFunctions.clearGraphicConstructionLicense)\r\n    }\r\n\r\n    const handleCloseAlertMsg = () => {\r\n        hideAlert();\r\n    }\r\n\r\n    const handleClickPrevStep = (value) => {\r\n        houseNumberAction.saveFormStepTwo(StepTwoSelector)\r\n        handleChangeStepBack()\r\n    }\r\n\r\n    const handleHouseIdBlur = async (evt, name) => {\r\n        const houseId = evt.target.value.toString()\r\n        \r\n        if(name === 'houseIdStart') {\r\n            const { houseNum } = _values\r\n            const idOver = (Number(houseId.slice(4,10)) + Number(houseNum)) > 999999;\r\n\r\n            if(idOver) {\r\n                setShowText(true)\r\n            } else {\r\n                setShowText(false)\r\n            }\r\n        }\r\n        \r\n        const char = new RegExp(/[^0-9]/)\r\n        const isSpecialChar = char.test(houseId)\r\n\r\n        if(isSpecialChar) {     \r\n            const rmSpecialChar = await houseId.replace(/[^0-9]/g, \"\")\r\n            await change(name, rmSpecialChar)\r\n        }\r\n    }\r\n\r\n    const handleNoStartBlur = (evt) => {\r\n        const noStart = evt.target.value;\r\n        const resultSplit = noStart.split(\"/\");\r\n        const { houseNum } = _values;\r\n        if (noStart !== \"\") {\r\n            if (resultSplit.length === 2) {\r\n                const noEnd = Number(resultSplit[1]) + Number(houseNum-1);\r\n                const resultNoEnd = `${resultSplit[0]}/${noEnd}`\r\n                change('noEnd', resultNoEnd);\r\n            } else if (resultSplit.length === 1) {\r\n                const noEndNumber = `${Number(resultSplit[0]) + Number(houseNum-1)}`;\r\n                change('noEnd', noEndNumber)\r\n            }\r\n        }\r\n    }\r\n\r\n    const handleIdStartBlur = async (evt) => {\r\n        const { houseNum } = _values\r\n        const houseId = evt.target.value.toString()\r\n        const rmSpecialChar = await houseId.replace(/[^0-9]/g, \"\")\r\n        await change('idStart', rmSpecialChar)\r\n\r\n        if(rmSpecialChar.length === 11) {\r\n            const sliceStr = Number(rmSpecialChar.slice(4,10)) + Number(houseNum) <= 999999\r\n\r\n            if(sliceStr) {\r\n                setshowTextOverTen(false)\r\n                // const lastHouseId = Number(rmSpecialChar.slice(0,10)) + Number(houseNum);\r\n                const lastHouseId = Number(rmSpecialChar) + (Number(houseNum) - 1);\r\n\r\n                change('idEnd', lastHouseId.toString())\r\n            } else {\r\n                setshowTextOverTen(true)\r\n            }\r\n        }\r\n\r\n    }\r\n\r\n    return (\r\n        <Fragment>\r\n            <StepTwoView\r\n                onHandleSubmit={handleSubmitValidate}//{submitUpdate? handleSubmit(submitUpdate):handleSubmit(handleSubmitHouseNumberForm)} \r\n                onHouseNumberChange={handleChangeHouseNumber}\r\n                onClickBack={onClickBack}\r\n                handleChangeStepBack={handleClickPrevStep}\r\n                isSubmitError={isSubmitError}\r\n            >\r\n\r\n                {houseRequest !== 0 && <Fragment>\r\n                    {(houseRequest <= 10) ?\r\n                        <StepTwoHouseUnder10View\r\n                            onHandleSubmit={handleSubmit}\r\n                            onClickAutogenHouseNo={handleClickAutogenHouseNo}\r\n                            dataSolutionRunHouse={dataOfRunHouseNumber}\r\n                            onHouseIdTextFieldBlur={handleHouseIdBlur}\r\n                            isShow={isShow}\r\n                            clickAutogen={clickAutogen}\r\n                            showText={showText}\r\n                        >\r\n                        </StepTwoHouseUnder10View> :\r\n                        <StepTwoHouseOver10View\r\n                            onHandleSubmit={handleSubmit}\r\n                            onNoStartBlur={handleNoStartBlur}\r\n                            onIdStartBlur={handleIdStartBlur}\r\n                            handleHouseIdBlur={handleHouseIdBlur}\r\n                            showText={showTextOverTen}\r\n                        />\r\n                    }\r\n                </Fragment>}\r\n            </StepTwoView>\r\n            <AlertMessageSuper {...props} />\r\n            <Loading isShowLoading={isShowLoading} />\r\n        </Fragment>\r\n    )\r\n}\r\n\r\nconst selector = formValueSelector('StepTwo')\r\n\r\nconst mapStateToProps = state => ({\r\n    houseNumberRdc: state.houseNumberRdc,\r\n    StepTwoSelector: {\r\n        //Form House Under10\r\n        houseNum: selector(state, \"houseNum\"),\r\n        houseIdStart: selector(state, \"houseIdStart\"),\r\n        houseNoStart: selector(state, \"houseNoStart\"),\r\n        runHouseNo: selector(state, \"runHouseNo\"),\r\n        houseList: selector(state, \"houseList\"),\r\n        //Form House Over 10\r\n        noStart: selector(state, \"noStart\"),\r\n        noEnd: selector(state, \"noEnd\"),\r\n        idStart: selector(state, \"idStart\"),\r\n        idEnd: selector(state, \"idEnd\"),\r\n    },\r\n    initialValues: { ...state.houseNumberRdc.stepTwo, runHouseNo: state.houseNumberRdc.stepTwo.runHouseNo ? state.houseNumberRdc.stepTwo.runHouseNo : 1 },\r\n    authenRdc: state.authen,\r\n    _values: getFormValues('StepTwo')(state)\r\n})\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    houseNumberAction: bindActionCreators(HouseNumberAction, dispatch),\r\n    mapAction: bindActionCreators(MapAction, dispatch),\r\n    panelContentAction: bindActionCreators(PanelContentAction, dispatch),\r\n});\r\n\r\nconst reduxFormParameter = {\r\n    form: \"StepTwo\",\r\n    validate: stepTwoValidate,\r\n};\r\n\r\nconst enhance = compose(\r\n    connect(\r\n        mapStateToProps,\r\n        mapDispatchToProps,\r\n    ),\r\n    reduxForm(reduxFormParameter),\r\n    WithLoading\r\n)\r\n\r\nexport default WithAlertMessage(enhance(StepTwo))","import React from 'react';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { Scrollbars } from 'react-custom-scrollbars';\r\nimport BreadCrumb from '../../../../../../Controls/Containers/BreadCrumb';\r\nimport classnames from 'classnames';\r\n\r\n//import tooltip\r\nimport Tooltip from '../../../../../../Controls/Containers/Tooltip';\r\n\r\nconst FormSubmitPmrView = ({ classes, children, formStep, onClickAddStepTwo, onDraw, isActiveDraw, onEdit, isActiveEdit }) => {\r\n  const renderTitle = () => {\r\n    switch (formStep) {\r\n      case 1:\r\n        return <label>ข้อมูลการออกเลขรหัสบ้านหรือเลขที่บ้าน</label>;\r\n      case 2:\r\n        return <label>ข้อมูลการออกเลขรหัสบ้านหรือเลขที่บ้าน</label>;\r\n      default:\r\n        break;\r\n    }\r\n  };\r\n\r\n  return (\r\n    <Grid container className={classes.root}>\r\n      <Grid item xs={12} className={classes.header}>\r\n        <BreadCrumb stepActive={formStep} listStep={[1, 2]} />\r\n      </Grid>\r\n      <Grid item xs={12}>\r\n        <div className={classes.title}>{renderTitle()}</div>\r\n        <Grid container justify='flex-end' className={classes.rootBtnDraft}>\r\n          <Tooltip title='วาดตำแหน่งใหม่' placement='bottom'>\r\n            <div\r\n              onClick={onDraw}\r\n              className={classnames(\r\n                classes.btnManageGraphic,\r\n                { [classes.btnAreaNormal]: !isActiveDraw },\r\n                { [classes.btnAreaSelected]: isActiveDraw }\r\n              )}\r\n            />\r\n          </Tooltip>\r\n          <Tooltip title='แก้ไขตำแหน่ง' placement='bottom'>\r\n            <div\r\n              onClick={onEdit}\r\n              className={classnames(\r\n                classes.btnManageGraphic,\r\n                { [classes.btnEditNormal]: !isActiveEdit },\r\n                { [classes.btnEditSelected]: isActiveEdit }\r\n              )}\r\n            />\r\n          </Tooltip>\r\n        </Grid>\r\n      </Grid>\r\n      <Grid container wrap='nowrap' className={classes.rootBody}>\r\n        <Scrollbars autoHide>{children}</Scrollbars>\r\n      </Grid>\r\n    </Grid>\r\n  );\r\n};\r\n\r\nexport default withStyles((theme) => ({\r\n  root: {\r\n    width: '100%',\r\n    height: '100%',\r\n    marginTop: '10px',\r\n  },\r\n  header: {\r\n    height: '70px',\r\n  },\r\n  title: {\r\n    color: theme.mainTheme.color1,\r\n    textAlign: 'center',\r\n    fontSize: theme.textSize.title,\r\n  },\r\n  rootBody: {\r\n    // marginTop: '15px',\r\n    height: 'calc(100% - 160px)',\r\n    backgroundColor: '#f2f2f2',\r\n    [theme.breakpoints.down('sm')]: {\r\n      height: 'calc(100% - 173px)',\r\n    },\r\n  },\r\n  rootBtnDraft: {\r\n    height: '50px',\r\n    width: '100%',\r\n    marginTop: '15px',\r\n  },\r\n  btnManageGraphic: {\r\n    width: '40px',\r\n    minHeight: '40px',\r\n    margin: '5px',\r\n    display: 'block',\r\n    padding: 0,\r\n    backgroundSize: '40px 40px',\r\n    backgroundRepeat: 'no-repeat',\r\n    backgroundPosition: 'center',\r\n  },\r\n  btnAreaNormal: {\r\n    backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_add_normal@2x.png)`,\r\n    '&:Hover': {\r\n      backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_add_selected@2x.png)`,\r\n    },\r\n    cursor: 'pointer',\r\n  },\r\n  btnAreaSelected: {\r\n    backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_add_selected@2x.png)`,\r\n    cursor: 'pointer',\r\n  },\r\n  btnEditNormal: {\r\n    backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_edit_normal@2x.png)`,\r\n    '&:Hover': {\r\n      backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_edit_selected@2x.png)`,\r\n    },\r\n    cursor: 'pointer',\r\n  },\r\n  btnEditSelected: {\r\n    backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_edit_selected@2x.png)`,\r\n    cursor: 'pointer',\r\n  },\r\n}))(FormSubmitPmrView);\r\n","import { withStyles } from '@material-ui/styles';\r\nimport React, { Fragment } from 'react';\r\nimport { Field } from 'redux-form';\r\nimport TextFieldRedux from '../../../../../../../Controls/Containers/TextFieldRedux';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { BTN } from '../../../../../../../Constants/Constants';\r\nimport Button from '../../../../../../../Controls/Containers/Button';\r\n\r\nconst HouseNumberFormMarkPointView = ({ classes, handleSubmit, onSubmit, onClickCancel }) => {\r\n  return (\r\n    <Fragment>\r\n      <div className={classes.root}>\r\n        <form onSubmit={handleSubmit(onSubmit)}>\r\n          <Field name='permitNo' label='เลขที่ใบอนุญาต' placeholder='กรุณากรอกเลขที่ใบอนุญาต' component={TextFieldRedux} required />\r\n          <Field name='houseNo' label='เลขที่บ้าน' placeholder='กรุณากรอกเลขที่บ้าน' component={TextFieldRedux} required />\r\n          <Field name='houseCode' label='รหัสประจำบ้าน' placeholder='กรุณากรอกรหัสประจำบ้าน' component={TextFieldRedux} required />\r\n          <Field name='remark' label='หมายเหตุ' placeholder='กรุณากรอกหมายเหตุ' component={TextFieldRedux} required />\r\n          <Grid container justify='center' spacing={24} className={classes.footer}>\r\n            <Grid item>\r\n              <Button label={BTN.TH.CANCEL} onClick={onClickCancel} />\r\n            </Grid>\r\n            <Grid item>\r\n              <Button type='submit' label={BTN.TH.SEARCH} />\r\n            </Grid>\r\n          </Grid>\r\n        </form>\r\n      </div>\r\n    </Fragment>\r\n  );\r\n};\r\n\r\nexport default withStyles((theme) => ({\r\n  root: {\r\n    padding: '8px',\r\n  },\r\n}))(HouseNumberFormMarkPointView);\r\n","//สถิติผู้เข้าใช้งาน\r\nimport React, { useState } from 'react';\r\nimport { compose } from 'recompose';\r\nimport { reduxForm, SubmissionError } from 'redux-form';\r\n\r\n//import step\r\nimport StepOne from './HouseNumberFormStep/StepOne';\r\nimport StepTwo from './HouseNumberFormStep/StepTwo/StepTwo';\r\n\r\n//import view\r\nimport HouseNumberFormStepView from '../../../../../../Presentationals/Web/Panel/Menu/MenuContent/HouseNumber/HouseNumberFormStepView';\r\nimport HouseNumberFormMarkPoint from './HouseNumberFormMarkPoint/HouseNumberFormMarkPoint';\r\nimport { isEmptyObj } from '../../../../../../Utilities/Utils';\r\n\r\nconst HouseNumberFormStep = ({\r\n  onClickBack,\r\n  stepPass,\r\n  submitUpdate,\r\n  isNotBKK,\r\n  isBKKFn,\r\n  isUpdate,\r\n  onDraw,\r\n  isActiveDraw,\r\n  onEdit,\r\n  isActiveEdit,\r\n  districtIdForHouseId,\r\n  handleSubmit,\r\n  reset,\r\n}) => {\r\n  const [formStep, setFormStep] = useState(1);\r\n\r\n  const handleChangeStep = (step) => {\r\n    setFormStep(step);\r\n    if (step === 2 && stepPass) {\r\n      stepPass();\r\n    }\r\n  };\r\n\r\n  const handleChangeStepBack = () => {\r\n    setFormStep(formStep - 1);\r\n  };\r\n\r\n  const renderFormStep = () => {\r\n    switch (formStep) {\r\n      case 1:\r\n        return <StepOne onChangeStep={handleChangeStep} onClickBack={onClickBack} isUpdate={isUpdate} />;\r\n      case 2:\r\n        return (\r\n          <StepTwo\r\n            onChangeStep={handleChangeStep}\r\n            isNotBKK={isNotBKK}\r\n            alertOutOfBKKFn={isBKKFn}\r\n            onClickBack={onClickBack}\r\n            handleChangeStepBack={handleChangeStepBack}\r\n            submitUpdate={submitUpdate}\r\n            districtIdForHouseId={districtIdForHouseId}\r\n          />\r\n        );\r\n      default:\r\n        break;\r\n    }\r\n  };\r\n\r\n  const onSubmit = (value) => {\r\n    validateForm(value);\r\n  };\r\n\r\n  const validateForm = (value) => {\r\n    const errors = {};\r\n    if (!value.permitNo) {\r\n      errors.permitNo = 'กรุณากรอกรหัสประจำบ้าน';\r\n    }\r\n    if (!value.houseNo) {\r\n      errors.houseNo = 'กรุณากรอกหมายเลขบ้าน';\r\n    }\r\n    if (!value.houseCode) {\r\n      errors.houseCode = 'กรุณากรอกรหัสประจำบ้าน';\r\n    }\r\n    if (!value.remark) {\r\n      errors.remark = 'กรุณากรอกหมายเหตุ';\r\n    }\r\n    if (!isEmptyObj(errors)) {\r\n      throw new SubmissionError(errors);\r\n    } else {\r\n      return;\r\n    }\r\n  };\r\n\r\n  const onClickCancel = () => {\r\n    reset();\r\n  };\r\n\r\n  return (\r\n    <HouseNumberFormStepView formStep={formStep} onEdit={onEdit} onDraw={onDraw} isActiveDraw={isActiveDraw} isActiveEdit={isActiveEdit}>\r\n      {renderFormStep()}\r\n      {/* <HouseNumberFormMarkPoint handleSubmit={handleSubmit} onSubmit={onSubmit} onClickCancel={onClickCancel} /> */}\r\n    </HouseNumberFormStepView>\r\n  );\r\n};\r\n\r\nconst formName = 'HouseNumberFormStep';\r\nconst reduxFormParameter = {\r\n  form: formName,\r\n};\r\n\r\nexport default compose(reduxForm(reduxFormParameter))(HouseNumberFormStep);\r\n","import React, { Component } from 'react';\r\nimport HouseNumberFormMarkPointView from './HouseNumberFormMarkPointView';\r\n\r\nclass HouseNumberFormMarkPoint extends Component {\r\n  constructor() {\r\n    super();\r\n  }\r\n\r\n  render() {\r\n    const { handleSubmit, onSubmit, onClickCancel } = this.props;\r\n    return <HouseNumberFormMarkPointView handleSubmit={handleSubmit} onSubmit={onSubmit} onClickCancel={onClickCancel} />;\r\n  }\r\n}\r\n\r\nexport default HouseNumberFormMarkPoint;\r\n","import React, { Component, Fragment } from \"react\";\r\nimport { connect } from \"react-redux\";\r\nimport { bindActionCreators } from \"redux\";\r\nimport { isDirty } from \"redux-form\";\r\nimport { compose } from \"recompose\";\r\n//import component\r\nimport HouseNumberView from \"../../../../../../Presentationals/Web/Panel/Menu/MenuContent/HouseNumber/HouseNumberView\";\r\nimport MenuListModeView from \"../../../../../../Presentationals/Web/Panel/Menu/MenuContent/HouseNumber/MenuListModeView\";\r\nimport HouseNumberFormStep from \"./HouseNumberFormStep\";\r\nimport WithAlertMessage from \"../../../../../../HOC/WithAlertMessage\";\r\nimport AlertMessage from \"../../../../../../Controls/Containers/AlertMessage\";\r\nimport withWidth from \"@material-ui/core/withWidth\";\r\nimport WithLoading from \"../../../../../../HOC/WithLoading\";\r\n//import constants\r\nimport {\r\n  MENU_HOUSENUMBER,\r\n  ALERT_MESSAGE,\r\n  ACTIVE_FUNCTION,\r\n} from \"../../../../../../Constants/Constants\";\r\n\r\n//import actions\r\nimport * as MapFunctions from \"../../../../../../Map/MapFunctions\";\r\nimport * as MapAction from \"../../../../../../Actions/Web/Maps/MapAction\";\r\nimport * as PanelContentAction from \"../../../../../../Actions/Web/Panel/PanelContentAction\";\r\nimport * as HouseNumberAction from \"../../../../../../Actions/Web/Panel/HouseNumberAction\";\r\nimport * as MenuAction from \"../../../../../../Actions/Web/MenuAction\";\r\n\r\nconst LIST_MENU = Object.keys(MENU_HOUSENUMBER).map((key) => ({\r\n  id: MENU_HOUSENUMBER[key].id,\r\n  name: MENU_HOUSENUMBER[key].name,\r\n  isActive: false,\r\n}));\r\n\r\nclass HouseNumber extends Component {\r\n  constructor() {\r\n    super();\r\n    this.state = {\r\n      listMenu: LIST_MENU,\r\n      isOpenForm: false,\r\n      dirty: false,\r\n      subDistrictID: null,\r\n      districtID: null,\r\n      isNotBKK: false,\r\n      // isActiveDraw: false,\r\n      // isActiveEdit: false,\r\n      graphic: null,\r\n      districtIdForHouseId: null,\r\n    };\r\n  }\r\n\r\n  manageModeDisplay = (id) => {\r\n    const { listMenu } = this.state;\r\n\r\n    const tmpListMode = listMenu.map((itm, ind) => {\r\n      if (itm.id === id) {\r\n        return { ...itm, isActive: !itm.isActive };\r\n      } else {\r\n        return { ...itm, isActive: false };\r\n      }\r\n    });\r\n\r\n    this.setState({\r\n      listMenu: tmpListMode,\r\n    });\r\n  };\r\n\r\n  handleMenuItemClick = (itm) => async (evt) => {\r\n    const { menuRdc, menuAction, mapAction } = this.props;\r\n\r\n    this.manageModeDisplay(itm.id);\r\n    if (menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM) {\r\n      await menuAction.activeFunction(null);\r\n      await mapAction.bindMapCommand(\r\n        MapFunctions.clearGraphicConstructionLicense\r\n      );\r\n    }\r\n\r\n    switch (itm.id) {\r\n      case MENU_HOUSENUMBER.clickMap.id:\r\n        const isActive = menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM;\r\n        this.manageClickMap(!isActive);\r\n        // this.manageClickMap(!itm.isActive)\r\n        break;\r\n      case MENU_HOUSENUMBER.currentLocation.id:\r\n        this.manageCurrentLocation();\r\n        break;\r\n      default:\r\n        break;\r\n    }\r\n  };\r\n\r\n  manageClickMap = async (isActive) => {\r\n    const { mapAction, showAlert, menuAction } = this.props;\r\n\r\n    if (isActive) {\r\n      menuAction.activeFunction(ACTIVE_FUNCTION.ADD_GP_FORM);\r\n      setTimeout(() => {\r\n        // set timeout เพื่อแก้ปัญหา willunmount ของ maptool clear event draw\r\n        mapAction.bindMapCommand(MapFunctions.drawPointConstructionLicense, {\r\n          callback: this.callBackDrawGraphic,\r\n          showAlert: showAlert,\r\n        });\r\n      }, 50);\r\n      this.managePanelForMobile(true, \"ClickMap\");\r\n    }\r\n  };\r\n\r\n  managePanelForMobile = async (isDraw, func) => {\r\n    const { menuAction, width } = this.props;\r\n    if (width === \"sm\" || width === \"xs\") {\r\n      switch (func) {\r\n        case \"ClickMap\":\r\n          if (isDraw) {\r\n            await menuAction.closeMenuPanel();\r\n            await menuAction.openMenuMap();\r\n          } else {\r\n            await menuAction.openMenuPanel();\r\n            await menuAction.closeMenuMap();\r\n          }\r\n          break;\r\n        default:\r\n          break;\r\n      }\r\n    }\r\n  };\r\n\r\n  handleClickDrawGraphic = async () => {\r\n    const { mapAction, menuAction, menuRdc } = this.props;\r\n\r\n    if (menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM) {\r\n      menuAction.activeFunction(null);\r\n      mapAction.bindMapCommand(MapFunctions.deActivateConstruct);\r\n    } else {\r\n      menuRdc.ActiveFunction === ACTIVE_FUNCTION.EDIT_GP_FORM &&\r\n        mapAction.bindMapCommand(MapFunctions.clearEditConstruct);\r\n      menuAction.activeFunction(ACTIVE_FUNCTION.ADD_GP_FORM);\r\n      this.managePanelForMobile(true);\r\n      this.manageClickMap(true);\r\n    }\r\n  };\r\n\r\n  callCheckBetweenFormWork = (geometry) => {\r\n    const { mapAction, showAlert } = this.props;\r\n    geometry &&\r\n      mapAction.bindMapCommand(MapFunctions.checkPermissionPointOnMap, {\r\n        geometry,\r\n        callback: (isPermission) => {\r\n          !isPermission &&\r\n            showAlert({ altMsg: ALERT_MESSAGE.POPUP.POINT_OUT_OF_PERMISSION });\r\n        },\r\n      });\r\n  };\r\n\r\n  editOutOfBKK = () => {\r\n    this.managePanelForMobile(true);\r\n    this.manageClickMap(true);\r\n  };\r\n\r\n  handleClickEditGraphic = async () => {\r\n    const { graphic } = this.state;\r\n    const { mapAction, showAlert, menuAction, menuRdc } = this.props;\r\n    if (graphic) {\r\n      if (menuRdc.ActiveFunction === ACTIVE_FUNCTION.EDIT_GP_FORM) {\r\n        menuAction.activeFunction(null);\r\n        mapAction.bindMapCommand(MapFunctions.clearEditConstruct);\r\n      } else {\r\n        menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM &&\r\n          mapAction.bindMapCommand(MapFunctions.deActivateConstruct);\r\n        menuAction.activeFunction(ACTIVE_FUNCTION.EDIT_GP_FORM);\r\n        this.managePanelForMobile(true);\r\n        mapAction.bindMapCommand(MapFunctions.editGraphicConstructionLicense, {\r\n          graphic,\r\n          callback: this.callbackEditGrphic,\r\n          showAlert,\r\n          callbackEditFail: this.editOutOfBKK,\r\n        });\r\n      }\r\n    } else {\r\n      showAlert({ altMsg: ALERT_MESSAGE.POPUP.REQUEST_PIN_MAP });\r\n    }\r\n  };\r\n\r\n  callbackEditGrphic = (geometry, graphic) => {\r\n    const { mapAction } = this.props;\r\n    this.setState({ graphic: graphic });\r\n    geometry &&\r\n      mapAction.bindMapCommand(\r\n        MapFunctions.getDistrictAndSubDistrictFormPoint,\r\n        {\r\n          // save sub-district code\r\n          geometry: geometry,\r\n          callbackFn: this.callbackGetDistrictAndSubDistrict,\r\n        }\r\n      );\r\n    geometry && this.callCheckBetweenFormWork(geometry);\r\n  };\r\n\r\n  callBackDrawGraphic = async (evt, graphic) => {\r\n    this.setState({\r\n      isOpenForm: true,\r\n      graphic: graphic,\r\n    });\r\n\r\n    if (evt) {\r\n      const { mapAction, menuAction } = this.props;\r\n      await mapAction.bindClearMapCommand();\r\n      this.managePanelForMobile(false, \"ClickMap\");\r\n\r\n      menuAction.activeFunction(null);\r\n      await mapAction.bindMapCommand(\r\n        MapFunctions.getDistrictAndSubDistrictFormPoint,\r\n        {\r\n          // save sub-district code\r\n          geometry: evt.geometry,\r\n          callbackFn: this.callbackGetDistrictAndSubDistrict,\r\n        }\r\n      );\r\n      await this.callCheckBetweenFormWork(evt.geometry);\r\n    }\r\n  };\r\n\r\n  callbackEdit = (geometry) => {\r\n    const { mapAction } = this.props;\r\n    if (geometry) {\r\n      mapAction.bindMapCommand(\r\n        MapFunctions.getDistrictAndSubDistrictFormPoint,\r\n        {\r\n          geometry: geometry,\r\n          callbackFn: this.callbackGetDistrictAndSubDistrict,\r\n        }\r\n      );\r\n    }\r\n  };\r\n\r\n  callbackGetDistrictAndSubDistrict = (values, geometry) => {\r\n    const { houseNumberAction } = this.props;\r\n    const { districtIdForHouseId } = this.state;\r\n    houseNumberAction.saveGeometry(geometry);\r\n    if (values) {\r\n      const { houseNumberAction } = this.props;\r\n      const { SUBDISTRICT_ID, DISTRICT_ID } = values;\r\n      if (!districtIdForHouseId) {\r\n        this.setState({ districtIdForHouseId: DISTRICT_ID });\r\n      }\r\n      const subDistrictCode = SUBDISTRICT_ID; //SUBDISTRICT_ID.slice(SUBDISTRICT_ID.length - 2, SUBDISTRICT_ID.length);\r\n      const districtCode = DISTRICT_ID; //DISTRICT_ID.slice(DISTRICT_ID.length - 2, DISTRICT_ID.length)\r\n      this.setState({\r\n        subDistrictID: subDistrictCode,\r\n        districtID: districtCode,\r\n        isNotBKK: false,\r\n      });\r\n      houseNumberAction.saveDistrictAndSubDistrict({\r\n        districtID: districtCode,\r\n        subDistrictID: subDistrictCode,\r\n      });\r\n    } else {\r\n      this.setState({ isNotBKK: true });\r\n      this.isBKKAlert();\r\n    }\r\n  };\r\n\r\n  manageCurrentLocation = () => {\r\n    const { mapAction } = this.props;\r\n\r\n    mapAction.bindMapCommand(MapFunctions.currentLocationConstructionLicense, {\r\n      callback: this.callBackDrawGraphic,\r\n    });\r\n  };\r\n\r\n  handleClickBack = async (dirty) => {\r\n    const {\r\n      panelContentAction,\r\n      mapAction,\r\n      showAlert,\r\n      houseNumberAction,\r\n      menuAction,\r\n    } = this.props;\r\n    const { isOpenForm } = this.state;\r\n\r\n    if ((isOpenForm && dirty) || this.state.dirty || this.props.dirtyOne) {\r\n      showAlert({\r\n        altMsg: ALERT_MESSAGE.QUESTION.CANCEL_FORM,\r\n        altType: 2,\r\n        callbackConfirm: this.handleCloseForm,\r\n        callbackCancel: this.handleCloseConfirm,\r\n      });\r\n    } else {\r\n      menuAction.activeFunction(null);\r\n      panelContentAction.setCurrentPage();\r\n      houseNumberAction.clearFormStep();\r\n      await mapAction.bindMapCommand(MapFunctions.clearGraphicHouseNumber);\r\n      await mapAction.bindClearMapCommand();\r\n    }\r\n  };\r\n\r\n  handleCloseConfirm = () => {\r\n    const { hideAlert } = this.props;\r\n\r\n    hideAlert();\r\n  };\r\n\r\n  handleCloseForm = () => {\r\n    const {\r\n      houseNumberAction,\r\n      mapAction,\r\n      hideAlert,\r\n      panelContentAction,\r\n      menuAction,\r\n    } = this.props;\r\n\r\n    const listMode = this.state.listMenu.map((itm) => ({\r\n      ...itm,\r\n      isActive: false,\r\n    }));\r\n    this.setState({\r\n      isOpenForm: false,\r\n      listMode: listMode,\r\n    });\r\n    menuAction.activeFunction(null);\r\n    panelContentAction.setCurrentPage();\r\n    houseNumberAction.clearFormStep();\r\n    mapAction.bindMapCommand(MapFunctions.clearGraphicHouseNumber);\r\n    hideAlert();\r\n  };\r\n\r\n  stepOnePass = () => {\r\n    const { dirtyOne } = this.props;\r\n    if (dirtyOne) {\r\n      this.setState({\r\n        dirty: true,\r\n      });\r\n    }\r\n  };\r\n\r\n  isBKKAlert = () => {\r\n    const { showAlert } = this.props;\r\n    showAlert({\r\n      altMsg: ALERT_MESSAGE.POPUP.OUT_OF_BKK,\r\n      altType: 1,\r\n      callbackClose: this.handleCloseConfirm,\r\n    });\r\n  };\r\n\r\n  renderChildren = () => {\r\n    const { isOpenForm, listMenu, isNotBKK, districtIdForHouseId } = this.state;\r\n    const { menuRdc } = this.props;\r\n\r\n    if (isOpenForm) {\r\n      return (\r\n        <HouseNumberFormStep\r\n          onClickBack={this.handleClickBack}\r\n          stepPass={this.stepOnePass}\r\n          isNotBKK={isNotBKK}\r\n          isBKKFn={this.isBKKAlert}\r\n          isUpdate={false}\r\n          onEdit={this.handleClickEditGraphic}\r\n          onDraw={this.handleClickDrawGraphic}\r\n          isActiveDraw={menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM}\r\n          isActiveEdit={menuRdc.ActiveFunction === ACTIVE_FUNCTION.EDIT_GP_FORM}\r\n          districtIdForHouseId={districtIdForHouseId}\r\n        />\r\n      );\r\n    } else {\r\n      return (\r\n        <MenuListModeView\r\n          listMode={listMenu}\r\n          onMenuItemClick={this.handleMenuItemClick}\r\n          callBackDrawGraphic={this.callBackDrawGraphic}\r\n          isActiveDraw={menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM}\r\n        />\r\n      );\r\n    }\r\n  };\r\n\r\n  render() {\r\n    const {\r\n      title,\r\n      altTitle,\r\n      altMsg,\r\n      altType,\r\n      isShowAlt,\r\n      callbackConfirm,\r\n      callbackCancel,\r\n    } = this.props;\r\n\r\n    return (\r\n      <Fragment>\r\n        <HouseNumberView\r\n          title={title}\r\n          onClickBack={() => this.handleClickBack()}\r\n        >\r\n          {this.renderChildren()}\r\n        </HouseNumberView>\r\n        <AlertMessage\r\n          title={altTitle}\r\n          text={altMsg}\r\n          type={altType}\r\n          showAlert={isShowAlt}\r\n          onSubmit={callbackConfirm}\r\n          onCancel={callbackCancel}\r\n        />\r\n      </Fragment>\r\n    );\r\n  }\r\n}\r\n\r\nconst mapStateToProps = (state) => ({\r\n  dirtyOne: isDirty(\"StepOne\")(state),\r\n  menuRdc: state.menu,\r\n});\r\n\r\nconst mapDispatchToProp = (dispatch) => ({\r\n  mapAction: bindActionCreators(MapAction, dispatch),\r\n  panelContentAction: bindActionCreators(PanelContentAction, dispatch),\r\n  houseNumberAction: bindActionCreators(HouseNumberAction, dispatch),\r\n  menuAction: bindActionCreators(MenuAction, dispatch),\r\n});\r\n\r\nconst enhance = compose(\r\n  connect(\r\n    mapStateToProps,\r\n    mapDispatchToProp\r\n  ),\r\n  withWidth(), //จะได้ props width มา,\r\n  WithLoading\r\n);\r\n\r\nexport default WithAlertMessage(enhance(HouseNumber));\r\n\r\n// export default WithAlertMessage(\r\n//   connect(\r\n//     mapStateToProps,\r\n//     mapDispatchToProp\r\n//   )(HouseNumber)\r\n// );\r\n","import React, { Fragment } from 'react'\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport AppBarHeaderView from '../../../AppBarHeaderView';\r\n\r\nconst SearchHouseNumberView = (props) => {\r\n    const { classes, children, onClickBack ,title} = props;\r\n\r\n    return (\r\n        <Fragment>\r\n            <Grid container className={classes.root}>\r\n                <AppBarHeaderView\r\n                    title={title}\r\n                    onClickBack={onClickBack}\r\n                />\r\n                <Grid item xs={12} className={classes.body} >\r\n                    {children}\r\n                </Grid>\r\n            </Grid>\r\n        </Fragment>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        height: '100%',\r\n    },\r\n    body: {\r\n        height: 'calc(100% - 45px)',\r\n    }\r\n}))(SearchHouseNumberView)","import React, { Fragment } from 'react';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport { Field } from 'redux-form';\r\nimport TextFieldRedux from '../../../../../../Controls/Containers/TextFieldRedux';\r\nimport SelectFieldRedux from '../../../../../../Controls/Containers/SelectFieldRedux';\r\nimport Button from '../../../../../../Controls/Containers/Button';\r\nimport { BTN } from '../../../../../../Constants/Constants';\r\n\r\nconst SearchHouseNumberFormView = (props) => {\r\n  const { classes, isActiveSpatialSearch, luDistrict = [], luSubDistrict = [], onChangeAdminPoly, onSubmit, onCancel, onSpatialSearchHouse } = props;\r\n\r\n  return (\r\n    <Fragment>\r\n      <Grid container className={classes.root}>\r\n        <Field name='TRrequest' label={'เลขที่คำขอ ทร.900'} component={TextFieldRedux} />\r\n        <Field\r\n          name='district'\r\n          label={'เขต'}\r\n          component={SelectFieldRedux}\r\n          onChangeValue={onChangeAdminPoly('district')}\r\n          data={luDistrict}\r\n          keyData={{ value: 'value', label: 'name' }}\r\n          val={0}\r\n        />\r\n        <Field\r\n          name='subDistrict'\r\n          label={'แขวง'}\r\n          component={SelectFieldRedux}\r\n          onChangeValue={onChangeAdminPoly('subDistrict')}\r\n          data={luSubDistrict}\r\n          keyData={{ value: 'value', label: 'name' }}\r\n          val={0}\r\n        />\r\n        <Field name='permitNo' label={'เลขที่ใบอนุญาต'} component={TextFieldRedux} />\r\n\r\n        <Grid container justify='center' spacing={24} className={classes.footer}>\r\n          <Grid item>\r\n            <Button label={BTN.TH.CANCEL} onClick={onCancel} />\r\n          </Grid>\r\n          <Grid item>\r\n            <Button type='submit' label={BTN.TH.SEARCH} onClick={onSubmit} />\r\n          </Grid>\r\n\r\n          <Grid item>\r\n            <Button\r\n              label='เลือกบนแผนที่'\r\n              // label={BTN.TH.SEARCH}\r\n              color={isActiveSpatialSearch ? 'black' : 'green'}\r\n              onClick={onSpatialSearchHouse}\r\n            />\r\n          </Grid>\r\n        </Grid>\r\n      </Grid>\r\n    </Fragment>\r\n  );\r\n};\r\n\r\nexport default withStyles((theme) => ({\r\n  root: {\r\n    padding: '10px',\r\n  },\r\n  body: {\r\n    height: 'calc(100% - 45px)',\r\n  },\r\n  containnerRow: {\r\n    height: '50px',\r\n    width: '100%',\r\n    marginBottom: '15px',\r\n  },\r\n  labelText: {\r\n    display: 'flex',\r\n    // justifyContent: 'center',\r\n    alignItems: 'center',\r\n  },\r\n  asterisk: {\r\n    color: 'red',\r\n  },\r\n  footer: {\r\n    marginTop: '10px',\r\n    marginBottom: '10px',\r\n  },\r\n}))(SearchHouseNumberFormView);\r\n","import React from 'react';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport ListItem from '@material-ui/core/ListItem';\r\nimport DeleteIcon from '@material-ui/icons/Delete';\r\nimport EditIcon from '@material-ui/icons/Edit';\r\nimport IconButton from '@material-ui/core/IconButton';\r\nimport { Scrollbars } from 'react-custom-scrollbars';\r\nimport * as DateTimeUtil from '../../../../../../Utilities/DateTimeUtil';\r\n//import Tooltip\r\nimport Tooltip from '../../../../../../Controls/Containers/Tooltip';\r\n\r\nconst ListResult = ({ classes, result, onClickListResult, onEdit, onDelete, isOnlySearch }) => {\r\n  if (!result || result == []) {\r\n    return <div className={classes.div_noData}>ไม่พบข้อมูล</div>;\r\n  }\r\n\r\n  return (\r\n    <Grid container className={classes.result}>\r\n      {result.map((itm, ind) => (\r\n        <ListItem\r\n          key={`result-${ind}`}\r\n          button\r\n          divider={true}\r\n          className={classes.menu_item}\r\n          classes={{ gutters: classes.guttersItem }}\r\n          onClick={() => onClickListResult(itm)}\r\n        >\r\n          <Grid container justify='space-between'>\r\n            <Grid item className={classes.containerTxtResult}>\r\n              <label className={classes.txtResult}>{`เลขทร.900 : ${itm.houseTRID}`}</label>\r\n              <br />\r\n              <label className={classes.txtResult}>{`เลขที่ใบอนุญาต :  ${itm.permissionID || '-'}`}</label>\r\n              <br />\r\n              <label className={classes.txtResult}>{`วันที่ :  ${itm.regDate &&\r\n                DateTimeUtil.convertDateTimeToDisplayDate(itm.regDate, 'd MMM yyyy')}`}</label>\r\n            </Grid>\r\n            {!isOnlySearch && itm.editPermission && (\r\n              <Grid item>\r\n                <Tooltip title='แก้ไข' placement='bottom'>\r\n                  <IconButton className={classes.iconButton} onClick={(evt) => onEdit(itm, evt)}>\r\n                    <EditIcon className={classes.icon} />\r\n                  </IconButton>\r\n                </Tooltip>\r\n                <Tooltip title='ลบ' placement='bottom'>\r\n                  <IconButton className={classes.iconButton} onClick={(evt) => onDelete(itm, evt)}>\r\n                    <DeleteIcon className={classes.icon} />\r\n                  </IconButton>\r\n                </Tooltip>\r\n              </Grid>\r\n            )}\r\n          </Grid>\r\n        </ListItem>\r\n      ))}\r\n    </Grid>\r\n  );\r\n};\r\n\r\nconst SearchHouseNumberResultView = (props) => {\r\n  const { result, classes, onClickItem, onEdit, onDelete, isOnlySearch } = props;\r\n\r\n  return (\r\n    <Grid container className={classes.root}>\r\n      <Grid item xs={12} className={classes.header}>\r\n        {`พบผลลัพธ์จำนวน ${result ? result.length.toLocaleString() : 0} รายการ`}\r\n      </Grid>\r\n      <Grid item xs={12} className={classes.rootResult}>\r\n        <Scrollbars autoHide>\r\n          <ListResult\r\n            classes={classes}\r\n            result={result}\r\n            // from={from}\r\n            onClickListResult={onClickItem}\r\n            onEdit={onEdit}\r\n            onDelete={onDelete}\r\n            isOnlySearch={isOnlySearch}\r\n          />\r\n        </Scrollbars>\r\n      </Grid>\r\n    </Grid>\r\n  );\r\n};\r\n\r\nexport default withStyles((theme) => ({\r\n  root: {\r\n    width: '100%',\r\n    height: 'calc(100% - 346px)',\r\n  },\r\n  rootResult: {\r\n    height: 'calc(100% - 25px)',\r\n  },\r\n  result: {\r\n    marginBottom: '0px',\r\n    [theme.breakpoints.down('sm')]: {\r\n      marginBottom: '20px',\r\n    },\r\n  },\r\n  header: {\r\n    height: '25px',\r\n    lineHeight: '25px',\r\n    width: '100%',\r\n    backgroundColor: theme.mainTheme.color3,\r\n    color: theme.mainTheme.color2,\r\n    textAlign: 'center',\r\n    fontSize: theme.textSize.subtitle,\r\n  },\r\n  div_noData: {\r\n    width: '100%',\r\n    padding: '18px',\r\n  },\r\n  menu_item: {\r\n    paddingRight: 0,\r\n    '&:focus': {\r\n      backgroundColor: theme.mainTheme.color2,\r\n    },\r\n    '&:hover': {\r\n      backgroundColor: theme.mainTheme.colorAH.colorHover,\r\n      color: theme.mainTheme.colorAH.colorTextHover,\r\n    },\r\n  },\r\n  txtResult: {\r\n    fontSize: '14px',\r\n    margin: '0px',\r\n    lineHeight: '24px',\r\n  },\r\n  containerTxtResult: {\r\n    maxWidth: 'calc(100% - 70px)',\r\n    textOverflow: 'ellipsis',\r\n    whiteSpace: 'nowrap',\r\n    overflow: 'hidden',\r\n  },\r\n  iconButton: {\r\n    height: '35px',\r\n    width: '35px',\r\n    marginTop: '6px',\r\n  },\r\n  icon: {\r\n    marginTop: '-6px',\r\n  },\r\n  guttersItem: {\r\n    padding: '5px 10px',\r\n    [theme.breakpoints.down('sm')]: {\r\n      [`& input`]: {\r\n        padding: '5px 20px',\r\n      },\r\n    },\r\n  },\r\n}))(SearchHouseNumberResultView);\r\n","import React from 'react';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport BreadCrumb from '../../../../../../../Controls/Containers/BreadCrumb';\r\nimport { Scrollbars } from 'react-custom-scrollbars';\r\n\r\nconst DetailHouseNoView = ({\r\n    classes,\r\n    children,\r\n    formStep,\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root}>\r\n            <Grid item xs={12} className={classes.header}>\r\n                <BreadCrumb\r\n                    stepActive={formStep}\r\n                    listStep={[1, 2]}\r\n                />\r\n            </Grid>\r\n            <Grid item xs={12}>\r\n                <div className={classes.title}>\r\n                    <label>ข้อมูลการออกเลขรหัสบ้านหรือเลขที่บ้าน</label>\r\n                </div>\r\n            </Grid>\r\n            <Grid item xs={12} className={classes.body}>\r\n                <Scrollbars autoHide>\r\n                    {children}\r\n                </Scrollbars>\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        height: '100%',\r\n    },\r\n    header: {\r\n        height: '70px',\r\n    },\r\n    title: {\r\n        color: theme.mainTheme.color1,\r\n        textAlign: 'center',\r\n        fontSize: theme.textSize.title,\r\n        marginBottom: '15px',\r\n        marginTop: '10px'\r\n    },\r\n    btnRightTitle: {\r\n        position: 'absolute',\r\n        right: '10px',\r\n        top: '118px',\r\n        width: '40px',\r\n        height: '40px'\r\n    },\r\n    body: {\r\n        height: 'calc(100% - 120px)',\r\n        backgroundColor: '#f2f2f2'\r\n    }\r\n}))(DetailHouseNoView)","import React, { Fragment } from 'react'\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport Button from '../../../../../../../Controls/Containers/Button';\r\nimport { convertDateTimeToDisplayDate } from '../../../../../../../Utilities/DateTimeUtil';\r\nconst RowDeail = ({\r\n    classes,\r\n    label,\r\n    value,\r\n    unit\r\n}) => (\r\n        <Grid container className={classes.row}>\r\n            <Grid item xs={5} className={classes.colLabel} >\r\n                {label}\r\n            </Grid>\r\n            {unit ? (<Fragment> <Grid item xs={4}> {value}</Grid><Grid item xs={3}>{unit}</Grid></Fragment>) : (< Grid item xs={7}> {value} </Grid>)}\r\n        </Grid>\r\n    )\r\n\r\nconst DetailHouseNoStepOneView = ({\r\n    classes,\r\n    detailHouseNo,\r\n    onChangeStep,\r\n    onClickCancel\r\n}) => {\r\n    // console.log('detail house no', detailHouseNo)\r\n        return (\r\n            <Grid container className={classes.root}>\r\n                <RowDeail\r\n                    classes={classes}\r\n                    label=\"เลขที่ใบอนุญาต(อ.1) หรือ (ยผ).4)\"\r\n                    value={detailHouseNo && detailHouseNo.stepOne && detailHouseNo.stepOne.permissionid}\r\n                />\r\n                <RowDeail\r\n                    classes={classes}\r\n                    label=\"เลขที่คำขอ ทร.900\"\r\n                    value={detailHouseNo && detailHouseNo.stepOne && detailHouseNo.stepOne.TRrequest}\r\n                />\r\n                <RowDeail\r\n                    classes={classes}\r\n                    label=\"วันที่รับเอกสารของทะเบียน\"\r\n                    value={detailHouseNo && detailHouseNo.stepOne && detailHouseNo.stepOne.regDate ? convertDateTimeToDisplayDate(detailHouseNo.stepOne.regDate, \"d MMMM yyyy\"):' ' }\r\n                />\r\n                <RowDeail\r\n                    classes={classes}\r\n                    label=\"ชื่อผู้ยื่นคำขอ\"\r\n                    value={detailHouseNo && detailHouseNo.stepOne && detailHouseNo.stepOne.applicantName}\r\n                />\r\n                <RowDeail\r\n                    classes={classes}\r\n                    label=\"เบอร์โทรผู้ยื่นคำขอ\"\r\n                    value={detailHouseNo && detailHouseNo.stepOne && detailHouseNo.stepOne.applicantTelNo}\r\n                />\r\n                <RowDeail\r\n                    classes={classes}\r\n                    label=\"เจ้าของบ้าน\"\r\n                    value={detailHouseNo && detailHouseNo.stepOne && detailHouseNo.stepOne.ownerName}\r\n                />\r\n                <RowDeail\r\n                    classes={classes}\r\n                    label=\"ประเภทบ้าน\"\r\n                    value={detailHouseNo && detailHouseNo.stepOne && detailHouseNo.stepOne.houseTypeDes}\r\n                /> \r\n                {detailHouseNo && detailHouseNo.stepOne && detailHouseNo.stepOne.houseTypeDetail && \r\n                    <RowDeail\r\n                        classes={classes}\r\n                        label=\" \"\r\n                        value={detailHouseNo.stepOne.houseTypeDetail}\r\n                    /> \r\n                }\r\n                <RowDeail\r\n                    classes={classes}\r\n                    label=\"ลักษณะบ้าน\"\r\n                    value={detailHouseNo && detailHouseNo.stepOne && detailHouseNo.stepOne.houseMatName}\r\n                />\r\n                <RowDeail\r\n                    classes={classes}\r\n                    label=\"จำนวนชั้น(เฉพาะที่สูงสุด)\"\r\n                    value={detailHouseNo && detailHouseNo.stepOne && detailHouseNo.stepOne.numFloor}\r\n                />\r\n                <RowDeail\r\n                    classes={classes}\r\n                    label=\"พื้นที่รวมทุกอาคาร\"\r\n                    value={detailHouseNo && detailHouseNo.stepOne && detailHouseNo.stepOne.bldgArea}\r\n                    unit=\"ตร.ม.\"\r\n                />\r\n                <RowDeail\r\n                    classes={classes}\r\n                    label=\"หมายเลข ทร.31\"\r\n                    value={detailHouseNo && detailHouseNo.stepOne && detailHouseNo.stepOne.TRnumber}\r\n                />\r\n                <RowDeail\r\n                    classes={classes}\r\n                    label=\"หมายเหตุ\"\r\n                    value={detailHouseNo && detailHouseNo.stepOne && detailHouseNo.stepOne.remark}\r\n                />\r\n                <RowDeail\r\n                    classes={classes}\r\n                    label=\"เลขที่โฉนด\"\r\n                    value={detailHouseNo && detailHouseNo.stepOne && detailHouseNo.stepOne.chanodeNo}\r\n                />\r\n                <RowDeail\r\n                    classes={classes}\r\n                    label=\"เลขที่ดิน\"\r\n                    value={detailHouseNo && detailHouseNo.stepOne && detailHouseNo.stepOne.landNo}\r\n                />\r\n                {/* ที่ตั้ง */}\r\n                <RowDeail\r\n                    classes={classes}\r\n                    label=\"หมู่\"\r\n                    value={detailHouseNo && detailHouseNo.stepOne && detailHouseNo.stepOne.moo}\r\n                />\r\n                <RowDeail\r\n                    classes={classes}\r\n                    label=\"ตรอก\"\r\n                    value={detailHouseNo && detailHouseNo.stepOne && detailHouseNo.stepOne.trok}\r\n                />\r\n                <RowDeail\r\n                    classes={classes}\r\n                    label=\"ซอย\"\r\n                    value={detailHouseNo && detailHouseNo.stepOne && detailHouseNo.stepOne.soi}\r\n                />\r\n                <RowDeail\r\n                    classes={classes}\r\n                    label=\"ถนน\"\r\n                    value={detailHouseNo && detailHouseNo.stepOne && detailHouseNo.stepOne.road}\r\n                />\r\n                <RowDeail\r\n                    classes={classes}\r\n                    label=\"จังหวัด\"\r\n                    value={detailHouseNo && detailHouseNo.stepOne && detailHouseNo.stepOne.provinceName}\r\n                />\r\n                <RowDeail\r\n                    classes={classes}\r\n                    label=\"เขต\"\r\n                    value={detailHouseNo && detailHouseNo.stepOne && detailHouseNo.stepOne.districtName}\r\n                />\r\n                <RowDeail\r\n                    classes={classes}\r\n                    label=\"แขวง\"\r\n                    value={detailHouseNo && detailHouseNo.stepOne && detailHouseNo.stepOne.subDistrictName}\r\n                />\r\n    \r\n                <Grid container justify=\"center\" className={classes.footer} spacing={24} >\r\n                    <Grid item>\r\n                        <Button\r\n                            label=\"ยกเลิก\"\r\n                            onClick={onClickCancel}\r\n                        />\r\n                    </Grid>\r\n                    <Grid item>\r\n                        <Button\r\n                            label=\"หน้าต่อไป\"\r\n                            onClick={onChangeStep(2)}\r\n                        />\r\n                    </Grid>\r\n                </Grid>\r\n            </Grid>\r\n        )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        padding: '0px 20px 20px 20px'\r\n    },\r\n    row: {\r\n        marginTop: '20px',\r\n        fontSize: '14px'\r\n    },\r\n    footer: {\r\n        marginTop: '20px'\r\n    },\r\n    colLabel: {\r\n        fontWeight: 'bold'\r\n    },\r\n    colValue: {\r\n        paddingLeft: '10px'\r\n    }\r\n}))(DetailHouseNoStepOneView)\r\n","import React, { Fragment } from 'react'\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport Button from '../../../../../../../Controls/Containers/Button';\r\n\r\nconst RowDeail = ({\r\n    classes,\r\n    label,\r\n    value\r\n}) => (\r\n        <Grid container className={classes.row}>\r\n            <Grid item xs={6} className={classes.colLabel} >\r\n                {label}\r\n            </Grid>\r\n            <Grid item xs={6} className={classes.colValue}>\r\n                {value}\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n\r\nconst HouseNo = ({\r\n    classes,\r\n    houseno,\r\n    houseid\r\n}) => (\r\n        <Grid container className={classes.rootBuilding}>\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"รหัสประจำบ้าน\"\r\n                value={houseid}\r\n            />\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"เลขที่บ้าน\"\r\n                value={houseno}\r\n            />\r\n\r\n            <Grid item xs={12} className={classes.row}>\r\n                <hr />\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n\r\nconst HouseNoOver = ({\r\n    classes,\r\n    houseList\r\n}) => (\r\n        <Grid container className={classes.rootBuilding}>\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"รหัสประจำบ้านเริ่มต้น\"\r\n                value={houseList && houseList[0] && houseList[0].houseId}\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"รหัสประจำบ้านสุดท้าย\"\r\n                value={houseList && houseList[1] && houseList[1].houseId}\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"เลขที่บ้านเริ่มต้น\"\r\n                value={houseList && houseList[0] && houseList[0].houseNo}\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"เลขที่บ้านสุดท้าย\"\r\n                value={houseList && houseList[1] && houseList[1].houseNo}\r\n            />\r\n\r\n            <Grid item xs={12} className={classes.row}>\r\n                <hr />\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n    \r\n\r\nconst DetailHouseNoStepTwoView = ({\r\n    classes,\r\n    detailHouseNo,\r\n    onClickCancel,\r\n    onChangeStep\r\n}) => {\r\n\r\n    return (\r\n        <Grid container className={classes.root}>\r\n            {(detailHouseNo && detailHouseNo.stepTwo && detailHouseNo.stepTwo.houseNum) && \r\n            <Fragment>\r\n                <div style={{height: '5px', width: '100%'}} />\r\n                <Grid item xs={12}>\r\n                    {`จำนวนบ้านที่ขอรหัสประจำบ้าน ${detailHouseNo.stepTwo.houseNum} หลัง`}\r\n                </Grid>\r\n                <Grid item xs={12} className={classes.row}>\r\n                    <hr />\r\n                </Grid>\r\n                { detailHouseNo.stepTwo.houseNum < 11 ? \r\n                    <Fragment>\r\n                        {detailHouseNo.stepTwo.houseList.map(detail => {\r\n                            return (\r\n                                <HouseNo\r\n                                    classes={classes}\r\n                                    houseno={detail.houseNo}\r\n                                    houseid={detail.houseId}\r\n                                />\r\n                            )\r\n                        })}\r\n                    </Fragment>:\r\n                    <Fragment>\r\n                        <HouseNoOver \r\n                            classes = { classes }\r\n                            houseList = { detailHouseNo.stepTwo.houseList }\r\n                        />\r\n                    </Fragment>\r\n                }\r\n            </Fragment>\r\n                \r\n            }\r\n\r\n            <Grid container justify=\"center\" className={classes.footer} spacing={24} >\r\n                <Grid item>\r\n                    <Button\r\n                        label=\"ยกเลิก\"\r\n                        onClick={onClickCancel}\r\n                    />\r\n                </Grid>\r\n                <Grid item>\r\n                    <Button\r\n                        label=\"ก่อนหน้า\"\r\n                        onClick={onChangeStep(1)}\r\n                    />\r\n                </Grid>\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        padding: '0px 20px 20px 20px'\r\n    },\r\n    row: {\r\n        marginTop: '10px',\r\n        fontSize: '14px'\r\n    },\r\n    footer: {\r\n        marginTop: '20px'\r\n    },\r\n    colLabel: {\r\n        fontWeight: 'bold'\r\n    },\r\n    colValue: {\r\n        paddingLeft: '10px'\r\n    }\r\n}))(DetailHouseNoStepTwoView)\r\n","import React, { Component, Fragment } from 'react';\r\n\r\nimport DetailHouseNoView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/SearchHouseNumber/Detail/DetailHouseNoView';\r\nimport DetailHouseNoStepOneView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/SearchHouseNumber/Detail/DetailHouseNoStepOneView';\r\nimport DetailHouseNoStepTwoView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/SearchHouseNumber/Detail/DetailHouseNoStepTwoView';\r\n\r\nimport { fetchGet_ } from '../../../../../../../Utilities/ServiceUtils'\r\nimport Loading from '../../../../../../../Controls/Containers/Loading'\r\nimport WithLoading from '../../../../../../../HOC/WithLoading'\r\n\r\nexport class DetailHouseNo extends Component {\r\n    constructor() {\r\n        super();\r\n        this.state = {\r\n            formStep: 1,\r\n            detailHouseNo: null,\r\n            updateHouseTypeName: false,\r\n            updateHouseMatName: false\r\n        }\r\n    }\r\n\r\n    componentDidMount() {\r\n        const { data } = this.props;\r\n        // const { resultIDActive } = this.props;\r\n        // this.callServiceGetDetailHouseNo()\r\n        this.callServiceGetLUTActivity(data);\r\n        this.callServiceGetHouseMaterial(data)\r\n        // this.setState({\r\n        //     detailHouseNo: data\r\n        // })\r\n    }\r\n\r\n    componentDidUpdate() {\r\n        const { data } = this.props;\r\n        const {  updateHouseMatName, updateHouseTypeName } = this.state;\r\n        // console.log('updateHouseMatName, updateHouseTypeName',updateHouseMatName, updateHouseTypeName)\r\n        if(updateHouseTypeName && updateHouseMatName) {\r\n            // console.log('pass')\r\n            this.setState({\r\n                detailHouseNo: data,\r\n                updateHouseMatName: false,\r\n                updateHouseMatName: false\r\n            })\r\n        }\r\n    }\r\n\r\n    callServiceGetLUTActivity = async (data) => {\r\n        const { showLoading, hideLoading } = this.props;\r\n        showLoading();\r\n        await fetchGet_(process.env.REACT_APP_LU_ACTIVITY)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(async result => {\r\n\r\n                // console.log('result', result)\r\n                const houseTypeName = await result.result.filter(item => {\r\n                    return Number(item.value) === Number(data.stepOne.houseType)\r\n                })\r\n\r\n                data.stepOne.houseTypeDes = await houseTypeName[0]? houseTypeName[0].name:'';\r\n                await this.setState({\r\n                    updateHouseTypeName: true\r\n                })\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceGetLUTActivity', ex)\r\n            })\r\n        await hideLoading();\r\n    }\r\n\r\n    callServiceGetHouseMaterial = async (data) => {\r\n        const { showLoading, hideLoading } = this.props;\r\n        showLoading();\r\n        await fetchGet_(process.env.REACT_APP_SURVEY_LU_HOUSE_MATERIAL)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(async result => {\r\n                const houseMatName = await result.result.filter(item => {\r\n                    return Number(item.value) === Number(data.stepOne.houseMaterial)\r\n                })\r\n\r\n                data.stepOne.houseMatName = await houseMatName[0] ? houseMatName[0].name:' '\r\n                await this.setState({\r\n                    updateHouseMatName: true\r\n                })\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceGetHouseMaterial', ex)\r\n            })\r\n        await hideLoading();\r\n    }\r\n\r\n    handleChangeStep = step => evt => {\r\n        this.setState({\r\n            formStep: step\r\n        })\r\n    }\r\n\r\n    renderChildren = () => {\r\n        const { formStep, detailHouseNo } = this.state;\r\n        const { onClickBack, } = this.props;\r\n\r\n        // console.log('this.props', this.props)\r\n        // console.log('this.state', this.state)\r\n\r\n        switch (formStep) {\r\n            case 1:\r\n                return <DetailHouseNoStepOneView\r\n                    detailHouseNo={detailHouseNo}\r\n                    onChangeStep={this.handleChangeStep}\r\n                    onClickCancel={onClickBack}\r\n                />\r\n            case 2:\r\n                return <DetailHouseNoStepTwoView\r\n                    detailHouseNo={detailHouseNo}\r\n                    onChangeStep={this.handleChangeStep}\r\n                    onClickCancel={onClickBack}\r\n                />\r\n            default:\r\n                break;\r\n        }\r\n    }\r\n\r\n    render() {\r\n        const { formStep } = this.state;\r\n        const { isShowLoading } = this.props;\r\n\r\n        return (\r\n            <Fragment>\r\n                <DetailHouseNoView\r\n                    formStep={formStep}\r\n                >\r\n                    {this.renderChildren()}\r\n                </DetailHouseNoView>\r\n                <Loading isShowLoading={isShowLoading} />\r\n            </Fragment>\r\n        )\r\n    }\r\n}\r\n\r\nexport default WithLoading(DetailHouseNo)\r\n","import React, { useState, useEffect, Fragment } from 'react'\r\nimport { connect } from 'react-redux'\r\nimport { bindActionCreators } from 'redux';\r\nimport {isDirty} from 'redux-form';\r\n\r\n//import Component\r\nimport HouseNumberFormStep from '../HouseNumber/HouseNumberFormStep'\r\nimport DetailHouseNo from './Detail/DetailHouseNo'\r\nimport WithAlertMessage from '../../../../../../HOC/WithAlertMessage'\r\nimport AlertMessageSuper from '../../../../../../Controls/Containers/AlertMessageSuper'\r\n\r\n//import constants\r\nimport * as Constants from '../../../../../../Constants/Constants'\r\n\r\n//import map process\r\nimport * as MapFunctions from '../../../../../../Map/MapFunctions'\r\nimport * as MapAction from '../../../../../../Actions/Web/Maps/MapAction'\r\nimport * as HouseNumberAction from '../../../../../../Actions/Web/Panel/HouseNumberAction'\r\nimport * as MenuAction from '../../../../../../Actions/Web/MenuAction';\r\n\r\n// const LIST_MENU = Object.keys(Constants.MENU_CONSTRUCTION_LICENSE).map(key => ({\r\n//     id: Constants.MENU_CONSTRUCTION_LICENSE[key].id,\r\n//     name: Constants.MENU_CONSTRUCTION_LICENSE[key].name,\r\n//     isActive: false\r\n// }))\r\n\r\nconst ManageHouseEditWithMap = (props) => {\r\n\r\n    const { onClickBack, \r\n        submitUpdate, \r\n        point, \r\n        openDetail, \r\n        houseRdc, \r\n        mapAction, \r\n        houseNumberAction,\r\n        hideAlert,\r\n        showAlert, \r\n        dirtyStepOne,\r\n        dirtyStepTwo,\r\n        menuRdc,\r\n        menuAction\r\n    } = props;\r\n\r\n    const [district, setDistrict] = useState();\r\n    const [subDistrict, setSubDistrict] = useState();\r\n    const [isNotBKK, setIsNotBKK]= useState(false)\r\n    // const [isActiveDraw, setIsActiveDraw] = useState(false);\r\n    // const [isActiveEdit, setIsActiveEdit] = useState(false);\r\n    const [graphic, setGraphic] = useState(null);\r\n\r\n    useEffect(() => {\r\n        manageMap();\r\n    },[])\r\n\r\n    const manageMap = async () => {\r\n        const { mapAction } = props;\r\n\r\n        mapAction.bindMapCommand(MapFunctions.specifyCoordinate, {\r\n\t\t\tx: point.x,\r\n\t\t\ty: point.y,\r\n            unit: point.unit,\r\n            layerName: openDetail?Constants.LISTGRAPHICLAYER.GRAPHICLAYER_HOUSE_NUMBER_DETAIL : Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CONSTRUCTION_LICENSE,\r\n            callback: callBackDrawGraphic,\r\n            isZoomToResult:true,\r\n            symbolColor: openDetail && [255, 51, 51] \r\n\t\t})\r\n    }\r\n\r\n    const callBackDrawGraphic = async (evt, graphic) => {\r\n        if (evt && !openDetail) {\r\n            setGraphic(graphic)\r\n            await mapAction.bindClearMapCommand()\r\n            // setIsActiveDraw(false)\r\n            menuAction.activeFunction(null)\r\n            await mapAction.bindMapCommand(MapFunctions.getDistrictAndSubDistrictFormPoint, { // save sub-district code\r\n                geometry: evt.geometry,\r\n                callbackFn: callbackGetDistrictAndSubDistrict\r\n            })\r\n        }\r\n    }\r\n\r\n    const drawGraphic = () => {\r\n        mapAction.bindMapCommand(MapFunctions.drawPointConstructionLicense, {\r\n            callback: callBackDrawGraphic\r\n        })\r\n    }\r\n\r\n    const callbackEdit = (geometry,graphic) => {\r\n        setGraphic(graphic)\r\n\t\tif (geometry) {\r\n\t\t\tmapAction.bindMapCommand(MapFunctions.getDistrictAndSubDistrictFormPoint, {\r\n\t\t\t\tgeometry: geometry,\r\n\t\t\t\tcallbackFn: callbackGetDistrictAndSubDistrict\r\n\t\t\t})\r\n\t\t}\r\n    }\r\n\r\n    const handleClickEditGraphic = async () => {\r\n        if (graphic) {\r\n            // if (isActiveEdit) { // ปิดการแก้ไข\r\n            //     mapAction.bindMapCommand(MapFunctions.clearEditConstruct)\r\n            //     setIsActiveEdit(false)\r\n            // } else { // เปิดการแก้ไข\r\n            //     if (isActiveDraw) {\r\n            //         setIsActiveDraw(false)\r\n            //         await mapAction.bindMapCommand(MapFunctions.deActivateConstruct)\r\n            //     }\r\n            //     // this.managePanelForMobile(true)\r\n            //     mapAction.bindMapCommand(\r\n            //         MapFunctions.editGraphicConstructionLicense,\r\n            //         { graphic, callback: callbackEdit }\r\n            //     )\r\n            //     setIsActiveEdit(true)\r\n            // }\r\n            if(menuRdc.ActiveFunction === Constants.ACTIVE_FUNCTION.EDIT_GP_FORM){\r\n                menuAction.activeFunction(null)\r\n                mapAction.bindMapCommand(MapFunctions.clearEditConstruct)\r\n            }else{\r\n                menuRdc.ActiveFunction === Constants.ACTIVE_FUNCTION.ADD_GP_FORM && mapAction.bindMapCommand(MapFunctions.deActivateConstruct)\r\n                menuAction.activeFunction(Constants.ACTIVE_FUNCTION.EDIT_GP_FORM)                \r\n                mapAction.bindMapCommand(\r\n                    MapFunctions.editGraphicConstructionLicense,\r\n                    { graphic, callback: callbackEdit }\r\n                )\r\n            }\r\n        } else {\r\n            showAlert({ altMsg: \"กรุณากำหนดตำแหน่ง\" })\r\n        }\r\n    }\r\n\r\n    const handleClickDrawGraphic = async () => {\r\n        // if (isActiveDraw) { // ปิดการวาด\r\n        //     setIsActiveDraw(false)\r\n        //     mapAction.bindMapCommand(MapFunctions.deActivateConstruct)\r\n        // } else { // เปิดการวาด\r\n        //     if (isActiveEdit) {\r\n        //         setIsActiveEdit(false)\r\n        //     }\r\n        //     setIsActiveDraw(true)\r\n        //     drawGraphic();\r\n        // }\r\n\r\n        if(menuRdc.ActiveFunction === Constants.ACTIVE_FUNCTION.ADD_GP_FORM){\r\n            menuAction.activeFunction(null)\r\n            mapAction.bindMapCommand(MapFunctions.deActivateConstruct)\r\n        }else{\r\n            menuRdc.ActiveFunction === Constants.ACTIVE_FUNCTION.EDIT_GP_FORM && mapAction.bindMapCommand(MapFunctions.clearEditConstruct)\r\n            menuAction.activeFunction(Constants.ACTIVE_FUNCTION.ADD_GP_FORM) \r\n            setTimeout(()=>{ // set timeout เพื่อแก้ปัญหา willunmount ของ maptool clear event draw\r\n                drawGraphic();\r\n            },50)\r\n        }\r\n    }\r\n\r\n    const callbackGetDistrictAndSubDistrict = async (values, geometry) => {\r\n        houseNumberAction.saveGeometry(geometry)\r\n        if(values) {\r\n            setIsNotBKK(false)\r\n            const { SUBDISTRICT_ID, DISTRICT_ID } = values;\r\n\t\r\n            const subDistrictCode = SUBDISTRICT_ID;//SUBDISTRICT_ID.slice(SUBDISTRICT_ID.length-2, SUBDISTRICT_ID.length);\r\n            const districtCode = DISTRICT_ID;//DISTRICT_ID.slice(DISTRICT_ID.length-2, DISTRICT_ID.length);\r\n            setDistrict(districtCode);\r\n            setSubDistrict(subDistrictCode);\r\n    \r\n            await houseNumberAction.saveDistrictAndSubDistrict({districtID:districtCode,subDistrictID:subDistrictCode})\r\n        } else {\r\n            setIsNotBKK(true)\r\n            isBKKAlert();\r\n            // console.log('dont have values')\r\n        }\r\n    }\r\n\r\n    const isBKKAlert = () => {\r\n        showAlert({\r\n            altMsg: Constants.ALERT_MESSAGE.POPUP.OUT_OF_BKK,\r\n            altType: 1,\r\n            callbackClose: handleCloseConfirm,\r\n        })\r\n    }\r\n\r\n    const handleCloseConfirm = () => {\r\n        hideAlert();\r\n    }\r\n\r\n    const handleClickBack = () =>{\r\n        if(dirtyStepOne || dirtyStepTwo){\r\n            showAlert({\r\n                altMsg: Constants.ALERT_MESSAGE.QUESTION.CANCEL_FORM ,\r\n                altType:2,\r\n                callbackConfirm : () => {\r\n                    hideAlert()\r\n                    onClickBack();\r\n                }\r\n            })\r\n        }else{\r\n            onClickBack();\r\n        }\r\n    }\r\n\r\n    return (\r\n        <Fragment>\r\n            {!openDetail ?\r\n                <HouseNumberFormStep \r\n                // onClickBack = { onClickBack } \r\n                onClickBack = { handleClickBack } \r\n                submitUpdate = { submitUpdate }\r\n                isNotBKK = { isNotBKK } \r\n                isBKKFn = { isBKKAlert } \r\n                isUpdate={true} \r\n                onEdit = { handleClickEditGraphic }\r\n                onDraw = { handleClickDrawGraphic }\r\n                isActiveDraw = { menuRdc.ActiveFunction === Constants.ACTIVE_FUNCTION.ADD_GP_FORM }\r\n                isActiveEdit = { menuRdc.ActiveFunction === Constants.ACTIVE_FUNCTION.EDIT_GP_FORM }\r\n                />:\r\n                <DetailHouseNo onClickBack = { onClickBack } data = { houseRdc } />\r\n            }\r\n            <AlertMessageSuper {...props} />\r\n        </Fragment>   \r\n    )\r\n}\r\n\r\nconst mapStateToProps = state => ({\r\n    houseRdc: state.houseNumberRdc,\r\n    menuRdc: state.menu,\r\n    dirtyStepOne : isDirty('StepOne')(state),\r\n    dirtyStepTwo : isDirty('StepTwo')(state),\r\n})\r\n\r\nconst mapDispatchToProp = dispatch => ({\r\n    mapAction: bindActionCreators(MapAction, dispatch),\r\n    houseNumberAction: bindActionCreators(HouseNumberAction, dispatch),\r\n    menuAction:bindActionCreators(MenuAction,dispatch)\r\n})\r\n\r\nexport default WithAlertMessage(connect(mapStateToProps, mapDispatchToProp)(ManageHouseEditWithMap))","import React, { useState, useEffect, Fragment } from 'react';\r\nimport { compose } from 'recompose';\r\nimport { connect } from 'react-redux';\r\nimport { reduxForm, isDirty, getFormValues } from 'redux-form';\r\nimport { bindActionCreators } from 'redux';\r\n\r\n//import Component\r\nimport SearchHouseNumberView from '../../../../../../Presentationals/Web/Panel/Menu/MenuContent/SearchHouseNumber/SearchHouseNumberView';\r\nimport SearchHouseNumberFormView from '../../../../../../Presentationals/Web/Panel/Menu/MenuContent/SearchHouseNumber/SearchHouseNumberFormView';\r\nimport SearchHouseNumberResultView from '../../../../../../Presentationals/Web/Panel/Menu/MenuContent/SearchHouseNumber/SearchHouseNumberResultView';\r\nimport ManageHouseEditWithMap from './ManageHouseEditWithMap';\r\nimport Loading from '../../../../../../Controls/Containers/Loading';\r\nimport WithLoading from '../../../../../../HOC/WithLoading';\r\nimport AlertMessageSuper from '../../../../../../Controls/Containers/AlertMessageSuper';\r\nimport WithAlertMessage from '../../../../../../HOC/WithAlertMessage';\r\n\r\n//import ServiceUtils\r\nimport { fetchGet_, fetchPost_ } from '../../../../../../Utilities/ServiceUtils';\r\n\r\n//import Action\r\nimport * as HouseNumberActions from '../../../../../../Actions/Web/Panel/HouseNumberAction';\r\nimport * as MapAction from '../../../../../../Actions/Web/Maps/MapAction';\r\nimport * as MapFunctions from '../../../../../../Map/MapFunctions';\r\nimport * as DatetimeUtil from '../../../../../../Utilities/DateTimeUtil';\r\nimport * as MenuAction from '../../../../../../Actions/Web/MenuAction';\r\n\r\n//import constants\r\nimport { TABLE_MAPSHEET1K, ALERT_MESSAGE } from '../../../../../../Constants/Constants';\r\n\r\nconst SearchHouseNumber = (props) => {\r\n  const {\r\n    onClickBack,\r\n    handleSubmit,\r\n    hideAlert,\r\n    showAlert,\r\n    // dirty,\r\n    houseNumberActions,\r\n    mapAction,\r\n    authenRdc,\r\n    showLoading,\r\n    hideLoading,\r\n    title,\r\n    isOnlySearch,\r\n    panelContentDataRdc,\r\n    change,\r\n    menuAction,\r\n  } = props;\r\n\r\n  const [luDistrict, setLuDistrict] = useState([]);\r\n  const [luSubDistrict, setLuSubDistrict] = useState([]);\r\n  const [isSearch, setIsSearch] = useState(false);\r\n  const [resultFromSearch, setResultFromSearch] = useState([]);\r\n  const [point, setPoint] = useState();\r\n  const [searchData, setSearchData] = useState();\r\n  const [spatialSearchData, setSpatialSearchData] = useState();\r\n  const [geometrySpatialSearch, setGeometrySpatialSearch] = useState({});\r\n  const [isShowLoading, setShowLoading] = useState(false);\r\n  const [isActiveSpatialSearch, setActiveSpatialSearch] = useState(false);\r\n  const [isOpenFormDetail, setIsOpenFormDetail] = useState(false);\r\n  const [openDetail, setOpenDetail] = useState(false);\r\n\r\n  useEffect(() => {\r\n    callServiceDistrict();\r\n\r\n    if (authenRdc.profile.districtID) {\r\n      change('district', authenRdc.profile.districtID);\r\n    }\r\n  }, []);\r\n\r\n  const callServiceDistrict = () => {\r\n    fetchGet_(`${process.env.REACT_APP_LU_DISTRICT}?provinceid=10`)\r\n      .then((res) => {\r\n        if (!res.ok) {\r\n          throw res.status;\r\n        }\r\n        return res.json();\r\n      })\r\n      .then((data) => {\r\n        setLuDistrict(data.result);\r\n      })\r\n      .catch((ex) => {\r\n        console.log('ex callServiceDistrict', ex);\r\n      });\r\n  };\r\n\r\n  const callServiceSubDistrict = (districtID) => {\r\n    fetchGet_(`${process.env.REACT_APP_LU_SUBDISTRICT}?provinceid=10&districtid=${districtID}`)\r\n      .then((res) => {\r\n        if (!res.ok) {\r\n          throw res.status;\r\n        }\r\n        return res.json();\r\n      })\r\n      .then((data) => {\r\n        setLuSubDistrict(data.result);\r\n      })\r\n      .catch((ex) => {\r\n        console.log('ex callServiceSubDistrict', ex);\r\n      });\r\n  };\r\n\r\n  const handleChangeAdminPoly = (type) => (evt) => {\r\n    const { change } = props;\r\n\r\n    switch (type) {\r\n      case 'district':\r\n        callServiceSubDistrict(evt.target.value);\r\n        setLuSubDistrict([]);\r\n        change('subDistrict', undefined);\r\n        break;\r\n      default:\r\n        break;\r\n    }\r\n  };\r\n\r\n  const handleClickSubmit = ({\r\n    TRrequest = '',\r\n    district = '',\r\n    subDistrict = '',\r\n    maxLat = '',\r\n    maxLon = '',\r\n    minLat = '',\r\n    minLon = '',\r\n    permitNo = '',\r\n  }) => {\r\n    const getUrl = `${\r\n      process.env.REACT_APP_CAH_SEARCH_HOUSENUMBER_FORM\r\n    }?HouseTRID=${TRrequest.toString()}&districtid=${district}&subdistrictid=${subDistrict}&maxLat=${maxLat}&maxLon=${maxLon}&minLat=${minLat}&minLon=${minLon}&permitNo=${permitNo}`;\r\n    setShowLoading(true);\r\n\r\n    if (isActiveSpatialSearch) {\r\n      setActiveSpatialSearch(false);\r\n      mapAction.bindMapCommand(MapFunctions.cleardrawSpatialSearchTR900);\r\n    }\r\n    try {\r\n      fetchGet_(getUrl)\r\n        .then((res) => {\r\n          setSearchData({\r\n            TRrequest,\r\n            district,\r\n            subDistrict,\r\n          });\r\n          return res.json();\r\n        })\r\n        .then((response) => {\r\n          if (response) {\r\n            const { result } = response;\r\n            if (!isOnlySearch) {\r\n              const editPermissionData = result.map((item) => {\r\n                item.editPermission = item.updater === authenRdc.profile.userID;\r\n\r\n                return item;\r\n              });\r\n              setResultFromSearch(editPermissionData);\r\n            } else {\r\n              setResultFromSearch(result);\r\n            }\r\n          } else {\r\n            setResultFromSearch(null);\r\n          }\r\n          setIsSearch(true);\r\n          setShowLoading(false);\r\n        });\r\n    } catch (ex) {\r\n      setShowLoading(false);\r\n      console.log('error callServiceSearchHouseNember:: ', ex);\r\n    }\r\n  };\r\n\r\n  // const formDirty = () => {\r\n  //     if (dirty) {\r\n  //         if(isOpenFormDetail){ //เช็คว่าหากเป็นการกด back จากหน้า detail ก็จะเข้า if นี้\r\n  //             mapAction.bindMapCommand(MapFunctions.clearGraphicConstructionLicense)\r\n  //             setIsOpenFormDetail(false)\r\n  //             setOpenDetail(!openDetail)\r\n  //         }\r\n  //         else{\r\n  //             !isOnlySearch ?\r\n  //             showAlert({\r\n  //                 altMsg: ALERT_MESSAGE.QUESTION.CANCEL_FORM ,\r\n  //                 altType: 2,\r\n  //                 callbackConfirm: handleCloseForm,\r\n  //                 callbackCancel: handleCloseConfirm\r\n  //             }) : handleCloseForm()\r\n  //         }\r\n  //     } else {\r\n  //         houseNumberActions.clearFormStep();\r\n  //         mapAction.bindMapCommand(MapFunctions.clearGraphicConstructionLicense)\r\n  //         onClickBack();\r\n  //     }\r\n  // }\r\n\r\n  const handleCloseForm = () => {\r\n    hideAlert();\r\n    houseNumberActions.clearFormStep();\r\n    mapAction.bindMapCommand(MapFunctions.clearGraphicConstructionLicense);\r\n    onClickBack();\r\n  };\r\n\r\n  const handleCloseConfirm = () => {\r\n    hideAlert();\r\n  };\r\n\r\n  //-------------------------------------- result manage -------------------------------------------------\r\n  const [openFormForEdit, setOpenFormForEdit] = useState(false);\r\n\r\n  const handleFormDetail = async (itm) => {\r\n    setIsOpenFormDetail(true);\r\n    // let houseTRID = itm.houseTRID\r\n    let selectedItem = {};\r\n    if (!openDetail) {\r\n      if (!itm.isSearchFromSpatial) {\r\n        //หากมาจากการ spatialsearch\r\n        selectedItem = itm;\r\n      }\r\n      manageData(selectedItem);\r\n    } else {\r\n      mapAction.bindMapCommand(MapFunctions.clearGraphicConstructionLicense);\r\n    }\r\n    setOpenDetail(!openDetail);\r\n  };\r\n\r\n  const handleFormForEdit = async (itm, evt) => {\r\n    // let houseTRID = itm.houseTRID\r\n    let selectedItem = {};\r\n    evt.stopPropagation();\r\n    selectedItem = itm;\r\n    manageData(selectedItem);\r\n    setOpenFormForEdit(true);\r\n  };\r\n\r\n  const sortHouseList = (a, b) => {\r\n    if (a.no < b.no) {\r\n      return -1;\r\n    }\r\n    if (a.no > b.no) {\r\n      return 1;\r\n    }\r\n    return 0;\r\n  };\r\n\r\n  const manageData = (values) => {\r\n    const newPoint = {\r\n      x: values.longitude,\r\n      y: values.latitude,\r\n      unit: 'LatLong',\r\n    };\r\n    setPoint(newPoint);\r\n    const stepOne = {\r\n      objectId: values.objectID,\r\n      permissionid: values.permissionID,\r\n      TRrequest: values.houseTRID,\r\n      TRnumber: values.tr31ID,\r\n      license: values.permissionID,\r\n      moo: values.moo,\r\n      soi: values.soi,\r\n      road: values.road,\r\n      district: values.districtID,\r\n      subDistrict: values.subDistrictID,\r\n      provinceName: values.provinceName,\r\n      districtName: values.districtName,\r\n      subDistrictName: values.subDistrictName,\r\n      houseRNo: values.houseRNO,\r\n      regDate: values.regDate ? new Date(values.regDate) : null,\r\n      applicantName: values.applicantName,\r\n      applicantTelNo: values.applicantTelNo,\r\n      ownerName: values.ownerName,\r\n      houseType: values.houseType,\r\n      houseTypeDetail: values.houseTypeDetail,\r\n      houseMaterial: values.houseMaterial,\r\n      numFloor: values.numFloor,\r\n      bldgArea: values.buldingArea,\r\n      remark: values.remark,\r\n      chanodeNo: values.chanodeNo,\r\n      landNo: values.landNo,\r\n    };\r\n    houseNumberActions.saveFormStepOne(stepOne);\r\n\r\n    const startHouseList = values.houseNo.map((item) => {\r\n      if (item['houseID']) {\r\n        item['houseId'] = item['houseID'];\r\n        delete item['houseID'];\r\n      }\r\n\r\n      return item;\r\n    });\r\n\r\n    const dataHouseList = startHouseList.map((item) => {\r\n      const no = item.houseNo.split('/');\r\n      item.no = Number(no[1]) ? Number(no[1]) : Number(item.houseNo);\r\n\r\n      return item;\r\n    });\r\n\r\n    const houseList = dataHouseList.sort(sortHouseList);\r\n\r\n    const stepTwo = {\r\n      houseNum: values.numberOfHouse,\r\n      houseList: houseList,\r\n      houseNoStart: houseList.length >= 1 ? houseList[0].houseNo : null,\r\n      houseIdStart: houseList.length >= 1 ? houseList[0].houseId : null,\r\n      noStart: houseList.length === 2 ? houseList[0].houseNo : null,\r\n      noEnd: houseList.length === 2 ? houseList[1].houseNo : null,\r\n      idStart: houseList.length === 2 ? houseList[0].houseId : null,\r\n      idEnd: houseList.length === 2 ? houseList[1].houseId : null,\r\n      runHouseNo: 1,\r\n    };\r\n    houseNumberActions.saveFormStepTwo(stepTwo);\r\n  };\r\n\r\n  const closeFormEdit = () => {\r\n    setOpenFormForEdit(false);\r\n    if (searchData.TRrequest || searchData.district) {\r\n      //เช็คว่าตอนนี้เป็น spatial search หรือไม่\r\n      handleClickSubmit(searchData);\r\n    } else {\r\n      //saptial search\r\n      handleSpatialSearchCallback(spatialSearchData, geometrySpatialSearch);\r\n    }\r\n    menuAction.activeFunction(null);\r\n    mapAction.bindMapCommand(MapFunctions.clearGraphicConstructionLicense);\r\n  };\r\n\r\n  //--------------------------------------- update or delete -------------------------------\r\n  const manageParamForUpdate = (values, numHouseRequest) => {\r\n    const { houseNumberRdc } = props;\r\n    const {\r\n      TRnumber,\r\n      TRrequest,\r\n      district,\r\n      license,\r\n      road,\r\n      soi,\r\n      subDistrict,\r\n      moo,\r\n      objectId,\r\n      houseRNo,\r\n      regDate,\r\n      applicantName,\r\n      applicantTelNo,\r\n      ownerName,\r\n      houseType,\r\n      houseTypeDetail,\r\n      houseMaterial,\r\n      numFloor,\r\n      bldgArea,\r\n      remark,\r\n      chanodeNo,\r\n      landNo,\r\n    } = houseNumberRdc.stepOne;\r\n    // let regDateTimeStamp = regDate && regDate.length > 0 ? DatetimeUtil.convertDatetimeToCallService(regDate): null\r\n    let regDateTimeStamp = regDate && regDate.getTime() > 0 ? regDate.getTime() : null;\r\n\r\n    let params = {};\r\n    if (numHouseRequest <= 10) {\r\n      //บ้านน้อยกว่า 10 หลัง\r\n      params = {\r\n        objectid: objectId,\r\n        housetrid: TRrequest,\r\n        tr31id: TRnumber,\r\n        permissionid: license,\r\n        numberofhouse: values.houseNum,\r\n        soi: soi,\r\n        road: road,\r\n        subdistrictid: subDistrict,\r\n        districtid: district,\r\n        provinceid: '10',\r\n        moo: moo,\r\n        houseno: values.houseList,\r\n        houserno: houseRNo,\r\n        regDate: regDateTimeStamp,\r\n        applicantName: applicantName,\r\n        applicantTelNo: applicantTelNo,\r\n        ownerName: ownerName,\r\n        houseType: houseType,\r\n        houseTypeDetail: houseTypeDetail,\r\n        houseMaterial: houseMaterial,\r\n        numFloor: numFloor,\r\n        bldgArea: bldgArea,\r\n        remark: remark,\r\n        chanodeNo: chanodeNo,\r\n        landNo: landNo,\r\n      };\r\n    } else {\r\n      params = {\r\n        objectid: objectId,\r\n        housetrid: TRrequest,\r\n        tr31id: TRnumber,\r\n        permissionid: license,\r\n        numberofhouse: values.houseNum,\r\n        soi: soi,\r\n        road: road,\r\n        subdistrictid: subDistrict,\r\n        districtid: district,\r\n        provinceid: '10',\r\n        moo: moo,\r\n        houseno: [\r\n          {\r\n            houseno: values.noStart,\r\n            houseid: values.idStart,\r\n          },\r\n          {\r\n            houseno: values.noEnd,\r\n            houseid: values.idEnd,\r\n          },\r\n        ],\r\n        houserno: houseRNo,\r\n        regDate: regDateTimeStamp,\r\n        applicantName: applicantName,\r\n        applicantTelNo: applicantTelNo,\r\n        ownerName: ownerName,\r\n        houseType: houseType,\r\n        houseTypeDetail: houseTypeDetail,\r\n        houseMaterial: houseMaterial,\r\n        numFloor: numFloor,\r\n        bldgArea: bldgArea,\r\n        remark: remark,\r\n        chanodeNo: chanodeNo,\r\n        landNo: landNo,\r\n      };\r\n    }\r\n\r\n    return params;\r\n  };\r\n\r\n  const handleDelete = (itm, evt) => {\r\n    evt.stopPropagation();\r\n    showAlert({\r\n      altMsg: `${ALERT_MESSAGE.QUESTION.DELETE} ${itm.houseTRID} ?`,\r\n      altType: 2,\r\n      callbackConfirm: () => confirmDelete(itm),\r\n      callbackCancel: handleCloseConfirm,\r\n    });\r\n  };\r\n\r\n  const confirmDelete = (itm) => {\r\n    setShowLoading(true);\r\n    try {\r\n      fetchGet_(`${process.env.REACT_APP_CAH_DELETE_HOUSE_NO}?HouseRNo=${itm.objectID}`)\r\n        .then((res) => {\r\n          return res.json();\r\n        })\r\n        .then((response) => {\r\n          if (response.statusCode === 1) {\r\n            showAlert({\r\n              altMsg: ALERT_MESSAGE.POPUP.DELETE_SUCCESS,\r\n              altType: 1,\r\n              callbackClose: handleCloseConfirm,\r\n            });\r\n\r\n            if (searchData.TRrequest || searchData.district) {\r\n              //form\r\n              handleClickSubmit(searchData);\r\n            } else {\r\n              //spatial search\r\n              handleSpatialSearchCallback(spatialSearchData, geometrySpatialSearch);\r\n            }\r\n\r\n            setShowLoading(false);\r\n          } else {\r\n            showAlert({\r\n              altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR,\r\n              altType: 1,\r\n              callbackClose: handleCloseConfirm,\r\n            });\r\n          }\r\n        })\r\n        .finally(() => {\r\n          setShowLoading(false);\r\n        });\r\n    } catch (ex) {\r\n      console.log('error callServiceDeleteHouseNo:: ', ex);\r\n    }\r\n  };\r\n\r\n  const checkDuplicateHouseNumberBeforeSave = async (values) => {\r\n    const numHouseRequest = values.houseNum;\r\n    const params = await manageParamForUpdate(values, numHouseRequest);\r\n    const isDuplicate = await checkDuplicateHouseId(params);\r\n\r\n    if (isDuplicate) {\r\n      showAlert({\r\n        altMsg: 'รหัสประจำบ้านมีอยู่แล้วในระบบ',\r\n        altType: 1,\r\n        callbackClose: handleCloseConfirm,\r\n      });\r\n    } else {\r\n      await updateHouseNumber(params);\r\n    }\r\n  };\r\n\r\n  const updateHouseNumber = (params) => {\r\n    let updateDateTimeStamp = DatetimeUtil.convertDatetimeToCallService(new Date());\r\n    const { houseNumberRdc } = props;\r\n\r\n    setShowLoading(true);\r\n    if (Object.values(params).length >= 1) {\r\n      //params not empty\r\n      mapAction.bindMapCommand(MapFunctions.editShapeTr900, {\r\n        geometry: houseNumberRdc.geometry,\r\n        stepTwo: params,\r\n        url: `${window.CPUDD_OTHERS_FEATURE_LAYER}/2`,\r\n        userID: authenRdc.profile.userID,\r\n        updateDate: updateDateTimeStamp,\r\n        callback: callbackAddPointTR900,\r\n      });\r\n    }\r\n  };\r\n\r\n  const callbackAddPointTR900 = async (result) => {\r\n    if (result) {\r\n      const params = {\r\n        HouseRNo: result.objectId,\r\n        Houses: result.stepTwo.houseno,\r\n      };\r\n      await mapAction.bindMapCommand(MapFunctions.refreshMap, {\r\n        //สั่ง refresh layer\r\n        layerID: panelContentDataRdc.currentPage.Layer ? panelContentDataRdc.currentPage.Layer[0].layerName : null,\r\n      });\r\n\r\n      await callServiceUpdateHouseNumber(params, result.objectId);\r\n    } else {\r\n      setShowLoading(false);\r\n      showAlert({ altMsg: ALERT_MESSAGE.POPUP.SAVE_FAIL });\r\n    }\r\n  };\r\n\r\n  const callServiceUpdateHouseNumber = (params, objectID) => {\r\n    const url = `${process.env.REACT_APP_CAH_UPDATE}`;\r\n\r\n    fetchPost_(url, params)\r\n      .then((res) => {\r\n        return res.json();\r\n      })\r\n      .then((value) => {\r\n        if (value.statusCode === 1) {\r\n          callServiceMapsheet1K(objectID);\r\n        } else {\r\n          showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR });\r\n          setShowLoading(false);\r\n        }\r\n      })\r\n      .catch((ex) => {\r\n        setShowLoading(false);\r\n        console.log('ex callServiceSave pmr', ex);\r\n      });\r\n  };\r\n\r\n  const callServiceMapsheet1K = (objectID) => {\r\n    fetchGet_(`${process.env.REACT_APP_UPDATE_MAPSHEET1K}?objectid=${objectID}&tablename=${TABLE_MAPSHEET1K.HOUSE_PNT}&isupdate=true`)\r\n      .then((res) => {\r\n        if (!res.ok) {\r\n          throw res;\r\n        }\r\n        return res.json();\r\n      })\r\n      .then((values) => {\r\n        if (values && values.statusCode === 1) {\r\n          showAlert({ altMsg: ALERT_MESSAGE.POPUP.SAVE_SUCCESS, callbackClose: handleCloseConfirm });\r\n        } else {\r\n          showAlert({ altMsg: ALERT_MESSAGE.POPUP.SAVE_FAIL });\r\n        }\r\n      })\r\n      .catch((ex) => {\r\n        showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR });\r\n        console.log('ex callServiceSaveForm', ex);\r\n      })\r\n      .finally(() => {\r\n        closeFormEdit();\r\n        setShowLoading(false);\r\n      });\r\n  };\r\n\r\n  //------------------------------------------ check duplicate ----------------------------------\r\n  const checkDuplicateHouseId = async (values) => {\r\n    let houseIdList = []; //สำหรับส่งเข้า serviceตรวจสอบรหัสบ้านซ้ำ\r\n    let isDuplicate = false;\r\n\r\n    if (values.numberofhouse <= 10) {\r\n      //บ้านไม่เกิน10หลัง\r\n      values.houseno.forEach((itm) => {\r\n        houseIdList.push(itm.houseId);\r\n      });\r\n\r\n      await fetchGet_(`${process.env.REACT_APP_CAH_CHECK_DUPLICLATE_HOUSENO}?HouseNo=${houseIdList.join('|')}&HouseRNo=${values.houserno}`)\r\n        .then((res) => {\r\n          if (!res.ok) {\r\n            throw res.status;\r\n          }\r\n          return res.json();\r\n        })\r\n        .then((result) => {\r\n          if (result.statusCode === -1) {\r\n            isDuplicate = true;\r\n          }\r\n        })\r\n        .catch((ex) => {\r\n          console.log('ex callServiceDistric', ex);\r\n        });\r\n    } else {\r\n      //บ้านมากกว่า 10 หลัง\r\n      await fetchGet_(\r\n        `${process.env.REACT_APP_CAH_CHECK_DUPLICLATE_HOUSENO}?HouseNo=${values.houseno[0].houseId}|${values.houseno[1].houseId}&HouseRNo=${\r\n          values.houserno\r\n        }`\r\n      )\r\n        .then((res) => {\r\n          if (!res.ok) {\r\n            throw res.status;\r\n          }\r\n          return res.json();\r\n        })\r\n        .then((result) => {\r\n          if (result.statusCode === -1) {\r\n            isDuplicate = true;\r\n          }\r\n        })\r\n        .catch((ex) => {\r\n          console.log('ex callServiceDistric', ex);\r\n        });\r\n    }\r\n    return isDuplicate;\r\n  };\r\n\r\n  //------------------------------Spatial Search-----------------------------------------\r\n  const handleClickSpatialSearchHouse = async () => {\r\n    if (isActiveSpatialSearch) {\r\n      setActiveSpatialSearch(false);\r\n      mapAction.bindMapCommand(MapFunctions.cleardrawSpatialSearchTR900);\r\n    } else {\r\n      await mapAction.bindMapCommand(MapFunctions.drawGraphicSpatialSearch, {\r\n        menu: 'TR900',\r\n        callback: handleSpatialSearchCallback,\r\n        loading: {\r\n          show: showLoading,\r\n          hide: hideLoading,\r\n        },\r\n      });\r\n      setActiveSpatialSearch(true);\r\n    }\r\n  };\r\n\r\n  const handleSpatialSearchCallback = async (res, geometry) => {\r\n    setSpatialSearchData(res);\r\n    setGeometrySpatialSearch(geometry);\r\n    setActiveSpatialSearch(false);\r\n\r\n    /////////////////////// find Min/Max Lat,Lon ////////////////////////////////////\r\n    let max = geometry.rings[0].length;\r\n    let lstLat = [],\r\n      lstLon = [];\r\n    for (let i = 0; i < max; i++) {\r\n      geometry.rings[0][i][0] = Number(geometry.rings[0][i][0].toFixed(6));\r\n      geometry.rings[0][i][1] = Number(geometry.rings[0][i][1].toFixed(6));\r\n\r\n      lstLon.push(Number(geometry.rings[0][i][0].toFixed(6)));\r\n      lstLat.push(Number(geometry.rings[0][i][1].toFixed(6)));\r\n    }\r\n\r\n    /* Find Min - Max of Latitude and Longitude */\r\n    lstLon = lstLon.sort(function(a, b) {\r\n      return a - b;\r\n    });\r\n    lstLat = lstLat.sort(function(a, b) {\r\n      return a - b;\r\n    });\r\n\r\n    let maxLatitude = lstLat[max - 1];\r\n    let minLatitude = lstLat[0];\r\n    let minLongitude = lstLon[0];\r\n    let maxLongitude = lstLon[max - 1];\r\n    ///////////////////////////////////////////////////////////////////////////////////\r\n    handleClickSubmit({\r\n      maxLat: maxLatitude,\r\n      minLat: minLatitude,\r\n      minLon: minLongitude,\r\n      maxLon: maxLongitude,\r\n    });\r\n  };\r\n\r\n  //--------------------------------------- render manage ------------------------------------\r\n  const renderDetailForm = () => {\r\n    return (\r\n      <Fragment>\r\n        {!openDetail ? (\r\n          <Fragment>\r\n            <SearchHouseNumberFormView\r\n              isActiveSpatialSearch={isActiveSpatialSearch}\r\n              luDistrict={luDistrict}\r\n              luSubDistrict={luSubDistrict}\r\n              onChangeAdminPoly={handleChangeAdminPoly}\r\n              onSubmit={handleSubmit(handleClickSubmit)}\r\n              onCancel={handleBack}\r\n              onSpatialSearchHouse={handleClickSpatialSearchHouse}\r\n            />\r\n            {isSearch && (\r\n              <SearchHouseNumberResultView\r\n                result={resultFromSearch}\r\n                onClickItem={handleFormDetail}\r\n                onEdit={handleFormForEdit}\r\n                onDelete={handleDelete}\r\n                isOnlySearch={isOnlySearch}\r\n              />\r\n            )}\r\n          </Fragment>\r\n        ) : (\r\n          <ManageHouseEditWithMap\r\n            onClickBack={handleFormDetail}\r\n            submitUpdate={checkDuplicateHouseNumberBeforeSave}\r\n            point={point}\r\n            openDetail={openDetail}\r\n          />\r\n        )}\r\n      </Fragment>\r\n    );\r\n  };\r\n\r\n  const renderEditForm = () => {\r\n    return <ManageHouseEditWithMap onClickBack={closeFormEdit} submitUpdate={checkDuplicateHouseNumberBeforeSave} point={point} />;\r\n  };\r\n\r\n  const handleBack = () => {\r\n    if (openFormForEdit) {\r\n      // กรณีอยู่หน้า edit\r\n      closeFormEdit();\r\n    } else if (openDetail) {\r\n      // กรณีอยู่หน้า detaild\r\n      // mapAction.bindMapCommand(MapFunctions.clearGraphicConstructionLicense)\r\n      setIsOpenFormDetail(false);\r\n      setOpenDetail(!openDetail);\r\n    } else {\r\n      // กรณีอยู่หน้า search\r\n      handleCloseForm();\r\n    }\r\n  };\r\n\r\n  return (\r\n    <Fragment>\r\n      <SearchHouseNumberView onClickBack={handleBack} title={title}>\r\n        {!openFormForEdit ? renderDetailForm() : renderEditForm()}\r\n      </SearchHouseNumberView>\r\n      <AlertMessageSuper {...props} />\r\n      <Loading isShowLoading={isShowLoading} />\r\n    </Fragment>\r\n  );\r\n};\r\n\r\nconst SearchHouseNumberValidate = (values) => {\r\n  const errors = {};\r\n\r\n  if (!values.TRrequest && !values.district) {\r\n    errors.TRrequest = 'ระบุอย่างน้อย 1 เงื่อนไข';\r\n    errors.district = 'ระบุอย่างน้อย 1 เงื่อนไข';\r\n  }\r\n\r\n  return errors;\r\n};\r\n\r\nconst mapStateToProps = (state) => ({\r\n  dirty: isDirty('SearchHouseNumber')(state),\r\n  _values: getFormValues('SearchHouseNumber')(state),\r\n  houseNumberRdc: state.houseNumberRdc,\r\n  authenRdc: state.authen,\r\n  panelContentDataRdc: state.PanelContentData,\r\n});\r\n\r\nconst mapDispatchToProps = (dispatch) => ({\r\n  houseNumberActions: bindActionCreators(HouseNumberActions, dispatch),\r\n  mapAction: bindActionCreators(MapAction, dispatch),\r\n  menuAction: bindActionCreators(MenuAction, dispatch),\r\n});\r\n\r\nconst reduxFormParameter = {\r\n  form: 'SearchHouseNumber',\r\n  validate: SearchHouseNumberValidate,\r\n};\r\n\r\nconst enhance = compose(\r\n  connect(\r\n    mapStateToProps,\r\n    mapDispatchToProps\r\n  ),\r\n  reduxForm(reduxFormParameter)\r\n);\r\n\r\nexport default enhance(WithAlertMessage(WithLoading(SearchHouseNumber)));\r\n","import React from 'react';\r\nimport classnames from 'classnames';\r\nimport { Field } from \"redux-form\";\r\nimport { Scrollbars } from 'react-custom-scrollbars';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { withStyles } from '@material-ui/core/styles';\r\n// import Button from '@material-ui/core/Button';\r\nimport Button from '../../../../../../../Controls/Containers/Button';\r\nimport AppBarHeaderView from '../../../../AppBarHeaderView';\r\nimport SelectField from '../../../../../../../Controls/Containers/SelectFieldRedux';\r\nimport { BTN } from '../../../../../../../Constants/Constants'\r\nconst ConstructionLicenseReportView = ({\r\n    classes,\r\n    onBackClick,\r\n    title,\r\n    listYear = [],\r\n    listMonth = [],\r\n    listDistrict = [],\r\n    listSubDistrict = [],\r\n    previewFn,\r\n    exportExcelFn,\r\n    handleSubmit,\r\n    onChangeAdminPoly,\r\n    isDistrict\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root}>\r\n            <AppBarHeaderView\r\n                title={title}\r\n                onClickBack={onBackClick}\r\n            />\r\n            <Grid container className={classnames(classes.content)}>\r\n                <Scrollbars\r\n                    autoHide={false}\r\n                    universal={true}>\r\n                    <Grid item xs={12} className={classes.content_in}>\r\n                       \r\n                        <Field\r\n                            label={'ปี'}\r\n                            name={'ConstructionLicenseYear'}\r\n                            component={SelectField}\r\n                            // onChange={onValueChange('year')}\r\n                            data={listYear}\r\n                            keyData={{value:\"ID\",label:\"year\"}}\r\n                            required\r\n                        />\r\n                        <Field\r\n                            label={'เดือน'}\r\n                            name={'ConstructionLicenseMonth'}\r\n                            component={SelectField}\r\n                            // onChange={onValueChange('month')}\r\n                            data={listMonth}\r\n                            required\r\n                        />\r\n                        <Field\r\n                            label={'เขต'}\r\n                            name={'ConstructionLicenseDistrict'}\r\n                            component={SelectField}\r\n                            onChange={onChangeAdminPoly('district')}\r\n                            data={listDistrict}\r\n                            disabled={isDistrict}\r\n                            required\r\n                        />\r\n                        <Field\r\n                            label={'แขวง'}\r\n                            name={'ConstructionLicenseSubDistrict'}\r\n                            component={SelectField}\r\n                            // onChange={onValueChange('district')}\r\n                            data={listSubDistrict}\r\n                            required\r\n                        />\r\n\r\n                        {/* //// Button //// */}\r\n                        <Grid container justify=\"center\" spacing={24} className={classes.divFooter} >\r\n                            <Grid item>\r\n                                <Button\r\n                                    label={BTN.TH.CANCEL}\r\n                                    onClick={onBackClick}\r\n                                />\r\n                            </Grid>\r\n                            <Grid item>\r\n                                <Button\r\n                                    label={BTN.EN.EXPORT_EXCEL}\r\n                                    onClick={handleSubmit(exportExcelFn)}\r\n                                />\r\n                            </Grid>\r\n                            <Grid item>\r\n                                <Button\r\n                                    label={BTN.EN.EXPORT_PDF}\r\n                                    onClick={handleSubmit(previewFn)}\r\n                                />\r\n                            </Grid>\r\n\r\n\r\n                        </Grid>\r\n                        {/* ////////////// */}\r\n                    </Grid>\r\n                </Scrollbars>\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    _hide: {\r\n        display: 'none'\r\n    },\r\n    root: {\r\n        position: 'absolute',\r\n        top: 0,\r\n        bottom: 0,\r\n        right: 0,\r\n        left: 0\r\n    },\r\n    content: {\r\n        position: 'relative',\r\n        height: 'calc(100% - 45px)'\r\n    },\r\n    content_in: {\r\n        padding: \"10px\",\r\n        width: \"100%\"\r\n    },\r\n    divFooter: {\r\n        marginTop: \"10px\",\r\n        marginBottom: \"10px\"\r\n    }\r\n}))(ConstructionLicenseReportView);","import Excel from \"exceljs/dist/es5/exceljs.browser\";\r\nimport {convertDateTimeToDisplayDate} from '../../../../../../../Utilities/DateTimeUtil';\r\n\r\nconst DEFAULT_MONTH = {id:99, name: 'ทุกเดือน'}\r\n\r\nconst DistrictReportExcel = (year='YYYY', month=DEFAULT_MONTH, datasource=[], profile, displaySelectAdminpoly) => {\r\n    // console.log('datasorce excel', datasource)\r\n    const startRowHeader = 6;//เป็น 3 ใน excel มีชื่อเรืองใช้่ row 1,2 ไปแล้ว\r\n    const workbook = new Excel.Workbook();\r\n    const worksheet = workbook.addWorksheet('sheet', {//จำเป็นต้องตั้งค่าส่วนนี้\r\n        pageSetup:{\r\n            paperSize: 9, //follow documentation the 9 value is A4\r\n            orientation:'portrait'\r\n        }\r\n    });\r\n    workbook.creator = 'PMR-WEB';\r\n    workbook.lastModifiedBy = 'PMR-WEB';\r\n    \r\n\r\n    const setCellBorder = (colKey) => {\r\n        \r\n        worksheet.getCell(colKey).border = {\r\n            top: {style:'thin'},\r\n            left: {style:'thin'},\r\n            bottom: {style:'thin'},\r\n            right: {style:'thin'}\r\n        };\r\n    }\r\n\r\n    const setFillColor = (colKey) =>{\r\n        worksheet.getCell(colKey).fill={\r\n            type: 'pattern',\r\n            pattern: 'solid',\r\n            fgColor: {\r\n                argb: '0098DAA8'//'0098DAA8'\r\n            }\r\n        }\r\n    }\r\n\r\n    const loadTopic = () => {\r\n\r\n        worksheet.mergeCells('A1:L1');\r\n        worksheet.getCell('L1').value = `กสผ.๑`;\r\n        worksheet.getCell('L1').alignment = { horizontal:'right'};\r\n\r\n        worksheet.mergeCells('A2:L2');\r\n        worksheet.getCell('A2').value = `แบบรายงานการให้อนุญาตก่อสร้างอาคาร (เชิงรายการ)`;\r\n        worksheet.getCell('A2').alignment = { horizontal:'center'};\r\n        \r\n        worksheet.mergeCells('A3:L3');\r\n        const displayMonth = (month.id === DEFAULT_MONTH.id) ? '' : `ประจำเดือน ${month.name}`\r\n        worksheet.getCell('A3').value =  `${displaySelectAdminpoly? `${displaySelectAdminpoly} ` : ''}${displayMonth} พ.ศ.${year}`;\r\n        worksheet.getCell('A3').alignment = { horizontal:'center'};\r\n\r\n        worksheet.mergeCells('A4:L4');\r\n        worksheet.mergeCells('A5:L5');\r\n        worksheet.getCell('A5').value =  `${profile.organizationName ? profile.organizationName : '-'} ${profile.userDistrictName ? profile.userDistrictName : '-'}`;\r\n        worksheet.getCell('A5').alignment = { horizontal:'left'};\r\n    }\r\n\r\n    const loadHeader = () => {//ใน Excel จะอยู่แถวแรก A1,B1,C1,D1,E1,F1,G1,H1,I1\r\n        const arrHeader = [\r\n            { \r\n                name: 'ลำดับที่', \r\n                key: 'no', \r\n                width: 10,\r\n            },\r\n            { \r\n                name: 'เลขที่รับโยธา', \r\n                key: 'constructID', \r\n                width: 20\r\n            },\r\n            { \r\n                name: 'ผู้ขออนุญาต', \r\n                key: 'applicantName', \r\n                width: 30\r\n            },\r\n            {\r\n                name: 'ประเภทลักษณะอาคาร', \r\n                key: 'buildingType', \r\n                width: 30\r\n            },\r\n            { \r\n                name: 'เพื่อใช้เป็น', \r\n                key: 'objective', \r\n                width: 30\r\n            },\r\n            { \r\n                name: 'วันที่ขออนุญาต/วันที่แจ้งความประสงค์', \r\n                key: 'applicationDate', \r\n                width: 30\r\n            },\r\n            { \r\n                name: 'วันที่อนุญาต/วันที่ออกใบรับแจ้งฯ', \r\n                key: 'permissionDate', \r\n                width: 30\r\n            },\r\n            { \r\n                name: 'เลขที่ใบอนุญาต (อ.๑) หรือเลขที่ใบรับแจ้งฯ', \r\n                key: 'permissionID', \r\n                width: 30\r\n            },\r\n            { \r\n                name: 'พื้นที่ใช้สอยรวม (ตร.ม)', \r\n                key: 'sumArea', \r\n                width: 20\r\n            },\r\n            { \r\n                name: 'โฉนดเลขที่/(เลขที่ดิน)', \r\n                key: 'chanode', \r\n                width: 20\r\n            },\r\n            { \r\n                name: 'สถานที่ปลูกสร้าง', \r\n                key: 'address', \r\n                width: 30\r\n            },\r\n            { \r\n                name: 'หมายเหตุ', \r\n                key: 'remark', \r\n                width: 30\r\n            }\r\n        ];\r\n        worksheet.columns = arrHeader.map(itm => ({key:itm.key, width: itm.width}));\r\n        worksheet.getRow(startRowHeader).values = arrHeader.map(itm => itm.name);\r\n        //กำหนด style ให้ cell Header\r\n        [   `A${startRowHeader}`,\r\n            `B${startRowHeader}`, \r\n            `C${startRowHeader}`, \r\n            `D${startRowHeader}`, \r\n            `E${startRowHeader}`, \r\n            `F${startRowHeader}`,\r\n            `G${startRowHeader}`,\r\n            `H${startRowHeader}`,\r\n            `I${startRowHeader}`,\r\n            `J${startRowHeader}`,\r\n            `K${startRowHeader}`,\r\n            `L${startRowHeader}`,\r\n        ].forEach(colKey => {\r\n            setCellBorder(colKey)\r\n            worksheet.getCell(colKey).alignment = {vertical: 'middle', horizontal:'center', wrapText: true};\r\n            worksheet.getCell(colKey).fill = {\r\n                type: 'pattern',\r\n                pattern:'solid',\r\n                fgColor:{\r\n                    argb:'005E9A50'\r\n                }\r\n            }\r\n        });\r\n        worksheet.getColumn('I').numFmt = '#,##0.00';\r\n    }\r\n\r\n    // const setCellFontColor = (colKey, argb, isBold) => {\r\n    //     worksheet.getCell(colKey).font  = {\r\n    //         bold: isBold,\r\n    //         color: { argb: argb}\r\n    //     };\r\n    // }\r\n\r\n    const makeRowITM = (rowNumber, rowITM, isSummaryRow=false) => {\r\n        const appDate = (rowITM.applicationDate && rowITM.applicationDate !== \"\") ? convertDateTimeToDisplayDate(new Date(rowITM.applicationDate), \"d MMM yyyy\") : \"\";\r\n        const permisDate = (rowITM.permissionDate && rowITM.permissionDate !== \"\") ? convertDateTimeToDisplayDate(new Date(rowITM.permissionDate), \"d MMM yyyy\") : \"\";\r\n        worksheet.addRow({\r\n            no: rowITM.no, \r\n            constructID: rowITM.constructID, \r\n            applicantName: rowITM.applicantName,\r\n            buildingType: rowITM.buildingType,\r\n            objective: rowITM.objective,\r\n            applicationDate: appDate,\r\n            permissionDate: permisDate,\r\n            permissionID:rowITM.permissionID,\r\n            sumArea: rowITM.sumArea,\r\n            chanode: rowITM.chanode,\r\n            address: rowITM.address,\r\n            remark: rowITM.remark\r\n        });\r\n\r\n        const arrColKey  = [   \r\n            `A${rowNumber}`,\r\n            `B${rowNumber}`,\r\n            `C${rowNumber}`,\r\n            `D${rowNumber}`,\r\n            `E${rowNumber}`,\r\n            `F${rowNumber}`,\r\n            `G${rowNumber}`,\r\n            `H${rowNumber}`,\r\n            `I${rowNumber}`,\r\n            `J${rowNumber}`,\r\n            `K${rowNumber}`,\r\n            `L${rowNumber}`\r\n        ];\r\n\r\n        arrColKey.forEach((colKey,index) =>{\r\n            worksheet.getCell(colKey).alignment = { wrapText: true};\r\n            setCellBorder(colKey);\r\n\r\n            if(rowNumber%2 !== 0){\r\n                setFillColor(colKey)\r\n            }\r\n            \r\n        })\r\n    }\r\n\r\n    const makeRowContent = () => {\r\n        try{\r\n            let rowSubHeaderNumber = startRowHeader//สำหรับรันเลขตำแหน่งเริ่มต้นของ group\r\n            let rowNO = 1;\r\n            let rowNumber = rowSubHeaderNumber + 1;\r\n\r\n            datasource.forEach(rowITM => {\r\n\r\n                makeRowITM(rowNumber, {\r\n                                no: rowNO++,\r\n                                ...rowITM\r\n                            })\r\n                rowNumber++\r\n\r\n            })\r\n        }\r\n        catch(err){\r\n            console.log('Error Generate Row Excel file DistrictReportExcel.js: ', err);\r\n            throw new Error(err);\r\n        }\r\n    }\r\n\r\n    const generateFinalSheet = () => {\r\n        const lastRow = (worksheet.lastRow._number)+1;\r\n        worksheet.mergeCells(`A${lastRow}:L${lastRow}`);\r\n        worksheet.getCell(`L${lastRow}`).value = `ผู้รายงาน ${profile.userFullname}`\r\n        worksheet.getCell(`L${lastRow}`).alignment = { vertical: 'middle', horizontal:'right'};\r\n\r\n        worksheet.mergeCells(`A${lastRow+1}:L${lastRow+1}`);\r\n        worksheet.getCell(`L${lastRow+1}`).value = `ผู้ตรวจ.......................................`\r\n        worksheet.getCell(`L${lastRow+1}`).alignment = { vertical: 'middle', horizontal:'right'};\r\n    }\r\n\r\n    const processColumns = () => {\r\n        loadTopic();\r\n        loadHeader();\r\n        makeRowContent();\r\n        generateFinalSheet();\r\n    }\r\n    \r\n    // //Main Program\r\n    processColumns();\r\n\r\n    workbook.xlsx.writeBuffer().then(function (xls64data) {\r\n        const blob = new Blob([xls64data],\r\n          { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });\r\n        const url = window.URL.createObjectURL(blob);\r\n        const anchor = document.createElement('a');\r\n        document.body.appendChild(anchor); //for firefox ref: https://stackoverflow.com/questions/41805095/excel-export-not-working-on-firefox-but-working-fine-in-google-crome/41806544\r\n        anchor.href = url;\r\n        anchor.download = 'แบบรายงานการให้อนุญาตก่อสร้างอาคาร.xlsx';\r\n        var isIE = /*@cc_on!@*/false || !!document.documentMode;\r\n        var isEdge = !isIE && !!window.StyleMedia;\r\n        if(isEdge){\r\n            anchor.click();\r\n            anchor.change();\r\n        } else {\r\n            anchor.click();\r\n        }\r\n        window.URL.revokeObjectURL(url);\r\n      });\r\n}\r\n\r\nexport default DistrictReportExcel;","import {numberWithCommas} from '../../../../../../../Utilities/Utils'\r\nimport pdfMake from \"pdfmake/build/pdfmake\";\r\nimport pdfFonts from \"pdfmake/build/vfs_fonts\";\r\nimport {convertDateTimeToDisplayDate} from '../../../../../../../Utilities/DateTimeUtil';\r\nimport { FOOTER_REPORT } from '../../../../../../../Constants/Constants'\r\n\r\nconst DEFAULT_MONTH = {id:99, name: 'ทุกเดือน'}\r\n// const DEFAULT_DISTRICT = { id: 99, name: 'ทุกเขต' }\r\n// const DEFAULT_SUB_DISTRICT = { id: 99, name: \"ทุกแขวง\" }\r\n\r\npdfMake.vfs = pdfFonts.pdfMake.vfs;\r\npdfMake.fonts = {\r\n    THSarabun: {\r\n        normal: 'THSarabun.ttf',\r\n        bold: 'THSarabun-Bold.ttf',\r\n        italics: 'THSarabun-Italic.ttf',\r\n        bolditalics: 'THSarabun-BoldItalic.ttf'\r\n    },\r\n    Roboto: {\r\n        normal: 'Roboto-Regular.ttf',\r\n        bold: 'Roboto-Medium.ttf',\r\n        italics: 'Roboto-Italic.ttf',\r\n        bolditalics: 'Roboto-MediumItalic.ttf'\r\n    }\r\n}\r\n\r\nconst configPage = {\r\n    pageSize: 'A4',\r\n    pageOrientation: 'landscape',//portrait\r\n    info: {\r\n        title: 'รายงานสรุปผลการกำหนดตำแหน่งขออนุญาตก่อสร้าง',\r\n        subject: 'รายงานสรุปผลการกำหนดตำแหน่งขออนุญาตก่อสร้าง',\r\n        keywords: 'รายงานสรุปผลการกำหนดตำแหน่งขออนุญาตก่อสร้าง',\r\n    },\r\n    pageMargins: [ 5, 40, 10, 60 ],// [left, top, right, bottom] or [horizontal, vertical]\r\n}\r\n\r\nconst fontStyle = {\r\n    fontHeading: {\r\n        fontSize: 18\r\n    },\r\n    fontTitle: {\r\n        fontSize: 16\r\n    },\r\n    fontSubheading: {\r\n        fontSize: 14\r\n    },\r\n    fontBody: {\r\n        fontSize:12\r\n    }\r\n}\r\nconst tableStyle = {\r\n    rowNumber: {\r\n        alignment: 'right'\r\n    },\r\n    rowHeaderColor: {\r\n        fillColor: '#5E9A50'\r\n    },\r\n    rowSubHeaderColor:{\r\n        fillColor: '#DAEEF3'\r\n    },\r\n    rowFooterColor: {\r\n        fillColor: '#5E9A50'\r\n    },\r\n    rowOtherColor1: {\r\n        fillColor: '#D0EFDA'\r\n    },\r\n    rowOtherColor2: {\r\n        fillColor: '#E5F6E8'\r\n    }\r\n}\r\n\r\nconst generateTableHeader = (datasource=[]) => {\r\n    return [\r\n        {\r\n            margin: [0,15,0,0],//[left, top, right, bottom]\r\n            columns: [\r\n                { width: '*', text: '' },\r\n                {\r\n                    width: 'auto',\r\n                    table: {\r\n                        // headers are automatically repeated if the table spans over multiple pages\r\n                        // you can declare how many rows should be treated as headers\r\n                        headerRows: 1,\r\n                        widths: [ 30, 50, 90, 90, 40, 60, 60, 50,50,50,70,40],\r\n                        body: [\r\n                            [ \r\n                                {\r\n                                    text: `ลำดับที่`,\r\n                                    style: ['fontSubheading', 'alignmentCenter', 'rowHeaderColor'],\r\n                                    margin: [0,25,0,0],//[left, top, right, bottom]\r\n                                    bold:true\r\n                                },\r\n                                {\r\n                                    text: `เลขที่รับโยธา`,\r\n                                    style: ['fontSubheading', 'alignmentCenter', 'rowHeaderColor'],\r\n                                    margin: [0,25,0,0],//[left, top, right, bottom]\r\n                                    bold:true\r\n                                },\r\n                                {\r\n                                    text: 'ผู้ขออนุญาต',\r\n                                    style: ['fontSubheading', 'alignmentCenter', 'rowHeaderColor'],\r\n                                    margin: [0,25,0,0],//[left, top, right, bottom]\r\n                                    bold:true\r\n                                },\r\n                                {\r\n                                    text: `ประเภทลักษณะอาคาร`,\r\n                                    style: ['fontSubheading', 'alignmentCenter', 'rowHeaderColor'],\r\n                                    margin: [0,25,0,0],//[left, top, right, bottom]\r\n                                    bold:true\r\n                                },\r\n                                {\r\n                                    text: `เพื่อใช้เป็น`,\r\n                                    style: ['fontSubheading', 'alignmentCenter', 'rowHeaderColor'],\r\n                                    margin: [0,25,0,0],//[left, top, right, bottom]\r\n                                    bold:true\r\n                                },\r\n                                {\r\n                                    text: `วันที่ขออนุญาต/วันที่แจ้งความประสงค์`,\r\n                                    style: ['fontSubheading', 'alignmentCenter', 'rowHeaderColor'],\r\n                                    margin: [0,0,0,0],//[left, top, right, bottom]\r\n                                    bold:true\r\n                                },\r\n                                {\r\n                                    text: `วันที่อนุญาต/วันที่ออกใบรับแจ้งฯ`,\r\n                                    style: ['fontSubheading', 'alignmentCenter', 'rowHeaderColor'],\r\n                                    margin: [0,10,0,0],//[left, top, right, bottom]\r\n                                    bold:true\r\n                                },\r\n                                {\r\n                                    text: `เลขที่ใบอนุญาต (อ.๑) หรือเลขที่ใบรับแจ้งฯ`,\r\n                                    style: ['fontSubheading', 'alignmentCenter', 'rowHeaderColor'],\r\n                                    margin: [0,0,0,0],//[left, top, right, bottom]\r\n                                    bold:true\r\n                                },\r\n                                {\r\n                                    text: `พื้นที่ใช้สอยรวม (ตร.ม)`,\r\n                                    style: ['fontSubheading', 'alignmentCenter', 'rowHeaderColor'],\r\n                                    margin: [0,20,0,0],//[left, top, right, bottom]\r\n                                    bold:true\r\n                                },\r\n                                {\r\n                                    text: `โฉนดเลขที่/(เลขที่ดิน)`,\r\n                                    style: ['fontSubheading', 'alignmentCenter', 'rowHeaderColor'],\r\n                                    margin: [0,20,0,0],//[left, top, right, bottom]\r\n                                    bold:true\r\n                                },\r\n                                {\r\n                                    text: `สถานที่ปลูกสร้าง`,\r\n                                    style: ['fontSubheading', 'alignmentCenter', 'rowHeaderColor'],\r\n                                    margin: [0,25,0,0],//[left, top, right, bottom]\r\n                                    bold:true\r\n                                },\r\n                                {\r\n                                       text: `หมายเหตุ`,\r\n                                        style: ['fontSubheading', 'alignmentCenter', 'rowHeaderColor'],\r\n                                        margin: [0,25,0,0],//[left, top, right, bottom]\r\n                                        bold:true\r\n                                }\r\n                            ],\r\n\r\n                            ...makeTableContent(datasource)\r\n                        ]\r\n                    },layout: {\r\n                        fillColor: function (rowIndex, node, columnIndex) {\r\n                            return (rowIndex % 2 === 1) ? '#0098DAA8': null;//'#c3f7b7' : null;\r\n                        }\r\n                    }\r\n                },\r\n                { width: '*', text: '' }\r\n            ]\r\n        }\r\n    ]\r\n}\r\n\r\nconst makeTableContent = (datasource=[]) => {\r\n    let rowNo = 1;\r\n    const listRow = [];\r\n    //console.log(\"datasource\",datasource)\r\n    datasource.forEach(groupITM => {\r\n        //content\r\n            listRow.push(makeRowITM({\r\n                no:rowNo++,\r\n                ...groupITM\r\n            }));\r\n       \r\n    })\r\n    //console.log(\"listRow>>\",listRow)\r\n    return listRow;\r\n}\r\n\r\nconst makeRowITM = (rowITM) => {\r\n    const FIXED_NUMBER = 2; //กำหนดจำนวนทศนิยม\r\n\r\n    const appDate = (rowITM.applicationDate && rowITM.applicationDate !== \"\") ? convertDateTimeToDisplayDate(new Date(rowITM.applicationDate), \"d MMM yyyy\") : \"\";\r\n    const permisDate = (rowITM.permissionDate && rowITM.permissionDate !== \"\") ? convertDateTimeToDisplayDate(new Date(rowITM.permissionDate), \"d MMM yyyy\") : \"\";\r\n\r\n    return [ \r\n        {\r\n            text: rowITM.no,\r\n            style: ['fontSubheading','alignmentRight']\r\n        },\r\n        {\r\n            text: rowITM.constructID, \r\n            style: ['fontSubheading']\r\n        },\r\n        {\r\n            text: rowITM.applicantName, \r\n            style: ['fontSubheading']\r\n        },\r\n        {\r\n            text: rowITM.buildingType, \r\n            style: ['fontSubheading']\r\n        },\r\n        {\r\n            text: rowITM.objective, \r\n            style: ['fontSubheading']\r\n        },\r\n        {\r\n            text: appDate, \r\n            style: ['fontSubheading']\r\n        },\r\n        {\r\n            text: permisDate, \r\n            style: ['fontSubheading']\r\n        },\r\n        {\r\n            text: rowITM.permissionID, \r\n            style: ['fontSubheading']\r\n        },\r\n        {\r\n            text: numberWithCommas(rowITM.sumArea, FIXED_NUMBER) , \r\n            style: ['fontSubheading', 'alignmentRight']\r\n        },\r\n        {\r\n            text: rowITM.chanode, \r\n            style: ['fontSubheading']\r\n        },\r\n        {\r\n            text: rowITM.address, \r\n            style: ['fontSubheading']\r\n        },\r\n        {\r\n            text: rowITM.remark, \r\n            style: ['fontSubheading']\r\n        }\r\n    ];\r\n}\r\n\r\nconst DistrictReportPDF = (year='YYYY', month=DEFAULT_MONTH, datasource=[], profile, displaySelectAdminpoly) => {\r\n    // console.log(\"formValues>>\",formValues)\r\n    const displayMonth = (month.id === DEFAULT_MONTH.id) ? '' : `ประจำเดือน ${month.name}`\r\n    // const dispalyDistrict = (formValues.ConstructionLicenseDistrict == DEFAULT_DISTRICT.id ) ? '' : ``\r\n    // console.log(\"configPage>\",...configPage)\r\n    var docDefinition = {\r\n        ...configPage,\r\n        content: [\r\n            {\r\n                text: `กสผ.๑`, \r\n                style: [ 'fontTitle', 'header','alignmentRight'],\r\n                margin: [0,0,20,0],//[left, top, right, bottom]\r\n                width: '*',\r\n                noWrap: true\r\n            },\r\n            {\r\n                text: `แบบรายงานการให้อนุญาตก่อสร้างอาคาร (เชิงรายการ)`, \r\n                style: [ 'fontTitle', 'header','alignmentCenter'],\r\n                width: '*',\r\n                noWrap: true\r\n            },\r\n            {\r\n                text: `${displaySelectAdminpoly} ${displayMonth} พ.ศ.${year}`, \r\n                style: [ 'fontTitle', 'header','alignmentCenter'],\r\n                margin: [0,10,0,0],//[left, top, right, bottom]\r\n                width: '*',\r\n                noWrap: true\r\n            },\r\n            {\r\n                text: `${profile.organizationName ? profile.organizationName : '-'} ${profile.userDistrictName ? profile.userDistrictName : '-'}`, \r\n                style: [ 'fontSubheading', 'header'],\r\n                margin: [20,10,0,0],//[left, top, right, bottom]\r\n                width: '*',\r\n                noWrap: true\r\n            },\r\n            ...generateTableHeader(datasource),\r\n            ...generateFooterRport(profile.userFullname ? profile.userFullname : '-')\r\n        ],\r\n        \r\n        styles: {\r\n            ...fontStyle,\r\n            ...tableStyle,\r\n            header: {\r\n                bold: true\r\n            },\r\n            alignmentCenter: {\r\n                alignment: 'center'\r\n            },\r\n            alignmentRight: {\r\n                alignment: 'right'\r\n            }\r\n        },\r\n        footer: {\r\n            columns: [\r\n                { \r\n                    text: FOOTER_REPORT,\r\n                    alignment: 'right',\r\n                    margin: [0,20,35,0],\r\n                    fontSize: 10\r\n                }\r\n            ]\r\n        },\r\n        \r\n        // footer: function(currentPage, pageCount,pageSize) {\r\n        //     if(currentPage === pageCount){\r\n              \r\n        //     return [\r\n        //             {\r\n        //                 text: `ผู้รายงาน ${profile.userFullname ? profile.userFullname : '-'}`, \r\n        //                 style: [ 'fontTitle','alignmentRight'],\r\n        //                 margin: [0,0,40,0],//[left, top, right, bottom]\r\n        //                 width: '*',\r\n        //                 noWrap: true\r\n        //             },\r\n        //             {\r\n        //                 text: `ผู้ตรวจ....................................`, \r\n        //                 style: [ 'fontTitle','alignmentRight'],\r\n        //                 margin: [0,15,40,50],//[left, top, right, bottom]\r\n        //                 width: '*',\r\n        //                 noWrap: true\r\n        //             },\r\n        //         ]\r\n        //     } else {\r\n        //         return [\r\n        //             { \r\n        //                 text: FOOTER_REPORT,\r\n        //                 alignment: 'right',\r\n        //                 margin: [0,20,35,0],\r\n        //                 fontSize: 10\r\n        //             }\r\n        //         ]\r\n        //     }\r\n        //  },\r\n        defaultStyle: {\r\n            font: \"THSarabun\",\r\n            columnGap: 10,\r\n        }\r\n      };\r\n    //   pdfMake.createPdf(docDefinition).open()\r\n      pdfMake.createPdf(docDefinition).download(\"รายงานสรุปผลการกำหนดตำแหน่งขออนุญาตก่อสร้าง.pdf\")\r\n      \r\n    \r\n}\r\n\r\nexport default DistrictReportPDF;\r\n\r\nconst generateFooterRport = (name) => {\r\n    return [\r\n        {\r\n            text: `ผู้รายงาน ${name}`, \r\n            style: [ 'fontTitle','alignmentRight'],\r\n            margin: [0,30,40,0],//[left, top, right, bottom]\r\n            width: '*',\r\n            noWrap: true\r\n        },\r\n        {\r\n            text: `ผู้ตรวจ....................................`, \r\n            style: [ 'fontTitle','alignmentRight'],\r\n            margin: [0,70,40,50],//[left, top, right, bottom]\r\n            width: '*',\r\n            noWrap: true\r\n        },\r\n    ]\r\n}","import React, { Fragment, useState, useEffect } from 'react';\r\nimport { connect } from 'react-redux'\r\nimport { reduxForm, getFormValues } from \"redux-form\";\r\nimport { compose } from \"recompose\";\r\n\r\n//import component\r\nimport ConstructionLicenseReportView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/Report/ConstructionLicense/ConstructionLicenseReportView'\r\nimport WithAlertMessage from '../../../../../../../HOC/WithAlertMessage';\r\nimport AlertMessageSuper from \"../../../../../../../Controls/Containers/AlertMessageSuper\";\r\nimport Loading from '../../../../../../../Controls/Containers/Loading';\r\nimport ConstructionLicenseReportExcel from './ConstructionLicenseReportExcel';\r\nimport ConstructionLicenseReportPDF from './ConstructionLicenseReportPDF';\r\n\r\n//import service - utils\r\nimport * as ServiceUtils from '../../../../../../../Utilities/ServiceUtils';\r\n\r\n//import constants\r\nimport { MONTH, ALERT_MESSAGE } from '../../../../../../../Constants/Constants';\r\n\r\nconst DEFAULT_MONTH = { id: 99, name: 'ทุกเดือน' }\r\nconst DEFAULT_DISTRICT = { id: 99, name: 'ทุกเขต' }\r\nconst DEFAULT_SUB_DISTRICT = { id: 99, name: \"ทุกแขวง\" }\r\n\r\nconst ConstructionLicenseReport = (props) => {\r\n\r\n    const {\r\n        onClickBack,\r\n        handleSubmit,\r\n        change,\r\n        title,\r\n        authenRdc,\r\n        showAlert,\r\n        hideAlert,\r\n    } = props;\r\n\r\n    const [listYear, setListYear] = useState();\r\n    const [listMonth, setListMonth] = useState();\r\n    const [listDistrict, setListDistrict] = useState();\r\n    const [listSubDistrict, setListSubDistrict] = useState([DEFAULT_SUB_DISTRICT]);\r\n    const [isLoading, setLoading] = useState(false)\r\n\r\n    useEffect(() => {\r\n\r\n        loadDDLyear()\r\n        loadDDLmonth()\r\n        loadDDLDistrict();\r\n        change('ConstructionLicenseSubDistrict', DEFAULT_SUB_DISTRICT.id)\r\n    }, [])\r\n\r\n    const loadDDLyear = async () => {\r\n        const currentDate = new Date();\r\n        const currentYear = currentDate.getFullYear() + 543;\r\n\r\n        const response = await ServiceUtils.fetchGet_(`${process.env.REACT_APP_LU_CONTRUCT_YEAR_REPORT}`);\r\n        const objResult = await response.json();\r\n\r\n        objResult.result.forEach((itm)=>{\r\n            itm.year = itm.year+543\r\n        })\r\n\r\n        setListYear(objResult.result);\r\n        change('ConstructionLicenseYear', currentYear - 543);\r\n    }\r\n\r\n    const loadDDLmonth = () => {\r\n        setListMonth([DEFAULT_MONTH, ...MONTH]);\r\n        change('ConstructionLicenseMonth', DEFAULT_MONTH.id)\r\n    }\r\n\r\n    const loadDDLDistrict = async () => {\r\n        try {\r\n            const PROVINCE_CODE = '10';\r\n            const response = await ServiceUtils.fetchGet_(`${process.env.REACT_APP_LU_DISTRICT}?provinceid=${PROVINCE_CODE}`);\r\n            const objResult = await response.json();\r\n          \r\n            setListDistrict([\r\n                DEFAULT_DISTRICT,\r\n                ...objResult.result.map(itm => ({\r\n                    id: `${itm.value}`,\r\n                    name: itm.name\r\n                }))\r\n            ]);\r\n\r\n            if(authenRdc && authenRdc.profile && authenRdc.profile.districtID) {\r\n                change('ConstructionLicenseDistrict', authenRdc.profile.districtID)\r\n                loadDDLSubDistrict(authenRdc.profile.districtID)\r\n            } else {\r\n                change('ConstructionLicenseDistrict', DEFAULT_DISTRICT.id)\r\n            }\r\n        }\r\n        catch (err) {\r\n            setListDistrict([]);\r\n        }\r\n    }\r\n\r\n    const loadDDLSubDistrict = async (districtID = null) => {\r\n   \r\n        let districtParam = `&districtid=${districtID}`;\r\n        if(districtID === DEFAULT_DISTRICT.id || districtID === null){\r\n    \r\n            setListSubDistrict([DEFAULT_SUB_DISTRICT]); \r\n            change('ConstructionLicenseSubDistrict', DEFAULT_SUB_DISTRICT.id)\r\n        } else {\r\n            try {\r\n                const PROVINCE_CODE = '10';\r\n                const response = await ServiceUtils.fetchGet_(`${process.env.REACT_APP_LU_SUBDISTRICT}?provinceid=${PROVINCE_CODE}${districtParam}`);\r\n                const objResult = await response.json();\r\n               \r\n                    setListSubDistrict([\r\n                    DEFAULT_SUB_DISTRICT,\r\n                    ...objResult.result.map(itm => ({\r\n                        id: `${itm.value}`,\r\n                        name: itm.name\r\n                    }))\r\n                ]);\r\n\r\n                change('ConstructionLicenseSubDistrict', DEFAULT_SUB_DISTRICT.id)\r\n            } catch (err) {\r\n                setListSubDistrict([]);\r\n            }\r\n        }\r\n    }\r\n\r\n    const handleChangeAdminPoly = (type) => (evt) => {\r\n      \r\n        switch (type) {\r\n            case \"district\":\r\n                loadDDLSubDistrict(evt.target.value);\r\n                break;\r\n            default:\r\n                break;\r\n        }\r\n    }\r\n\r\n    const executeGenerateReport = async(values, reportFunction) => {\r\n        setLoading(true);\r\n        try{\r\n            const profile = {\r\n                userFullname: `${authenRdc.profile.firstName} ${authenRdc.profile.lastName}`,\r\n                userDistrictName: authenRdc.profile.districtName,\r\n                usergroupName: authenRdc.profile.groupName,\r\n                organizationName: authenRdc.profile.organizationName,\r\n            }\r\n\r\n            let displayMonth = DEFAULT_MONTH;\r\n            let displaySelectAdminpoly = '';\r\n            let monthParam = `&month=${values.ConstructionLicenseMonth}`;\r\n            let districtParam = `&districtid=${values.ConstructionLicenseDistrict}`;\r\n            let subDistrictParam = `&subdistrictid=${values.ConstructionLicenseSubDistrict}`\r\n\r\n            if(values.ConstructionLicenseDistrict === DEFAULT_DISTRICT.id){\r\n                districtParam = '';\r\n            }else{\r\n                let displayDistrict = listDistrict.filter(itmDistrict => itmDistrict.id.toString() === values.ConstructionLicenseDistrict)[0];\r\n                displaySelectAdminpoly += `เขต ${displayDistrict.name}`\r\n            }\r\n\r\n            if(values.ConstructionLicenseMonth === DEFAULT_MONTH.id){\r\n                monthParam = '';\r\n            }else{\r\n                displayMonth = MONTH.filter(itmMonth => itmMonth.id === values.ConstructionLicenseMonth)[0];\r\n            }\r\n\r\n            if(values.ConstructionLicenseSubDistrict === DEFAULT_SUB_DISTRICT.id ){\r\n                subDistrictParam = ''\r\n            }else{\r\n                if(values.ConstructionLicenseSubDistrict !== null) {\r\n                    let displaySubDistrict = listSubDistrict.filter(itmSubDistrict => itmSubDistrict.id === values.ConstructionLicenseSubDistrict)[0];\r\n                    displaySelectAdminpoly += ` แขวง ${displaySubDistrict.name}`\r\n                }               \r\n            }\r\n            \r\n            const response = await ServiceUtils.fetchGet_(`${process.env.REACT_APP_GET_CONSTRUCT_REPORT}?year=${values.ConstructionLicenseYear}${monthParam}${districtParam}${subDistrictParam}`)\r\n            setLoading(false);\r\n            const objResult = await response.json();\r\n            \r\n            if(objResult && objResult.result && objResult.result.length > 0){\r\n                const datasource = objResult.result;\r\n                const displayYearBC = values.ConstructionLicenseYear + 543;\r\n                reportFunction(displayYearBC, displayMonth, datasource, profile, displaySelectAdminpoly)\r\n            }\r\n            else{\r\n                showAlert({ altMsg: \"ไม่พบข้อมูลสำหรับออกรายงาน\" , callbackClose: hideAlert})\r\n            }\r\n        }\r\n        catch(err){\r\n            console.log('err ::: ', err);\r\n            setLoading(false);\r\n            showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR, callbackClose: hideAlert})\r\n        }\r\n    }\r\n\r\n\r\n    const previewFunction = (values) => {\r\n        executeGenerateReport(values, ConstructionLicenseReportPDF)\r\n    }\r\n\r\n    const exportExcelFunction = async (values) => {\r\n        executeGenerateReport(values, ConstructionLicenseReportExcel)\r\n    }\r\n\r\n    return <Fragment>\r\n        <ConstructionLicenseReportView\r\n            onBackClick={onClickBack}\r\n            title={title}\r\n            listYear={listYear}\r\n            listMonth={listMonth}\r\n            listDistrict={listDistrict}\r\n            listSubDistrict={listSubDistrict}\r\n            handleSubmit={handleSubmit}\r\n            previewFn={previewFunction}\r\n            exportExcelFn={exportExcelFunction}\r\n            onChangeAdminPoly={handleChangeAdminPoly}\r\n            isDistrict={authenRdc.profile.districtID ? true:false}\r\n        />\r\n        <Loading isShowLoading={isLoading}/>\r\n        <AlertMessageSuper {...props} />\r\n    </Fragment>\r\n}\r\n\r\nconst mapStateToProps = state => ({\r\n    _values: getFormValues('ConstructionLicenseReportFormCAH')(state),\r\n    authenRdc: state.authen,\r\n})\r\nconst formName = \"ConstructionLicenseReportFormCAH\";\r\nconst reduxFormParameter = {\r\n    form: formName,\r\n};\r\n\r\nexport default compose(\r\n    connect(mapStateToProps, null),\r\n    reduxForm(reduxFormParameter),\r\n    WithAlertMessage\r\n)(ConstructionLicenseReport);","import React from 'react';\r\nimport { Scrollbars } from 'react-custom-scrollbars';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { withStyles } from '@material-ui/core/styles';\r\n// import Button from '@material-ui/core/Button';\r\nimport Button from '../../../../../../../Controls/Containers/Button';\r\nimport classnames from 'classnames';\r\nimport { Field } from \"redux-form\";\r\n\r\nimport SelectField from '../../../../../../../Controls/Containers/SelectFieldRedux';\r\nimport AppBarHeaderView from '../../../../AppBarHeaderView';\r\nimport { BTN } from '../../../../../../../Constants/Constants'\r\n\r\nconst HouseNumberReportView = ({\r\n    classes,\r\n    onBackClick,\r\n    title,\r\n    listYear = [],\r\n    listMonth = [],\r\n    listDistrict = [],\r\n    listSubDistrict = [],\r\n    previewFn,\r\n    exportExcelFn,\r\n    handleSubmit,\r\n    onChangeAdminPoly,\r\n    isDistrict\r\n    // onValueChange\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root}>\r\n            <AppBarHeaderView\r\n                title={title}\r\n                onClickBack={onBackClick}\r\n            />\r\n            <Grid container className={classnames(classes.content)}>\r\n                <Scrollbars\r\n                    autoHide={false}\r\n                    universal={true}>\r\n                    <Grid item xs={12} className={classes.content_in}>\r\n                        \r\n                        <Field\r\n                            label={'ปี'}\r\n                            name={'TR900Year'}\r\n                            component={SelectField}\r\n                            // onChange={onValueChange('year')}\r\n                            data={listYear}\r\n                            required\r\n                        />\r\n                        <Field\r\n                            label={'เดือน'}\r\n                            name={'TR900Month'}\r\n                            component={SelectField}\r\n                            // onChange={onValueChange('month')}\r\n                            data={listMonth}\r\n                            required\r\n                        />\r\n                        <Field\r\n                            label={'เขต'}\r\n                            name={'TR900District'}\r\n                            component={SelectField}\r\n                            onChange={onChangeAdminPoly('district')}\r\n                            disabled={isDistrict}\r\n                            // onChange={onValueChange('district')}\r\n                            data={listDistrict}\r\n                            required\r\n                        />\r\n                        <Field\r\n                            label={'แขวง'}\r\n                            name={'TR900SubDistrict'}\r\n                            component={SelectField}\r\n                            // onChange={onValueChange('district')}\r\n                            data={listSubDistrict}\r\n                            required\r\n                        />\r\n\r\n                        {/* //// Button //// */}\r\n                        <Grid container justify=\"center\" spacing={24} className={classes.divFooter} >\r\n                            <Grid item>\r\n                                <Button\r\n                                    label={BTN.TH.CANCEL}\r\n                                    onClick={onBackClick}\r\n                                />\r\n                            </Grid>\r\n                            <Grid item>\r\n                                <Button\r\n                                      label={BTN.EN.EXPORT_EXCEL}\r\n                                    onClick={handleSubmit(exportExcelFn)}\r\n                                />\r\n                            </Grid>\r\n                            <Grid item>\r\n                                <Button\r\n                                     label={BTN.EN.EXPORT_PDF}\r\n                                    onClick={handleSubmit(previewFn)}\r\n                                />\r\n                            </Grid>\r\n\r\n\r\n                        </Grid>\r\n                        {/* ////////////// */}\r\n\r\n                    </Grid>\r\n                </Scrollbars>\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    _hide: {\r\n        display: 'none'\r\n    },\r\n    root: {\r\n        position: 'absolute',\r\n        top: 0,\r\n        bottom: 0,\r\n        right: 0,\r\n        left: 0\r\n    },\r\n    content: {\r\n        position: 'relative',\r\n        height: 'calc(100% - 45px)'\r\n    },\r\n    content_in: {\r\n        padding: \"10px\",\r\n        width: \"100%\"\r\n    },\r\n    divFooter: {\r\n        marginTop: \"10px\",\r\n        marginBottom: \"10px\"\r\n    }\r\n}))(HouseNumberReportView);","import pdfMake from \"pdfmake/build/pdfmake\";\r\nimport pdfFonts from \"pdfmake/build/vfs_fonts\";\r\nimport { FOOTER_REPORT } from '../../../../../../../Constants/Constants'\r\n\r\npdfMake.vfs = pdfFonts.pdfMake.vfs;\r\npdfMake.fonts = {\r\n    THSarabun: {\r\n        normal: 'THSarabun.ttf',\r\n        bold: 'THSarabun-Bold.ttf',\r\n        italics: 'THSarabun-Italic.ttf',\r\n        bolditalics: 'THSarabun-BoldItalic.ttf'\r\n    },\r\n    Roboto: {\r\n        normal: 'Roboto-Regular.ttf',\r\n        bold: 'Roboto-Medium.ttf',\r\n        italics: 'Roboto-Italic.ttf',\r\n        bolditalics: 'Roboto-MediumItalic.ttf'\r\n    }\r\n}\r\n\r\nconst configPage = {\r\n    pageSize: 'A4',\r\n    pageOrientation: 'landscape',//portrait\r\n    info: {\r\n        title: 'รายงานการกำหนดตำแหน่งการออกเลขรหัสบ้านหรือเลขที่บ้าน',\r\n        subject: 'รายงานการกำหนดตำแหน่งการออกเลขรหัสบ้านหรือเลขที่บ้าน',\r\n        keywords: 'รายงานการกำหนดตำแหน่งการออกเลขรหัสบ้านหรือเลขที่บ้าน',\r\n    },\r\n    pageMargins: [ 5, 40, 10, 60 ],// [left, top, right, bottom] or [horizontal, vertical]\r\n}\r\n\r\n// let sum = 0;\r\n\r\n// const mock = [{\"permissionID\":\"007/2562\",\"chanode\":\"C001, C002\",\"address\":\"เลขที่ 11\",\"houseID\":\"11111212\",\"houseTRID\":\"2539\",\"numHouse\":1},\r\n// {\"permissionID\":\"0524200\",\"chanode\":\"1, 2\",\"address\":\"เลขที่ 524200200, 524200201, 524200202, 524200203, 524200204, 524200205, 524200206, 524200207, 524200208, 524200209\",\"houseID\":\"0524200200, 0524200201, 0524200202, 0524200203, 0524200204, 0524200205, 0524200206, 0524200207, 0524200208, 0524200209\",\"houseTRID\":\"0524200\",\"numHouse\":10},\r\n// {\"permissionID\":\"0524400\",\"chanode\":\"\",\"address\":\"เลขที่ 524500, 524501, 524502, 524503, 524504, 524505, 524506, 524507, 524508, 524509\",\"houseID\":\"0524350, 0524351, 0524352, 0524353, 0524354, 0524355, 0524356, 0524357, 0524358, 0524359\",\"houseTRID\":\"0524400\",\"numHouse\":10},\r\n// {\"permissionID\":\"0524500\",\"chanode\":\"\",\"address\":\"เลขที่ 524500, 524501, 524502, 524503, 524504, 524505, 524506, 524507, 524508, 524509\",\"houseID\":\"0524500, 0524501, 0524502, 0524503, 0524504, 0524505, 0524506, 0524507, 0524508, 0524509\",\"houseTRID\":\"0524500\",\"numHouse\":10},\r\n// {\"permissionID\":\"2562/001\",\"chanode\":\"\",\"address\":\"เลขที่ 1 ถึง 11\",\"houseID\":\"000001 ถึง 0000011\",\"houseTRID\":\"1111\",\"numHouse\":11},\r\n// {\"permissionID\":null,\"chanode\":\"\",\"address\":\"เลขที่ 100/1, 100/2, 100/3, 100/4, 100/5\",\"houseID\":\"10000000001, 10000000002, 10000000003, 10000000004, 10000000005\",\"houseTRID\":\"1001\",\"numHouse\":5}\r\n// ]\r\n\r\nconst fontStyle = {\r\n    fontHeading: {\r\n        fontSize: 18\r\n    },\r\n    fontTitle: {\r\n        fontSize: 16\r\n    },\r\n    fontSubheading: {\r\n        fontSize: 14\r\n    },\r\n    fontBody: {\r\n        fontSize: 12\r\n    }\r\n}\r\n\r\nconst tableStyle = {\r\n    rowNumber: {\r\n        alignment: 'right'\r\n    },\r\n    rowHeaderColor: {\r\n        fillColor: '#5E9A50'\r\n    },\r\n    rowFooterColor: {\r\n        fillColor: '#5E9A50'\r\n    },\r\n    rowOtherColor1: {\r\n        fillColor: '#D0EFDA'\r\n    },\r\n    rowOtherColor2: {\r\n        fillColor: '#E5F6E8'\r\n    },\r\n}\r\n\r\n\r\n\r\n\r\nconst HouseNumberExporPDF = (datasource=[]) => {\r\n    const {dataDisplay, profile} = datasource\r\n    const docDefinition = {\r\n        ...configPage,\r\n        content: [\r\n            {\r\n                text: `กสผ.๒`, \r\n                style: [ 'fontTitle', 'header','alignmentRight'],\r\n                margin: [0,0,20,0],//[left, top, right, bottom]\r\n                width: '*',\r\n                noWrap: true\r\n            },\r\n            {\r\n                text: `รายงานสรุปผลการกำหนดตำแหน่งการออกเลขรหัสบ้านหรือเลขที่บ้าน`, \r\n                style: [ 'fontTitle', 'header','alignmentCenter'],\r\n                width: '*',\r\n                noWrap: true\r\n            },\r\n            {\r\n                // text: `ประจำเดือน ${displayMonth} พ.ศ.${year}`, \r\n                text: `  ${dataDisplay.display} พ.ศ ${dataDisplay.displayYearBC}`, \r\n                style: [ 'fontTitle', 'header','alignmentCenter'],\r\n                margin: [0,10,0,0],//[left, top, right, bottom]\r\n                width: '*',\r\n                noWrap: true\r\n            },\r\n            {\r\n                text: `${profile.organizationName ? profile.organizationName : '-'} ${profile.userDistrictName ? profile.userDistrictName : '-'}`,//`ฝ่ายโยธา สำนักงานเขต .......`, \r\n                style: [ 'fontSubheading', 'header'],\r\n                margin: [20,10,0,0],//[left, top, right, bottom]\r\n                width: '*',\r\n                noWrap: true\r\n            },\r\n            ...generateTableHeader(datasource),\r\n            // ...generateFooterFinal(dataDisplay)\r\n            {\r\n                text: `ผู้รายงาน  ${dataDisplay.name}`, \r\n                style: [ 'fontTitle','alignmentRight'],\r\n                margin: [0, 30, 40, 0],//[left, top, right, bottom]\r\n                width: '*',\r\n                noWrap: true\r\n            },\r\n            {\r\n                text: `ผู้ตรวจ....................................`, \r\n                style: [ 'fontTitle','alignmentRight'],\r\n                margin: [0, 70, 40, 10],//[left, top, right, bottom]\r\n                width: '*',\r\n                noWrap: true\r\n            },\r\n            \r\n        ],\r\n        styles: {\r\n            ...fontStyle,\r\n            ...tableStyle,\r\n            header: {\r\n                bold: true\r\n            },\r\n            alignmentCenter: {\r\n                alignment: 'center'\r\n            },\r\n            alignmentRight: {\r\n                alignment: 'right'\r\n            }\r\n        },\r\n        footer: {\r\n            columns: [\r\n                { \r\n                    text: FOOTER_REPORT,\r\n                    alignment: 'right',\r\n                    margin: [0,20,35,0],\r\n                    fontSize: 10\r\n                }\r\n            ]\r\n        },\r\n    //     footer: function(currentPage, pageCount,pageSize) {\r\n    //         // if(currentPage === pageCount){\r\n    //         //     return [\r\n    //         //         // {\r\n    //         //         //     text: `ผู้รายงาน  ${dataDisplay.name}`, \r\n    //         //         //     style: [ 'fontTitle','alignmentRight'],\r\n    //         //         //     margin: [0,-55,40,0],//[left, top, right, bottom]\r\n    //         //         //     width: '*',\r\n    //         //         //     noWrap: true\r\n    //         //         // },\r\n    //         //         // {\r\n    //         //         //     text: `ผู้ตรวจ....................................`, \r\n    //         //         //     style: [ 'fontTitle','alignmentRight'],\r\n    //         //         //     margin: [0,0,40,10],//[left, top, right, bottom]\r\n    //         //         //     width: '*',\r\n    //         //         //     noWrap: true\r\n    //         //         // },\r\n    //         //         { \r\n    //         //             text: FOOTER_REPORT,\r\n    //         //             alignment: 'right',\r\n    //         //             margin: [0,20,35,0],\r\n    //         //             fontSize: 10\r\n    //         //         }\r\n    //         //     ]\r\n    //         // } else {\r\n    //             return [\r\n    //                 { \r\n    //                     text: FOOTER_REPORT,\r\n    //                     alignment: 'right',\r\n    //                     margin: [0,20,35,0],\r\n    //                     fontSize: 10\r\n    //                 }\r\n    //             ]\r\n    //         // }\r\n\r\n    //  },\r\n        defaultStyle: {\r\n            font: \"THSarabun\",\r\n            columnGap: 10,\r\n        }\r\n    };\r\n    // pdfMake.createPdf(docDefinition).open()\r\n    pdfMake.createPdf(docDefinition).download('รายงานสรุปผลการกำหนดตำแหน่งการออกเลขรหัสบ้านหรือเลขที่บ้าน.pdf');\r\n}\r\n\r\nexport default HouseNumberExporPDF;\r\n\r\n// const generateFooterFinal = (name) => {\r\n//     return [ \r\n//         {\r\n//             margin: [0, 20, 0, 0],\r\n//             column: [\r\n//                {\r\n//                     text: `ผู้รายงาน  ${name}`, \r\n//                     style: [ 'fontTitle','alignmentRight'],\r\n//                     margin: [0, 0, 40, 0],//[left, top, right, bottom]\r\n//                     width: '*',\r\n//                     noWrap: true\r\n//                 },\r\n//                 {\r\n//                     text: `ผู้ตรวจ....................................`, \r\n//                     style: [ 'fontTitle','alignmentRight'],\r\n//                     margin: [0, 20, 40, 10],//[left, top, right, bottom]\r\n//                     width: '*',\r\n//                     noWrap: true\r\n//                 },\r\n//             ]\r\n//         }\r\n//     ]\r\n// }\r\n\r\n\r\nconst generateTableHeader = (datasource=[]) => {\r\n    return [\r\n        {\r\n            margin: [0,15,0,0],//[left, top, right, bottom]\r\n            columns: [\r\n                { width: '*', text: '' },\r\n                {\r\n                    width: 'auto',\r\n                    table: {\r\n                        // headers are automatically repeated if the table spans over multiple pages\r\n                        // you can declare how many rows should be treated as headers\r\n                        headerRows: 1,\r\n                        widths: [ 30, 140, 100, 150, 105, 100, 100],\r\n                        body: [\r\n                            [ \r\n                                {\r\n                                    text: `ลำดับที่`,\r\n                                    style: ['fontSubheading', 'alignmentCenter', 'rowHeaderColor'],\r\n                                    bold:true,\r\n                                    margin: [0,8,0,0]\r\n                                },\r\n                                {\r\n                                    text: `เลขที่ใบอนุญาต (อ.๑) หรือ เลขที่ใช้รับแจ้ง (กทม.๖)`,\r\n                                    style: ['fontSubheading', 'alignmentCenter', 'rowHeaderColor'],\r\n                                    bold:true\r\n                                },\r\n                                {\r\n                                    text: 'โฉนดเลขที่/(เลขที่ดิน)',\r\n                                    style: ['fontSubheading', 'alignmentCenter', 'rowHeaderColor'],\r\n                                    bold:true,\r\n                                    margin: [0,8,0,0]\r\n                                },\r\n                                {\r\n                                    text: `กำหนดบ้านเลขที่`,\r\n                                    style: ['fontSubheading', 'alignmentCenter', 'rowHeaderColor'],\r\n                                    bold:true,\r\n                                    margin: [0,8,0,0]\r\n                                },\r\n                                {\r\n                                    text: `เลขรหัสประจำบ้าน`,\r\n                                    style: ['fontSubheading', 'alignmentCenter', 'rowHeaderColor'],\r\n                                    bold:true,\r\n                                    margin: [0,8,0,0]\r\n                                },\r\n                                {\r\n                                    text: `คำขอเลขที่`,\r\n                                    style: ['fontSubheading', 'alignmentCenter', 'rowHeaderColor'],\r\n                                    bold:true,\r\n                                    margin: [0,8,0,0]\r\n                                },\r\n                                {\r\n                                    text: `จำนวนหลัง (จำนวนเลขที่)`,\r\n                                    style: ['fontSubheading', 'alignmentCenter', 'rowHeaderColor'],\r\n                                    bold:true\r\n                                }\r\n                            ],\r\n\r\n                            ...makeTableContent(datasource)\r\n                        ]\r\n                    },\r\n                    layout: {\r\n                        fillColor: function (rowIndex, node, columnIndex) {\r\n                            return (rowIndex % 2 === 1) ? '#0098DAA8' : null;\r\n                        }\r\n                    }\r\n                },\r\n                { width: '*', text: '' }\r\n            ]\r\n        }\r\n    ]\r\n}\r\n\r\nconst makeTableContent = (datasource=[]) => {\r\n    let rowNo = 1;\r\n    const listRow = [];\r\n    let sumNum = 0\r\n    datasource['datasource'].forEach(groupITM => {\r\n        // mock.forEach(groupITM => {\r\n        //content\r\n        // console.log('sum', sumNum, groupITM.numHouse )\r\n        sumNum += groupITM.numHouse\r\n            listRow.push(makeRowITM({\r\n                    no:rowNo++,\r\n                    ...groupITM\r\n                }));\r\n\r\n       \r\n    })\r\n\r\n    listRow.push([ \r\n        {\r\n            colSpan: 6,\r\n            text: 'รวม', \r\n            style: ['fontSubheading','alignmentCenter']\r\n        },'','','','','',\r\n        {\r\n            text: sumNum, \r\n            style: ['fontSubheading','alignmentRight']\r\n        }\r\n    ]);\r\n    return listRow;\r\n}\r\n\r\nconst makeRowITM = (rowITM) => {\r\n\r\n    return [ \r\n        {\r\n            text: rowITM.no,\r\n            style: ['fontSubheading','alignmentRight']\r\n        },\r\n        {\r\n            text: rowITM.permissionID, \r\n            style: ['fontSubheading']\r\n        },\r\n        {\r\n            text: rowITM.chanode, \r\n            style: ['fontSubheading']\r\n        },\r\n        {\r\n            text: rowITM.address, \r\n            style: ['fontSubheading']\r\n        },\r\n        {\r\n            text: rowITM.houseID, \r\n            style: ['fontSubheading','alignmentRight']\r\n        },\r\n        {\r\n            text: rowITM.houseTRID, \r\n            style: ['fontSubheading']\r\n        },\r\n        {\r\n            text: rowITM.numHouse, \r\n            style: ['fontSubheading','alignmentRight']\r\n        }\r\n    ];\r\n}","import Excel from \"exceljs/dist/es5/exceljs.browser\";\r\n\r\nexport default(values) => {\r\n    const startRowTopic = 1; //ใช้กำหนดแถวที่เป็นหัวเรื่อง\r\n    const startRowHeader = 5;//ใช้กำหนดแถวที่จะเป็นหัวตาราง\r\n    const workbook = new Excel.Workbook();//สร้าง instance\r\n    const worksheet = workbook.addWorksheet('sheet', {//จำเป็นต้องตั้งค่าส่วนนี้\r\n        pageSetup:{\r\n            paperSize: 9, //follow documentation the 9 value is A4\r\n            orientation:'portrait'//แนวตั้ง\r\n        }\r\n    });\r\n    workbook.creator = 'PMR-WEB';//ผู้สร้าง\r\n    workbook.lastModifiedBy = 'PMR-WEB';//ผู้แก้ไขล่าสุด\r\n    const {profile} = values;\r\n    const textOfTopic = [\r\n        { name: 'กสผ.๒', horizontal: 'right' },\r\n        { name: 'รายงานสรุปผลการกำหนดตำแหน่งการออกเลขรหัสบ้านหรือเลขที่บ้าน', horizontal: 'center' },\r\n        { name: `${values.dataDisplay.display === \" \"? \"ประจำปี\": values.dataDisplay.display} ${values.dataDisplay.displayYearBC}`, horizontal: 'center' },\r\n        { name: `${profile.organizationName ? profile.organizationName : '-'} ${profile.userDistrictName ? profile.userDistrictName : '-'}`, horizontal: 'left' }\r\n    ]\r\n\r\n    const headerExcel = [\r\n        { key:'no', name: 'ลำดับ', width: 10 },\r\n        { key:'permissionID', name: 'เลขที่ใบอนุญาต(อ.1) หรือ เลขที่ใบรับแจ้ง(กทม.6)', width: 30 },\r\n        { key:'chanode', name: 'โฉนดเลขที่(เลขที่ดิน)', width: 30 },\r\n        { key:'address', name: 'กำหนดบ้านเลขที่', width: 30 },\r\n        { key:'houseID', name: 'เลขรหัสประจำบ้าน', width: 30 },\r\n        { key:'houseTRID', name: 'คำขอเลขที่', width: 30 },\r\n        { key:'numHouse', name: 'จำนวนหลัง(จำนวนเลขที่)', width: 15 }\r\n    ]\r\n\r\n    const contentTableExcale = values.datasource\r\n\r\n    const downloadProcess = () => {\r\n        workbook.xlsx.writeBuffer().then(function (xls64data) {\r\n            const blob = new Blob([xls64data],\r\n              { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });\r\n            const url = window.URL.createObjectURL(blob);\r\n            const anchor = document.createElement('a');\r\n            document.body.appendChild(anchor); //for firefox ref: https://stackoverflow.com/questions/41805095/excel-export-not-working-on-firefox-but-working-fine-in-google-crome/41806544\r\n            anchor.href = url;\r\n            anchor.download = 'รายงานสรุปผลการกำหนดตำแหน่งการออกเลขรหัสบ้านหรือเลขที่บ้าน.xlsx';\r\n            var isIE = /*@cc_on!@*/false || !!document.documentMode;\r\n            var isEdge = !isIE && !!window.StyleMedia;\r\n            if(isEdge){\r\n                anchor.click();\r\n                anchor.change();\r\n            } else {\r\n                anchor.click();\r\n            }\r\n            window.URL.revokeObjectURL(url);//เมื่อใช้ URL.createObjectURL แล้วต้องเรียกคำสั่งนี้เพื่อให้ Browser รู้ว่าจะไม่เก็บ Reference file อีกต่อไป\r\n        });\r\n    }\r\n\r\n    const generateTopic = () => {\r\n        const columns = headerExcel.length;\r\n        \r\n        textOfTopic.map((item, index) => {\r\n            const row = startRowTopic + index;\r\n            worksheet.mergeCells(row, 1, row, columns);\r\n            const getRow = worksheet.getRow(row);\r\n            getRow.getCell(columns).value = item.name;\r\n            getRow.getCell(columns).alignment = { vertical: 'middle', horizontal: item.horizontal }\r\n\r\n            return true\r\n        })\r\n    }\r\n\r\n    const setCellBorder = (row, colKey) => {\r\n        row.getCell(colKey).border = {\r\n            top: {style:'thin'},\r\n            left: {style:'thin'},\r\n            bottom: {style:'thin'},\r\n            right: {style:'thin'}\r\n        };\r\n    }\r\n\r\n    const settingColumn = () => {\r\n        worksheet.columns = headerExcel.map((item) => {\r\n            return {\r\n                key: item.key,\r\n                width: item.width\r\n            }\r\n        })\r\n    }\r\n\r\n    const generateHeader = () => {\r\n        worksheet.getRow(startRowHeader).values = headerExcel.map((item) => {\r\n            return item.name\r\n        })\r\n        let row = worksheet.getRow(startRowHeader);\r\n        headerExcel.map((item) => {\r\n            setCellBorder(row, item.key)\r\n            row.getCell(item.key).alignment = { vertical: 'middle', horizontal:'center', wrapText: true }\r\n            row.getCell(item.key).fill = {\r\n                type: 'pattern',\r\n                pattern: 'solid',\r\n                fgColor: {\r\n                    argb:'005E9A50'\r\n                }\r\n            }\r\n\r\n            if(item.key === 'numHouse') { \r\n                worksheet.getColumn(item.key).numFmt = '#,##0';\r\n            }\r\n        })\r\n    }\r\n\r\n    const generateBody = () => {\r\n        contentTableExcale.forEach((item,index) => {\r\n            item.no = index+1;\r\n            worksheet.addRow(item)\r\n            \r\n             //set style\r\n            const lastRowNumber = worksheet.lastRow._number;\r\n            const row = worksheet.getRow(lastRowNumber);\r\n            worksheet.lastRow._cells.forEach(cell => {\r\n                setCellBorder(row, cell.col);\r\n                row.getCell(cell.col).alignment = { wrapText: true, vertical: 'top' };\r\n                if(item.no%2 !== 0){\r\n                    row.getCell(cell.col).fill = {\r\n                        type: 'pattern',\r\n                        pattern: 'solid',\r\n                        fgColor: {\r\n                            argb: '0098DAA8'\r\n                        }\r\n                    }\r\n                }\r\n            })\r\n        })\r\n    }\r\n\r\n    const generateBodyFinal = () => {\r\n        const result = calculateNumberOfHouse();\r\n\r\n        const columns = headerExcel.length;\r\n        const lastRow = (worksheet.lastRow._number)+1;\r\n\r\n        const rowBodyFinal = worksheet.getRow(lastRow);\r\n        worksheet.mergeCells(lastRow, 1, lastRow, columns-1);\r\n        setCellBorder(rowBodyFinal, columns-1);\r\n        rowBodyFinal.getCell(columns-1).value = 'รวม';\r\n        rowBodyFinal.getCell(columns-1).alignment = { vertical: 'middle', horizontal: 'center' };\r\n\r\n        setCellBorder(rowBodyFinal, columns);\r\n        rowBodyFinal.getCell(columns).value = result;\r\n        rowBodyFinal.getCell(columns).alignment = { vertical: 'middle', horizontalz: 'right' };\r\n    }\r\n\r\n    const calculateNumberOfHouse = () => {\r\n        const exportNumHouse = contentTableExcale.map(item => item.numHouse);\r\n        const result = exportNumHouse.reduce((accmulator, currentValue) => accmulator + currentValue, 0)\r\n\r\n        return result\r\n    }\r\n\r\n    const generateFinalSheet = () => {\r\n        const columns = headerExcel.length;\r\n        const lastRow = (worksheet.lastRow._number)+1;\r\n\r\n        const rowReportBy = worksheet.getRow(lastRow);\r\n        worksheet.mergeCells(lastRow,1,lastRow,columns);\r\n        rowReportBy.getCell(columns).value = `ผู้รายงาน ${values.dataDisplay.name}`;\r\n        rowReportBy.getCell(columns).alignment = { vertical: 'middle', horizontal:'right' }\r\n\r\n        const rowInspectBy = worksheet.getRow(lastRow+1)\r\n        worksheet.mergeCells(lastRow+1, 1, lastRow+1, columns);\r\n        rowInspectBy.getCell(columns).value = 'ผู้ตรวจ.......................................'\r\n        rowInspectBy.getCell(columns).alignment = { vertical: 'middle', horizontal:'right' }\r\n    }\r\n\r\n    const generateContentProcess = () => {\r\n        generateTopic();\r\n        settingColumn();\r\n        generateHeader();\r\n        generateBody();\r\n        generateBodyFinal();\r\n        generateFinalSheet();\r\n    }\r\n\r\n    const mainProcess = () => {\r\n        generateContentProcess();\r\n        downloadProcess();\r\n    }\r\n\r\n    mainProcess();\r\n}\r\n\r\n","import React, { Fragment, useState, useEffect } from 'react';\r\nimport { connect } from 'react-redux'\r\nimport { reduxForm, getFormValues } from \"redux-form\";\r\nimport { compose } from \"recompose\";\r\n\r\n//import component\r\nimport HouseNumberReportView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/Report/HouseNumber/HouseNumberReportView'\r\nimport WithAlertMessage from '../../../../../../../HOC/WithAlertMessage';\r\nimport AlertMessageSuper from \"../../../../../../../Controls/Containers/AlertMessageSuper\";\r\nimport Loading from '../../../../../../../Controls/Containers/Loading';\r\nimport HouseNumberExporPDF from './HouseNumberExporPDF'\r\nimport Excel from './HouseNumberExcel'\r\n\r\n//import service - utils\r\nimport * as ServiceUtils from '../../../../../../../Utilities/ServiceUtils';\r\n\r\n//import constants\r\nimport { MONTH, ALERT_MESSAGE } from '../../../../../../../Constants/Constants';\r\n\r\nconst DEFAULT_MONTH = { id: 99, name: 'ทุกเดือน' }\r\nconst DEFAULT_DISTRICT = { id: 99, name: 'ทุกเขต' }\r\nconst DEFAULT_SUB_DISTRICT = { id: 99, name: \"ทุกแขวง\" }\r\n\r\nconst HouseNumberReport = (props) => {\r\n\r\n    const {\r\n        onClickBack,\r\n        handleSubmit,\r\n        change,\r\n        title,\r\n        showAlert,\r\n        hideAlert,\r\n        authenRdc\r\n    } = props;\r\n\r\n    const [listYear, setListYear] = useState();\r\n    const [listMonth, setListMonth] = useState();\r\n    const [listDistrict, setListDistrict] = useState();\r\n    const [listSubDistrict, setListSubDistrict] = useState([DEFAULT_SUB_DISTRICT]);\r\n    const [isLoading, setLoading] = useState(false)\r\n\r\n    useEffect(() => {\r\n        loadDDLyear()\r\n        loadDDLmonth()\r\n        loadDDLDistrict();\r\n        change('TR900SubDistrict', DEFAULT_SUB_DISTRICT.id)\r\n    }, [])\r\n\r\n    const loadDDLyear = () => {\r\n        const MIN_YEAR = 2562;\r\n        const currentDate = new Date();\r\n        const currentYear = currentDate.getFullYear() + 543;\r\n        let keepListYear = [];\r\n        for (let i = MIN_YEAR; i <= currentYear; i++) {\r\n            keepListYear.push({ id: i - 543, name: i });\r\n        }\r\n        setListYear(keepListYear);\r\n        change('TR900Year', currentYear - 543);\r\n    }\r\n\r\n    const loadDDLmonth = () => {\r\n        setListMonth([DEFAULT_MONTH, ...MONTH]);\r\n        change('TR900Month', DEFAULT_MONTH.id)\r\n    }\r\n\r\n\r\n    const loadDDLDistrict = async () => {\r\n        try {\r\n            const PROVINCE_CODE = '10';\r\n            const response = await ServiceUtils.fetchGet_(`${process.env.REACT_APP_LU_DISTRICT}?provinceid=${PROVINCE_CODE}`);\r\n            const objResult = await response.json();\r\n            setListDistrict([\r\n                DEFAULT_DISTRICT,\r\n                ...objResult.result.map(itm => ({\r\n                    id: `${itm.value}`,\r\n                    name: itm.name\r\n                }))\r\n            ]);\r\n\r\n            if(authenRdc && authenRdc.profile && authenRdc.profile.districtID) {\r\n                change('TR900District', authenRdc.profile.districtID)\r\n                loadDDLSubDistrict(authenRdc.profile.districtID)\r\n            } else {\r\n                change('TR900District', DEFAULT_DISTRICT.id)\r\n            }\r\n        }\r\n        catch (err) {\r\n            setListDistrict([]);\r\n        }\r\n\r\n    }\r\n\r\n    const handleChangeAdminPoly = (type) => (evt) => {\r\n\r\n        switch (type) {\r\n            case \"district\":\r\n                loadDDLSubDistrict(evt.target.value);\r\n                break;\r\n            default:\r\n                break;\r\n        }\r\n    }\r\n\r\n    const loadDDLSubDistrict = async (districtID = null) => {\r\n        let districtParam = `&districtid=${districtID}`;\r\n        if (districtID === DEFAULT_DISTRICT.id || districtID === null) {\r\n            setListSubDistrict([DEFAULT_SUB_DISTRICT]);\r\n            change('TR900SubDistrict', DEFAULT_SUB_DISTRICT.id)\r\n\r\n        } else {\r\n            try {\r\n                const PROVINCE_CODE = '10';\r\n                const response = await ServiceUtils.fetchGet_(`${process.env.REACT_APP_LU_SUBDISTRICT}?provinceid=${PROVINCE_CODE}${districtParam}`);\r\n                const objResult = await response.json();\r\n\r\n                setListSubDistrict([\r\n                    DEFAULT_SUB_DISTRICT,\r\n                    ...objResult.result.map(itm => ({\r\n                        id: `${itm.value}`,\r\n                        name: itm.name\r\n                    }))\r\n                ]);\r\n                change('TR900SubDistrict', DEFAULT_SUB_DISTRICT.id)\r\n\r\n\r\n            } catch (err) {\r\n                setListSubDistrict([]);\r\n\r\n            }\r\n        }\r\n    }\r\n\r\n    //เปิดแค่บางการทำงาน เพื่อยิงเซอร์วิส\r\n    const executeGenerateReport = async (values, reportFunction) => {\r\n        setLoading(true);\r\n        const { profile } = authenRdc\r\n        try {\r\n            let displayMonth = DEFAULT_MONTH;\r\n            let display = ' ';\r\n            let name = `${profile.firstName} ${profile.lastName}`;\r\n            let monthParam = `&month=${values.TR900Month}`;\r\n            let districtParam = `&districtid=${values.TR900District}`;\r\n            let subDistrictParam = `&subdistrictid=${values.TR900SubDistrict}`\r\n            if (values.TR900District === DEFAULT_DISTRICT.id) {\r\n                districtParam = '';\r\n            } else {\r\n                let displayDistrict = listDistrict.filter(itmDistrict => itmDistrict.id === values.TR900District)[0];\r\n                display += `เขต ${displayDistrict.name}`\r\n            }\r\n\r\n            if (values.TR900SubDistrict === DEFAULT_SUB_DISTRICT.id) {\r\n                subDistrictParam = ''\r\n            } else {\r\n                if (values.TR900SubDistrict !== null) {\r\n                    let displaySubDistrict = listSubDistrict.filter(itmSubDistrict => itmSubDistrict.id === values.TR900SubDistrict)[0];\r\n                    display += ` แขวง ${displaySubDistrict.name}`\r\n                }\r\n            }\r\n\r\n            if (values.TR900Month === DEFAULT_MONTH.id) {\r\n                monthParam = '';\r\n            } else {\r\n                displayMonth = MONTH.filter(itmMonth => itmMonth.id === values.TR900Month)[0];\r\n                display += ` ประจำเดือน ${displayMonth.name}`\r\n            }\r\n\r\n            //ทดสอบยิง service เลย โดยปี = 2019\r\n            const response = await ServiceUtils.fetchGet_(`${process.env.REACT_APP_GET_HOUSE_REPORT}?year=${values.TR900Year}${monthParam}${districtParam}${subDistrictParam}`)\r\n            setLoading(false);\r\n            const objResult = await response.json();\r\n            if (objResult.result && objResult.result.length > 0) {\r\n                const datasource = objResult.result;\r\n                const displayYearBC = values.TR900Year + 543;\r\n                let dataDisplay = {\r\n                    displayYearBC: displayYearBC,\r\n                    display: display,\r\n                    name: name\r\n                }\r\n                const profile = {\r\n                    userDistrictName: authenRdc.profile.districtName,\r\n                    usergroupName: authenRdc.profile.groupName,\r\n                    organizationName: authenRdc.profile.organizationName,\r\n                }\r\n                //ส่ง data ไปเข้า function\r\n                reportFunction({ datasource, dataDisplay, profile})\r\n            }\r\n            else {\r\n                showAlert({ altMsg: \"ไม่พบข้อมูลสำหรับออกรายงาน\", callbackClose: hideAlert })\r\n            }\r\n\r\n        }\r\n        catch (err) {\r\n            setLoading(false);\r\n            showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR, callbackClose: hideAlert })\r\n        }\r\n    }\r\n\r\n    const previewFunction = (values) => {\r\n        executeGenerateReport(values, HouseNumberExporPDF);\r\n    }\r\n\r\n    const exportExcelFunction = async (values) => {\r\n        executeGenerateReport(values, Excel);\r\n    }\r\n\r\n    return <Fragment>\r\n        <HouseNumberReportView\r\n            onBackClick={onClickBack}\r\n            title={title}\r\n            listYear={listYear}\r\n            listMonth={listMonth}\r\n            listDistrict={listDistrict}\r\n            listSubDistrict={listSubDistrict}\r\n            handleSubmit={handleSubmit}\r\n            previewFn={previewFunction}\r\n            exportExcelFn={exportExcelFunction}\r\n            onChangeAdminPoly={handleChangeAdminPoly}\r\n            isDistrict={authenRdc.profile.districtID ? true:false}\r\n        />\r\n        <Loading isShowLoading={isLoading} />\r\n        <AlertMessageSuper {...props} />\r\n    </Fragment>\r\n}\r\n\r\nexport const Validate = (values) => {\r\n    const errors = {};\r\n\r\n    if (!values.districtReportYear) {\r\n        errors.districtReportYear = 'กรุณาระบุปี';\r\n    }\r\n    if (!values.districtReportMonth) {\r\n        errors.districtReportMonth = 'กรุณาระบุเดือน'\r\n    }\r\n    if (!values.districtReportDistrict) {\r\n        errors.districtReportDistrict = 'กรุณาระบุเขต'\r\n    }\r\n\r\n    return errors;\r\n};\r\n\r\nconst mapStateToProps = state => ({\r\n    _values: getFormValues('HouseNumberReportFormCAH')(state),\r\n    authenRdc: state.authen,\r\n})\r\nconst formName = \"HouseNumberReportFormCAH\";\r\nconst reduxFormParameter = {\r\n    form: formName,\r\n};\r\n\r\nexport default compose(\r\n    connect(mapStateToProps, null),\r\n    reduxForm(reduxFormParameter),\r\n    WithAlertMessage\r\n)(HouseNumberReport);","import React from 'react';\r\nimport {BarChart, Bar, XAxis, YAxis, CartesianGrid} from 'recharts'\r\nconst MinisterialRegulationBarChart = props => {\r\n    //console.log(\"props barchart>>\",props)\r\n    return (\r\n    <BarChart\r\n    ref={props.refer}\r\n    width={700} \r\n    height={500} \r\n    data={props.data} \r\n    >\r\n        <CartesianGrid stroke=\"#ebf3f0\" vertical={false}/>\r\n        <XAxis dataKey=\"zone\" angle={-45}  textAnchor=\"end\" interval={0} height={80}/>\r\n        <YAxis width={100}/>\r\n        <Bar isAnimationActive={false} dataKey=\"useArea\" fill=\"#8884d8\" barSize={10}/>\r\n    </BarChart>)\r\n}\r\n\r\nexport default MinisterialRegulationBarChart;","import React from 'react';\r\nimport { Scrollbars } from 'react-custom-scrollbars';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport classnames from 'classnames';\r\nimport { Field } from \"redux-form\";\r\nimport Radio from '@material-ui/core/Radio';\r\n// import Button from '@material-ui/core/Button';\r\nimport Button from '../../../../../../../Controls/Containers/Button';\r\nimport SelectField from '../../../../../../../Controls/Containers/SelectFieldRedux';\r\nimport MinisterialRegulationBarChart from '../../../../../../../Containers/Web/Panel/Menu/MenuContent/Report/MinisterialRegulation/MinisterialRegulationBarChart'\r\nimport AppBarHeaderView from '../../../../AppBarHeaderView';\r\nimport { BTN } from '../../../../../../../Constants/Constants'\r\nconst MinisterialRegulationReportView = ({\r\n    classes,\r\n    onBackClick,\r\n    title,\r\n    listYear = [],\r\n    listMonth = [],\r\n    listDistrict = [],\r\n    listSubDistrict = [],\r\n    listQuarter = [],\r\n    previewFn,\r\n    exportExcelFn,\r\n    handleSubmit,\r\n    radioChange,\r\n    radioSelected,\r\n    onChangeAdminPoly,\r\n    barChartRef,\r\n    displayChartData,\r\n    isHaveDistrict\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root}>\r\n            <AppBarHeaderView\r\n                title={title}\r\n                onClickBack={onBackClick}\r\n            />\r\n            <Grid container className={classnames(classes.content)}>\r\n                <Scrollbars\r\n                    autoHide={false}\r\n                    universal={true}>\r\n                    <Grid item xs={12} className={classes.content_in}>\r\n                        <Field\r\n                            label={'ปี'}\r\n                            name={'MinisterialReportYear'}\r\n                            component={SelectField}\r\n                            // onChange={onValueChange('year')}\r\n                            data={listYear}\r\n                            required\r\n                        />\r\n                        {/* ///// เดือน ////// */}\r\n                        <Grid container>\r\n                            <Grid item xs={2} className={classes.radioDiv}>\r\n                                <Radio\r\n                                    checked={radioSelected == 1}\r\n                                    onChange={radioChange}\r\n                                    value={1}\r\n                                    name=\"month\"\r\n                                    color=\"primary\"\r\n                                />\r\n                            </Grid>\r\n                            <Grid item xs={10}>\r\n                                <Field\r\n                                    label={'เดือน'}\r\n                                    name={'MinisterialReportMonth'}\r\n                                    component={SelectField}\r\n                                    disabled={radioSelected != 1}\r\n                                    // onChange={onValueChange('month')}\r\n                                    data={listMonth}\r\n                                    // required\r\n                                />\r\n                            </Grid>\r\n                        </Grid>\r\n                        {/* ///////// ไตรมาส //////////// */}\r\n                        <Grid container>\r\n                            <Grid item xs={2} className={classes.radioDiv}>\r\n                                <Radio\r\n                                    checked={radioSelected == 2}\r\n                                    onChange={radioChange}\r\n                                    value={2}\r\n                                    name=\"quarter\"\r\n                                    color=\"primary\"\r\n                                />\r\n                            </Grid>\r\n                            <Grid item xs={10}>\r\n                                <Field\r\n                                    label={'ไตรมาส'}\r\n                                    name={'MinisterialReportQuarter'}\r\n                                    component={SelectField}\r\n                                    disabled={radioSelected != 2}\r\n                                    // onChange={onValueChange('month')}\r\n                                    data={listQuarter}\r\n                                    // required\r\n                                />\r\n                            </Grid>\r\n                        </Grid>\r\n                        <Field\r\n                            label={'เขต'}\r\n                            name={'MinisterialReportDistrict'}\r\n                            component={SelectField}\r\n                            onChange={onChangeAdminPoly('district')}\r\n                            data={listDistrict}\r\n                            disabled={isHaveDistrict}\r\n                            required\r\n                        />\r\n\r\n                        <Field\r\n                            label={'แขวง'}\r\n                            name={'MinisterialReportSubDistrict'}\r\n                            component={SelectField}\r\n                            // onChange={onValueChange('district')}\r\n                            data={listSubDistrict}\r\n                            required\r\n                        />\r\n\r\n\r\n\r\n                        {/* //// Button //// */}\r\n                        <Grid container justify=\"center\" spacing={24} className={classes.divFooter} >\r\n                            <Grid item>\r\n                                <Button\r\n                                    label={BTN.TH.CANCEL}\r\n                                    onClick={onBackClick}\r\n                                />\r\n                            </Grid>\r\n                            <Grid item>\r\n                                <Button\r\n                                    label={BTN.EN.EXPORT_EXCEL}\r\n                                    onClick={handleSubmit(exportExcelFn)}\r\n                                />\r\n                            </Grid>\r\n                            <Grid item>\r\n                                <Button\r\n                                    label={BTN.EN.EXPORT_PDF}\r\n                                    onClick={handleSubmit(previewFn)}\r\n                                />\r\n                            </Grid>\r\n\r\n\r\n                        </Grid>\r\n                        {/* ////////////// */}\r\n                        <Grid style={{ display: \"none\" }}>\r\n                            <MinisterialRegulationBarChart refer={barChartRef} data={displayChartData} />\r\n                        </Grid>\r\n                    </Grid>\r\n                </Scrollbars>\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    _hide: {\r\n        display: 'none'\r\n    },\r\n    root: {\r\n        position: 'absolute',\r\n        top: 0,\r\n        bottom: 0,\r\n        right: 0,\r\n        left: 0\r\n    },\r\n    content: {\r\n        position: 'relative',\r\n        height: 'calc(100% - 45px)'\r\n    },\r\n    content_in: {\r\n        padding: \"10px\",\r\n        width: \"100%\"\r\n    },\r\n    divFooter: {\r\n        marginTop: \"10px\",\r\n        marginBottom: \"10px\"\r\n    },\r\n    radioDiv: {\r\n        lineHeight: '6'\r\n    }\r\n}))(MinisterialRegulationReportView);","import {numberWithCommas} from '../../../../../../../Utilities/Utils'\r\n// import {MONTH} from '../../../../../../../Constants/Constants'\r\nimport pdfMake from \"pdfmake/build/pdfmake\";\r\nimport pdfFonts from \"pdfmake/build/vfs_fonts\";\r\nimport { FOOTER_REPORT } from '../../../../../../../Constants/Constants'\r\n\r\nconst DEFAULT_MONTH = {id:99, name: 'ทุกเดือน'}\r\npdfMake.vfs = pdfFonts.pdfMake.vfs;\r\npdfMake.fonts = {\r\n    THSarabun: {\r\n        normal: 'THSarabun.ttf',\r\n        bold: 'THSarabun-Bold.ttf',\r\n        italics: 'THSarabun-Italic.ttf',\r\n        bolditalics: 'THSarabun-BoldItalic.ttf'\r\n    },\r\n    Roboto: {\r\n        normal: 'Roboto-Regular.ttf',\r\n        bold: 'Roboto-Medium.ttf',\r\n        italics: 'Roboto-Italic.ttf',\r\n        bolditalics: 'Roboto-MediumItalic.ttf'\r\n    }\r\n}\r\n\r\nconst configPage = {\r\n    pageSize: 'A4',\r\n    pageOrientation: 'portrait',\r\n    info: {\r\n        title: 'รายงานสรุปการใช้ประโยชน์ที่ดินตามกฏกระทรวง',\r\n        subject: 'รายงานสรุปการใช้ประโยชน์ที่ดินตามกฏกระทรวง',\r\n        keywords: 'รายงานสรุปการใช้ประโยชน์ที่ดินตามกฏกระทรวง',\r\n    },\r\n    pageMargins: [ 5, 40, 10, 40 ],// [left, top, right, bottom] or [horizontal, vertical]\r\n}\r\n\r\n\r\nconst fontStyle = {\r\n    fontHeading: {\r\n        fontSize: 18\r\n    },\r\n    fontTitle: {\r\n        fontSize: 16\r\n    },\r\n    fontSubheading: {\r\n        fontSize: 14\r\n    },\r\n    fontBody: {\r\n        fontSize: 12\r\n    }\r\n}\r\n\r\nconst tableStyle = {\r\n    rowNumber: {\r\n        alignment: 'right'\r\n    },\r\n    rowHeaderColor: {\r\n        fillColor: '#5E9A50'\r\n    },\r\n    rowFooterColor: {\r\n        fillColor: '#5E9A50'\r\n    },\r\n    rowOtherColor1: {\r\n        fillColor: '#D0EFDA'\r\n    },\r\n    rowOtherColor2: {\r\n        fillColor: '#E5F6E8'\r\n    }\r\n}\r\n\r\nconst generateTableHeader = (datasource=[]) => {\r\n    return [\r\n        {\r\n            margin: [0,15,0,0],//[left, top, right, bottom]\r\n            columns: [\r\n                { width: '*', text: '' },\r\n                {\r\n                    width: 'auto',\r\n                    table: {\r\n                        // headers are automatically repeated if the table spans over multiple pages\r\n                        // you can declare how many rows should be treated as headers\r\n                        headerRows: 1,\r\n                        widths: [ 30, 50, 100, 100, 100],\r\n                        body: [\r\n                            [ \r\n                                {\r\n                                    text: `ลำดับที่`,\r\n                                    style: ['fontSubheading', 'alignmentCenter', 'rowHeaderColor'],\r\n                                    margin: [0,30,0,0],//[left, top, right, bottom]\r\n                                    bold:true\r\n                                },\r\n                                {\r\n                                    text: `บริเวณหมายเลข`,\r\n                                    style: ['fontSubheading', 'alignmentCenter', 'rowHeaderColor'],\r\n                                    margin: [0,25,0,0],//[left, top, right, bottom]\r\n                                    bold:true\r\n                                },\r\n                                {\r\n                                    text: `พื้นที่ทั้งบริเวณ ตามผังเมือง รวม พ.ศ.2556 \r\n                                                        (ตร.ม.)`,\r\n                                    style: ['fontSubheading', 'alignmentCenter', 'rowHeaderColor'],\r\n                                    margin: [0,5,0,5],//[left, top, right, bottom]\r\n                                    bold:true\r\n                                },\r\n                                {\r\n                                    text: `พื้นที่การใช้ประโยชน์ที่ดิน (ตร.ม.)`,\r\n                                    style: ['fontSubheading', 'alignmentCenter', 'rowHeaderColor'],\r\n                                    margin: [0,25,0,0],//[left, top, right, bottom]\r\n                                    bold:true\r\n                                },\r\n                                {\r\n                                    text: `พื้นที่อาคารรวม \r\n                                            (ตร.ม.)`,\r\n                                    style: ['fontSubheading', 'alignmentCenter', 'rowHeaderColor'],\r\n                                    margin: [0,25,0,0],//[left, top, right, bottom]\r\n                                    bold:true\r\n                                }\r\n                            ],\r\n\r\n                            ...makeTableContent(datasource)\r\n                        ]\r\n                    },\r\n                    layout: {\r\n                        fillColor: function (rowIndex, node, columnIndex) {\r\n                            return (rowIndex % 2 === 1) ? '#0098DAA8':null;//'#c3f7b7' : null;\r\n                        }\r\n                    }\r\n                },\r\n                { width: '*', text: '' }\r\n            ]\r\n        }\r\n    ]\r\n}\r\n\r\nconst makeTableContent = (datasource=[]) => {\r\n    let rowNo = 1;\r\n    const listRow = [];\r\n   \r\n    datasource.forEach(groupITM => {\r\n        //content\r\n            listRow.push(makeRowITM({\r\n                no:rowNo++,\r\n                ...groupITM\r\n            }));\r\n       \r\n    })\r\n    return listRow;\r\n}\r\n\r\nconst makeRowITM = (rowITM) => {\r\n    const FIXED_NUMBER = 2; //กำหนดจำนวนทศนิยม\r\n\r\n    return [ \r\n\r\n        {\r\n            text: rowITM.no, \r\n            style: ['fontSubheading','alignmentRight']\r\n        },\r\n        {\r\n            text: rowITM.subZone, \r\n            style: ['fontSubheading']\r\n        },\r\n        {\r\n            text:numberWithCommas(rowITM.subZoneArea, FIXED_NUMBER) , \r\n            style: ['fontSubheading','alignmentRight']\r\n        },\r\n        {\r\n            text: numberWithCommas(rowITM.useArea, FIXED_NUMBER) , \r\n            style: ['fontSubheading','alignmentRight']\r\n        },\r\n        {\r\n            text: numberWithCommas(rowITM.buildingArea, FIXED_NUMBER), \r\n            style: ['fontSubheading','alignmentRight']\r\n        },\r\n    ];\r\n}\r\n\r\nconst Chart = (chartPNGBase64) => {\r\n    return [\r\n        {\r\n            text: '',\r\n            pageOrientation: 'landscape',\r\n            pageBreak: 'after'\r\n        },\r\n        {\r\n            text: 'พื้นที่การใช้ประโยชน์ที่ดิน (ตร.ม.)',\r\n            noWrap: true, \r\n            style: [ 'fontTitle', 'bold_font','alignmentCenter'],\r\n            width: '*',\r\n        },\r\n        {\r\n            image: chartPNGBase64,\r\n            alignment: 'center',\r\n            margin: [-30,50,0,0],//[left, top, right, bottom]\r\n            width: 600,\r\n            height:420\r\n        }\r\n    ]\r\n}\r\n\r\n\r\nconst MinisterialRegulationExportPDF = (year='YYYY', month=DEFAULT_MONTH, datasource=[],chartPNGBase64,radioSelected,quarter,displayDistrictSubDistrict) => {\r\n \r\n    let periodForDisplay = null\r\n    if (radioSelected === 1) { //choose month\r\n        // radioParam = monthParam;\r\n        periodForDisplay = (month.id === DEFAULT_MONTH.id) ? '' : `เดือน ${month.name}`\r\n\r\n    } else { //choose quarter\r\n        // radioParam = `&quarter=${values.MinisterialReportQuarter}`\r\n        periodForDisplay = `ไตรมาสที่ ${quarter}`\r\n    }\r\n    const docDefinition = {\r\n        ...configPage,\r\n        footer: {\r\n            columns: [\r\n                { \r\n                    text: FOOTER_REPORT,\r\n                    alignment: 'right',\r\n                    margin: [0,20,35,0],\r\n                    fontSize: 10\r\n                }\r\n            ]\r\n        },\r\n        content: [\r\n            {\r\n                text: 'สรุปการใช้พื้นที่ ในที่ดินแต่ละบริเวณ', \r\n                style: [ 'fontTitle', 'header','alignmentCenter'],\r\n                width: '*',\r\n                noWrap: true\r\n            },\r\n            {\r\n                text: 'ตามกฏกระทรวงให้ใช้บังคับผังเมืองรวมกรุงเทพมหานคร พ.ศ.2556', \r\n                style: [ 'fontTitle', 'header','alignmentCenter'],\r\n                margin: [0,10,0,0],//[left, top, right, bottom]\r\n                width: '*',\r\n                noWrap: true\r\n            },\r\n            {\r\n                text: `จำแนกตามประเภทที่ดิน ${periodForDisplay} พ.ศ.${year}`, \r\n                style: [ 'fontTitle', 'header','alignmentCenter'],\r\n                margin: [0,10,0,0],//[left, top, right, bottom]\r\n                width: '*',\r\n                noWrap: true\r\n            },\r\n            {\r\n                text: `จากการลงจุดแสดงตำแหน่งการอนุญาตก่อสร้างอาคาร`, \r\n                style: [ 'fontTitle', 'header','alignmentCenter'],\r\n                margin: [0,10,0,0],//[left, top, right, bottom]\r\n                width: '*',\r\n                noWrap: true\r\n                \r\n            },\r\n            {\r\n                text: `${displayDistrictSubDistrict}`, \r\n                style: [ 'fontTitle', 'header','alignmentCenter'],\r\n                margin: [0,10,0,0],//[left, top, right, bottom]\r\n                width: '*',\r\n                noWrap: true\r\n                \r\n            },\r\n            ...generateTableHeader(datasource),\r\n           \r\n            ...Chart(chartPNGBase64)\r\n        ],\r\n        styles: {\r\n            ...fontStyle,\r\n            ...tableStyle,\r\n            header: {\r\n                bold: true\r\n            },\r\n            alignmentCenter: {\r\n                alignment: 'center'\r\n            },\r\n            alignmentRight: {\r\n                alignment: 'right'\r\n            }\r\n        },\r\n        defaultStyle: {\r\n            font: \"THSarabun\",\r\n            columnGap: 10,\r\n        }\r\n    };\r\n    // pdfMake.createPdf(docDefinition).open()\r\n    pdfMake.createPdf(docDefinition).download('รายงานสรุปการใช้ประโยชน์ที่ดินตามกฏกระทรวง.pdf'); \r\n}\r\n\r\nexport default MinisterialRegulationExportPDF;","import Excel from \"exceljs/dist/es5/exceljs.browser\";\r\n\r\nexport default((displayYearBC, displayMonth, dataSouce, pngChart,radioSelected,quarter,displayDistrictSubDistrict) => {\r\n    //console.log('dataSouce',dataSouce)\r\n\r\n    const startRowTopic = 1;\r\n    const startRowHeader = 6;//ใช้กำหนดแถวที่จะเป็นหัวตาราง\r\n    const workbook = new Excel.Workbook();//สร้าง instance\r\n    const worksheet = workbook.addWorksheet('sheet', {//จำเป็นต้องตั้งค่าส่วนนี้\r\n        pageSetup:{\r\n            paperSize: 9, //follow documentation the 9 value is A4\r\n            orientation:'portrait'//แนวตั้ง\r\n        }\r\n    });\r\n    workbook.creator = 'PMR-WEB';//ผู้สร้าง\r\n    workbook.lastModifiedBy = 'PMR-WEB';//ผู้แก้ไขล่าสุด\r\n    let periodForDisplay = null\r\n    if (radioSelected === 1) { //choose month\r\n        \r\n        periodForDisplay = `${displayMonth ? `เดือน ${displayMonth.name} พ.ศ.${displayYearBC}`: `ปี พ.ศ.${displayYearBC}`}`//(month.id === DEFAULT_MONTH.id) ? '' : `เดือน ${month.name}`\r\n\r\n    } else { //choose quarter\r\n        \r\n        periodForDisplay = `ไตรมาสที่ ${quarter} พ.ศ.${displayYearBC}`\r\n    }\r\n\r\n    const textTopic = [\r\n        'สรุปการใช้พื้นที่ ในที่ดินแต่ละบริเวณ', \r\n        `ตามกฎกระทรวงให้ใช้บังคับผังเมืองรวมกรุงเทพมหานคร พ.ศ. 2556`, \r\n        `จำนวนตามประเภทที่ดิน ${periodForDisplay}`,\r\n        `จากการลงจุดแสดงตำแหน่งการอนุญาตก่อสร้างอาคาร`,\r\n        `${displayDistrictSubDistrict}`\r\n\r\n    ]\r\n\r\n    const headerTableExcel = [\r\n        { key:'no', name: 'ลำดับที่', width: 10 },\r\n        { key:'subZone', name: 'บริเวณหมายเลข', width: 20 },\r\n        { key:'subZoneArea', name: 'พื้นที่บริเวณ ตามผังเมืองรวม พ.ศ. 2556 (ตร.ม.)', width: 30 },\r\n        { key:'useArea', name: 'พื้นที่การใช้ประโยชน์ที่ดิน (ตร.ม.)', width: 30 },\r\n        { key:'buildingArea', name: 'พื้นที่อาคารรวม (ตร.ม.)', width: 30 }\r\n    ]\r\n\r\n    const contentTableExcale = dataSouce\r\n\r\n    const setCellBorder = (row, colKey) => {\r\n        row.getCell(colKey).border = {\r\n            top: {style:'thin'},\r\n            left: {style:'thin'},\r\n            bottom: {style:'thin'},\r\n            right: {style:'thin'}\r\n        };\r\n    }\r\n\r\n    const settingColumn = () => {\r\n        worksheet.columns = headerTableExcel.map((item) => {\r\n            return {\r\n                key: item.key,\r\n                width: item.width\r\n            }\r\n        })\r\n    }\r\n\r\n    const generateTopic = () => {\r\n        const columns = headerTableExcel.length;\r\n\r\n        textTopic.map((item, index) => {\r\n            const rowText = index+startRowTopic;\r\n            worksheet.mergeCells(rowText, 1, rowText, columns);\r\n            const row = worksheet.getRow(rowText);\r\n            row.getCell(rowText).value = item;\r\n            row.getCell(rowText).alignment = { vertical: 'middle', horizontal:'center', wrapText: true };\r\n\r\n            return true;\r\n        })\r\n    }\r\n\r\n    const generateHeader = () => {\r\n        worksheet.getRow(startRowHeader).values = headerTableExcel.map((item) => {\r\n            return item.name\r\n        })\r\n        let row = worksheet.getRow(startRowHeader);\r\n        headerTableExcel.map((item) => {\r\n            setCellBorder(row, item.key)\r\n            row.getCell(item.key).alignment = { vertical: 'middle', horizontal:'center', wrapText: true }\r\n            row.getCell(item.key).fill = {\r\n                type: 'pattern',\r\n                pattern: 'solid',\r\n                fgColor: {\r\n                    argb:'005E9A50'\r\n                }\r\n            }\r\n            if(item.key === 'subZoneArea' || item.key === 'useArea' || item.key === 'buildingArea'){\r\n                worksheet.getColumn(item.key).numFmt = '#,##0.00';\r\n            }\r\n        })\r\n    }\r\n\r\n    const generateBody = () => {\r\n        contentTableExcale.forEach((item,index) => {\r\n            item.no = index+1;\r\n            // item.subZoneArea = Number(Number(item.subZoneArea).toFixed(2))\r\n            worksheet.addRow(item)\r\n            \r\n             //set style\r\n            const lastRowNumber = worksheet.lastRow._number;\r\n            const row = worksheet.getRow(lastRowNumber);\r\n            worksheet.lastRow._cells.forEach(cell => {\r\n                setCellBorder(row, cell.col);\r\n                row.getCell(cell.col).alignment = { wrapText: true, vertical: 'top' };\r\n                if(item.no%2 !== 0) {\r\n                    row.getCell(cell.col).fill = {\r\n                        type: 'pattern',\r\n                        pattern: 'solid',\r\n                        fgColor: {\r\n                            argb: '0098DAA8'\r\n                        }\r\n                    }\r\n                }\r\n            })\r\n        })\r\n    }\r\n\r\n    const generateImageChart= ()=> {\r\n        const imageChart = workbook.addImage({\r\n            base64: pngChart,\r\n            extension: 'png'\r\n        })\r\n\r\n        const lastRow = worksheet.lastRow._number + 2\r\n        worksheet.addImage(imageChart, `A${lastRow}:E${lastRow+30}`)\r\n    }\r\n\r\n    const downloadProcess = () => {\r\n        workbook.xlsx.writeBuffer().then(function (xls64data) {\r\n            const blob = new Blob([xls64data],\r\n              { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });\r\n            const url = window.URL.createObjectURL(blob);\r\n            const anchor = document.createElement('a');\r\n            document.body.appendChild(anchor); //for firefox ref: https://stackoverflow.com/questions/41805095/excel-export-not-working-on-firefox-but-working-fine-in-google-crome/41806544\r\n            anchor.href = url;\r\n            anchor.download = 'รายงานผลการใช้ประโยชน์ที่ดินตามกฎกระทรวง.xlsx';\r\n            var isIE = /*@cc_on!@*/false || !!document.documentMode;\r\n            var isEdge = !isIE && !!window.StyleMedia;\r\n            if(isEdge){\r\n                anchor.click();\r\n                anchor.change();\r\n            } else {\r\n                anchor.click();\r\n            }\r\n            window.URL.revokeObjectURL(url);//เมื่อใช้ URL.createObjectURL แล้วต้องเรียกคำสั่งนี้เพื่อให้ Browser รู้ว่าจะไม่เก็บ Reference file อีกต่อไป\r\n        });\r\n    }\r\n\r\n    const mainProcess = () => {\r\n        generateTopic();\r\n        settingColumn();\r\n        generateHeader();\r\n        generateBody();\r\n        generateImageChart();\r\n        downloadProcess();\r\n    }\r\n\r\n    mainProcess();\r\n})","import React, { Fragment, useState, useEffect, useRef } from 'react';\r\nimport { connect } from 'react-redux'\r\nimport { reduxForm, getFormValues } from \"redux-form\";\r\nimport { compose } from \"recompose\";\r\n\r\n//import component\r\nimport MinisterialRegulationReportView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/Report/MinisterialRegulation/MinisterialRegulationReportView'\r\nimport WithAlertMessage from '../../../../../../../HOC/WithAlertMessage';\r\nimport AlertMessageSuper from \"../../../../../../../Controls/Containers/AlertMessageSuper\";\r\nimport Loading from '../../../../../../../Controls/Containers/Loading';\r\nimport MinisterialRegulationReportPDF from './MinisterialRegulationReportPDF';\r\nimport Excel from './MinisterialRegulationExcel'\r\n\r\n//import constants\r\nimport { MONTH, ALERT_MESSAGE } from '../../../../../../../Constants/Constants';\r\n\r\n//import service - utils\r\nimport * as ServiceUtils from '../../../../../../../Utilities/ServiceUtils';\r\nimport * as Util from '../../../../../../../Utilities/Utils';\r\n\r\nconst DEFAULT_MONTH = { id: 99, name: 'ทุกเดือน' }\r\nconst DEFAULT_DISTRICT = { id: 99, name: 'ทุกเขต' }\r\nconst DEFAULT_SUB_DISTRICT = { id: 99, name: \"ทุกแขวง\" }\r\nconst LOOKUP_QUARTER = [{ id: 1, name: \"1\" }, { id: 2, name: \"2\" }, { id: 3, name: \"3\" }, { id: 4, name: \"4\" }]\r\nlet timeoutExportPDF = null;\r\n\r\nconst MinisterialRegulationReport = (props) => {\r\n    \r\n    const {\r\n        onClickBack,\r\n        handleSubmit,\r\n        change,\r\n        title,\r\n        showAlert,\r\n        hideAlert,\r\n        authenRdc\r\n    } = props;\r\n\r\n    const barChartRef = useRef(null);\r\n    const [listYear, setListYear] = useState();\r\n    const [listMonth, setListMonth] = useState();\r\n    const [listDistrict, setListDistrict] = useState();\r\n    const [listSubDistrict, setListSubDistrict] = useState([DEFAULT_SUB_DISTRICT]);\r\n    const [displayChartData, setDisplayChartData] = useState([]);\r\n    const [isLoading, setLoading] = useState(false)\r\n    const [radioSelected, setRadioSelected] = useState(1)\r\n    const [isHaveDistrict,setIsHaveDistrict] = useState(false)\r\n\r\n    useEffect(() => {\r\n        loadDDLyear()\r\n        loadDDLmonth()\r\n        loadDDLDistrict();\r\n\r\n        change('MinisterialReportSubDistrict', DEFAULT_SUB_DISTRICT.id)\r\n        change('MinisterialReportQuarter', 1)\r\n\r\n        return () => {\r\n            if (timeoutExportPDF) {\r\n                clearTimeout(timeoutExportPDF);\r\n            }\r\n        }\r\n    }, [])\r\n\r\n\r\n    const loadDDLyear = () => {\r\n        const MIN_YEAR = 2562;\r\n        const currentDate = new Date();\r\n        const currentYear = currentDate.getFullYear() + 543;\r\n        let keepListYear = [];\r\n        for (let i = MIN_YEAR; i <= currentYear; i++) {\r\n            keepListYear.push({ id: i - 543, name: i });\r\n        }\r\n        setListYear(keepListYear);\r\n        change('MinisterialReportYear', currentYear - 543);\r\n    }\r\n\r\n    const loadDDLmonth = () => {\r\n        setListMonth([DEFAULT_MONTH, ...MONTH]);\r\n        change('MinisterialReportMonth', DEFAULT_MONTH.id)\r\n    }\r\n\r\n    const loadDDLDistrict = async () => {\r\n\r\n        try {\r\n            const PROVINCE_CODE = '10';\r\n            const response = await ServiceUtils.fetchGet_(`${process.env.REACT_APP_LU_DISTRICT}?provinceid=${PROVINCE_CODE}`);\r\n            const objResult = await response.json();\r\n            setListDistrict([\r\n                \r\n                DEFAULT_DISTRICT,\r\n                ...objResult.result.map(itm => ({\r\n                    id: `${itm.value}`,\r\n                    name: itm.name\r\n                }))\r\n            ]);\r\n\r\n            if(authenRdc.profile.districtID){\r\n                change('MinisterialReportDistrict', authenRdc.profile.districtID)\r\n                loadDDLSubDistrict(authenRdc.profile.districtID)\r\n                setIsHaveDistrict(true)\r\n            }else{\r\n                change('MinisterialReportDistrict', DEFAULT_DISTRICT.id)\r\n            }\r\n\r\n            // change('MinisterialReportDistrict', DEFAULT_DISTRICT.id)\r\n        }\r\n        catch (err) {\r\n            setListDistrict([]);\r\n        }\r\n    }\r\n\r\n    const loadDDLSubDistrict = async (districtID = null) => {\r\n\r\n        let districtParam = `&districtid=${districtID}`;\r\n        if (districtID === DEFAULT_DISTRICT.id || districtID === null) {\r\n            setListSubDistrict([DEFAULT_SUB_DISTRICT]);\r\n            change('MinisterialReportSubDistrict', DEFAULT_SUB_DISTRICT.id)\r\n        } else {\r\n            try {\r\n                const PROVINCE_CODE = '10';\r\n                const response = await ServiceUtils.fetchGet_(`${process.env.REACT_APP_LU_SUBDISTRICT}?provinceid=${PROVINCE_CODE}${districtParam}`);\r\n                const objResult = await response.json();\r\n\r\n                setListSubDistrict([\r\n                    DEFAULT_SUB_DISTRICT,\r\n                    ...objResult.result.map(itm => ({\r\n                        id: `${itm.value}`,\r\n                        name: itm.name\r\n                    }))\r\n                ]);\r\n\r\n                change('MinisterialReportSubDistrict', DEFAULT_SUB_DISTRICT.id)\r\n            } catch (err) {\r\n                setListSubDistrict([]);\r\n            }\r\n        }\r\n    }\r\n    const handleChangeAdminPoly = (type) => (evt) => {\r\n\r\n        switch (type) {\r\n            case \"district\":\r\n                //console.log(evt)\r\n                loadDDLSubDistrict(evt.target.value);\r\n                break;\r\n            default:\r\n                break;\r\n        }\r\n    }\r\n\r\n    const executeGenerateReport = async (values, reportFunction) => {\r\n        setLoading(true);\r\n        try {\r\n            // const PROVINCE_CODE = '10';\r\n            let displayMonth = DEFAULT_MONTH;\r\n            let displayDistrictSubDistrict = ' ';\r\n            let radioParam;\r\n            let monthParam = `&month=${values.MinisterialReportMonth}`;\r\n            let districtParam = `&districtid=${values.MinisterialReportDistrict}`;\r\n            let subDistrictParam = `&subdistrictid=${values.MinisterialReportSubDistrict}`\r\n            if (values.MinisterialReportDistrict === DEFAULT_DISTRICT.id) {\r\n                districtParam = '';\r\n                displayDistrictSubDistrict += `เขต ${DEFAULT_DISTRICT.name}`\r\n            }else{\r\n                let displayDistrict = listDistrict.filter(itmDistrict => itmDistrict.id === values.MinisterialReportDistrict)[0];\r\n                displayDistrictSubDistrict += `เขต ${displayDistrict.name}`\r\n\r\n            } \r\n            if (values.MinisterialReportSubDistrict === DEFAULT_SUB_DISTRICT.id) {\r\n                subDistrictParam = ''\r\n                displayDistrictSubDistrict += ` แขวง ${DEFAULT_SUB_DISTRICT.name}`\r\n            }else{\r\n                let displaySubDistrict = listSubDistrict.filter(itmSubDistrict => itmSubDistrict.id === values.MinisterialReportSubDistrict)[0];\r\n                displayDistrictSubDistrict += ` แขวง ${displaySubDistrict.name}`\r\n            }\r\n\r\n            if (values.MinisterialReportMonth === DEFAULT_MONTH.id) {\r\n                monthParam = '';\r\n            }\r\n            else {\r\n                displayMonth = MONTH.filter(itmMonth => itmMonth.id === values.MinisterialReportMonth)[0];\r\n            }\r\n\r\n            if (radioSelected === 1) { //choose month\r\n                radioParam = monthParam;\r\n\r\n            } else { //choose quarter\r\n                radioParam = `&quarter=${values.MinisterialReportQuarter}`\r\n            }\r\n\r\n            //call service...\r\n            const response = await ServiceUtils.fetchGet_(`${process.env.REACT_APP_GET_MINISTERIAL_REPORT}?year=${values.MinisterialReportYear}${radioParam}${districtParam}${subDistrictParam}`)\r\n            const objResult = await response.json();\r\n            if (objResult && objResult.result && objResult.result.length > 0) {\r\n\r\n                setDisplayChartData(objResult.chart)\r\n                const nodeBarChart = barChartRef.current.container.children[0];\r\n                const pngChart = await Util.svg2pngBase64(nodeBarChart, 650, 650);\r\n\r\n                const datasource = objResult.result;\r\n                const displayYearBC = values.MinisterialReportYear + 543;\r\n\r\n                timeoutExportPDF = setTimeout(() => {//wait render graph\r\n                    reportFunction(displayYearBC, displayMonth, datasource, pngChart,radioSelected,values.MinisterialReportQuarter,displayDistrictSubDistrict)\r\n                    setLoading(false);\r\n                }, 5000)\r\n            }\r\n            else {\r\n                setLoading(false);\r\n                showAlert({ altMsg: \"ไม่พบข้อมูลสำหรับออกรายงาน\", callbackClose: hideAlert })\r\n            }\r\n        }\r\n        catch (err) {\r\n            console.log('errer', err)\r\n            setLoading(false);\r\n            showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR, callbackClose: hideAlert })\r\n        }\r\n    }\r\n\r\n    const previewFunction = (values) => {\r\n        executeGenerateReport(values, MinisterialRegulationReportPDF)\r\n    }\r\n\r\n    const exportExcelFunction = async (values) => {\r\n        executeGenerateReport(values, Excel)\r\n    }\r\n\r\n    const handleRadioChange = (value) => {\r\n        setRadioSelected(value.target.value)\r\n    }\r\n\r\n    return <Fragment>\r\n        <MinisterialRegulationReportView\r\n            onBackClick={onClickBack}\r\n            title={title}\r\n            listYear={listYear}\r\n            listMonth={listMonth}\r\n            listDistrict={listDistrict}\r\n            listSubDistrict={listSubDistrict}\r\n            handleSubmit={handleSubmit}\r\n            previewFn={previewFunction}\r\n            exportExcelFn={exportExcelFunction}\r\n            radioChange={handleRadioChange}\r\n            radioSelected={radioSelected}\r\n            onChangeAdminPoly={handleChangeAdminPoly}\r\n            barChartRef={barChartRef}\r\n            displayChartData={displayChartData}\r\n            listQuarter={LOOKUP_QUARTER}\r\n            isHaveDistrict={isHaveDistrict}\r\n        />\r\n        <Loading isShowLoading={isLoading} />\r\n        <AlertMessageSuper {...props} />\r\n    </Fragment>\r\n}\r\n\r\nexport const Validate = (values) => {\r\n    const errors = {};\r\n\r\n    if (!values.districtReportYear) {\r\n        errors.districtReportYear = 'กรุณาระบุปี';\r\n    }\r\n    if (!values.districtReportMonth) {\r\n        errors.districtReportMonth = 'กรุณาระบุเดือน'\r\n    }\r\n    if (!values.districtReportDistrict) {\r\n        errors.districtReportDistrict = 'กรุณาระบุเขต'\r\n    }\r\n\r\n    return errors;\r\n};\r\n\r\nconst mapStateToProps = state => ({\r\n    authenRdc: state.authen,\r\n    _values: getFormValues('MinisterialRegulationReportFormCAH')(state)\r\n})\r\nconst formName = \"MinisterialRegulationReportFormCAH\";\r\nconst reduxFormParameter = {\r\n    form: formName,\r\n};\r\n\r\nexport default compose(\r\n    connect(mapStateToProps, null),\r\n    reduxForm(reduxFormParameter),\r\n    WithAlertMessage\r\n)(MinisterialRegulationReport);","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport clsx from 'clsx';\r\n\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport TableCell from '@material-ui/core/TableCell';\r\nimport Paper from '@material-ui/core/Paper';\r\n\r\nimport { AutoSizer, Column, Table } from 'react-virtualized';\r\nimport {convertDateTimeToDisplayDate} from '../../../../../../Utilities/DateTimeUtil';\r\nimport {displayImportExportStatus} from '../../../../../../Utilities/Utils';\r\n// import CloudDownload from '@material-ui/icons/CloudDownload';\r\n// import IconButton from '@material-ui/core/IconButton';\r\n// import {STATUS_IMPORT_EXPORT} from '../../../../../../Constants/Constants';\r\n\r\nconst styles = theme => ({\r\n    flexContainer: {\r\n        display: 'flex',\r\n        alignItems: 'center',\r\n        boxSizing: 'border-box',\r\n    },\r\n    tableRow: {\r\n        cursor: 'pointer',\r\n    },\r\n    tableRowHover: {\r\n        '&:hover': {\r\n        backgroundColor: theme.palette.grey[200],\r\n        },\r\n    },\r\n    tableCell: {\r\n        flex: 1,\r\n        padding: '4px 56px 4px 15px',\r\n        '&:last-child':{\r\n            paddingRight: '0px'\r\n        }\r\n    },\r\n    noClick: {\r\n        cursor: 'initial',\r\n    },\r\n});\r\n  \r\nclass MuiVirtualizedTable extends React.PureComponent {\r\n    static defaultProps = {\r\n        headerHeight: 48,\r\n        rowHeight: 48,\r\n    };\r\n\r\n    getRowClassName = ({ index }) => {\r\n        const { classes, onRowClick } = this.props;\r\n\r\n        return clsx(classes.tableRow, classes.flexContainer, {\r\n        [classes.tableRowHover]: index !== -1 && onRowClick != null,\r\n        });\r\n    };\r\n\r\n    handleClickDownload = (rowData) => event => {\r\n        const {onDownloadClick} = this.props;\r\n        if(onDownloadClick){\r\n            onDownloadClick(rowData)\r\n        }\r\n    }\r\n\r\n    cellRenderer = ({rowData, cellData, columnIndex}) => {//displayImportExportStatus\r\n        const { columns, classes, rowHeight, onRowClick } = this.props;\r\n        const isDateColumn = (columns[columnIndex].isDate);//เป็น column date หรือไม่\r\n        const isColumnStatus = (columns[columnIndex].isStatusColumn)\r\n        let displayText = cellData;\r\n        if(isDateColumn){\r\n            displayText = convertDateTimeToDisplayDate(cellData, \"d MMM yyyy\");\r\n        }\r\n        else if(isColumnStatus){\r\n            displayText = displayImportExportStatus(cellData);\r\n            \r\n        }\r\n        const renderCell = <TableCell\r\n            component=\"div\"\r\n            className={clsx(classes.tableCell, classes.flexContainer, {\r\n            [classes.noClick]: onRowClick == null,\r\n            })}\r\n            variant=\"body\"\r\n            style={{ height: rowHeight }}\r\n            align={(columnIndex != null && columns[columnIndex].numeric) || false ? 'right' : 'left'}\r\n            >\r\n            {displayText}\r\n        </TableCell>\r\n\r\n        return renderCell;\r\n    };\r\n\r\n    headerRenderer = ({ label, columnIndex }) => {\r\n        const { headerHeight, columns, classes } = this.props;\r\n\r\n        return (\r\n        <TableCell\r\n            component=\"div\"\r\n            className={clsx(classes.tableCell, classes.flexContainer, classes.noClick)}\r\n            variant=\"head\"\r\n            style={{ height: headerHeight, color: '#FFFFFF'}}\r\n            align={columns[columnIndex].numeric || false ? 'right' : 'left'}\r\n        >\r\n            <span>{label}</span>\r\n        </TableCell>\r\n        );\r\n    };\r\n\r\n    headerRowRenderer = ({\r\n        className,\r\n        columns,\r\n        style\r\n      }) => (\r\n        <div\r\n          className={className}\r\n          role='row'\r\n          style={{...style, background: 'linear-gradient(to left, #03763d, #1d7d43, #2d844a, #3b8c50, #479357)'}}\r\n        >\r\n          {columns}\r\n        </div>\r\n      )\r\n\r\n    render() {\r\n        const { classes, columns, onRowClick, ...tableProps } = this.props;\r\n        return (\r\n        <AutoSizer>\r\n            {({ height, width }) => (\r\n            <Table height={height} width={width} {...tableProps} onRowClick={onRowClick} rowClassName={this.getRowClassName} headerRowRenderer={this.headerRowRenderer}>\r\n                {columns.map(({ dataKey, ...other }, index) => {\r\n                return (\r\n                    <Column\r\n                    key={dataKey}\r\n                    headerRenderer={headerProps =>\r\n                        this.headerRenderer({\r\n                        ...headerProps,\r\n                        columnIndex: index,\r\n                        })\r\n                    }\r\n                    className={classes.flexContainer}\r\n                    cellRenderer={this.cellRenderer}\r\n                    dataKey={dataKey}\r\n                    {...other}\r\n                    width={width / 3}\r\n                    />\r\n                );\r\n                })}\r\n            </Table>\r\n            )}\r\n        </AutoSizer>\r\n        );\r\n    }\r\n}\r\n\r\nMuiVirtualizedTable.propTypes = {\r\n    classes: PropTypes.object.isRequired,\r\n    columns: PropTypes.arrayOf(PropTypes.object).isRequired,\r\n    headerHeight: PropTypes.number,\r\n    onRowClick: PropTypes.func,\r\n    rowHeight: PropTypes.number,\r\n};\r\n  \r\nconst VirtualizedTable = withStyles(styles)(MuiVirtualizedTable);\r\n  \r\nconst ImportShapeHistoryTable = withStyles(theme=>({\r\n    rootPaper:{\r\n        height: 'calc(100% - 370px)', \r\n        minHeight: '255px', \r\n        width: '100%', \r\n        position: 'absolute',\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            height: 'calc(100% - 340px)', \r\n        },\r\n        // [theme.breakpoints.down(\"xs\")]: {\r\n        //     height: 'calc(100% - 357px)',  \r\n        // }\r\n    }\r\n}))(props => {\r\n    const {\r\n        columnHeader=[],\r\n        datasource=[],\r\n        styleProps={},\r\n        onDownloadClick,\r\n        onRowClick,\r\n        classes\r\n    } = props;\r\n    return (\r\n        // <Paper style={{ height: 'calc(100% - 383px)', minHeight: '255px', width: '100%', position: 'absolute', ...styleProps }}>\r\n        <Paper className={classes.rootPaper} style={{ ...styleProps }}>\r\n            <VirtualizedTable\r\n                rowCount={datasource.length}\r\n                rowGetter={({ index }) => datasource[index]}\r\n                columns={columnHeader}\r\n                onDownloadClick={onDownloadClick}\r\n                onRowClick={onRowClick}\r\n            />\r\n        </Paper>\r\n    );\r\n})\r\n\r\nImportShapeHistoryTable.propTypes = {\r\n    columnHeader: PropTypes.arrayOf(PropTypes.shape({\r\n        width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\r\n        label: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\r\n        dataKey: PropTypes.string,\r\n        numeric: PropTypes.bool,\r\n        isRowIcon: PropTypes.bool,\r\n    })).isRequired,\r\n    datasource: PropTypes.arrayOf(PropTypes.object).isRequired\r\n  };\r\n  \r\nexport default ImportShapeHistoryTable;","import React from 'react';\r\nimport ImportShapeHistoryTable from '../../../../../../Containers/Web/Panel/Menu/MenuContent/ImportShapeFile/ImportShapeHistoryTable';\r\n\r\nconst ImportShapeFileHistoryView = props => {\r\n    const {columnHeader=[], datasource=[], onDownloadClick, onRowClick} = props;\r\n    return <ImportShapeHistoryTable\r\n    columnHeader={columnHeader}\r\n    datasource={datasource}\r\n    onRowClick={onRowClick}\r\n    onDownloadClick={onDownloadClick}/>\r\n}\r\n\r\nexport default ImportShapeFileHistoryView;","import React, {useEffect, useState, useRef} from 'react';\r\nimport {bindActionCreators} from 'redux';\r\nimport {connect} from 'react-redux';\r\nimport ImportShapeFileHistoryView from '../../../../../../Presentationals/Web/Panel/Menu/MenuContent/ImportShapeFile/ImportShapeFileHistoryView';\r\nimport * as ServiceUtils from '../../../../../../Utilities/ServiceUtils';\r\nimport * as MapAction from '../../../../../../Actions/Web/Maps/MapAction';\r\nimport * as MapFunctions from '../../../../../../Map/MapFunctions';\r\n\r\nconst headerTable = [\r\n    {\r\n        width: 200,\r\n        label: 'วันที่',\r\n        dataKey: 'importDate',\r\n        isDate: true\r\n    },\r\n    {\r\n        width: 200,\r\n        label: 'ชั้นข้อมูล',\r\n        dataKey: 'layerName',\r\n        numeric: false,\r\n    },\r\n    {\r\n        width: 150,\r\n        label: 'สถานะ',\r\n        dataKey: 'status',\r\n        isStatusColumn: true,\r\n        numeric: false,\r\n    }\r\n]\r\nconst ImportShapeFileHistory = props => {\r\n    const {userID, onRefFunction} = props;\r\n    const [statehistoryData, setStateHistoryData] = useState([]);\r\n    const repeatTimeImportHistory = useRef();\r\n\r\n    const getImportHistory = async () => {\r\n        try{\r\n            const response = await ServiceUtils.fetchGet_(`${process.env.REACT_APP_SURVEY_GET_IMPORT_SHAPE_HISTORY}?userID=${userID}`);\r\n            const resultObj = await response.json();\r\n            const result = (resultObj) ? resultObj : [];\r\n            setStateHistoryData(result)\r\n        }\r\n        catch(err){\r\n            console.log('error Get import shape history :: ', err);\r\n        }\r\n    }\r\n\r\n    const loadImportHistoryFirst = () => {\r\n        getImportHistory();\r\n    }\r\n\r\n    const loadImportHistoryRepeat = (time) => {\r\n        repeatTimeImportHistory.current = setInterval(async ()=>{\r\n            getImportHistory();\r\n        }, 30000);\r\n    }\r\n\r\n    const clearIntervalImportHistoryRepeat = () => {\r\n        if(repeatTimeImportHistory && repeatTimeImportHistory.current){\r\n            clearInterval(repeatTimeImportHistory.current)\r\n        }\r\n    }\r\n\r\n    const resetIntervalImportHistoryRepeat = () => {//reset เวลาให้ cooldown ใหม่\r\n        clearIntervalImportHistoryRepeat();\r\n        loadImportHistoryRepeat(30000);//30s\r\n    }\r\n\r\n    useEffect(()=>{\r\n        if(onRefFunction){\r\n            onRefFunction({\r\n                getImportHistory: getImportHistory,\r\n                resetIntervalImportHistoryRepeat: resetIntervalImportHistoryRepeat\r\n            })\r\n        }\r\n        loadImportHistoryFirst();\r\n        loadImportHistoryRepeat(30000);//30s\r\n\r\n        return () => {//จะ unmountComponent ต้อง clearTimeout\r\n            clearIntervalImportHistoryRepeat();\r\n        }\r\n    }, []);\r\n\r\n    const handleDownloadClick = (rowData) => {\r\n        alert('download is comming soon.')\r\n    }\r\n\r\n    const handleClickRow =async ({rowData}) =>{\r\n        rowData.extent && await props.mapAction.bindMapCommand(MapFunctions.extentToListImportShape,{\r\n            extent: JSON.parse(rowData.extent)\r\n        })\r\n        props.mapAction.bindClearMapCommand();\r\n    }\r\n\r\n    return <ImportShapeFileHistoryView\r\n    columnHeader={headerTable}\r\n    datasource={statehistoryData}\r\n    onDownloadClick={handleDownloadClick}\r\n    onRowClick={handleClickRow}\r\n    />\r\n}\r\n\r\nconst mapDispatchToProps = dispatch =>({\r\n    mapAction: bindActionCreators(MapAction,dispatch)\r\n})\r\n\r\nexport default connect(null,mapDispatchToProps)(ImportShapeFileHistory);","import React from 'react';\r\n// import PropTypes from 'prop-types';\r\nimport { Scrollbars } from 'react-custom-scrollbars';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport { Field } from 'redux-form';\r\n\r\nimport CloudUpload from '@material-ui/icons/CloudUpload';\r\nimport TextField from '../../../../../../Controls/Containers/TextFieldRedux';\r\nimport SelectField from '../../../../../../Controls/Containers/SelectFieldRedux';\r\nimport Button from '../../../../../../Controls/Containers/Button';\r\nimport AppBarHeaderView from '../../../AppBarHeaderView';\r\nimport ImportShapeFileHistory from '../../../../../../Containers/Web/Panel/Menu/MenuContent/ImportShapeFile/ImportShapeFileHistory';\r\nimport { BTN } from '../../../../../../Constants/Constants'\r\n// const DEFAULT_DDL_REQ = { id: -999, name: 'กรุณาเลือก' };\r\nconst ImportShapeFileView = ({\r\n    classes,\r\n    userID,\r\n    title,\r\n    ddlLayer = [],\r\n    inputUploadShapeRef,\r\n    refUploadForm,\r\n    onOpenUpload,\r\n    onImportShapeFile,\r\n    onBackClick,\r\n    onClearFormClick,\r\n    onSubmitClick,\r\n    handleSubmit,\r\n    onRefImportShapeFileHistoryFunction\r\n}) => {\r\n    return (\r\n        <Grid container spacing={0} className={classes.root}>\r\n            <form encType=\"multipart/form-data\" method=\"post\" ref={refUploadForm}>\r\n                <input\r\n                    id=\"inFile\"\r\n                    type=\"file\"\r\n                    name=\"file\"\r\n                    ref={inputUploadShapeRef}\r\n                    onChange={onImportShapeFile}\r\n                    hidden\r\n                />\r\n            </form>\r\n            <AppBarHeaderView\r\n                title={title}\r\n                onClickBack={onBackClick}\r\n            />\r\n\r\n            <Grid container className={classes.rootBody}>\r\n                <Scrollbars\r\n                    autoHide={false}\r\n                    universal={true}>\r\n                    <Grid container>\r\n                        <Grid item xs={12}>\r\n                            <form onSubmit={handleSubmit(onSubmitClick)} className={classes.rootForm} method=\"POST\">\r\n                                <Grid container className={classes.importShapeForm_root}>\r\n                                    <Grid container style={{ paddingBottom: '10px' }}>\r\n                                        <Grid item xs={12}>\r\n                                            เลือก Shape File ที่ต้องการนำเข้า\r\n                                    </Grid>\r\n                                        {/* <Grid item xs={12} className={classes.labelText}>\r\n                                        รองรับไฟล์นามสกุล *.zip (Shape File)\r\n                                    </Grid>\r\n                                    <Grid item xs={12} className={classes.labelText}>\r\n                                        ขนาดไม่เกิน 10 MB และค่าพิกัดเป็น WGS1984 เท่านั้น\r\n                                    </Grid> */}\r\n                                        <Grid item xs={12} className={classes.labelText}>\r\n                                            <u>หมายเหตุ</u> รองรับไฟล์นามสกุล *.zip (Shape File)\r\n                                            ขนาดไม่เกิน 10 MB และค่าพิกัดเป็น WGS1984 เท่านั้น\r\n                                            ข้อมูล point มีจำนวนไม่เกิน 4,000 รายการ ข้อมูล line/polygon มีจำนวนไม่เกิน 2,000 รายการ\r\n                                    </Grid>\r\n                                    </Grid>\r\n                                    <Grid item xs={12} >\r\n                                        <Field\r\n                                            name=\"shapeFile\"\r\n                                            label=\"Upload Shape\"\r\n                                            component={TextField}\r\n                                            icon={<CloudUpload />}\r\n                                            onClick={onOpenUpload}\r\n                                            required\r\n                                        />\r\n                                    </Grid>\r\n                                    <Grid item xs={12}>\r\n                                        <Field\r\n                                            label={'ชั้นข้อมูล'}\r\n                                            name={'layerImport'}\r\n                                            component={SelectField}\r\n                                            // onChangeValue={onMonthChange}\r\n                                            data={ddlLayer}\r\n                                            required\r\n                                        />\r\n                                    </Grid>\r\n\r\n                                    <Grid container justify=\"center\" spacing={24} className={classes.divFooter}>\r\n                                        <Grid item>\r\n                                            <Button\r\n                                                // color=\"black\"\r\n                                                label={BTN.TH.CANCEL}\r\n                                                // onClick={onClearFormClick}\r\n                                                onClick={onBackClick}\r\n                                                className={classes.btnReset}\r\n                                            />\r\n                                        </Grid>\r\n                                        <Grid item>\r\n                                            <Button\r\n                                                label={BTN.TH.SAVE}\r\n                                                type=\"submit\"\r\n                                                // label=\"บันทึก\"\r\n                                            />\r\n                                        </Grid>\r\n                                    </Grid>\r\n                                </Grid>\r\n                            </form>\r\n                        </Grid>\r\n                        <Grid item xs={12} className={classes.historyHeader}>\r\n                            ประวัติการนำเข้า Shape File\r\n                        </Grid>\r\n                        <Grid item xs={12}>\r\n                            <ImportShapeFileHistory\r\n                                userID={userID}\r\n                                onRefFunction={onRefImportShapeFileHistoryFunction} />\r\n                        </Grid>\r\n                    </Grid>\r\n                </Scrollbars>\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        // position: 'absolute',\r\n        // top: 0,\r\n        // bottom: 0,\r\n        // right: 0,\r\n        // left: 0\r\n        width: '100%',\r\n        height: '100%'\r\n    },\r\n    rootBody: {\r\n        width: '100%',\r\n        height: 'calc(100% - 43px)',\r\n    },\r\n    labelText: {\r\n        fontSize: theme.textSize.mini\r\n        // display: 'flex',\r\n        // // justifyContent: 'center',\r\n        // alignItems: 'center'\r\n    },\r\n    divFooter: {\r\n        marginTop: '0px',\r\n        marginBottom: '0px'\r\n    },\r\n    containnerRow: {\r\n        height: '50px',\r\n        width: '100%',\r\n        marginBottom: '15px'\r\n    },\r\n    containnerRowText: {\r\n        height: '30px',\r\n        width: '100%',\r\n        marginBottom: '15px'\r\n    },\r\n    rootForm: {\r\n        // width: '95%',\r\n        width: '100%',\r\n        height: '100%'\r\n    },\r\n    importShapeForm_root: {\r\n        padding: '10px 10px 0px',\r\n        // paddingTop: '20px'\r\n    },\r\n    historyHeader: {\r\n        height: '30px',\r\n        lineHeight: '30px',\r\n        textAlign: 'center',\r\n        backgroundColor: '#6D6D6D',\r\n        color: '#FFFFFF'\r\n    },\r\n    btnReset: {\r\n        // backgroundColor: 'red'\r\n    }\r\n}))(ImportShapeFileView)","import React, {Fragment, useRef, useEffect, useState} from 'react';\r\nimport { reduxForm, SubmissionError  } from \"redux-form\";\r\nimport { compose } from \"recompose\";\r\nimport { connect } from \"react-redux\";\r\nimport { bindActionCreators } from \"redux\";\r\n\r\n//import component\r\nimport ImportShapeFileView from '../../../../../../Presentationals/Web/Panel/Menu/MenuContent/ImportShapeFile/ImportShapeFileView';\r\nimport WithAlertMessage from '../../../../../../HOC/WithAlertMessage';\r\nimport AlertMessageSuper from '../../../../../../Controls/Containers/AlertMessageSuper';\r\nimport WithLoading from '../../../../../../HOC/WithLoading';\r\nimport Loading from '../../../../../../Controls/Containers/Loading';\r\n\r\n//import service - utils\r\nimport { isEmptyObj } from '../../../../../../Utilities/Utils';\r\nimport * as ServiceUtils from '../../../../../../Utilities/ServiceUtils';\r\nimport * as MapAction from \"../../../../../../Actions/Web/Maps/MapAction\";\r\n\r\n//import actions\r\nimport { importShape, clearImportShapeGraphic } from \"../../../../../../Map/MapFunctions\";\r\n\r\n//import costants\r\nimport { ALERT_MESSAGE } from '../../../../../../Constants/Constants';\r\n\r\nconst ImportShapeFile = props => {\r\n    const {\r\n        title,\r\n        onBackClick,\r\n\r\n        //ConnectAction\r\n        mapAction,\r\n\r\n        //Redux-form\r\n        // initialize,\r\n        handleSubmit,\r\n        change,\r\n        reset,\r\n        // formValue\r\n\r\n        //Reducer\r\n        authenData,\r\n\r\n        //WithAlert\r\n        showAlert,\r\n        // hideAlert\r\n\r\n        //WithLoading\r\n        isShowLoading,\r\n        showLoading, \r\n        hideLoading\r\n    } = props;\r\n\r\n    const inputUploadShapeRef = useRef();\r\n    const refUploadForm = useRef();\r\n    const currentImportShapeData = useRef();\r\n    const curentBrowFile = useRef();\r\n    const refFunctionImportShapeHistory = useRef();\r\n\r\n    const [stateLookupLayer, setStateLookupLayer] = useState({\r\n        datasourceLookup: null,\r\n        displayLookup: []\r\n    });\r\n    const [extent, setExtent] = useState(null)\r\n    \r\n    const loadLookupLayer = async () => {\r\n        try{\r\n            const response = await ServiceUtils.fetchGet_(process.env.REACT_APP_SURVEY_GET_IMPORT_LAYER_LOOKUP);\r\n            if (!response.ok) {\r\n                throw response.status;\r\n            }\r\n            const resultObj = await response.json();\r\n            if(resultObj && resultObj.result){\r\n                const lookup = resultObj.result.map(layerITM => {\r\n                    return {\r\n                        id: layerITM.ID,\r\n                        name: layerITM.displayName\r\n                    }\r\n                });\r\n                setStateLookupLayer({\r\n                    ...stateLookupLayer,\r\n                    datasourceLookup: resultObj.result,\r\n                    displayLookup: [...lookup]\r\n                })\r\n            }\r\n        }\r\n        catch(err){\r\n            console.log('Load Lookup Import Layer error : ', err);\r\n        }\r\n    }\r\n\r\n    useEffect(()=>{\r\n        loadLookupLayer();\r\n\r\n        return () => {//will unmount component\r\n            mapAction.bindClearMapCommand();//clear map command\r\n        }\r\n    }, []);\r\n    const handleOpenUpload = () => {\r\n        if (inputUploadShapeRef.current) {\r\n            inputUploadShapeRef.current.value = \"\";\r\n            inputUploadShapeRef.current.click();\r\n        }\r\n    }\r\n\r\n    const callbackImportShape = (data) => {\r\n        hideLoading();\r\n        \r\n        if(data.error){\r\n            let isMAximumRecordsError = data.error.message.includes(\"001509\") //001509 เป็นเลข error หาก records ของ shape เกิน limit\r\n           \r\n            if(isMAximumRecordsError){\r\n               \r\n                if(curentBrowFile.current){//update textbox upload\r\n                    change('shapeFile', '')\r\n                }\r\n                showAlert({ altMsg: \"คำแนะนำ zip file ขนาดไม่เกิน 10 MB ข้อมูล point มีจำนวนไม่เกิน 4,000 รายการ ข้อมูล line/polygon มีจำนวนไม่เกิน 2,000 รายการ\"})\r\n            }else{\r\n           \r\n                if(curentBrowFile.current){//update textbox upload\r\n                    change('shapeFile', '')\r\n                }\r\n                showAlert({ altMsg: data.message})\r\n            }\r\n            setExtent(null)\r\n        }else{\r\n            if(data.isSupport){\r\n                if(curentBrowFile.current){//update textbox upload\r\n                    change('shapeFile', curentBrowFile.current.name)\r\n                }\r\n                currentImportShapeData.current = data;//เก็บ data\r\n                setExtent(data.extend)\r\n            }\r\n        }\r\n    }\r\n\r\n    const handleImportShapeFile = (evt) => {\r\n        showLoading();\r\n        curentBrowFile.current = null;\r\n        currentImportShapeData.current = null;\r\n        const filePath = evt.target.value.toLowerCase();\r\n        const file = evt.target.files[0];\r\n        if(file.size <= 10485760){//ไม่เกิน 10MB (1 mb = 1,048,576)\r\n            const isZipFile = filePath.indexOf(\".zip\") !== -1;\r\n            if (isZipFile) {\r\n                curentBrowFile.current = file;\r\n                mapAction.bindMapCommand(importShape, {\r\n                    filePath: filePath,\r\n                    callback: callbackImportShape,\r\n                    refFormUpload: refUploadForm.current\r\n                });\r\n            } \r\n            else {\r\n                showAlert({ altMsg: 'เฉพาะ .zip เท่านั้น' })\r\n                hideLoading();\r\n            }\r\n        }\r\n        else{\r\n            showAlert({altMsg:ALERT_MESSAGE.POPUP.SYSTEM_ERROR})\r\n            // showAlert({ altMsg: 'คำแนะนำ zip file ขนาดไม่เกิน 10 MB ข้อมูล point มีจำนวนไม่เกิน 4,000 รายการ ข้อมูล line/polygon มีจำนวนไม่เกิน 2,000 รายการ' })\r\n            hideLoading();\r\n        }\r\n    }\r\n\r\n    const validateForm = values => {\r\n        const errors = {};\r\n        if(!values.layerImport){\r\n            errors.layerImport = 'กรุณาระบุชั้นข้อมูล';\r\n        }\r\n        if (!values.shapeFile || values.shapeFile === ''){\r\n            errors.shapeFile = 'กรุณา Import Shape File.';\r\n        }\r\n        if(!isEmptyObj(errors)){\r\n            throw new SubmissionError(errors)\r\n        }\r\n    }\r\n\r\n    const getLookupITM = (layerImport) => {\r\n        const lookupDataITM = stateLookupLayer.datasourceLookup.filter(lookITM => {\r\n            return lookITM.ID === layerImport\r\n        })\r\n        return lookupDataITM[0]\r\n    }\r\n\r\n    const uploadFile = async file => {\r\n        let result = null;\r\n        try{\r\n            const formData = new FormData();\r\n            formData.append(\"IMPORT_SHAPE_FILE\", file);\r\n            \r\n            const response = await fetch(process.env.REACT_APP_SURVEY_UPLOAD_IMPORT_SHAPE, {\r\n                method: \"POST\",\r\n                body: formData,\r\n            });\r\n            if(!response.ok){\r\n                throw response.status\r\n            }\r\n\r\n            result = await response.json();\r\n        }\r\n        catch(err){\r\n            showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR })\r\n        }\r\n\r\n        return result;\r\n    };\r\n\r\n    const saveImportShapeData = async parameter => {\r\n        let result = null;\r\n        try{\r\n            const response = await ServiceUtils.fetchPost(process.env.REACT_APP_SURVEY_SAVE_IMPORT_SHAPE, parameter);\r\n            if(!response.ok){\r\n                throw response.status\r\n            }\r\n\r\n            result = await response.json();\r\n        }\r\n        catch(err){\r\n            console.log('save import shape error : ', err);\r\n        }\r\n\r\n        return result;\r\n    };\r\n\r\n    const resetForm = () => {\r\n        mapAction.bindMapCommand(clearImportShapeGraphic);//clear map graphic\r\n        reset();//clear form\r\n    }\r\n\r\n    const processAfterSuccess = () => {\r\n        showAlert({ altMsg: 'บันทึกรายการนำเข้า ระบบกำลังดำเนินการนำเข้าข้อมูล กรุณาตรวจสอบสถานะ'});\r\n        if(refFunctionImportShapeHistory.current){\r\n            refFunctionImportShapeHistory.current.getImportHistory();//ดึงข้อมูลตารางใหม่\r\n            refFunctionImportShapeHistory.current.resetIntervalImportHistoryRepeat();//reset เวลา auto ดึงข้อมูลตาราง\r\n        }\r\n        resetForm();//clear form\r\n    }\r\n\r\n    const processSaveImportShape = async (values) => {\r\n        const layerData = getLookupITM(values.layerImport);\r\n        const isMatchGeometryType = layerData.value.toLowerCase().indexOf(currentImportShapeData.current.geometryType.toLowerCase()) > -1;\r\n        if(isMatchGeometryType){\r\n            const fileData = curentBrowFile.current;\r\n            showLoading();\r\n            const uploadData = await uploadFile(fileData);\r\n            if(uploadData && uploadData.statusCode !== 0){\r\n                const saveParameter = {\r\n                    userID: authenData.profile.userID,\r\n                    fileName: uploadData.fileName,\r\n                    url: uploadData.url,\r\n                    layerName: layerData.name,\r\n                    extent: extent && JSON.stringify(extent)\r\n                }\r\n                const saveData = await saveImportShapeData(saveParameter);\r\n                if(saveData && saveData.statusCode === 1){\r\n                    processAfterSuccess();\r\n                    // รอติดตั้งบนเครื่องจริงค่อยเปิดใช้\r\n                    callServiceRunProcessImportShape(saveData.objectID);\r\n                }else{\r\n                    showAlert({ altMsg: 'บันทึกรายการนำเข้าไม่สำเร็จ'})\r\n                }\r\n                \r\n            }\r\n            else{\r\n                showAlert({ altMsg: 'Upload ข้อมูลไม่สำเร็จกรุณาลองใหม่อีกครั้ง'})\r\n            }\r\n\r\n            hideLoading();\r\n        }\r\n        else{\r\n            showAlert({ altMsg: 'ชั้นข้อมูลและข้อมูลที่จะนำเข้า มีประเภทข้อมูลไม่ตรงกัน'})\r\n        }\r\n    }\r\n\r\n    // ยิง service สำหรับ run โปรแกรมหลังบ้านให้นำเข้าข้อมูล shape\r\n    const callServiceRunProcessImportShape = (objectID) =>{\r\n        ServiceUtils.fetchGet_(`${process.env.REACT_APP_SERVER_RUN_PROCESS_IMPORT_SHAPE}?objectID=${objectID}`)\r\n        .catch(ex =>{\r\n            console.log('ex callServiceRunProcessImportShape',ex)\r\n        })\r\n    }\r\n\r\n    const handleSubmitClick = values => {\r\n        validateForm(values);\r\n        //statement ข้างล้างจะทำงานเมื่อ validateForm ผ่าน\r\n        processSaveImportShape(values);\r\n    }\r\n\r\n    const handleClearFormClick = () => {\r\n        resetForm();\r\n    }\r\n\r\n    const handleRefImportShapeFileHistoryFunction = (objFunction) => {\r\n        refFunctionImportShapeHistory.current = objFunction;\r\n    }\r\n\r\n    const handleBackToMainMenu = () => {\r\n        mapAction.bindMapCommand(clearImportShapeGraphic);//clear map graphic\r\n        if(onBackClick){\r\n            onBackClick();\r\n        }\r\n    }\r\n    return <Fragment>\r\n        <Loading isShowLoading={isShowLoading} />\r\n        <ImportShapeFileView\r\n            userID={authenData.profile.userID}\r\n            inputUploadShapeRef={inputUploadShapeRef}\r\n            refUploadForm={refUploadForm}\r\n            onRefImportShapeFileHistoryFunction={handleRefImportShapeFileHistoryFunction}\r\n\r\n            title={title} \r\n            ddlLayer={stateLookupLayer.displayLookup}\r\n\r\n            onClearFormClick={handleClearFormClick}\r\n            handleSubmit={handleSubmit}\r\n            onSubmitClick={handleSubmitClick}\r\n            onBackClick={handleBackToMainMenu}\r\n            onOpenUpload={handleOpenUpload}\r\n            onImportShapeFile={handleImportShapeFile}/>\r\n\r\n        <AlertMessageSuper {...props} />\r\n    </Fragment>;\r\n}\r\n\r\nconst FORM_NAME = 'ImportShapeFile';\r\n\r\nconst reduxFormParameter = {\r\n    form: FORM_NAME,\r\n};\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    mapAction: bindActionCreators(MapAction, dispatch)\r\n})\r\n\r\nconst mapStateToProps = state => ({\r\n    authenData: state.authen,\r\n})\r\n\r\nexport default compose(\r\n    connect(mapStateToProps, mapDispatchToProps),\r\n    reduxForm(reduxFormParameter),\r\n    WithAlertMessage,\r\n    WithLoading\r\n)(ImportShapeFile)","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport clsx from 'clsx';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport TableCell from '@material-ui/core/TableCell';\r\nimport Paper from '@material-ui/core/Paper';\r\nimport CloudDownload from '@material-ui/icons/CloudDownload';\r\nimport { AutoSizer, Column, Table } from 'react-virtualized';\r\nimport IconButton from '@material-ui/core/IconButton';\r\n\r\n//import service - utils\r\nimport {displayImportExportStatus} from '../../../../../../Utilities/Utils';\r\nimport {convertDateTimeToDisplayDate} from '../../../../../../Utilities/DateTimeUtil';\r\n\r\n//import constants\r\nimport {STATUS_IMPORT_EXPORT} from '../../../../../../Constants/Constants';\r\n\r\nconst styles = theme => ({\r\n    flexContainer: {\r\n        display: 'flex',\r\n        alignItems: 'center',\r\n        boxSizing: 'border-box',\r\n    },\r\n    tableRow: {\r\n        cursor: 'pointer',\r\n    },\r\n    tableRowHover: {\r\n        '&:hover': {\r\n        backgroundColor: theme.palette.grey[200],\r\n        },\r\n    },\r\n    tableCell: {\r\n        flex: 1,\r\n        padding: '4px 56px 4px 15px',\r\n        '&:last-child':{\r\n            paddingRight: '0px'\r\n        }\r\n    },\r\n    noClick: {\r\n        cursor: 'initial',\r\n    },\r\n});\r\n  \r\nclass MuiVirtualizedTable extends React.PureComponent {\r\n    static defaultProps = {\r\n        headerHeight: 48,\r\n        rowHeight: 48,\r\n    };\r\n\r\n    getRowClassName = ({ index }) => {\r\n        const { classes, onRowClick } = this.props;\r\n\r\n        return clsx(classes.tableRow, classes.flexContainer, {\r\n        [classes.tableRowHover]: index !== -1 && onRowClick != null,\r\n        });\r\n    };\r\n\r\n    handleClickDownload = (rowData) => event => {\r\n        const {onDownloadClick} = this.props;\r\n        if(onDownloadClick){\r\n            onDownloadClick(rowData)\r\n        }\r\n    }\r\n\r\n    cellRenderer = ({rowData, cellData, columnIndex}) => {//displayImportExportStatus\r\n        const { columns, classes, rowHeight, onRowClick } = this.props;\r\n        const isColumnAction = (columns[columnIndex].isColumnAction);//เป็น column ของ Icon\r\n        const isDateColumn = (columns[columnIndex].isDate);//เป็น column date หรือไม่\r\n        let isDisplayIconDownload = false;//ใช้จัดการการแสดงผล Icon\r\n        const isColumnStatus = (columns[columnIndex].isStatusColumn)//เป็น Column status\r\n        let displayText = cellData;\r\n\r\n        if(isDateColumn) {\r\n            displayText = (cellData) ? convertDateTimeToDisplayDate(cellData, \"d MMM yyyy\") : '';\r\n        } else if(isColumnStatus) {\r\n            displayText =(cellData === \"D\" && rowData.fileName === null) ? \"ไม่พบข้อมูล\" : displayImportExportStatus(cellData);\r\n            // displayText = displayImportExportStatus(cellData);\r\n        } else if(isColumnAction){\r\n            displayText = '';\r\n\r\n            if(cellData === \"D\" && rowData.fileName === null){\r\n                isDisplayIconDownload = false\r\n            }else{\r\n                const isStatusSuccess = cellData.toLowerCase().indexOf(STATUS_IMPORT_EXPORT.D.key.toLowerCase()) !== -1;\r\n                isDisplayIconDownload = isStatusSuccess;\r\n            }\r\n        }\r\n\r\n        const renderCell = <TableCell\r\n            component=\"div\"\r\n            className={clsx(classes.tableCell, classes.flexContainer, {\r\n            [classes.noClick]: onRowClick == null,\r\n            })}\r\n            variant=\"body\"\r\n            style={{ height: rowHeight }}\r\n            align={(columnIndex != null && columns[columnIndex].numeric) || false ? 'right' : 'left'}\r\n            >\r\n            {displayText}\r\n        </TableCell>\r\n\r\n        const renderCellIcon = <TableCell\r\n            component=\"div\"\r\n            className={clsx(classes.tableCell, classes.flexContainer, {\r\n            [classes.noClick]: onRowClick == null,\r\n            })}\r\n            variant=\"body\"\r\n            style={{ height: rowHeight }}\r\n            align={(columnIndex != null && columns[columnIndex].numeric) || false ? 'right' : 'left'}\r\n            >\r\n            {   isDisplayIconDownload &&\r\n                <IconButton onClick={this.handleClickDownload(rowData)}>\r\n                    <CloudDownload/>\r\n                </IconButton>\r\n            }\r\n        </TableCell>\r\n\r\n        return (\r\n            (!isColumnAction && renderCell) || renderCellIcon\r\n        );\r\n    };\r\n\r\n    headerRenderer = ({ label, columnIndex }) => {\r\n        const { headerHeight, columns, classes } = this.props;\r\n\r\n        return (\r\n        <TableCell\r\n            component=\"div\"\r\n            className={clsx(classes.tableCell, classes.flexContainer, classes.noClick)}\r\n            variant=\"head\"\r\n            style={{ height: headerHeight, color: '#FFFFFF'}}\r\n            align={columns[columnIndex].numeric || false ? 'right' : 'left'}\r\n        >\r\n            <span>{label}</span>\r\n        </TableCell>\r\n        );\r\n    };\r\n\r\n    headerRowRenderer = ({\r\n        className,\r\n        columns,\r\n        style\r\n      }) => (\r\n        <div\r\n          className={className}\r\n          role='row'\r\n          style={{...style, background: 'linear-gradient(to left, #03763d, #1d7d43, #2d844a, #3b8c50, #479357)'}}\r\n        >\r\n          {columns}\r\n        </div>\r\n      )\r\n\r\n    render() {\r\n        const { classes, columns, ...tableProps } = this.props;\r\n        return (\r\n            <AutoSizer>\r\n                {({ height, width }) => (\r\n                <Table height={height} width={width} {...tableProps} rowClassName={this.getRowClassName} headerRowRenderer={this.headerRowRenderer}>\r\n                    {columns.map(({ dataKey, ...other }, index) => {\r\n                    return (\r\n                        <Column\r\n                        key={dataKey}\r\n                        headerRenderer={headerProps =>\r\n                            this.headerRenderer({\r\n                            ...headerProps,\r\n                            columnIndex: index,\r\n                            })\r\n                        }\r\n                        className={classes.flexContainer}\r\n                        cellRenderer={this.cellRenderer}\r\n                        dataKey={dataKey}\r\n                        {...other}\r\n                        width = {width * other.width}\r\n                        />\r\n                    );\r\n                    })}\r\n                </Table>\r\n                )}\r\n            </AutoSizer>\r\n        );\r\n    }\r\n}\r\n\r\nMuiVirtualizedTable.propTypes = {\r\n    classes: PropTypes.object.isRequired,\r\n    columns: PropTypes.arrayOf(PropTypes.object).isRequired,\r\n    headerHeight: PropTypes.number,\r\n    onRowClick: PropTypes.func,\r\n    rowHeight: PropTypes.number,\r\n};\r\n  \r\nconst VirtualizedTable = withStyles(styles)(MuiVirtualizedTable);\r\n  \r\nconst ExportShapeFileHistoryTable =withStyles(()=>({\r\n    rootPaper:{\r\n        height: 'calc(100% - 490px)',\r\n        minHeight: '255px',\r\n        width: '100%', \r\n        position: 'absolute',\r\n        // [theme.breakpoints.down(\"xs\")]: {\r\n        //     height: 'calc(100% - 525px)',\r\n        // }\r\n    }\r\n}))(props => {\r\n    const {\r\n        classes,\r\n        columnHeader=[],\r\n        datasource=[],\r\n        styleProps={},\r\n        onDownloadClick\r\n    } = props;\r\n\r\n    return (\r\n        // <Paper style={{ height: 'calc(100% - 605px)', minHeight: '255px', width: '100%', position: 'absolute', ...styleProps }}>\r\n        <Paper className={classes.rootPaper} style={{ ...styleProps }}>\r\n            <VirtualizedTable\r\n                rowCount={datasource.length}\r\n                rowGetter={({ index }) => datasource[index]}\r\n                columns={columnHeader}\r\n                onDownloadClick={onDownloadClick}\r\n            />\r\n        </Paper>\r\n    );\r\n})\r\n\r\nExportShapeFileHistoryTable.propTypes = {\r\n    columnHeader: PropTypes.arrayOf(PropTypes.shape({\r\n        width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\r\n        label: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\r\n        dataKey: PropTypes.string,\r\n        numeric: PropTypes.bool,\r\n        isRowIcon: PropTypes.bool,\r\n    })).isRequired,\r\n    datasource: PropTypes.arrayOf(PropTypes.object).isRequired\r\n  };\r\n  \r\nexport default ExportShapeFileHistoryTable;","import React from 'react';\r\nimport ExportShapeFileHistoryTable from '../../../../../../Containers/Web/Panel/Menu/MenuContent/ExportShapeFile/ExportShapeFileHistoryTable';\r\n\r\nconst ExportShapeFileHistoryView = props => {\r\n    const {columnHeader=[], datasource=[], onDownloadClick} = props;\r\n    return <ExportShapeFileHistoryTable\r\n    columnHeader={columnHeader}\r\n    datasource={datasource}\r\n    onDownloadClick={onDownloadClick}/>\r\n}\r\n\r\nexport default ExportShapeFileHistoryView;","import React, { useEffect, useState, useRef } from \"react\";\r\n\r\n//import component\r\nimport ExportShapeFileHistoryView from \"../../../../../../Presentationals/Web/Panel/Menu/MenuContent/ExportShapeFile/ExportShapeFileHistoryView\";\r\n\r\n//import service - utils\r\nimport * as ServiceUtils from \"../../../../../../Utilities/ServiceUtils\";\r\n\r\nconst headerTable = [\r\n    {\r\n        // width: 200,\r\n        width: 0.28,\r\n        label: \"วันที่\",\r\n        dataKey: \"exportDate\",\r\n        isDate: true,\r\n    },\r\n    {\r\n        // width: 210,\r\n        width: 0.27,\r\n        label: \"ชั้นข้อมูล\",\r\n        dataKey: \"layerName\",\r\n        numeric: false,\r\n    },\r\n    {\r\n        // width: 150,\r\n        width: 0.25,\r\n        label: \"สถานะ\",\r\n        dataKey: \"status\",\r\n        isStatusColumn: true,\r\n        numeric: false,\r\n    },\r\n    {\r\n        // width: 150,\r\n        width: 0.2,\r\n        label: \"ดาวน์โหลด\",\r\n        dataKey: \"status\",\r\n        numeric: false,\r\n        isColumnAction: true,\r\n    },\r\n];\r\n\r\nconst ExportShapeFileHistory = (props) => {\r\n    const { userID, onRefFunction } = props;\r\n    const [statehistoryData, setStateHistoryData] = useState([]);\r\n    const repeatTimeExportHistory = useRef();\r\n\r\n    const getExportHistory = async () => {\r\n        try {\r\n            const response = await ServiceUtils.fetchGet_(\r\n                `${\r\n                    process.env.REACT_APP_SURVEY_GET_EXPORT_SHAPE_HISTORY\r\n                }?userID=${userID}`\r\n            );\r\n            const resultObj = await response.json();\r\n            const result = resultObj ? resultObj : [];\r\n            setStateHistoryData(result);\r\n        } catch (err) {\r\n            console.log(\"error Get export shape history :: \", err);\r\n        }\r\n    };\r\n\r\n    const loadExportHistoryFirst = () => {\r\n        getExportHistory();\r\n    };\r\n\r\n    const loadExportHistoryRepeat = (time) => {\r\n        repeatTimeExportHistory.current = setInterval(async () => {\r\n            getExportHistory();\r\n        }, 30000);\r\n    };\r\n\r\n    const clearIntervalExportHistoryRepeat = () => {\r\n        if (repeatTimeExportHistory && repeatTimeExportHistory.current) {\r\n            clearInterval(repeatTimeExportHistory.current);\r\n        }\r\n    };\r\n\r\n    const resetIntervalExportHistoryRepeat = () => {\r\n        //reset เวลาให้ cooldown ใหม่\r\n        clearIntervalExportHistoryRepeat();\r\n        loadExportHistoryRepeat(30000); //30s\r\n    };\r\n\r\n    useEffect(() => {\r\n        if (onRefFunction) {\r\n            onRefFunction({\r\n                getExportHistory: getExportHistory,\r\n                resetIntervalExportHistoryRepeat: resetIntervalExportHistoryRepeat,\r\n            });\r\n        }\r\n        loadExportHistoryFirst();\r\n        loadExportHistoryRepeat(30000); //30s\r\n\r\n        return () => {\r\n            //จะ unmountComponent ต้อง clearTimeout\r\n            clearIntervalExportHistoryRepeat();\r\n        };\r\n    }, []);\r\n\r\n    const handleDownloadClick = (rowData) => {\r\n        if (rowData.fileName) {\r\n            // const urlDownload = `${rowData.downloadUrl}${rowData.fileName}`;\r\n            window.open(rowData.downloadUrl, \"Export Shape File Download\");\r\n        }\r\n    };\r\n\r\n    return (\r\n        <ExportShapeFileHistoryView\r\n            columnHeader={headerTable}\r\n            datasource={statehistoryData}\r\n            onDownloadClick={handleDownloadClick}\r\n        />\r\n    );\r\n};\r\n\r\nexport default ExportShapeFileHistory;\r\n","\r\nimport React, {Fragment, useEffect} from 'react';\r\nimport { connect } from \"react-redux\";\r\nimport { bindActionCreators } from \"redux\";\r\n\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport FormControl from '@material-ui/core/FormControl';\r\nimport classnames from 'classnames';\r\nimport FormHelperText from '@material-ui/core/FormHelperText'\r\n\r\nimport * as MapAction from \"../../../../../../Actions/Web/Maps/MapAction\";\r\nimport * as MapFunction from '../../../../../../Map/MapFunctions';\r\nimport * as MenuAction from '../../../../../../Actions/Web/MenuAction';\r\nimport {ACTIVE_FUNCTION} from '../../../../../../Constants/Constants';\r\n\r\nimport WithLoading from '../../../../../../HOC/WithLoading';\r\nimport Loading from '../../../../../../Controls/Containers/Loading';\r\n\r\nconst FieldSpecifyArea = withStyles(theme=>({\r\n    btnPolygone: {\r\n        width: \"50px\",\r\n        minHeight: \"40px\",\r\n        margin: \"0px 10px 10px\",\r\n        display: \"block\",\r\n        padding: 0,\r\n        backgroundSize: \"40px 40px\",\r\n        backgroundRepeat: \"no-repeat\",\r\n        backgroundPosition: \"center\"\r\n    },\r\n    btnAreaNormal: {\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/webmap_measurement_01_normal.png)`,\r\n        \"&:Hover\": {\r\n            backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/webmap_measurement_01_selected.png)`\r\n        },\r\n        cursor: 'pointer'\r\n    },\r\n    btnAreaSelected: {\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/webmap_measurement_01_selected.png)`,\r\n        cursor: 'pointer'\r\n    },\r\n    formControl: {\r\n        minWidth: \"100%\",\r\n        // marginTop: theme.spacing.unit,\r\n        // marginBottom: theme.spacing.unit\r\n    },\r\n    label: {\r\n        marginBottom: '5px'\r\n    },\r\n    red: {\r\n        color: \"red\"\r\n    },\r\n    formHelper: {\r\n        // marginTop: theme.spacing.unit / 3,\r\n        // marginTop: '4px',\r\n        marginTop: '0px',\r\n        color: \"red\",\r\n        padding: '0px',\r\n    }\r\n}))(({\r\n    classes,\r\n    input,\r\n    label,\r\n    meta: { touched, error, invalid},\r\n    required,\r\n    onChangeSelectArea,\r\n    onResetActiveButton,\r\n    mapAction,\r\n    menuRdc,\r\n    menuAction,\r\n\r\n    isShowLoading,\r\n    showLoading, \r\n    hideLoading\r\n}) => {\r\n    // const [isActive, setIsActive] = useState(false);\r\n\r\n    useEffect(()=>{\r\n        if(onResetActiveButton){\r\n            onResetActiveButton(resetActiveButton)\r\n        }\r\n    },[])\r\n\r\n    const callbackDrawArea = (data) => {\r\n        if(onChangeSelectArea){\r\n            onChangeSelectArea(data)\r\n        }\r\n    }\r\n\r\n    const handleClick = async () => {\r\n        input.onChange(null);\r\n        // const isActiveBtn = !isActive;\r\n        // if(isActiveBtn){\r\n        //     mapAction.bindMapCommand(MapFunction.createDrawAreaExportShape, {\r\n        //         callbackFn:callbackDrawArea,\r\n        //         loadingFunction: {\r\n        //             showLoading, \r\n        //             hideLoading\r\n        //         }\r\n        //     });\r\n        // }\r\n        // else{\r\n        //     await mapAction.bindMapCommand(MapFunction.clearDrawEventExportShape);\r\n        //     mapAction.bindClearMapCommand();\r\n        // }\r\n        // setIsActive(isActiveBtn)\r\n        if(menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM){\r\n            menuAction.activeFunction(null)\r\n            await mapAction.bindMapCommand(MapFunction.clearDrawEventExportShape);\r\n            mapAction.bindClearMapCommand();\r\n        }else{\r\n            menuAction.activeFunction(ACTIVE_FUNCTION.ADD_GP_FORM)\r\n            setTimeout(()=>{ // set timeout เพื่อแก้ปัญหา willunmount ของ maptool clear event draw\r\n                mapAction.bindMapCommand(MapFunction.createDrawAreaExportShape, {\r\n                    callbackFn:callbackDrawArea,\r\n                    loadingFunction: {\r\n                        showLoading, \r\n                        hideLoading\r\n                    }\r\n                });\r\n            },50)\r\n        }\r\n    }\r\n\r\n    const resetActiveButton = () => {\r\n        // setIsActive(false);\r\n        menuAction.activeFunction(null)\r\n        input.onChange(null);\r\n    }\r\n\r\n    return (\r\n        <Fragment>\r\n        <Loading isShowLoading={isShowLoading}/>\r\n        <FormControl variant=\"outlined\" error={touched && invalid} className={classes.formControl}  >\r\n            <Grid container>\r\n                <Grid item xs={4}>\r\n                    <Grid container alignItems='center' style={{height: '100%'}}>\r\n                    {\r\n                        label && \r\n                        <span className={classnames(classes.label, { [classes.red]: touched && invalid })}>\r\n                            {label}{required && <label className={classes.red}>*</label>}\r\n                        </span>\r\n                    }\r\n                    </Grid>\r\n                </Grid>\r\n                <Grid item xs={8}>\r\n                    <div\r\n                        className={classnames(classes.btnPolygone, { [classes.btnAreaNormal]: true, [classes.btnAreaSelected]: menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM })}\r\n                        onClick={handleClick}\r\n                    />\r\n                </Grid>\r\n            </Grid>\r\n            \r\n            <FormHelperText className={classes.formHelper}>\r\n                {touched && invalid && error}\r\n            </FormHelperText>\r\n        </FormControl >\r\n        </Fragment>\r\n    );\r\n})\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    mapAction: bindActionCreators(MapAction, dispatch),\r\n    menuAction: bindActionCreators(MenuAction, dispatch)\r\n})\r\n\r\nconst mapStateToProps = state =>({\r\n    menuRdc:state.menu\r\n})\r\nexport default WithLoading(connect(mapStateToProps, mapDispatchToProps)(FieldSpecifyArea))","import React from 'react';\r\n// import PropTypes from 'prop-types';\r\nimport { Scrollbars } from 'react-custom-scrollbars';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport { Field } from 'redux-form';\r\n\r\nimport ReduxFormDatePickerThai from '../../../../../../Controls/Containers/Picker/ReduxFormDatePickerThai';\r\nimport SelectField from '../../../../../../Controls/Containers/SelectFieldRedux';\r\nimport Button from '../../../../../../Controls/Containers/Button';\r\nimport AppBarHeaderView from '../../../AppBarHeaderView';\r\nimport ExportShapeFileHistory from '../../../../../../Containers/Web/Panel/Menu/MenuContent/ExportShapeFile/ExportShapeFileHistory';\r\nimport FieldSpecifyArea from './FieldSpecifyArea';\r\n\r\nconst ExportShapeFileView = ({\r\n    classes,\r\n    userID,\r\n    title,\r\n    ddlLayer = [],\r\n    ddlExplorer = [],\r\n    surveyDate: { maxDateSurvey, minDateSurvey },\r\n\r\n    onChangeStartDateSurvey,\r\n    onChangeEndDateSurvey,\r\n    onBackClick,\r\n    onSubmitClick,\r\n    handleSubmit,\r\n\r\n    onRefExportShapeFileHistoryFunction,\r\n\r\n    onChangeSelectArea,\r\n    onResetActiveButton\r\n}) => {\r\n    return (\r\n        <Grid container spacing={0} className={classes.root}>\r\n            <AppBarHeaderView\r\n                title={title}\r\n                onClickBack={onBackClick}\r\n            />\r\n            <Grid container className={classes.rootBody}>\r\n                <Scrollbars\r\n                    autoHide={false}\r\n                    universal={true}>\r\n                    <Grid container>\r\n                        <Grid item xs={12}>\r\n                            <form onSubmit={handleSubmit(onSubmitClick)} className={classes.rootForm} method=\"POST\">\r\n                                <Grid container className={classes.importShapeForm_root}>\r\n                                    {/* <Grid container style={{ paddingBottom: '10px' }}>\r\n                                        <Grid item xs={12}>\r\n                                            เลือกข้อมูลที่ต้องการจะ Export\r\n                                        </Grid>\r\n                                    </Grid> */}\r\n                                    <Grid item xs={12} >\r\n                                        <Field\r\n                                            label={'ชั้นข้อมูล'}\r\n                                            name={'layerExport'}\r\n                                            component={SelectField}\r\n                                            data={ddlLayer}\r\n                                            required\r\n                                        />\r\n                                    </Grid>\r\n                                    <Grid item xs={12}>\r\n                                        <Field\r\n                                            label={'ผู้สำรวจ'}\r\n                                            name={'ddlExplorer'}\r\n                                            component={SelectField}\r\n                                            data={ddlExplorer}\r\n                                        />\r\n                                    </Grid>\r\n                                    <Grid item xs={12} >\r\n                                        <Field\r\n                                            label={'วันที่เริ่มสำรวจ'}\r\n                                            name={'startExplorer'}\r\n                                            component={ReduxFormDatePickerThai}\r\n                                            onChange={(date) => onChangeStartDateSurvey(date)}\r\n                                            maxDate={maxDateSurvey}\r\n                                        />\r\n                                    </Grid>\r\n                                    <Grid item xs={12}>\r\n                                        <Field\r\n                                            label={'วันที่สิ้นสุดสำรวจ'}\r\n                                            name={'endExplorer'}\r\n                                            component={ReduxFormDatePickerThai}\r\n                                            onChange={(date) => onChangeEndDateSurvey(date)}\r\n                                            minDate={minDateSurvey}\r\n                                        />\r\n                                    </Grid>\r\n                                    <Grid container>\r\n                                        <Field\r\n                                            label={'กำหนดพื้นที่'}\r\n                                            name={'specifyArea'}\r\n                                            component={FieldSpecifyArea}\r\n                                            onChangeSelectArea={onChangeSelectArea}\r\n                                            onResetActiveButton={onResetActiveButton}\r\n                                            required\r\n                                        />\r\n\r\n                                    </Grid>\r\n\r\n                                    <Grid container justify=\"center\" spacing={24} className={classes.divFooter}>\r\n                                        <Grid item>\r\n                                            <Button\r\n                                                // color=\"black\"\r\n                                                label={\"ยกเลิก\"}\r\n                                                onClick={onBackClick}\r\n                                            />\r\n                                        </Grid>\r\n                                        <Grid item>\r\n                                            <Button\r\n                                                type=\"submit\"\r\n                                                label=\"บันทึก\"\r\n                                            />\r\n                                        </Grid>\r\n                                    </Grid>\r\n                                </Grid>\r\n                            </form>\r\n                        </Grid>\r\n                        <Grid item xs={12} className={classes.historyHeader}>\r\n                            ประวัติการ Export ข้อมูล\r\n                    </Grid>\r\n                        <Grid item xs={12}>\r\n                            <ExportShapeFileHistory\r\n                                userID={userID}\r\n                                onRefFunction={onRefExportShapeFileHistoryFunction} />\r\n                        </Grid>\r\n                    </Grid>\r\n                </Scrollbars>\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        width: '100%',\r\n        height: '100%'\r\n    },\r\n    rootBody:{\r\n        width: '100%',\r\n        height: 'calc(100% - 43px)',\r\n    },\r\n    labelText: {\r\n        fontSize: theme.textSize.mini\r\n    },\r\n    divFooter: {\r\n        marginTop: '0px',\r\n        marginBottom: '0px'\r\n    },\r\n    containnerRow: {\r\n        height: '50px',\r\n        width: '100%',\r\n        marginBottom: '15px'\r\n    },\r\n    containnerRowText: {\r\n        height: '30px',\r\n        width: '100%',\r\n        marginBottom: '15px'\r\n    },\r\n    rootForm: {\r\n        // width: '95%',\r\n        width: '100%',\r\n        height: '100%'\r\n    },\r\n    importShapeForm_root: {\r\n        padding: '10px 10px 0px',\r\n        // paddingTop: '20px'\r\n    },\r\n    historyHeader: {\r\n        height: '30px',\r\n        lineHeight: '30px',\r\n        textAlign: 'center',\r\n        backgroundColor: '#6D6D6D',\r\n        color: '#FFFFFF'\r\n    },\r\n    grid_date: {\r\n        marginTop: '-8px',\r\n        marginBottom: '-8px'\r\n    },\r\n    btnReset: {\r\n        // backgroundColor: 'red'\r\n    }\r\n}))(ExportShapeFileView)","import React, { Fragment, useRef, useEffect, useState } from \"react\";\r\nimport { reduxForm, SubmissionError } from \"redux-form\";\r\nimport { compose } from \"recompose\";\r\nimport { connect } from \"react-redux\";\r\nimport { bindActionCreators } from \"redux\";\r\n\r\n//import component\r\nimport WithAlertMessage from \"../../../../../../HOC/WithAlertMessage\";\r\nimport AlertMessageSuper from \"../../../../../../Controls/Containers/AlertMessageSuper\";\r\nimport WithLoading from \"../../../../../../HOC/WithLoading\";\r\nimport Loading from \"../../../../../../Controls/Containers/Loading\";\r\nimport ExportShapeFileView from \"../../../../../../Presentationals/Web/Panel/Menu/MenuContent/ExportShapeFile/ExportShapeFileView\";\r\n\r\n//import service - utils\r\nimport { isEmptyObj } from \"../../../../../../Utilities/Utils\";\r\n\r\n//import actioms\r\nimport * as ServiceUtils from \"../../../../../../Utilities/ServiceUtils\";\r\nimport * as MapAction from \"../../../../../../Actions/Web/Maps/MapAction\";\r\nimport * as MenuAction from \"../../../../../../Actions/Web/MenuAction\";\r\nimport {\r\n    saveExportShapeRequest,\r\n    clearExportShapeGraphic,\r\n    clearDrawEventExportShape,\r\n} from \"../../../../../../Map/MapFunctions\";\r\n\r\n//import constants\r\nimport { ALERT_MESSAGE } from \"../../../../../../Constants/Constants\";\r\n\r\nconst ExportShapeFile = (props) => {\r\n    const {\r\n        title,\r\n        onBackClick,\r\n\r\n        //ConnectAction\r\n        mapAction,\r\n        menuAction,\r\n\r\n        //Redux-form\r\n        // initialize,\r\n        handleSubmit,\r\n        // change,\r\n        reset,\r\n        // formValue\r\n\r\n        //Reducer\r\n        authenData,\r\n\r\n        //WithAlert\r\n        showAlert,\r\n        // hideAlert\r\n\r\n        //WithLoading\r\n        isShowLoading,\r\n        showLoading,\r\n        hideLoading,\r\n    } = props;\r\n\r\n    const geometryFromDrawAreaRef = useRef();\r\n    const refResetActiveButton = useRef();\r\n    const refFunctionExportShapeHistory = useRef(); //เก็บฟังก์ชันของ ExportShapeFileHistory\r\n\r\n    const [state, setState] = useState({\r\n        datasourceLookupLayer: null,\r\n        ddlLayer: [],\r\n        ddlExplorer: [],\r\n    });\r\n\r\n    const [stateDate, setStateDate] = useState({\r\n        maxDateSurvey: null,\r\n        minDateSurvey: null,\r\n    });\r\n\r\n    const resetForm = () => {\r\n        geometryFromDrawAreaRef.current = null;\r\n        mapAction.bindMapCommand(clearExportShapeGraphic);\r\n        reset();\r\n    };\r\n\r\n    const handleRefExportShapeFileHistoryFunction = (functionObject) => {\r\n        //auto bind ครั้งแรกที่เข้ามาฟังก์ชั่นนี้\r\n        refFunctionExportShapeHistory.current = functionObject;\r\n    };\r\n\r\n    const loadLookupLayer = async () => {\r\n        let result = null;\r\n        try {\r\n            const response = await ServiceUtils.fetchGet_(\r\n                process.env.REACT_APP_SURVEY_GET_EXPORT_LAYER_LOOKUP\r\n            );\r\n            if (!response.ok) {\r\n                throw response.status;\r\n            }\r\n            const resultObj = await response.json();\r\n            if (resultObj && resultObj.result) {\r\n                const lookup = resultObj.result.map((layerITM) => {\r\n                    return {\r\n                        id: layerITM.ID,\r\n                        name: layerITM.displayName,\r\n                    };\r\n                });\r\n                result = {\r\n                    lookup: lookup,\r\n                    datasource: resultObj.result,\r\n                };\r\n            }\r\n        } catch (err) {\r\n            console.log(\"Load Lookup Import Layer error : \", err);\r\n            result = {\r\n                lookup: [],\r\n                datasource: null,\r\n            };\r\n        }\r\n        return result;\r\n    };\r\n\r\n    const loadLookupSurveyName = async () => {\r\n        let result = null;\r\n        try {\r\n            const response = await ServiceUtils.fetchGet_(\r\n                process.env.REACT_APP_SURVEY_GET_SURVEYOR_NAME\r\n            );\r\n            if (!response.ok) {\r\n                throw response.status;\r\n            }\r\n            const resultObj = await response.json();\r\n            if (resultObj && resultObj.result) {\r\n                const lookup = resultObj.result.map((layerITM) => {\r\n                    return {\r\n                        id: layerITM.value,\r\n                        name: layerITM.name,\r\n                    };\r\n                });\r\n                result = lookup;\r\n            }\r\n        } catch (err) {\r\n            console.log(\"Load Lookup Survor Name error : \", err);\r\n            result = [];\r\n        }\r\n        return result;\r\n    };\r\n\r\n    const loadLookup = () => {\r\n        Promise.all([loadLookupLayer(), loadLookupSurveyName()]).then(\r\n            (values) => {\r\n                const lookupLayerData = values[0];\r\n                const lookupSurveyorName = values[1];\r\n                setState({\r\n                    ...state,\r\n                    datasourceLookupLayer: lookupLayerData.datasource,\r\n                    ddlLayer: lookupLayerData.lookup,\r\n                    ddlExplorer: lookupSurveyorName,\r\n                });\r\n            }\r\n        );\r\n    };\r\n\r\n    useEffect(() => {\r\n        loadLookup();\r\n        return () => {\r\n            //will unmount component\r\n            mapAction.bindClearMapCommand(); //clear map command\r\n        };\r\n    }, []);\r\n    const processSaveSuccess = () => {\r\n        if (refFunctionExportShapeHistory.current) {\r\n            refFunctionExportShapeHistory.current.getExportHistory(); //ดึงข้อมูลตารางใหม่\r\n            refFunctionExportShapeHistory.current.resetIntervalExportHistoryRepeat(); //reset เวลา auto ดึงข้อมูลตาราง\r\n        }\r\n        resetForm(); //clear form\r\n        mapAction.bindMapCommand(clearExportShapeGraphic); //clear map graphic\r\n    };\r\n\r\n    const processAfterSave = (data) => {\r\n        //จากการ callback save gis\r\n        hideLoading();\r\n        if (data.isSuccess) {\r\n            processSaveSuccess();\r\n            // รอติดตั้งบนเครื่องจริงแล้วค่อยเปิดใช้งาน\r\n            data.objectID && callServiceRunProcessExportShape(data.objectID);\r\n        }\r\n        showAlert({ altMsg: data.message });\r\n    };\r\n\r\n    // ยิง service สำหรับ run โปรแกรมหลังบ้าน\r\n    const callServiceRunProcessExportShape = (objectID) => {\r\n        ServiceUtils.fetchGet_(\r\n            `${\r\n                process.env.REACT_APP_SERVER_RUN_PROCESS_EXPORT_SHAPE\r\n            }?objectID=${objectID}`\r\n        ).catch((ex) => {\r\n            console.log(\"ex callServiceRunProcessExportShape\", ex);\r\n        });\r\n    };\r\n\r\n    const getLookupITM = (layerImport) => {\r\n        const lookupDataITM = state.datasourceLookupLayer.filter((lookITM) => {\r\n            return lookITM.ID === layerImport;\r\n        });\r\n        return lookupDataITM[0];\r\n    };\r\n\r\n    const validateForm = (values) => {\r\n        const errors = {};\r\n        if (!values.layerExport) {\r\n            errors.layerExport = \"กรุณาระบุข้อมูล\";\r\n        }\r\n        if (!geometryFromDrawAreaRef.current) {\r\n            errors.specifyArea = \"กรุณากำหนดพื้นที่สำหรับ Export\";\r\n        }\r\n\r\n        if (values.startExplorer && !values.endExplorer) {\r\n            errors.endExplorer = \"กรุณาระบุข้อมูล\";\r\n        }\r\n\r\n        if (!values.startExplorer && values.endExplorer) {\r\n            errors.startExplorer = \"กรุณาระบุข้อมูล\";\r\n        }\r\n\r\n        if (!isEmptyObj(errors)) {\r\n            throw new SubmissionError(errors);\r\n        }\r\n    };\r\n\r\n    const processSaveExportShape = (values) => {\r\n        // saveExportShapeRequest\r\n        const parameter = {};\r\n        parameter.userID = authenData.profile.userID;\r\n        if (values.layerExport) {\r\n            parameter.layerName = getLookupITM(values.layerExport).name;\r\n        }\r\n        if (values.ddlExplorer) {\r\n            parameter.surveyUserID = values.ddlExplorer;\r\n        }\r\n        if (values.startExplorer) {\r\n            parameter.startDate = values.startExplorer;\r\n        }\r\n        if (values.endExplorer) {\r\n            parameter.endDate = values.endExplorer;\r\n        }\r\n        showLoading();\r\n        saveExportShapeRequest(\r\n            geometryFromDrawAreaRef.current,\r\n            parameter,\r\n            processAfterSave\r\n        );\r\n    };\r\n\r\n    const handleSubmitClick = (values) => {\r\n        validateForm(values);\r\n        processSaveExportShape(values);\r\n    };\r\n\r\n    const handleClickForm = () => {\r\n        resetForm();\r\n    };\r\n\r\n    const handleChangeSelectArea = (data) => {\r\n        if (data.isSupportArea) {\r\n            geometryFromDrawAreaRef.current = data.geometry;\r\n        } else {\r\n            geometryFromDrawAreaRef.current = null;\r\n            if (isNaN(data.areaSQ_KM)) {\r\n                showAlert({\r\n                    altMsg: `${ALERT_MESSAGE.POPUP.SYSTEM_ERROR}`,\r\n                });\r\n            } else {\r\n                showAlert({\r\n                    altMsg: `${ALERT_MESSAGE.POPUP.OUT_OF_LAND} 10 ตร.กม.`,\r\n                });\r\n            }\r\n        }\r\n    };\r\n\r\n    const handleResetActiveButton = (fn) => {\r\n        refResetActiveButton.current = fn;\r\n    };\r\n\r\n    const handleBackToMainMenu = async () => {\r\n        await mapAction.bindMapCommand(clearDrawEventExportShape);\r\n        mapAction.bindMapCommand(clearExportShapeGraphic);\r\n        menuAction.activeFunction(null);\r\n        if (onBackClick) {\r\n            onBackClick();\r\n        }\r\n    };\r\n\r\n    const handleChangeStartDateSurvey = (date) => {\r\n        setStateDate({\r\n            ...stateDate,\r\n            minDateSurvey: date,\r\n        });\r\n    };\r\n\r\n    const handleChangeEndDateSurvey = (date) => {\r\n        setStateDate({\r\n            ...stateDate,\r\n            maxDateSurvey: date,\r\n        });\r\n    };\r\n\r\n    return (\r\n        <Fragment>\r\n            <Loading isShowLoading={isShowLoading} />\r\n            <ExportShapeFileView\r\n                userID={authenData.profile.userID}\r\n                title={title}\r\n                ddlLayer={state.ddlLayer}\r\n                ddlExplorer={state.ddlExplorer}\r\n                surveyDate={stateDate}\r\n                onChangeStartDateSurvey={handleChangeStartDateSurvey}\r\n                onChangeEndDateSurvey={handleChangeEndDateSurvey}\r\n                onClearFormClick={handleClickForm}\r\n                handleSubmit={handleSubmit}\r\n                onSubmitClick={handleSubmitClick}\r\n                onBackClick={handleBackToMainMenu}\r\n                onChangeSelectArea={handleChangeSelectArea}\r\n                onResetActiveButton={handleResetActiveButton}\r\n                onRefExportShapeFileHistoryFunction={\r\n                    handleRefExportShapeFileHistoryFunction\r\n                }\r\n            />\r\n            <AlertMessageSuper {...props} />\r\n        </Fragment>\r\n    );\r\n};\r\n\r\nconst FORM_NAME = \"ExportShapeFile\";\r\n\r\nconst reduxFormParameter = {\r\n    form: FORM_NAME,\r\n};\r\n\r\nconst mapDispatchToProps = (dispatch) => ({\r\n    mapAction: bindActionCreators(MapAction, dispatch),\r\n    menuAction: bindActionCreators(MenuAction, dispatch),\r\n});\r\n\r\nconst mapStateToProps = (state) => ({\r\n    authenData: state.authen,\r\n});\r\n\r\nexport default compose(\r\n    connect(\r\n        mapStateToProps,\r\n        mapDispatchToProps\r\n    ),\r\n    reduxForm(reduxFormParameter),\r\n    WithAlertMessage,\r\n    WithLoading\r\n)(ExportShapeFile);\r\n","import React from 'react';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport { Field } from 'redux-form';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport SelectFieldRedux from '../../../../../../../Controls/Containers/SelectFieldRedux';\r\nimport Button from '../../../../../../../Controls/Containers/Button';\r\nimport TextFieldRedux from '../../../../../../../Controls/Containers/TextFieldRedux';\r\nimport ReduxFormDatePickerThai from '../../../../../../../Controls/Containers/Picker/ReduxFormDatePickerThai';\r\nimport classnames from 'classnames';\r\n\r\n//import tooltip\r\nimport Tooltip from '../../../../../../../Controls/Containers/Tooltip'\r\n\r\nconst FormDraftView = ({\r\n    classes,\r\n    luDataType,\r\n    luDistrict,\r\n    luSubDistrict,\r\n    handleSubmit,\r\n    onSubmit,\r\n    onClickClearForm,\r\n    onChangeDistrict,\r\n    onChangeSubDistrict,\r\n    isActiveDraw,\r\n    isActiveEdit,\r\n    onDraw,\r\n    onEdit\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root} >\r\n            <form onSubmit={handleSubmit(onSubmit)} className={classes.rootForm}>\r\n                <Grid container justify=\"flex-end\" className={classes.row}>\r\n                    <Tooltip title=\"กำหนดตำแหน่งใหม่\" placement=\"bottom\">\r\n                        <div onClick={onDraw} className={classnames(classes.btnManageGraphic, { [classes.btnAddNormal]: !isActiveDraw }, { [classes.btnAddSelected]: isActiveDraw })}></div>\r\n                    </Tooltip>\r\n                    <Tooltip title=\"แก้ไขตำแหน่ง\" placement=\"bottom\">\r\n                        <div onClick={onEdit} className={classnames(classes.btnManageGraphic, { [classes.btnEditNormal]: !isActiveEdit }, { [classes.btnEditSelected]: isActiveEdit })}></div>\r\n                    </Tooltip>\r\n                </Grid>\r\n\r\n                <Field\r\n                    name=\"name\"\r\n                    label=\"ชื่อ\"\r\n                    maxLength={100}\r\n                    component={TextFieldRedux}\r\n                    required\r\n                />\r\n\r\n                <Field\r\n                    name=\"dataType\"\r\n                    label=\"ประเภทข้อมูล\"\r\n                    component={SelectFieldRedux}\r\n                    data={luDataType}\r\n                    keyData={{ value: \"value\", label: \"name\" }}\r\n                    required\r\n                />\r\n\r\n                <Field\r\n                    name=\"description\"\r\n                    label=\"รายละเอียด\"\r\n                    component={TextFieldRedux}\r\n                    maxLength={300}\r\n                    multiline\r\n                    rows={2}\r\n                />\r\n\r\n                <Field\r\n                    name=\"date\"\r\n                    label=\"วันที่สำรวจ\"\r\n                    component={ReduxFormDatePickerThai}\r\n                    maxDate={new Date()}\r\n                    required\r\n                />\r\n\r\n                <Field\r\n                    name=\"province\"\r\n                    label=\"จังหวัด\"\r\n                    component={TextFieldRedux}\r\n                    disabled\r\n                />\r\n\r\n                <Field\r\n                    label=\"เขต\"\r\n                    name=\"districtID\"\r\n                    component={SelectFieldRedux}\r\n                    onChangeValue={onChangeDistrict}\r\n                    data={luDistrict}\r\n                    keyData={{ value: \"value\", label: \"name\" }}\r\n                    required\r\n                />\r\n\r\n                <Field\r\n                    label=\"แขวง\"\r\n                    name=\"subDistrictID\"\r\n                    component={SelectFieldRedux}\r\n                    onChangeValue={onChangeSubDistrict}\r\n                    data={luSubDistrict}\r\n                    keyData={{ value: \"value\", label: \"name\" }}\r\n                    required\r\n                />\r\n\r\n                <Grid container justify=\"center\" spacing={24} className={classes.rowBtn} >\r\n                    <Grid item>\r\n                        <Button\r\n                            label=\"ยกเลิก\"\r\n                            onClick={onClickClearForm}\r\n                        />\r\n                    </Grid>\r\n                    <Grid item>\r\n                        <Button\r\n                            type=\"submit\"\r\n                            label=\"บันทึก\"\r\n                        />\r\n                    </Grid>\r\n                </Grid>\r\n            </form>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        padding: '10px'\r\n\r\n    },\r\n    rootForm: {\r\n        width: '100%',\r\n        height: '100%'\r\n    },\r\n    row: {\r\n        height: \"50px\",\r\n        width: \"100%\",\r\n        marginTop: \"15px\",\r\n    },\r\n    btnManageGraphic: {\r\n        width: \"40px\",\r\n        minHeight: \"40px\",\r\n        margin: \"5px\",\r\n        display: \"block\",\r\n        padding: 0,\r\n        backgroundSize: \"40px 40px\",\r\n        backgroundRepeat: \"no-repeat\",\r\n        backgroundPosition: \"center\"\r\n    },\r\n    btnAddNormal: {\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_add_normal@2x.png)`,\r\n        \"&:Hover\": {\r\n            backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_add_selected@2x.png)`\r\n        },\r\n        cursor: 'pointer'\r\n    },\r\n    btnAddSelected: {\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_add_selected@2x.png)`,\r\n        cursor: 'pointer'\r\n    },\r\n    btnEditNormal: {\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_edit_normal@2x.png)`,\r\n        \"&:Hover\": {\r\n            backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_edit_selected@2x.png)`\r\n        },\r\n        cursor: 'pointer'\r\n    },\r\n    btnEditSelected: {\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_edit_selected@2x.png)`,\r\n        cursor: 'pointer'\r\n    },\r\n    rowBtn: {\r\n        marginTop: '10px',\r\n        marginBottom: '10px'\r\n    }\r\n}))(FormDraftView)\r\n","import React, { Component, Fragment } from 'react';\r\nimport { reduxForm, isDirty } from 'redux-form';\r\nimport PropTypes from 'prop-types';\r\nimport { compose } from 'recompose';\r\nimport { connect } from 'react-redux';\r\n\r\n//import component\r\nimport FormDraftView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/DraftPoint/Form/FormDraftView';\r\nimport WithAlertMessage from '../../../../../../../HOC/WithAlertMessage';\r\nimport AlertMessageSuper from '../../../../../../../Controls/Containers/AlertMessageSuper';\r\n\r\n//import service - utils\r\nimport { validateFormDraftPnt } from '../../../../../../../Utilities/Validate';\r\nimport { fetchGet_ } from '../../../../../../../Utilities/ServiceUtils';\r\n\r\n//import constants\r\nimport { ALERT_MESSAGE } from '../../../../../../../Constants/Constants';\r\n\r\n/*\r\n    1. ส่ง urlLookupDataType เพื่อดึงข้อมูล lookup มาแสดงใน droupdown ประเภทข้อมูล\r\n    2. ส่ง callBackSubmitForm เพื่อส่งค่าในฟรอมกลับไปยัง component ที่เรียกใช้\r\n*/\r\n\r\nexport class FormDraft extends Component {\r\n    constructor() {\r\n        super()\r\n        this.isAlertAdminpolyInconsistent = false;//เป็นตัวล็อคให้ alert แจ้งเตือนครั้งเดียว\r\n        this.currentAdminpolyData = {\r\n            districtCode: null,\r\n            subdistrictCode: null\r\n        }\r\n\r\n        this.state = {\r\n            luDataType: [],\r\n            luDistrict: [],\r\n            luSubDistrict: []\r\n        }\r\n    }\r\n\r\n    componentDidMount() {\r\n        this.callServiceGetLupDataType();\r\n        const { initializeValue, initialize } = this.props;\r\n        if (initializeValue) {\r\n            initialize({\r\n                name: initializeValue.name,\r\n                date: initializeValue.date,\r\n                dataType: initializeValue.type,\r\n                description: initializeValue.detail,\r\n                districtID: initializeValue.districtID,\r\n                subDistrictID: initializeValue.subDistrictID,\r\n                province: \"กรุงเทพมหานคร\"\r\n            })\r\n            initializeValue.districtID && this.callServiceSubDistrict(initializeValue.districtID)\r\n\r\n            //เก็บค่าปัจจุบันของ adminpoly\r\n            this.currentAdminpolyData.districtCode = initializeValue.districtID;\r\n            this.currentAdminpolyData.subdistrictCode = initializeValue.subDistrictID\r\n        }\r\n        this.callServiceDistrict();\r\n    }\r\n\r\n    componentWillReceiveProps(nextProps) {\r\n        const { districtID, subDistrictID, change } = this.props;\r\n\r\n        if (districtID !== nextProps.districtID) {\r\n            this.currentAdminpolyData.districtCode = nextProps.districtID;\r\n            this.currentAdminpolyData.subdistrictCode = null;\r\n            this.isAlertAdminpolyInconsistent = false;\r\n\r\n            change(\"districtID\", nextProps.districtID)\r\n            this.callServiceSubDistrict(nextProps.districtID)\r\n        }\r\n\r\n        if (subDistrictID !== nextProps.subDistrictID) {\r\n            this.currentAdminpolyData.subdistrictCode = nextProps.subDistrictID;\r\n            this.isAlertAdminpolyInconsistent = false;\r\n\r\n            change(\"subDistrictID\", nextProps.subDistrictID)\r\n        }\r\n    }\r\n\r\n    callServiceDistrict = () => {\r\n        fetchGet_(`${process.env.REACT_APP_LU_DISTRICT}?provinceid=10`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(data => {\r\n                this.setState({\r\n                    luDistrict: data && data.result ? data.result : []\r\n                })\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceDistric', ex)\r\n            })\r\n    }\r\n\r\n    callServiceSubDistrict = (districtID) => {\r\n        fetchGet_(`${process.env.REACT_APP_LU_SUBDISTRICT}?provinceid=10&districtid=${districtID}`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(data => {\r\n                this.setState({\r\n                    luSubDistrict: data && data.result ? data.result : []\r\n                })\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceSubDistric', ex)\r\n            })\r\n    }\r\n\r\n    callServiceGetLupDataType = () => {\r\n        fetchGet_(this.props.urlLookupDataType)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(({ result }) => {\r\n                if (result) {\r\n                    this.setState({\r\n                        luDataType: result\r\n                    })\r\n                }\r\n            })\r\n            .catch(ex => { console.log('ex callServiceGetLupDataType', ex) })\r\n    }\r\n\r\n    changeTextBoxValue = (name, value) => {\r\n        this.props.change(name, value)\r\n    }\r\n\r\n    confirmDistrictChange = districtCode => {\r\n        this.isAlertAdminpolyInconsistent = true;\r\n        this.currentAdminpolyData.districtCode = districtCode;\r\n        this.currentAdminpolyData.subdistrictCode = null;\r\n        this.callServiceSubDistrict(districtCode);\r\n        this.changeTextBoxValue(\"districtID\", districtCode);\r\n        this.changeTextBoxValue('subDistrictID', null);\r\n        this.props.hideAlert();\r\n    }\r\n\r\n    confirmSubdistrictChange = subdistrictCode => {\r\n        this.isAlertAdminpolyInconsistent = true;\r\n        this.currentAdminpolyData.subdistrictCode = subdistrictCode;\r\n        this.changeTextBoxValue('subDistrictID', subdistrictCode);\r\n        this.props.hideAlert();\r\n    }\r\n\r\n    cancelAdminpolyChange = () => {\r\n        if(this.currentAdminpolyData.districtCode){\r\n            this.changeTextBoxValue(\"districtID\", this.currentAdminpolyData.districtCode);\r\n            this.changeTextBoxValue(\"subDistrictID\", this.currentAdminpolyData.subdistrictCode);\r\n        }\r\n        else{//กรณีที่เข้ามาครั้งแรกแล้วยังไม่มี current adminpoly\r\n            const {initialValues} = this.props;\r\n            this.changeTextBoxValue('districtID', initialValues.districtID);\r\n            this.changeTextBoxValue('subDistrictID', initialValues.subDistrictID);\r\n        }\r\n\r\n        this.props.hideAlert();\r\n    }\r\n\r\n    handleChangeDistrict = evt => {\r\n        const newDistrictCode = evt.target.value;\r\n        const {showAlert} = this.props;\r\n        const isInconsistent = (this.currentAdminpolyData.districtCode !== newDistrictCode);\r\n        if(isInconsistent){\r\n            if(!this.isAlertAdminpolyInconsistent && this.currentAdminpolyData.districtCode){\r\n                showAlert({\r\n                    altMsg: ALERT_MESSAGE.QUESTION.WARNING_POINT,\r\n                    altType: 2,\r\n                    callbackConfirm: this.confirmDistrictChange,\r\n                    callbackClose: this.cancelAdminpolyChange,\r\n                    param: newDistrictCode\r\n                })\r\n            }\r\n            else{\r\n                this.confirmDistrictChange(newDistrictCode);\r\n            }\r\n        }\r\n    }\r\n\r\n    handleChangeSubDistrict = evt => {\r\n        const newSubdistrictCode = evt.target.value;\r\n        const {showAlert} = this.props;\r\n        const isInconsistent = (this.currentAdminpolyData.subdistrictCode !== newSubdistrictCode);\r\n        if(isInconsistent){\r\n            if(!this.isAlertAdminpolyInconsistent && this.currentAdminpolyData.subdistrictCode){\r\n                showAlert({\r\n                    altMsg: ALERT_MESSAGE.QUESTION.WARNING_POINT,\r\n                    altType: 2,\r\n                    callbackConfirm: this.confirmSubdistrictChange,\r\n                    callbackClose: this.cancelAdminpolyChange,\r\n                    param: newSubdistrictCode\r\n                })\r\n            }\r\n            else{\r\n                this.confirmSubdistrictChange(newSubdistrictCode);\r\n            }\r\n        }\r\n    }\r\n\r\n    handleSubmit = values => {\r\n        const { callBackSubmitForm } = this.props;\r\n        callBackSubmitForm && callBackSubmitForm(values)\r\n    }\r\n\r\n    handleClearForm = () => {\r\n        const { showAlert, dirty, onClickBack } = this.props;\r\n        if (dirty) {\r\n            showAlert({\r\n                altMsg: ALERT_MESSAGE.QUESTION.CANCEL_FORM, altType: 2, callbackConfirm: () => {\r\n                    onClickBack && onClickBack();\r\n                }\r\n            })\r\n        } else {\r\n            onClickBack && onClickBack();\r\n        }\r\n    }\r\n\r\n    render() {\r\n        const { handleSubmit, isActiveDraw, isActiveEdit, onDraw, onEdit } = this.props;\r\n        const { luDataType, luDistrict, luSubDistrict } = this.state;\r\n\r\n        return (\r\n            <Fragment>\r\n                <FormDraftView\r\n                    isActiveDraw={isActiveDraw}\r\n                    isActiveEdit={isActiveEdit}\r\n                    luDataType={luDataType}\r\n                    luDistrict={luDistrict}\r\n                    luSubDistrict={luSubDistrict}\r\n                    handleSubmit={handleSubmit}\r\n                    onSubmit={this.handleSubmit}\r\n                    onClickClearForm={this.handleClearForm}\r\n                    onChangeDistrict={this.handleChangeDistrict}\r\n                    onChangeSubDistrict={this.handleChangeSubDistrict}\r\n                    onDraw={onDraw}\r\n                    onEdit={onEdit}\r\n                />\r\n                <AlertMessageSuper {...this.props} />\r\n            </Fragment>\r\n        )\r\n    }\r\n}\r\n\r\nFormDraft.propTypes = {\r\n    luDataType: PropTypes.array, // [{id:\"\",name:\"\"}]\r\n    callBackSubmitForm: PropTypes.func,\r\n}\r\n\r\nconst reduxFormParameter = {\r\n    form: \"formDraft\",\r\n    validate: validateFormDraftPnt,\r\n    initialValues: { province: \"กรุงเทพมหานคร\" }\r\n};\r\nconst mapStateToProps = state => ({\r\n    dirty: isDirty('formDraft')(state),\r\n})\r\n\r\nexport default compose(\r\n    WithAlertMessage,\r\n    reduxForm(reduxFormParameter),\r\n    connect(mapStateToProps, null)\r\n)(FormDraft)\r\n\r\n\r\n\r\n","import React from 'react';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { withStyles } from '@material-ui/core/styles'\r\nimport AppBarHeaderView from '../../../../AppBarHeaderView';\r\nimport { Scrollbars } from 'react-custom-scrollbars';\r\n\r\nconst AddDraftPointView = ({\r\n    classes,\r\n    title,\r\n    children,\r\n    onClickBack\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root}>\r\n            <AppBarHeaderView\r\n                title={title}\r\n                onClickBack={onClickBack}\r\n            />\r\n            <Grid item xs={12} className={classes.body}>\r\n                <Scrollbars autoHide>\r\n                    {children}\r\n                </Scrollbars>\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        height: '100%',\r\n    },\r\n    body: {\r\n        height: 'calc(100% - 45px)',\r\n        width:'100%'\r\n    }\r\n}))(AddDraftPointView)\r\n","import React, { Component, Fragment } from 'react'\r\nimport { bindActionCreators } from 'redux';\r\nimport { connect } from 'react-redux';\r\nimport { isDirty } from 'redux-form';\r\nimport { compose } from 'recompose';\r\nimport withWidth from '@material-ui/core/withWidth';\r\n\r\n//import component\r\nimport FormDraft from '../Form/FormDraft';\r\nimport AddDraftPointView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/DraftPoint/Add/AddDraftPointView';\r\nimport WithAlertMessage from '../../../../../../../HOC/WithAlertMessage';\r\nimport AlertMessageSuper from '../../../../../../../Controls/Containers/AlertMessageSuper';\r\nimport Loading from '../../../../../../../Controls/Containers/Loading';\r\nimport WithLoading from '../../../../../../../HOC/WithLoading';\r\n\r\n//import actions\r\nimport * as MapFunctions from '../../../../../../../Map/MapFunctions';\r\nimport * as MapAction from '../../../../../../../Actions/Web/Maps/MapAction';\r\nimport * as MenuAction from '../../../../../../../Actions/Web/MenuAction';\r\n\r\n//import service - utils\r\nimport { fetchGet_ } from '../../../../../../../Utilities/ServiceUtils';\r\n\r\n//import constants\r\nimport { TABLE_MAPSHEET1K, ALERT_MESSAGE, ACTIVE_FUNCTION } from '../../../../../../../Constants/Constants';\r\n\r\nexport class AddDraftPoint extends Component {\r\n    constructor() {\r\n        super();\r\n        this.state = {\r\n            geometry: null,\r\n            districtID: null,\r\n            subDistrictID: null,\r\n            isLocalBKK: false,\r\n            // isActiveDraw: false,\r\n            // isActiveEdit: false,\r\n        }\r\n    }\r\n\r\n    managePanelForMobile = async (isDraw) => {\r\n        const { menuAction, width } = this.props;\r\n        if (width === 'sm' || width === 'xs') {\r\n            if (isDraw) {\r\n                await menuAction.closeMenuPanel();\r\n                await menuAction.openMenuMap();\r\n            } else {\r\n                await menuAction.openMenuPanel();\r\n                await menuAction.closeMenuMap();\r\n            }\r\n        }\r\n    }\r\n\r\n    handleCallBackDrawPnt = async (evt, graphic) => {\r\n        const { mapAction, showLoading,menuAction } = this.props;\r\n        this.managePanelForMobile(false)\r\n        showLoading();\r\n        await mapAction.bindMapCommand(MapFunctions.getDistrictAndSubDistrictFormPoint, { // save sub-district code\r\n            geometry: evt.geometry,\r\n            callbackFn: this.callbackGetDistrictAndSubDistrict\r\n        })\r\n        this.setState({\r\n            geometry: evt.geometry,\r\n            graphic: graphic,\r\n            // isActiveDraw: false\r\n        })\r\n        menuAction.activeFunction(null)\r\n    }\r\n\r\n    callbackGetDistrictAndSubDistrict = (values) => {\r\n        this.props.hideLoading();\r\n        this.props.mapAction.bindClearMapCommand()\r\n        if (values) {\r\n            if (!values.errMsg) {\r\n                const { SUBDISTRICT_ID, DISTRICT_ID } = values;\r\n                this.setState({\r\n                    districtID: DISTRICT_ID,\r\n                    subDistrictID: SUBDISTRICT_ID,\r\n                    isLocalBKK: true\r\n                })\r\n            } else {\r\n                this.props.showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR })\r\n            }\r\n        } else {\r\n            this.props.showAlert({ altMsg: ALERT_MESSAGE.POPUP.OUT_OF_BKK })\r\n            this.setState({\r\n                districtID: null,\r\n                subDistrictID: null,\r\n                isLocalBKK: false\r\n            })\r\n        }\r\n    }\r\n\r\n    handleCallBackEditGraphic = (geometry) => {\r\n        this.props.mapAction.bindMapCommand(MapFunctions.getDistrictAndSubDistrictFormPoint, { // save sub-district code\r\n            geometry: geometry,\r\n            callbackFn: this.callbackGetDistrictAndSubDistrict\r\n        })\r\n        this.setState({ geometry: geometry })\r\n    }\r\n\r\n    handleCallBackSubmitForm = values => {\r\n        const { geometry, isLocalBKK } = this.state;\r\n        const { showAlert, authenRdc, showLoading } = this.props;\r\n\r\n        if (geometry) {\r\n            if (isLocalBKK) {\r\n                showLoading();\r\n                this.callMapServiceSavepoint({\r\n                    geometry,\r\n                    date: values.date,\r\n                    name: values.name,\r\n                    type: values.dataType,\r\n                    description: values.description,\r\n                    districtID: values.districtID,\r\n                    subDistrictID: values.subDistrictID,\r\n                    userID: authenRdc.profile && authenRdc.profile.userID ? authenRdc.profile.userID : \"\"\r\n                });\r\n            } else {\r\n                showAlert({ altMsg: ALERT_MESSAGE.POPUP.OUT_OF_BKK })\r\n            }\r\n        } else {\r\n            showAlert({ altMsg: ALERT_MESSAGE.POPUP.REQUEST_PIN_MAP })\r\n        }\r\n    }\r\n\r\n    callMapServiceSavepoint = ({ geometry, date, name, type, description, userID, districtID, subDistrictID }) => {\r\n        const { panelContentDataRdc, mapAction } = this.props;        \r\n        const { currentPage } = panelContentDataRdc\r\n        const selectionLayerID = currentPage.Layer && currentPage.Layer.length > 0 && currentPage.Layer[0].layerName\r\n        // step 1 save point into map service\r\n        mapAction.bindMapCommand(MapFunctions.applyEditShapeDraftPnt, {\r\n            date, name, type, description,\r\n            userID, districtID, subDistrictID,\r\n            geometry: geometry,\r\n            callback: this.callBackSavePoint,\r\n            mode: \"ADD\",\r\n            selectionLayerID\r\n        })\r\n    }\r\n\r\n    callBackSavePoint = (values) => {\r\n        const { showAlert, mapAction, hideLoading } = this.props;\r\n        mapAction.bindClearMapCommand();\r\n        if (values && values.success) {\r\n            this.callServiceSaveForm(values.objectId)\r\n        } else {\r\n            showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR })\r\n            hideLoading()\r\n        }\r\n    }\r\n\r\n    callServiceSaveForm = (objectID) => {\r\n        // step 2 save data in service\r\n        const { showAlert, hideLoading } = this.props;\r\n        fetchGet_(`${process.env.REACT_APP_UPDATE_MAPSHEET1K}?objectid=${objectID}&tablename=${TABLE_MAPSHEET1K.DRAFT_PNT}`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(values => {\r\n                if (values && values.statusCode === 1) {\r\n                    showAlert({ altMsg: ALERT_MESSAGE.POPUP.SAVE_SUCCESS, callbackClose: this.handleCloseForm })\r\n                } else {\r\n                    showAlert({ altMsg: ALERT_MESSAGE.POPUP.SAVE_FAIL })\r\n                }\r\n            })\r\n            .catch(ex => {\r\n                showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR })\r\n                console.log('ex callServiceSaveForm', ex)\r\n            })\r\n            .finally(() => {\r\n                hideLoading();\r\n            })\r\n    }\r\n\r\n    handleCloseForm = () => {\r\n        const { mapAction, onClickBack,menuAction } = this.props;\r\n        menuAction.activeFunction(null)\r\n        mapAction.bindMapCommand(MapFunctions.clearGraphicDrawDraft);\r\n        onClickBack && onClickBack();\r\n    }\r\n\r\n    handleClickBack = () => {\r\n        if (this.props.dirty) {\r\n            this.props.showAlert({ altMsg: ALERT_MESSAGE.QUESTION.CANCEL_FORM, altType: 2, callbackConfirm: this.handleCloseForm })\r\n        } else {\r\n            this.handleCloseForm();\r\n        }\r\n    }\r\n\r\n    handleDrawGraphic = async () => {\r\n        const { mapAction, menuRdc, menuAction} = this.props;\r\n\r\n        // if (isActiveDraw) { // ปิดการวาด\r\n        //     mapAction.bindMapCommand(MapFunctions.deActivateDraftPnt)\r\n        // } else { // เปิดการวาด\r\n        //     this.managePanelForMobile(true)\r\n        //     await mapAction.bindMapCommand(MapFunctions.clearEditDraftPnt)\r\n        //     await mapAction.bindMapCommand(MapFunctions.drawDraftPnt, { callback: this.handleCallBackDrawPnt })\r\n        // }\r\n        // this.setState(prevState => ({\r\n        //     isActiveDraw: !prevState.isActiveDraw,\r\n        //     isActiveEdit: false\r\n        // }))\r\n\r\n        if(menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM){\r\n            menuAction.activeFunction(null)\r\n            mapAction.bindMapCommand(MapFunctions.deActivateDraftPnt)\r\n        }else{\r\n            this.managePanelForMobile(true)\r\n            menuAction.activeFunction(ACTIVE_FUNCTION.ADD_GP_FORM)\r\n            await mapAction.bindMapCommand(MapFunctions.clearEditDraftPnt)\r\n            setTimeout(()=>{ // set timeout เพื่อแก้ปัญหา willunmount ของ maptool clear event draw\r\n                mapAction.bindMapCommand(MapFunctions.drawDraftPnt, { callback: this.handleCallBackDrawPnt })\r\n            },50)\r\n        }\r\n    }\r\n\r\n    handleEditGraphic = async () => {\r\n        const { graphic } = this.state;\r\n        const { mapAction, showAlert, menuRdc, menuAction} = this.props;\r\n\r\n        // if (!graphic) {\r\n        //     showAlert({ altMsg: ALERT_MESSAGE.POPUP.REQUEST_PIN_MAP })\r\n        // } else {\r\n        //     if (isActiveEdit) { // ปิดการแก้ไข\r\n        //         mapAction.bindMapCommand(MapFunctions.clearEditDraftPnt)\r\n        //     } else { // เปิดการแก้ไข\r\n        //         this.managePanelForMobile(true)\r\n        //         await mapAction.bindMapCommand(MapFunctions.deActivateDraftPnt)\r\n        //         await mapAction.bindMapCommand(MapFunctions.editGraphicDraftPnt, { graphic, callback: this.handleCallBackEditGraphic })\r\n        //     }\r\n        //     this.setState(prevState => ({\r\n        //         isActiveEdit: !prevState.isActiveEdit,\r\n        //         isActiveDraw: false\r\n        //     }))\r\n        // }\r\n\r\n        if (!graphic) {\r\n            showAlert({ altMsg: ALERT_MESSAGE.POPUP.REQUEST_PIN_MAP })\r\n        }else{\r\n            if(menuRdc.ActiveFunction === ACTIVE_FUNCTION.EDIT_GP_FORM){\r\n                menuAction.activeFunction(null)\r\n                mapAction.bindMapCommand(MapFunctions.clearEditDraftPnt)\r\n            }else{\r\n                this.managePanelForMobile(true)\r\n                menuAction.activeFunction(ACTIVE_FUNCTION.EDIT_GP_FORM)\r\n                await mapAction.bindMapCommand(MapFunctions.deActivateDraftPnt)\r\n                await mapAction.bindMapCommand(MapFunctions.editGraphicDraftPnt, { graphic, callback: this.handleCallBackEditGraphic })\r\n            }\r\n        }\r\n    }\r\n\r\n    render() {\r\n        const { title, isShowLoading, menuRdc } = this.props;\r\n        const { districtID, subDistrictID} = this.state;\r\n\r\n        return (\r\n            <Fragment>\r\n                <AddDraftPointView\r\n                    title={title}\r\n                    onClickBack={this.handleClickBack}\r\n                >\r\n                    <FormDraft\r\n                        onClickBack={this.handleCloseForm}\r\n                        urlLookupDataType={process.env.REACT_APP_SURVEY_LU_DRAFT_POINT_TYPE}\r\n                        callBackSubmitForm={this.handleCallBackSubmitForm}\r\n                        districtID={districtID}\r\n                        subDistrictID={subDistrictID}\r\n\r\n                        isActiveDraw={menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM}\r\n                        isActiveEdit={menuRdc.ActiveFunction === ACTIVE_FUNCTION.EDIT_GP_FORM}\r\n                        onDraw={this.handleDrawGraphic}\r\n                        onEdit={this.handleEditGraphic}\r\n                    />\r\n                </AddDraftPointView >\r\n                <AlertMessageSuper {...this.props} />\r\n                <Loading isShowLoading={isShowLoading} />\r\n            </Fragment>\r\n        )\r\n    }\r\n}\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    mapAction: bindActionCreators(MapAction, dispatch),\r\n    menuAction: bindActionCreators(MenuAction, dispatch),\r\n})\r\n\r\nconst mapStateToProps = state => ({\r\n    authenRdc: state.authen,\r\n    dirty: isDirty('formDraft')(state),\r\n    panelContentDataRdc: state.PanelContentData,\r\n    menuRdc: state.menu\r\n})\r\n\r\nconst enhance = compose(\r\n    connect(mapStateToProps, mapDispatchToProps),\r\n    withWidth(),//จะได้ props width มา\r\n    WithAlertMessage,\r\n    WithLoading\r\n)\r\n\r\nexport default enhance(AddDraftPoint)\r\n","import React from 'react';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport { Scrollbars } from 'react-custom-scrollbars';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport AppBarHeaderView from '../../../../AppBarHeaderView';\r\n\r\nconst SearchDraftPointView = ({\r\n    classes,\r\n    title,\r\n    children,\r\n    onClickBack\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root}>\r\n            <AppBarHeaderView\r\n                title={title}\r\n                onClickBack={onClickBack}\r\n            />\r\n            <Grid item xs={12} className={classes.body}>\r\n                <Scrollbars autoHide>\r\n                    {children}\r\n                </Scrollbars>\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        height: '100%',\r\n    },\r\n    body: {\r\n        height: 'calc(100% - 45px)',\r\n        width: '100%'\r\n    }\r\n}))(SearchDraftPointView)\r\n","import React from 'react';\r\nimport { Field } from 'redux-form';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport classnames from 'classnames';\r\n\r\nimport TextFieldRedux from '../../../../../../../Controls/Containers/TextFieldRedux';\r\nimport SelectFieldRedux from '../../../../../../../Controls/Containers/SelectFieldRedux';\r\nimport ReduxFormDatePickerThai from '../../../../../../../Controls/Containers/Picker/ReduxFormDatePickerThai';\r\nimport Button from '../../../../../../../Controls/Containers/Button';\r\n\r\nconst Form = ({\r\n    classes,\r\n    isActiveSelectInMap,\r\n    luDataType,\r\n    startDate,\r\n    endDate,\r\n\r\n    handleSubmit,\r\n    onSubmit,\r\n    onClickClearForm,\r\n    onClickSelectInMap\r\n}) => {\r\n    return <form onSubmit={handleSubmit(onSubmit)} className={classes.form}>\r\n        <Field\r\n            label=\"ชื่อ\"\r\n            name=\"name\"\r\n            component={TextFieldRedux}\r\n        />\r\n        <Field\r\n            name=\"dataType\"\r\n            label=\"ประเภทข้อมูล\"\r\n            component={SelectFieldRedux}\r\n            data={luDataType}\r\n            keyData={{ value: \"value\", label: \"name\" }}\r\n        />\r\n        <Field\r\n            label=\"ช่วงเวลาสำรวจ\"\r\n            name=\"startDate\"\r\n            component={ReduxFormDatePickerThai}\r\n            maxDate={endDate}\r\n        />\r\n        <Field\r\n            label=\"ถึง\"\r\n            name=\"endDate\"\r\n            component={ReduxFormDatePickerThai}\r\n            minDate={startDate}\r\n        />\r\n        {/* \r\n        <Grid container justify=\"flex-end\" style={{ marginTop: '10px' }}>\r\n            <Grid item>\r\n                <Button\r\n                    label=\"เลือกบนแผนที่\"\r\n                    color={isActiveSelectInMap ? \"black\" : \"green\"}\r\n                    onClick={onClickSelectInMap}\r\n                />\r\n            </Grid>\r\n        </Grid> */}\r\n\r\n        <Grid container justify=\"center\" spacing={24} className={classes.footer}>\r\n            <Grid item>\r\n                <Button\r\n                    label=\"ยกเลิก\"\r\n                    onClick={onClickClearForm}\r\n                />\r\n            </Grid>\r\n            <Grid item>\r\n                <Button\r\n                    type=\"submit\"\r\n                    label=\"ค้นหา\"\r\n                />\r\n            </Grid>\r\n            <Grid item>\r\n                <Button\r\n                    label=\"เลือกบนแผนที่\"\r\n                    color={isActiveSelectInMap ? \"black\" : \"green\"}\r\n                    onClick={onClickSelectInMap}\r\n                />\r\n            </Grid>\r\n        </Grid>\r\n    </form>\r\n}\r\n\r\nconst FormSearchDraftView = ({\r\n    classes,\r\n    children,\r\n    isDisplay,\r\n    isActiveSelectInMap,\r\n    luDataType,\r\n    startDate,\r\n    endDate,\r\n\r\n    handleSubmit,\r\n    onSubmit,\r\n    onClickClearForm,\r\n    onClickSelectInMap\r\n}) => {\r\n    return (\r\n        <Grid container className={classnames(classes.root, { [classes.hide]: !isDisplay })}>\r\n            <Grid item xs={12} className={classes.rootForm}>\r\n                <Form\r\n                    classes={classes}\r\n                    isActiveSelectInMap={isActiveSelectInMap}\r\n                    luDataType={luDataType}\r\n                    startDate={startDate}\r\n                    endDate={endDate}\r\n                    handleSubmit={handleSubmit}\r\n                    onSubmit={onSubmit}\r\n                    onClickClearForm={onClickClearForm}\r\n                    onClickSelectInMap={onClickSelectInMap}\r\n                />\r\n            </Grid>\r\n\r\n            <Grid item xs={12} className={classes.rootResult}>\r\n                {children}\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        // padding: '10px',\r\n        height: '100%'\r\n    },\r\n    rootForm: {\r\n        padding: '10px',\r\n        // height: '455px',\r\n        height: '420px',\r\n    },\r\n    form: {\r\n        width: '100%',\r\n        height: '100%'\r\n    },\r\n    rootResult: {\r\n        // height: 'calc(100% - 455px)'\r\n        height: 'calc(100% - 420px)'\r\n    },\r\n    hide: {\r\n        display: 'none'\r\n    },\r\n    row: {\r\n        height: \"50px\",\r\n        width: \"100%\",\r\n        marginTop: \"15px\",\r\n    },\r\n    multiRow: {\r\n        height: \"70px\",\r\n        width: \"100%\",\r\n        marginTop: \"5px\",\r\n    },\r\n    colLabel: {\r\n        fontSize: '14px',\r\n        paddingTop: '5px'\r\n    },\r\n    footer: {\r\n        marginTop: '10px',\r\n        marginBottom: '10px'\r\n    }\r\n}))(FormSearchDraftView)\r\n","import React, { Fragment } from 'react';\r\nimport { Scrollbars } from 'react-custom-scrollbars';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport ListItem from '@material-ui/core/ListItem';\r\nimport Delete from \"@material-ui/icons/Delete\";\r\nimport Edit from \"@material-ui/icons/Edit\";\r\nimport IconButton from '@material-ui/core/IconButton';\r\nimport Checkbox from '@material-ui/core/Checkbox';\r\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\r\nimport { green } from '@material-ui/core/colors';\r\nimport Divider from '@material-ui/core/Divider';\r\n\r\n\r\n//import tooltip\r\nimport Tooltip from '../../../../../../../Controls/Containers/Tooltip'\r\n\r\nconst ListResult = ({\r\n    classes,\r\n    listResult,\r\n    onClickListResult,\r\n    onClickEdit,\r\n    onClickDelete\r\n}) => {\r\n    if (listResult.length === 0) {\r\n        return <div className={classes.div_noData}>ไม่พบข้อมูล</div>\r\n    }\r\n    return (\r\n        <Grid item xs={12}>\r\n            {listResult.map((result, index) =>\r\n                <ListItem\r\n                    key={`result-${result.id}-${index}`}\r\n                    button\r\n                    divider={true}\r\n                    className={classes.menu_item}\r\n                    classes={{ gutters: classes.guttersItem }}\r\n                    onClick={onClickListResult(result)}\r\n                >\r\n                    <Grid container justify=\"space-between\">\r\n                        <Grid item className={classes.containerTxtResult} >\r\n                            <label className={classes.txtResult}>{`ชื่อ : ${result.name}`}</label><br />\r\n                            <label className={classes.txtResult}>{`วันที่ : ${result.dateDisplay}`}</label>\r\n                        </Grid>\r\n                        <Grid item >\r\n                            <Tooltip title=\"แก้ไข\" placement=\"bottom\">\r\n                                <IconButton className={classes.iconButton} onClick={onClickEdit(result)} >\r\n                                    <Edit className={classes.icon} />\r\n                                </IconButton>\r\n                            </Tooltip>\r\n                            <Tooltip title=\"ลบ\" placement=\"bottom\">\r\n                                {<IconButton className={classes.iconButton} onClick={onClickDelete(result)} >\r\n                                    <Delete className={classes.icon} />\r\n                                </IconButton>}\r\n                            </Tooltip>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ListItem>\r\n            )}\r\n        </Grid>\r\n    )\r\n}\r\n\r\nconst ResultSearchDraftPointView = ({\r\n    classes,\r\n    listResult,\r\n    onClickListResult,\r\n    onClickEdit,\r\n    onClickDelete,\r\n    isCreate,\r\n    isUpdate,\r\n    handleChangeCheckbox\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root}>\r\n            <Grid item xs={12} className={classes.header}>\r\n                {`ผลลัพธ์จำนวน ${listResult.length} รายการ`}\r\n            </Grid>\r\n            <Grid item xs={12} className={classes.rootResult} >\r\n                <Scrollbars autoHide>\r\n                    {(listResult.length > 0 || (isCreate || isUpdate)) &&\r\n                        <Fragment>\r\n                            <FormControlLabel\r\n                                className={classes.checkbox}\r\n                                control={\r\n                                    <GreenCheckbox\r\n                                        checked={isCreate}\r\n                                        onChange={() => handleChangeCheckbox('create')}\r\n                                        value=\"create\"\r\n                                    />\r\n                                }\r\n                                label=\"รายการที่สร้าง\"\r\n                            />\r\n                            <FormControlLabel\r\n                                className={classes.checkbox}\r\n                                control={\r\n                                    <GreenCheckbox\r\n                                        checked={isUpdate}\r\n                                        onChange={() => handleChangeCheckbox('update')}\r\n                                        value=\"update\"\r\n                                    />\r\n                                    }\r\n                                label=\"รายการที่แก้ไข\"\r\n                            />\r\n                            <Divider />\r\n                        </Fragment>\r\n                    }\r\n                    <ListResult\r\n                        classes={classes}\r\n                        listResult={listResult}\r\n                        onClickListResult={onClickListResult}\r\n                        onClickEdit={onClickEdit}\r\n                        onClickDelete={onClickDelete}\r\n                    />\r\n                </Scrollbars >\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nconst GreenCheckbox = withStyles({\r\n    root: {\r\n      color: green[400],\r\n      '&$checked': {\r\n        color: green[600],\r\n      },\r\n    },\r\n    checked: {},\r\n})(props => <Checkbox color=\"default\" {...props} />);\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        width: '100%',\r\n        height: '100%'\r\n    },\r\n    rootResult: {\r\n        height: 'calc(100% - 25px)',\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            minHeight: '200px',\r\n            [`& input`]: {\r\n                height: 'calc(100% - 35px)',\r\n            },\r\n        },\r\n    },\r\n    header: {\r\n        height: '25px',\r\n        lineHeight: '25px',\r\n        width: '100%',\r\n        backgroundColor: theme.mainTheme.color3,\r\n        color: theme.mainTheme.color2,\r\n        textAlign: 'center',\r\n        fontSize: theme.textSize.subtitle\r\n    },\r\n    div_noData: {\r\n        width: '100%',\r\n        padding: '18px'\r\n    },\r\n    menu_item: {\r\n        '&:focus': {\r\n            backgroundColor: theme.mainTheme.color2\r\n        },\r\n        '&:hover': {\r\n            backgroundColor: theme.mainTheme.colorAH.colorHover,\r\n            color: theme.mainTheme.colorAH.colorTextHover\r\n        }\r\n    },\r\n    txtResult: {\r\n        fontSize: '14px',\r\n        margin: '0px',\r\n        lineHeight: '24px'\r\n    },\r\n    iconButton: {\r\n        height: \"35px\",\r\n        width: \"35px\",\r\n        marginTop: \"6px\"\r\n    },\r\n    icon: {\r\n        marginTop: '-6px'\r\n    },\r\n    guttersItem: {\r\n        padding: \"5px 10px\",\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            [`& input`]: {\r\n                padding: \"5px 20px\",\r\n            },\r\n        },\r\n    },\r\n    marginIcon: {\r\n        marginRight: '35px'\r\n    },\r\n    containerTxtResult: {\r\n        maxWidth: 'calc(100% - 70px)',\r\n        textOverflow: 'ellipsis',\r\n        whiteSpace: 'nowrap',\r\n        overflow: 'hidden',\r\n    },\r\n    checkbox: {\r\n        padding: '5px 10px'\r\n    }\r\n}))(ResultSearchDraftPointView)\r\n","import React, { Component, Fragment } from 'react';\r\nimport { reduxForm, getFormValues } from 'redux-form';\r\nimport { connect } from 'react-redux';\r\nimport { compose } from 'recompose';\r\nimport { bindActionCreators } from 'redux';\r\nimport withWidth from '@material-ui/core/withWidth';\r\nimport { format } from \"date-fns\";\r\nimport enLocale from \"date-fns/locale/en-US\";\r\n\r\n//import component\r\nimport FormSearchDraftView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/DraftPoint/Search/FormSearchDraftView';\r\nimport WithAlertMessage from '../../../../../../../HOC/WithAlertMessage';\r\nimport WithLoading from '../../../../../../../HOC/WithLoading';\r\nimport Loading from '../../../../../../../Controls/Containers/Loading';\r\nimport AlertMessageSuper from '../../../../../../../Controls/Containers/AlertMessageSuper';\r\nimport ResultSearchDraftView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/DraftPoint/Search/ResultSearchDraftView';\r\n\r\n//import service - utils\r\nimport { validateFormSearchDraftPnt } from '../../../../../../../Utilities/Validate';\r\nimport { convertDateTimeToDisplayDate } from '../../../../../../../Utilities/DateTimeUtil';\r\nimport { fetchGet_ } from '../../../../../../../Utilities/ServiceUtils';\r\n\r\n//import actions\r\nimport * as MapAction from '../../../../../../../Actions/Web/Maps/MapAction';\r\nimport * as MapFunctions from '../../../../../../../Map/MapFunctions';\r\nimport * as MenuAction from '../../../../../../../Actions/Web/MenuAction';\r\n\r\n/*  \r\n    FormSearchDraft จะจัดการตั้งแต่ การค้นหาไปจนถึงการแสดงผลลัพธ์\r\n    โดย props ที่รับมีดังนี้\r\n    1. urlServiceSearchResult คือ url service ที่ใช้ในการหาค่าผลลัพผธ์\r\n    2. urlLookupDataType  คือ url service ที่ใช้ในการดึงรายการ lookup ประเภทข้อมูล\r\n    3. type คือ ชนิดของข้อมูลที่จะใช้ในการ selection layer \r\n    4. onDetail คือ ฟังก์ชันที่จะ callback เมื่อกดที่ list รายการ\r\n    5. onEdit คือ ฟังก์ชันที่จะ callback เมื่อกดปุ่ม edit\r\n    6. onDelete คือ ฟังก์ชันที่จะ callback เมื่อกดปุ่ม delete\r\n*/\r\n\r\nexport class FormSearcgDraft extends Component {\r\n    constructor() {\r\n        super();\r\n        this.state = {\r\n            luDataType: [],\r\n            listResult: null, // default เป็น null เพื่อใช้สำหรับการเช็ค ซ่อน/แสดง ผลลัพธ์\r\n            isActiveSelectInMap: false,\r\n            isCreate: false,\r\n            isUpdate: false,\r\n            listResultSearch: null\r\n        }\r\n    }\r\n\r\n    componentDidMount() {\r\n        this.callServiceGetLupDataType();\r\n    }\r\n\r\n    // ###################### SERVICE ######################\r\n    callServiceGetLupDataType = () => {\r\n        fetchGet_(this.props.urlLookupDataType)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(({ result }) => {\r\n                if (result) {\r\n                    this.setState({\r\n                        luDataType: result\r\n                    })\r\n                }\r\n            })\r\n            .catch(ex => { console.log('ex callServiceGetLupDataType', ex) })\r\n    }\r\n\r\n    // ###################### SEARCH ######################\r\n    managePanelForMobile = async (isDraw) => {\r\n        const { menuAction, width } = this.props;\r\n        if (width === 'sm' || width === 'xs') {\r\n            if (isDraw) {\r\n                await menuAction.closeMenuPanel();\r\n                await menuAction.openMenuMap();\r\n            } else {\r\n                await menuAction.openMenuPanel();\r\n                await menuAction.closeMenuMap();\r\n            }\r\n        }\r\n    }\r\n\r\n    handleClickSelecIntMap = () => {\r\n        const { isActiveSelectInMap } = this.state;\r\n        const { mapAction, type, showLoading, panelContentDataRdc } = this.props;\r\n\r\n        if (isActiveSelectInMap) {\r\n            mapAction.bindMapCommand(MapFunctions.cleardrawSpatialSearchDraft);\r\n        } else {\r\n            const { currentPage } = panelContentDataRdc\r\n            // จะเอา layer แรกมา selection เท่านั้น\r\n            const selectionLayerID = currentPage.Layer && currentPage.Layer.length > 0 && currentPage.Layer[0].layerName\r\n            mapAction.bindMapCommand(MapFunctions.drawSpatialSearchDraft, {\r\n                callback: this.callbackDrawSpatilaSearch,\r\n                type: type,\r\n                showLoading,\r\n                selectionLayerID: selectionLayerID\r\n            })\r\n            this.managePanelForMobile(true)\r\n        }\r\n        this.setState(prevState => ({\r\n            isActiveSelectInMap: !prevState.isActiveSelectInMap\r\n        }))\r\n    }\r\n\r\n    getDataTypeByID = dataTypeID => {\r\n        const { luDataType } = this.state;\r\n        if (dataTypeID) {\r\n            dataTypeID = dataTypeID.toString();\r\n            const luDataTypeFilter = luDataType.filter(itm => itm.value === dataTypeID)\r\n            return luDataTypeFilter.length > 0 ? luDataTypeFilter[0].name : \"\";\r\n        } else {\r\n            return \"\"\r\n        }\r\n    }\r\n\r\n    converFormatDataMapservice = datas => {\r\n        return datas.map(itm => ({\r\n            id: itm.attributes.DRAFT_PNT_ID,\r\n            objectID: itm.attributes.OBJECTID,\r\n            name: itm.attributes.NAME,\r\n            type: itm.attributes.TYPE,\r\n            typeDisplay: this.getDataTypeByID(itm.attributes.TYPE),\r\n            date: itm.attributes.SURVEY_DATE,\r\n            dateDisplay: itm.attributes.SURVEY_DATE ? convertDateTimeToDisplayDate(itm.attributes.SURVEY_DATE, \"d MMM yyyy\") : \"\",\r\n            createDateDisplay: itm.attributes.CREATION_DATE ? convertDateTimeToDisplayDate(itm.attributes.CREATION_DATE, \"d MMM yyyy\") : \"\",\r\n            latitude: itm.geometry && itm.geometry.y,\r\n            longitude: itm.geometry && itm.geometry.x,\r\n            spatialReference: itm.geometry && itm.geometry.spatialReference,\r\n            detail: itm.attributes.DESCRIPTION,\r\n            districtID: itm.attributes.DISTRICT_ID && itm.attributes.DISTRICT_ID,\r\n            subDistrictID: itm.attributes.SUBDISTRICT_ID && itm.attributes.SUBDISTRICT_ID,\r\n            creator: itm.attributes.CREATOR,\r\n            updater: itm.attributes.UPDATER\r\n        }))\r\n    }\r\n\r\n    callbackDrawSpatilaSearch = async (features) => {\r\n        const { hideLoading, mapAction } = this.props;\r\n        hideLoading();\r\n        mapAction.bindClearMapCommand()\r\n        const result = await this.converFormatDataMapservice(features)\r\n        this.setState({\r\n            isActiveSelectInMap: false,\r\n            listResult: result,\r\n            listResultSearch: result\r\n        })\r\n        this.managePanelForMobile(false)\r\n    }\r\n\r\n    createCondition = values => {\r\n        let condition = \"\";\r\n\r\n        if (values.name) {\r\n            condition = condition + ` AND NAME LIKE '%${values.name}%'`\r\n        }\r\n\r\n        if (values.dataType) {\r\n            condition = condition + ` AND TYPE = ${values.dataType}`\r\n        }\r\n\r\n        if (values.startDate && values.endDate) {\r\n            const strStartDateUTC = `${format(new Date(values.startDate), 'yyyy-MM-dd', { locale: enLocale })} 00:00:00`\r\n            const strEndDateUTC = `${format(new Date(values.endDate), 'yyyy-MM-dd', { locale: enLocale })} 23:59:59`;\r\n            condition = condition + ` AND SURVEY_DATE BETWEEN timestamp '${strStartDateUTC}' AND timestamp '${strEndDateUTC}'`;\r\n        }\r\n\r\n        if (condition !== \"\") {\r\n            condition = \"1 = 1\" + condition\r\n        }\r\n\r\n        return condition\r\n    }\r\n\r\n    handleSubmit = async values => {\r\n        const { type, mapAction, showLoading, panelContentDataRdc } = this.props;\r\n        const { currentPage } = panelContentDataRdc\r\n        // จะเอา layer แรกมา selection เท่านั้น\r\n        const selectionLayerID = currentPage.Layer && currentPage.Layer.length > 0 && currentPage.Layer[0].layerName\r\n\r\n        showLoading();\r\n        await mapAction.bindMapCommand(MapFunctions.cleardrawSpatialSearchDraft);\r\n        await mapAction.bindMapCommand(MapFunctions.selectionDraft, {\r\n            callback: this.callbackDrawSpatilaSearch,\r\n            type: type,\r\n            condition: this.createCondition(values),\r\n            selectionLayerID: selectionLayerID\r\n        })\r\n    }\r\n\r\n    // ###################  HANDLE RESULT  ##################\r\n    handleDetail = values => evt => {\r\n        evt.stopPropagation()\r\n        const { onDetail } = this.props;\r\n        onDetail && onDetail(values)\r\n    }\r\n\r\n    handleEdit = values => evt => {\r\n        evt.stopPropagation()\r\n        const { onEdit } = this.props;\r\n        onEdit && onEdit(values)\r\n    }\r\n\r\n    handleDelete = values => evt => {\r\n        evt.stopPropagation()\r\n        const { onDelete } = this.props;\r\n        onDelete && onDelete(values)\r\n    }\r\n\r\n    handleChangeCheckbox = async (type) => {\r\n        const { isCreate, isUpdate } = this.state;\r\n        switch(type) {\r\n            case \"create\":\r\n                this.filterListResult(!isCreate, isUpdate)\r\n                break;\r\n            case \"update\":\r\n                this.filterListResult(isCreate, !isUpdate)\r\n                break;\r\n            default:\r\n                break;\r\n        }\r\n    }\r\n\r\n    filterListResult = async (create, update) => {\r\n        const userId = this.props.authenRdc.profile.userID;\r\n        const { listResultSearch } = this.state;\r\n\r\n        const filterResult = await listResultSearch.filter(item => {\r\n            return create && update ? \r\n                item.creator === userId || item.updater === userId :\r\n                create && !update ?\r\n                item.creator === userId :\r\n                !create && update ?\r\n                item.updater === userId :\r\n                item\r\n        })\r\n\r\n        await this.setState({\r\n            listResult: filterResult,\r\n            isCreate: create,\r\n            isUpdate: update\r\n        })\r\n    }\r\n\r\n    render() {\r\n        const { handleSubmit, _values, isDisplay, isShowLoading, onClickBack } = this.props;\r\n        const { listResult, luDataType, isActiveSelectInMap, isCreate, isUpdate } = this.state;\r\n\r\n        return (\r\n            <Fragment>\r\n                <FormSearchDraftView\r\n                    isDisplay={isDisplay}\r\n                    isActiveSelectInMap={isActiveSelectInMap}\r\n                    luDataType={luDataType}\r\n                    endDate={_values && _values.endDate && _values.endDate}\r\n                    startDate={_values && _values.startDate && _values.startDate}\r\n\r\n                    handleSubmit={handleSubmit}\r\n                    onSubmit={this.handleSubmit}\r\n                    onClickClearForm={onClickBack}\r\n                    onClickSelectInMap={this.handleClickSelecIntMap}\r\n                >\r\n                    {listResult && <ResultSearchDraftView\r\n                        isDisplay={isDisplay}\r\n                        listResult={listResult}\r\n                        onClickListResult={this.handleDetail}\r\n                        onClickEdit={this.handleEdit}\r\n                        onClickDelete={this.handleDelete}\r\n                        isCreate={isCreate}\r\n                        isUpdate={isUpdate}\r\n                        handleChangeCheckbox={this.handleChangeCheckbox}\r\n                    />}\r\n                </FormSearchDraftView>\r\n                <AlertMessageSuper {...this.props} />\r\n                <Loading isShowLoading={isShowLoading} />\r\n            </Fragment>\r\n        )\r\n    }\r\n}\r\n\r\nconst reduxFormParameter = {\r\n    form: \"formSearchDraft\",\r\n    validate: validateFormSearchDraftPnt\r\n};\r\n\r\nconst mapStateToProps = state => ({\r\n    _values: getFormValues('formSearchDraft')(state),\r\n    panelContentDataRdc: state.PanelContentData,\r\n    authenRdc: state.authen\r\n})\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    mapAction: bindActionCreators(MapAction, dispatch),\r\n    menuAction: bindActionCreators(MenuAction, dispatch)\r\n})\r\n\r\nexport default compose(\r\n    WithAlertMessage,\r\n    WithLoading,\r\n    reduxForm(reduxFormParameter),\r\n    connect(mapStateToProps, mapDispatchToProps),\r\n    withWidth()\r\n)(FormSearcgDraft)\r\n","import React from 'react';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport Button from '../../../../../../../Controls/Containers/Button';\r\nimport {BTN} from '../../../../../../../Constants/Constants'\r\nconst RowDeail = ({\r\n    classes,\r\n    label,\r\n    value,\r\n}) => (\r\n        <Grid container wrap=\"nowrap\" className={classes.row} >\r\n            <Grid item xs={5} className={classes.colLabel} >\r\n                {label}\r\n            </Grid>\r\n            < Grid item xs={7} style={{ wordWrap: \"break-word\" }}>\r\n                {value}\r\n            </Grid>\r\n        </Grid >\r\n    )\r\n\r\nconst DetailDraftView = ({\r\n    classes,\r\n    detail,\r\n    onClickBack\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root}>\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"ชื่อ\"\r\n                value={detail.name && detail.name}\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"ประเภทข้อมูล\"\r\n                value={detail.typeDisplay && detail.typeDisplay}\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"รายละเอียด\"\r\n                value={detail.detail && detail.detail}\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"วันที่สำรวจ\"\r\n                value={detail.dateDisplay && detail.dateDisplay}\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"จังหวัด\"\r\n                value=\"กรุงเทพมหานคร\"\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"เขต\"\r\n                value={detail.districtDisplay && detail.districtDisplay}\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"แขวง\"\r\n                value={detail.subDistrictDisplay && detail.subDistrictDisplay}\r\n            />\r\n\r\n\r\n            <Grid container justify=\"center\" className={classes.footer} >\r\n                <Button\r\n                    label={BTN.TH.CANCEL}\r\n                    // color=\"black\"\r\n                    onClick={onClickBack}\r\n                />\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        padding: '10px'\r\n    },\r\n    row: {\r\n        marginTop: '10px',\r\n        marginBottom:'10px'\r\n    },\r\n    footer: {\r\n        marginTop: '20px'\r\n    },\r\n    colLabel: {\r\n        fontWeight: 'bold'\r\n    },\r\n}))(DetailDraftView)","import React, { Component } from 'react';\r\nimport EsriLoader from \"esri-loader\";\r\nimport { connect } from 'react-redux';\r\nimport { bindActionCreators } from 'redux';\r\n\r\n//import component\r\nimport DetailDraftView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/DraftPoint/Detail/DetailDraftView';\r\n\r\n//import actions\r\nimport * as MapAction from '../../../../../../../Actions/Web/Maps/MapAction';\r\nimport * as MapFunctions from '../../../../../../../Map/MapFunctions';\r\n\r\nexport class DetailDraft extends Component {\r\n\r\n    componentDidMount() {\r\n        const { detail } = this.props;\r\n\r\n        if (detail && detail.latitude && detail.longitude) {\r\n            this.drawGraphic(detail.longitude, detail.latitude, detail.spatialReference)\r\n        }\r\n    }\r\n\r\n    drawGraphic = (longitude, latitude, spatialReference) => {\r\n        EsriLoader.loadModules([\r\n            \"esri/geometry/Point\",\r\n            \"esri/geometry/webMercatorUtils\",\r\n            \"esri/SpatialReference\"\r\n        ], window.MAP_OPTION)\r\n            .then(([\r\n                Point,\r\n                webMercatorUtils,\r\n                SpatialReference\r\n            ]) => {\r\n                const { mapAction } = this.props;\r\n\r\n                if (!spatialReference || spatialReference.wkid !== 102100) {\r\n                    const geoMercator = webMercatorUtils.lngLatToXY(longitude, latitude);\r\n                    longitude = geoMercator[0]\r\n                    latitude = geoMercator[1]\r\n                }\r\n                const point = new Point(longitude, latitude, new SpatialReference({ wkid: 102100, latestWkid: 3857 }));\r\n                mapAction.bindMapCommand(MapFunctions.addGraphicDraft, {\r\n                    evt: { geometry: point },\r\n                    type: \"point\"\r\n                });\r\n            })\r\n    }\r\n\r\n    render() {\r\n        const { detail, onClickBack } = this.props;\r\n        return (\r\n            <DetailDraftView\r\n                detail={detail}\r\n                onClickBack={onClickBack}\r\n            />\r\n        )\r\n    }\r\n}\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    mapAction: bindActionCreators(MapAction, dispatch)\r\n})\r\n\r\nexport default connect(null, mapDispatchToProps)(DetailDraft)\r\n","import React, { Component, Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { bindActionCreators } from 'redux';\r\nimport { compose } from 'recompose'\r\nimport EsriLoader from \"esri-loader\";\r\nimport withWidth from '@material-ui/core/withWidth';\r\n\r\n//import component\r\nimport FormDraft from '../Form/FormDraft';\r\nimport AlertMessageSuper from '../../../../../../../Controls/Containers/AlertMessageSuper';\r\nimport WithAlertMessage from '../../../../../../../HOC/WithAlertMessage';\r\nimport Loading from '../../../../../../../Controls/Containers/Loading';\r\nimport WithLoading from '../../../../../../../HOC/WithLoading'\r\n\r\n//import actions\r\nimport * as MapAction from '../../../../../../../Actions/Web/Maps/MapAction';\r\nimport * as MapFunctions from '../../../../../../../Map/MapFunctions';\r\nimport * as MenuAction from '../../../../../../../Actions/Web/MenuAction';\r\n\r\n//import service - utils\r\nimport { fetchGet_ } from '../../../../../../../Utilities/ServiceUtils';\r\n\r\n//import constants\r\nimport { TABLE_MAPSHEET1K, ALERT_MESSAGE, ACTIVE_FUNCTION } from '../../../../../../../Constants/Constants';\r\n\r\nclass EditDraftPoint extends Component {\r\n    constructor(props) {\r\n        super()\r\n        this.state = {\r\n            geometry: null,\r\n            districtID: props.detail.districtID,\r\n            subDistrictID: props.detail.subDistrictID,\r\n            isLocalBKK: true, //default เป็น true เพราะกรณีไม่ขยับจุด\r\n            // isActiveDraw: false,\r\n            // isActiveEdit: false,\r\n        }\r\n    }\r\n\r\n    componentDidMount() {\r\n        const { detail } = this.props;\r\n        this.drawGraphic(detail.longitude, detail.latitude, detail.spatialReference)\r\n    }\r\n\r\n    componentWillUnmount = async () => {\r\n        const { mapAction } = this.props;\r\n        await mapAction.bindMapCommand(MapFunctions.clearGraphicDrawDraft)\r\n        await mapAction.bindClearMapCommand();\r\n    }\r\n\r\n    managePanelForMobile = async (isDraw) => {\r\n        const { menuAction, width } = this.props;\r\n        if (width === 'sm' || width === 'xs') {\r\n            if (isDraw) {\r\n                await menuAction.closeMenuPanel();\r\n                await menuAction.openMenuMap();\r\n            } else {\r\n                await menuAction.openMenuPanel();\r\n                await menuAction.closeMenuMap();\r\n            }\r\n        }\r\n    }\r\n\r\n    drawGraphic = (longitude, latitude, spatialReference) => {\r\n        EsriLoader.loadModules([\r\n            \"esri/geometry/Point\",\r\n            \"esri/geometry/webMercatorUtils\",\r\n            \"esri/SpatialReference\"\r\n        ], window.MAP_OPTION)\r\n            .then(([\r\n                Point,\r\n                webMercatorUtils,\r\n                SpatialReference\r\n            ]) => {\r\n                const { mapAction } = this.props;\r\n\r\n                if (!spatialReference || spatialReference.wkid !== 102100) {\r\n                    const geoMercator = webMercatorUtils.lngLatToXY(longitude, latitude);\r\n                    longitude = geoMercator[0]\r\n                    latitude = geoMercator[1]\r\n                }\r\n                const point = new Point(longitude, latitude, new SpatialReference({ wkid: 102100, latestWkid: 3857 }));\r\n                mapAction.bindMapCommand(MapFunctions.addGraphicDraft, {\r\n                    evt: { geometry: point },\r\n                    type: \"point\",\r\n                    callback: this.handleCallBackDrawPnt\r\n                });\r\n            })\r\n    }\r\n\r\n    handleCallBackDrawPnt = async (evt, graphic) => {\r\n        // const { isActiveDraw } = this.state;\r\n        const { showLoading, mapAction, menuRdc, menuAction } = this.props;\r\n\r\n        // if (isActiveDraw) {\r\n        if (menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM) {\r\n            showLoading();\r\n            this.managePanelForMobile(false)\r\n            menuAction.activeFunction(null)\r\n            await mapAction.bindMapCommand(MapFunctions.deActivateDraftPnt)\r\n            mapAction.bindMapCommand(MapFunctions.getDistrictAndSubDistrictFormPoint, { // save sub-district code\r\n                geometry: evt.geometry,\r\n                callbackFn: this.callbackGetDistrictAndSubDistrict\r\n            })\r\n        }\r\n\r\n        this.setState({\r\n            geometry: evt.geometry,\r\n            graphic: graphic,\r\n            // isActiveDraw: false\r\n        })\r\n    }\r\n\r\n    handleCallBackEditGraphic = (geometry) => {\r\n        this.props.showLoading();\r\n        this.props.mapAction.bindMapCommand(MapFunctions.getDistrictAndSubDistrictFormPoint, { // save sub-district code\r\n            geometry: geometry,\r\n            callbackFn: this.callbackGetDistrictAndSubDistrict\r\n        })\r\n        this.setState({ geometry: geometry })\r\n    }\r\n\r\n    callbackGetDistrictAndSubDistrict = (values) => {\r\n        this.props.hideLoading();\r\n        this.props.mapAction.bindClearMapCommand()\r\n        if (values) {\r\n            if (!values.errMsg) {\r\n                const { SUBDISTRICT_ID, DISTRICT_ID } = values;\r\n                this.setState({\r\n                    districtID: DISTRICT_ID,\r\n                    subDistrictID: SUBDISTRICT_ID,\r\n                    isLocalBKK: true\r\n                })\r\n            } else {\r\n                this.props.showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR })\r\n            }\r\n        } else {\r\n            this.props.showAlert({ altMsg: ALERT_MESSAGE.POPUP.OUT_OF_BKK })\r\n            this.setState({\r\n                districtID: null,\r\n                subDistrictID: null,\r\n                isLocalBKK: false\r\n            })\r\n        }\r\n    }\r\n\r\n    handleCallBackSubmitForm = values => {\r\n        const { geometry, isLocalBKK } = this.state;\r\n        const { mapAction, detail, authenRdc, showAlert, showLoading, panelContentDataRdc } = this.props;\r\n        const { currentPage } = panelContentDataRdc\r\n        const selectionLayerID = currentPage.Layer && currentPage.Layer.length > 0 && currentPage.Layer[0].layerName\r\n\r\n        if (isLocalBKK) {\r\n            showLoading();\r\n            mapAction.bindMapCommand(MapFunctions.applyEditShapeDraftPnt, {\r\n                date: values.date,\r\n                name: values.name,\r\n                description: values.description,\r\n                type: values.dataType,\r\n                districtID: values.districtID,\r\n                subDistrictID: values.subDistrictID,\r\n                objectID: detail.objectID,\r\n                geometry: geometry,\r\n                callback: this.callBackSavePoint,\r\n                mode: \"EDIT\",\r\n                userID: authenRdc.profile && authenRdc.profile.userID ? authenRdc.profile.userID : \"\",\r\n                selectionLayerID\r\n            })\r\n        } else {\r\n            showAlert({ altMsg: ALERT_MESSAGE.POPUP.OUT_OF_BKK })\r\n        }\r\n    }\r\n\r\n    callBackSavePoint = values => {\r\n        const { detail, showAlert, hideLoading } = this.props;\r\n\r\n        if (values) {\r\n            this.callServiceSaveForm(detail.objectID)\r\n        } else {\r\n            showAlert({ altMsg: ALERT_MESSAGE.POPUP.SAVE_FAIL })\r\n            hideLoading();\r\n        }\r\n    }\r\n\r\n    callServiceSaveForm = (objectID) => {\r\n        const { showAlert, onClearForm, hideLoading } = this.props;\r\n        fetchGet_(`${process.env.REACT_APP_UPDATE_MAPSHEET1K}?objectid=${objectID}&tablename=${TABLE_MAPSHEET1K.DRAFT_PNT}&isupdate=true`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(values => {\r\n                if (values && values.statusCode === 1) {\r\n                    showAlert({ altMsg: ALERT_MESSAGE.POPUP.SAVE_SUCCESS, callbackClose: onClearForm })\r\n                } else {\r\n                    showAlert({ altMsg: ALERT_MESSAGE.POPUP.SAVE_FAIL })\r\n                }\r\n            })\r\n            .catch(ex => {\r\n                showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR })\r\n                console.log('ex callServiceSaveForm', ex)\r\n            })\r\n            .finally(() => {\r\n                hideLoading();\r\n            })\r\n    }\r\n\r\n    handleDrawGraphic = async () => {\r\n        const { mapAction, menuAction, menuRdc } = this.props;\r\n\r\n        // if (isActiveDraw) { // ปิดการวาด\r\n        //     mapAction.bindMapCommand(MapFunctions.deActivateDraftPnt)\r\n        // } else { // เปิดการวาด\r\n        //     this.managePanelForMobile(true)\r\n        //     await mapAction.bindMapCommand(MapFunctions.clearEditDraftPnt)\r\n        //     await mapAction.bindMapCommand(MapFunctions.drawDraftPnt, { callback: this.handleCallBackDrawPnt })\r\n        // }\r\n        // this.setState(prevState => ({\r\n        //     isActiveDraw: !prevState.isActiveDraw,\r\n        //     isActiveEdit: false\r\n        // }))\r\n\r\n\r\n        if (menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM) {\r\n            menuAction.activeFunction(null)\r\n            mapAction.bindMapCommand(MapFunctions.deActivateDraftPnt)\r\n        } else {\r\n            this.managePanelForMobile(true)\r\n            menuAction.activeFunction(ACTIVE_FUNCTION.ADD_GP_FORM)\r\n            await mapAction.bindMapCommand(MapFunctions.clearEditDraftPnt)\r\n            setTimeout(()=>{ // set timeout เพื่อแก้ปัญหา willunmount ของ maptool clear event draw\r\n                mapAction.bindMapCommand(MapFunctions.drawDraftPnt, { callback: this.handleCallBackDrawPnt })\r\n            },50)\r\n        }\r\n    }\r\n\r\n    handleEditGraphic = async () => {\r\n        const { graphic } = this.state;\r\n        const { mapAction, showAlert, menuAction,menuRdc } = this.props;\r\n\r\n        if (!graphic) {\r\n            showAlert({ altMsg: ALERT_MESSAGE.POPUP.REQUEST_PIN_MAP })\r\n        } else {\r\n            if (menuRdc.ActiveFunction === ACTIVE_FUNCTION.EDIT_GP_FORM) { // ปิดการแก้ไข\r\n                menuAction.activeFunction(null)\r\n                mapAction.bindMapCommand(MapFunctions.clearEditDraftPnt)\r\n            } else { // เปิดการแก้ไข\r\n                this.managePanelForMobile(true)\r\n                menuAction.activeFunction(ACTIVE_FUNCTION.EDIT_GP_FORM)\r\n                await mapAction.bindMapCommand(MapFunctions.deActivateDraftPnt)\r\n                await mapAction.bindMapCommand(MapFunctions.editGraphicDraftPnt, { graphic, callback: this.handleCallBackEditGraphic })\r\n            }\r\n            // this.setState(prevState => ({\r\n            //     isActiveEdit: !prevState.isActiveEdit,\r\n            //     isActiveDraw: false\r\n            // }))\r\n        }\r\n    }\r\n\r\n    render() {\r\n        const { detail, isShowLoading, onClearForm, menuRdc } = this.props;\r\n        const { districtID, subDistrictID } = this.state;\r\n\r\n        return (\r\n            <Fragment>\r\n                <FormDraft\r\n                    urlLookupDataType={process.env.REACT_APP_SURVEY_LU_DRAFT_POINT_TYPE}\r\n                    callBackSubmitForm={this.handleCallBackSubmitForm}\r\n                    initializeValue={detail}\r\n                    districtID={districtID}\r\n                    subDistrictID={subDistrictID}\r\n\r\n                    isActiveDraw={menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM}\r\n                    isActiveEdit={menuRdc.ActiveFunction === ACTIVE_FUNCTION.EDIT_GP_FORM}\r\n                    onDraw={this.handleDrawGraphic}\r\n                    onEdit={this.handleEditGraphic}\r\n                    onClickBack={onClearForm}\r\n                />\r\n                <AlertMessageSuper {...this.props} />\r\n                <Loading isShowLoading={isShowLoading} />\r\n            </Fragment>\r\n        )\r\n    }\r\n}\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    mapAction: bindActionCreators(MapAction, dispatch),\r\n    menuAction: bindActionCreators(MenuAction, dispatch),\r\n})\r\n\r\nconst mapStateToProps = state => ({\r\n    authenRdc: state.authen,\r\n    panelContentDataRdc: state.PanelContentData,\r\n    menuRdc: state.menu\r\n})\r\n\r\nexport default compose(\r\n    connect(mapStateToProps, mapDispatchToProps),\r\n    withWidth(),\r\n    WithAlertMessage,\r\n    WithLoading\r\n)(EditDraftPoint)\r\n","import React, { Component, Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { bindActionCreators } from 'redux';\r\nimport { compose } from 'recompose';\r\nimport { isDirty } from 'redux-form';\r\n\r\n//import component\r\nimport SearchDraftPointView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/DraftPoint/Search/SearchDraftPointView';\r\nimport WithAlertMessage from '../../../../../../../HOC/WithAlertMessage';\r\nimport AlertMessageSuper from '../../../../../../../Controls/Containers/AlertMessageSuper';\r\nimport Loading from '../../../../../../../Controls/Containers/Loading';\r\nimport WithLoading from '../../../../../../../HOC/WithLoading';\r\nimport FormSearchDraft from './FormSearchDraft';\r\nimport DetailDraft from '../Detail/DetailDraft';\r\nimport EditDraftPoint from '../Edit/EditDraftPoint';\r\n\r\n//import service - utils\r\nimport { fetchGet_ } from '../../../../../../../Utilities/ServiceUtils';\r\n\r\n//import actions\r\nimport * as MapAction from '../../../../../../../Actions/Web/Maps/MapAction';\r\nimport * as MapFunctions from '../../../../../../../Map/MapFunctions';\r\nimport * as MenuAction from '../../../../../../../Actions/Web/MenuAction';\r\n\r\n//import constants\r\nimport { ALERT_MESSAGE } from '../../../../../../../Constants/Constants';\r\n\r\nconst PAGE = {\r\n    SEARCH_DRAFT_PNT: \"ค้นหาและแก้ไขข้อมูล\",\r\n    DETAIL_DRAFT_PNT: \"ข้อมูล\",\r\n    EDIT_DRAFT_PNT: \"แก้ไขข้อมูล\",\r\n}\r\n\r\nclass SearchDraftPoint extends Component {\r\n    constructor() {\r\n        super();\r\n        this.state = {\r\n            page: PAGE.SEARCH_DRAFT_PNT,\r\n            detailView: null,\r\n            detailEdit: null,\r\n            luDistrict: []\r\n        }\r\n    }\r\n\r\n    componentDidMount() {\r\n        this.callServiceDistrict();\r\n    }\r\n\r\n    callServiceDistrict = () => {\r\n        fetchGet_(`${process.env.REACT_APP_LU_DISTRICT}?provinceid=10`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(data => {\r\n                this.setState({\r\n                    luDistrict: data && data.result ? data.result : []\r\n                })\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceDistric', ex)\r\n            })\r\n    }\r\n\r\n    callServiceSubDistrict = (districtID) => {\r\n        return fetchGet_(`${process.env.REACT_APP_LU_SUBDISTRICT}?provinceid=10&districtid=${districtID}`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(data => {\r\n                if (data && data.result) {\r\n                    return data.result\r\n                } else {\r\n                    return []\r\n                }\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceSubDistric', ex)\r\n                return []\r\n            })\r\n    }\r\n\r\n    mapLookUpDetail = async (values) => {\r\n        const { luDistrict } = this.state;\r\n        const luSubDistrict = await this.callServiceSubDistrict(values.districtID)\r\n\r\n        const districtDisplay = values.districtID && luDistrict.find(itm => {\r\n            return itm.value === values.districtID.toString();\r\n        });\r\n\r\n        const subDistrictDisplay = values.subDistrictID && luSubDistrict.find(itm => {\r\n            return itm.value === values.subDistrictID.toString();\r\n        });\r\n\r\n        return {\r\n            districtDisplay: districtDisplay && districtDisplay.name,\r\n            subDistrictDisplay: subDistrictDisplay && subDistrictDisplay.name,\r\n        }\r\n    }\r\n\r\n    handleDetail = async values => {\r\n        this.setState({ detailView: { ...values, ...await this.mapLookUpDetail(values) } })\r\n        this.changePage(PAGE.DETAIL_DRAFT_PNT)\r\n    }\r\n\r\n    handleEdit = values => {\r\n        this.setState({ detailEdit: values })\r\n        this.changePage(PAGE.EDIT_DRAFT_PNT)\r\n    }\r\n\r\n    handleDelete = values => {\r\n        const { hideAlert, showAlert, showLoading } = this.props;\r\n        showAlert({\r\n            altMsg: `${ALERT_MESSAGE.QUESTION.DELETE} ${values.name} ?`,\r\n            altType: 2,\r\n            callbackConfirm: () => {\r\n                hideAlert();\r\n                showLoading();\r\n                this.callServiceDeleteFeature(values.objectID)\r\n            }\r\n        })\r\n    }\r\n\r\n    callServiceDeleteFeature = (objectID) => {\r\n        const { showAlert, hideLoading } = this.props;\r\n        const formData = new FormData();\r\n        formData.append(\"objectIds\", objectID);\r\n        formData.append(\"rollbackOnFailure\", true);\r\n        formData.append(\"f\", \"json\");\r\n\r\n        fetch(`${window.CONFIG_URL_GIS.DRAFT_POINT}/deleteFeatures`, {\r\n            method: \"POST\",\r\n            body: formData\r\n        })\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(result => {\r\n                if (result && result.deleteResults && result.deleteResults[0].success) {\r\n                    showAlert({ altMsg: ALERT_MESSAGE.POPUP.DELETE_SUCCESS })\r\n                    this.props.mapAction.bindMapCommand(MapFunctions.reSearchDraft);\r\n                } else {\r\n                    showAlert({ altMsg: ALERT_MESSAGE.POPUP.DELETE_FAIL })\r\n                }\r\n            })\r\n            .catch(ex => {\r\n                showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR })\r\n                console.log(\"ex callServiceDeleteFeature\", ex);\r\n            })\r\n            .finally(() => {\r\n                hideLoading();\r\n            })\r\n    }\r\n\r\n    changePage = page => {\r\n        this.setState({\r\n            page: page\r\n        })\r\n    }\r\n\r\n    handleBackToMenu = async () => { //เข้าเมื่อกดปุ่ม < บน panel โดยที่หน้า search,detail,edit ใช้ panel เดียวกัน\r\n        const { page } = this.state;\r\n        const { showAlert, mapAction, dirtyEdit, onClickBack } = this.props;\r\n\r\n        switch (page) {\r\n            case PAGE.SEARCH_DRAFT_PNT:\r\n                // showAlert({\r\n                //     altMsg: ALERT_MESSAGE.QUESTION.CANCEL_FORM,\r\n                //     altType: 2,\r\n                //     callbackConfirm: () => {\r\n                //         mapAction.bindMapCommand(MapFunctions.cleardrawSpatialSearchDraft);\r\n                //         onClickBack && onClickBack();\r\n                //     }\r\n                // })\r\n                onClickBack && onClickBack(); //back ไปยังหน้า menu\r\n                break;\r\n            case PAGE.DETAIL_DRAFT_PNT:\r\n                this.setState({ detailView: null })\r\n                mapAction.bindMapCommand(MapFunctions.clearGraphicDrawDraft);\r\n                this.changePage(PAGE.SEARCH_DRAFT_PNT)\r\n                break;\r\n            case PAGE.EDIT_DRAFT_PNT:\r\n                if (dirtyEdit) {\r\n                    showAlert({\r\n                        altMsg: ALERT_MESSAGE.QUESTION.CANCEL_FORM,\r\n                        altType: 2,\r\n                        callbackConfirm: this.clearEdit\r\n                    })\r\n                } else {\r\n                    this.clearEdit();\r\n                }\r\n                break;\r\n            default:\r\n                onClickBack && onClickBack(); //back ไปยังหน้า menu\r\n                break;\r\n        }\r\n    }\r\n\r\n    clearEdit = () => {\r\n        const { hideAlert, mapAction, menuAction } = this.props;\r\n        this.setState({ detailEdit: null })\r\n        mapAction.bindMapCommand(MapFunctions.reSearchDraft);\r\n        menuAction.activeFunction(null)\r\n        this.changePage(PAGE.SEARCH_DRAFT_PNT)\r\n        hideAlert();\r\n    }\r\n\r\n    renderChildren = () => {\r\n        // การ render children จะเลือก render เฉพาะ detail และ edit เท่านั้น \r\n        // หน้า form นั้นจะถูก render แต่จะเพียงแค่ซ่อนแสดงเท่านั้นเพื่อให้คงสถานะ state อยู่\r\n        const { page, detailView, detailEdit } = this.state;\r\n        let element = null\r\n\r\n        if (page === PAGE.DETAIL_DRAFT_PNT) {\r\n            element = <DetailDraft detail={detailView} onClickBack={this.handleBackToMenu} />\r\n        } else if (page === PAGE.EDIT_DRAFT_PNT) {\r\n            element = <EditDraftPoint detail={detailEdit} onClearForm={this.clearEdit} />\r\n        }\r\n\r\n        return (\r\n            <Fragment>\r\n                <FormSearchDraft\r\n                    isDisplay={page === PAGE.SEARCH_DRAFT_PNT}\r\n                    urlServiceSearchResult=\"\"\r\n                    urlLookupDataType={process.env.REACT_APP_SURVEY_LU_DRAFT_POINT_TYPE}\r\n                    type=\"PNT\"\r\n                    onDetail={this.handleDetail}\r\n                    onDelete={this.handleDelete}\r\n                    onEdit={this.handleEdit}\r\n                    onClickBack={this.handleBackToMenu}\r\n                />\r\n                {element}\r\n            </Fragment>\r\n        )\r\n    }\r\n\r\n\r\n    render() {\r\n        const { title, isShowLoading } = this.props;\r\n\r\n        return (\r\n            <Fragment>\r\n                <SearchDraftPointView\r\n                    title={title}\r\n                    onClickBack={this.handleBackToMenu}\r\n                >\r\n                    {this.renderChildren()}\r\n                </SearchDraftPointView>\r\n                <AlertMessageSuper {...this.props} />\r\n                <Loading isShowLoading={isShowLoading} />\r\n            </Fragment>\r\n        )\r\n    }\r\n}\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    mapAction: bindActionCreators(MapAction, dispatch),\r\n    menuAction: bindActionCreators(MenuAction, dispatch)\r\n})\r\n\r\nconst mapStateToProps = state => ({\r\n    dirtyEdit: isDirty('formDraft')(state),\r\n})\r\n\r\nexport default compose(\r\n    WithAlertMessage,\r\n    connect(mapStateToProps, mapDispatchToProps),\r\n    WithLoading\r\n)(SearchDraftPoint)","import React from 'react'\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { withStyles } from '@material-ui/core/styles'\r\nimport AppBarHeaderView from '../../../../AppBarHeaderView';\r\nimport BreadCrumb from '../../../../../../../Controls/Containers/BreadCrumb';\r\nimport { Scrollbars } from 'react-custom-scrollbars';\r\n\r\nconst AddDraftBuildingView = ({\r\n    classes,\r\n    title,\r\n    onClickBack,\r\n    children,\r\n    formStep,\r\n    buttonCustom\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root}>\r\n        <AppBarHeaderView\r\n            title={title}\r\n            onClickBack={onClickBack}\r\n        />\r\n        <BreadCrumb\r\n                    stepActive={formStep}\r\n                    listStep={[1, 2]}\r\n                />\r\n        {/* <div>{buttonCustom}</div> */}\r\n        <Grid container justify=\"flex-end\">\r\n            {buttonCustom}\r\n        </Grid>\r\n        <Grid item xs={12} className={classes.body}>\r\n                <Scrollbars\r\n                autoHide={false}>\r\n                  {children}  \r\n                </Scrollbars>\r\n            \r\n        </Grid>\r\n    </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        height: '100%',\r\n    },\r\n    body: {\r\n        height: 'calc(100% - 170px)',\r\n    }\r\n}))(AddDraftBuildingView) \r\n","import React from 'react'\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport { Field } from 'redux-form';\r\nimport Grid from '@material-ui/core/Grid';\r\n\r\nimport { normalizePositiveInteger, normalizePositiveFloat } from '../../../../../../../Utilities/Validate';\r\nimport SelectFieldRedux from '../../../../../../../Controls/Containers/SelectFieldRedux';\r\nimport Button from '../../../../../../../Controls/Containers/Button';\r\nimport TextFieldRedux from '../../../../../../../Controls/Containers/TextFieldRedux';\r\nimport ReduxFormDatePickerThai from '../../../../../../../Controls/Containers/Picker/ReduxFormDatePickerThai';\r\nimport { BTN } from '../../../../../../../Constants/Constants'\r\nimport ErrorSubmit from '../../../../../../../Controls/Containers/ErrorSubmit'\r\n\r\nconst FormDraftView = ({\r\n    classes,\r\n    luDataType,\r\n    luActivityList,\r\n    onSubmit,\r\n    onClickClearForm,\r\n    onChangeBuildingUse,\r\n    marerialList,\r\n    buildingUseList,\r\n    buildingSubUseList,\r\n    buildingAdsList,\r\n    buildingAfterList,\r\n    ownerList,\r\n    isSubmitError\r\n}) => {\r\n\r\n    return (\r\n        <Grid container className={classes.root} >\r\n            <Field\r\n                name=\"BL_TYPE\"\r\n                label=\"ประเภทอาคาร\"\r\n                component={SelectFieldRedux}\r\n                data={luDataType}\r\n                required\r\n            />\r\n            <Field\r\n                name=\"BL_ACT_CODE\"\r\n                label=\"ประเภทกิจกรรม\"\r\n                component={SelectFieldRedux}\r\n                data={luActivityList}\r\n            />\r\n            <Field\r\n                name=\"BL_ACT_NAME\"\r\n                label=\"ชื่อกิจกรรม\"\r\n                component={TextFieldRedux}\r\n                maxLength = {50}\r\n            />\r\n            <Field\r\n                name=\"BL_FRONTAGE\"\r\n                label=\"หน้ากว้าง(เมตร)\"\r\n                component={TextFieldRedux}\r\n                normalize={normalizePositiveFloat}\r\n            />\r\n            <Field\r\n                name=\"BL_HEIGHT\"\r\n                label=\"ความสูง(เมตร)\"\r\n                component={TextFieldRedux}\r\n                normalize={normalizePositiveFloat}\r\n            />\r\n            <Field\r\n                name=\"BL_DEPTH\"\r\n                label=\"ความลึก(เมตร)\"\r\n                component={TextFieldRedux}\r\n                normalize={normalizePositiveFloat}\r\n            />\r\n            <Field\r\n                name=\"BL_NSTOREY\"\r\n                label=\"จำนวนชั้น(ชั้น)\"\r\n                component={TextFieldRedux}\r\n                normalize={normalizePositiveInteger}\r\n            />\r\n            <Field\r\n                name=\"BL_NUNIT\"\r\n                label=\"จำนวนที่พักอาศัย(หน่วย)\"\r\n                component={TextFieldRedux}\r\n                normalize={normalizePositiveInteger}\r\n            />\r\n            <Field\r\n                name=\"BL_NRESIDENT\"\r\n                label=\"จำนวนผู้พัก(คน)\"\r\n                component={TextFieldRedux}\r\n                normalize={normalizePositiveInteger}\r\n            />\r\n            <Field\r\n                name=\"BL_EMPLOY\"\r\n                label=\"จำนวนแรงงาน(คน)\"\r\n                component={TextFieldRedux}\r\n                normalize={normalizePositiveInteger}\r\n            />\r\n            <Field\r\n                name=\"BL_AREA\"\r\n                label=\"พื้นที่อาคาร(ตารางเมตร)\"\r\n                component={TextFieldRedux}\r\n                normalize={normalizePositiveFloat}\r\n            />\r\n            <Field\r\n                name=\"BL_OWNER\"\r\n                label=\"กรรมสิทธิ์\"\r\n                component={SelectFieldRedux}\r\n                data={ownerList}\r\n            />\r\n            <Field\r\n                name=\"BL_PAGE_NO\"\r\n                label=\"เลขที่ขออนุญาตปลูกสร้างอาคาร\"\r\n                component={TextFieldRedux}\r\n                maxLength = {50}\r\n            />\r\n            <Field\r\n                name=\"BL_DATE\"\r\n                label=\"วันที่ขออนุญาตก่อสร้าง\"\r\n                component={ReduxFormDatePickerThai}\r\n            />\r\n            <Field\r\n                name=\"BL_MATL\"\r\n                label=\"ประเภทวัสดุ\"\r\n                component={SelectFieldRedux}\r\n                data={marerialList}\r\n            />\r\n            <Field\r\n                name=\"BL_MAIN_USE\"\r\n                label=\"การใช้ประโยชน์ฯ หลัก\"\r\n                component={SelectFieldRedux}\r\n                data={buildingUseList}\r\n                onChange={(evt) => onChangeBuildingUse(evt)}\r\n                required\r\n            />\r\n            <Field\r\n                name=\"BL_USE\"\r\n                label=\"การใช้ประโยชน์ฯ อาคาร\"\r\n                component={SelectFieldRedux}\r\n                data={buildingSubUseList}\r\n                required\r\n            />\r\n            <Field\r\n                name=\"BL_AFTER_CODE\"\r\n                label=\"อาคารใหม่หรือต่อเติม\"\r\n                component={SelectFieldRedux}\r\n                data={buildingAfterList}\r\n            />\r\n            <Field\r\n                name=\"BL_AD\"\r\n                label=\"ป้ายบนอาคาร\"\r\n                component={SelectFieldRedux}\r\n                data={buildingAdsList}\r\n            />\r\n            <Grid container justify=\"center\" spacing={24} className={classes.divFooter}>\r\n                {(isSubmitError) &&\r\n                    <Grid item xs={12}>\r\n                        <Field\r\n                            name=\"errorForm\"\r\n                            component={ErrorSubmit}\r\n                        />\r\n                    </Grid>}\r\n\r\n                <Grid item>\r\n                    <Button\r\n                        label={BTN.TH.CANCEL}\r\n                        onClick={onClickClearForm}\r\n                    />\r\n                </Grid>\r\n                <Grid item>\r\n                    <Button\r\n                        type=\"submit\"\r\n                        onClick={onSubmit}\r\n                        label={BTN.TH.NEXT}\r\n                    />\r\n                </Grid>\r\n            </Grid>\r\n\r\n        </Grid>\r\n    )\r\n}\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        padding: '10px',\r\n        width: \"100%\"\r\n    },\r\n    rootForm: {\r\n        width: '100%',\r\n        height: '100%'\r\n    },\r\n    row: {\r\n        height: \"50px\",\r\n        width: \"100%\",\r\n        marginTop: \"15px\",\r\n\r\n    },\r\n    row_2: {\r\n\r\n    },\r\n    multiRow: {\r\n        height: \"70px\",\r\n        width: \"100%\",\r\n        marginTop: \"5px\",\r\n    },\r\n    colLabel: {\r\n        fontSize: '14px',\r\n        paddingTop: '5px'\r\n    },\r\n    colLabel_Sub: {\r\n        textAlign: 'center'\r\n    },\r\n    divFooter: {\r\n        marginTop: \"10px\",\r\n        marginBottom: \"10px\"\r\n    }\r\n}))(FormDraftView)\r\n","import React, { Fragment,useState, useEffect } from 'react';\r\nimport { connect } from 'react-redux'\r\nimport { reduxForm, getFormValues } from \"redux-form\";\r\nimport { compose } from \"recompose\";\r\n\r\n//import component\r\nimport FormDraftView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/DraftBuilding/Form/FormDraftView'\r\n\r\n//import service - utils\r\nimport { validateFormDraftBLDG } from '../../../../../../../Utilities/Validate';\r\nimport { fetchGet_ } from '../../../../../../../Utilities/ServiceUtils';\r\n\r\nconst FormDraft = ({\r\n    handleSubmit,\r\n    title,\r\n    onChangeForm,\r\n    callBackSubmitForm,\r\n    initialize,\r\n    initialData,\r\n    handleClickBack,\r\n    _values\r\n}) => {\r\n    const [minDate, setMinDate] = useState();\r\n    const [maxDate, setMaxDate] = useState();\r\n    const [buildList, setBuildList] = useState([]);\r\n    const [activityList, setAsctivityList] = useState([]);\r\n    const [marerialList, setMarerialList] = useState([]);\r\n    const [buildingUseList, setBuildingUseList] = useState([]);\r\n    const [ownerList, setOwnerList] = useState([]);\r\n    const [buildingSubUseList, setBuildingSubUseList] = useState([]);\r\n    const [buildingAdsList, setBuildingAdsList] = useState([]);\r\n    const [buildingAfterList, setBuildingAfterList] = useState([]);\r\n    const [isSubmitError,setIsSubmitError] = useState(false);\r\n    const handleClearForm = ()=>{\r\n        if(handleClickBack){\r\n            handleClickBack()\r\n        }\r\n    }\r\n\r\n    const onhandleSubmit = (res)=>{\r\n        if(buildingSubUseList.length === 0){\r\n            res.BL_USE =\"\"\r\n        }\r\n        callBackSubmitForm('one',res)\r\n        onChangeForm(2)\r\n    }\r\n\r\n    const handleChangeDate = (type, evt) => {\r\n        if (type === 'startDate') {\r\n            setMinDate(evt)\r\n        } else {\r\n            setMaxDate(evt)\r\n        }\r\n    }\r\n    \r\n    useEffect(() => {\r\n         initailValuesFormReport()\r\n         initialize(initialData)\r\n         if(initialData && initialData.BL_USE){\r\n                callService(`${process.env.REACT_APP_SURVEY_LU_BUILDING_SUBUSE_TYPE}?BuildingUseType=${initialData.BL_MAIN_USE}`,setBuildingSubUseList);\r\n         }\r\n    }, [])\r\n\r\n    const handleChangeBuildingUse = async (res)=>{\r\n        await callService(`${process.env.REACT_APP_SURVEY_LU_BUILDING_SUBUSE_TYPE}?BuildingUseType=${res.target.value}`,setBuildingSubUseList);\r\n    }\r\n\r\n    const initailValuesFormReport = async () => {\r\n        callServiceBuildingType();\r\n        await callService(`${process.env.REACT_APP_SURVEY_LU_ACTIVITY}`,setAsctivityList);\r\n        await callService(`${process.env.REACT_APP_SURVEY_LU_BUILDING_OWNER}`,setOwnerList);\r\n        await callService(`${process.env.REACT_APP_CAH_GET_BLDG_MARERIAL}`,setMarerialList);\r\n        await callService(`${process.env.REACT_APP_SURVEY_LU_BUILDING_USE_TYPE}`,setBuildingUseList);\r\n        await callService(`${process.env.REACT_APP_SURVEY_LU_BUILDING_ADS}`,setBuildingAdsList);\r\n        await callService(`${process.env.REACT_APP_SURVEY_LU_BUILDING_AFTER}`,setBuildingAfterList);\r\n        return true\r\n    }\r\n\r\n    const callServiceBuildingType = async () => {\r\n        try {\r\n            const response = await fetchGet_(`${process.env.REACT_APP_SURVET_GET_BUILDING_TYPE}`);\r\n            const objResult = await response.json();\r\n\r\n            const resultDistrict = [];\r\n            await objResult.result.map(item => {\r\n                if(item.ID === 11 || item.ID === 12){\r\n                    //ตัด string อาคารที่จดทะเบียน,อาคารที่ไม่จดทะเบียน เอาแค่ (แฟลต, หอพัก, อาคารชุด, แมนชั่น)\r\n                    resultDistrict.push({ id: item.value, name: `${item.name.split(\" \")[0]} ${item.name.split(\" \")[1]} ${item.name.split(\" \")[2]} ${item.name.split(\" \")[3]}ฯลฯ)` });\r\n                }else{\r\n                    resultDistrict.push({ id: item.value, name: item.name});\r\n\r\n                }\r\n                return true\r\n            })\r\n\r\n            await setBuildList(resultDistrict);\r\n        } catch (err) {\r\n            setBuildList([]);\r\n        }\r\n    }\r\n\r\n    const callService = async (Url,Param) => {\r\n        try {\r\n            const response = await fetchGet_(Url);\r\n            const objResult = await response.json();\r\n            const resultDistrict = [];\r\n            await objResult.result.map(item => {\r\n                    resultDistrict.push({ id: item.value, name: item.name});\r\n\r\n                return true\r\n            })\r\n\r\n            await Param(resultDistrict);\r\n        } catch (err) {\r\n            Param([]);\r\n        }\r\n    }\r\n    const handleSubmitValidate = () =>{\r\n        validateFormDraftBLDG(_values)\r\n        handleSubmit(onhandleSubmit)()\r\n        setIsSubmitError(true)\r\n    }\r\n\r\n    return (\r\n        <Fragment>\r\n            <FormDraftView \r\n                title = { title }\r\n                onChangeDate = { handleChangeDate }\r\n                onChangeBuildingUse={ handleChangeBuildingUse}\r\n                luDataType={buildList}\r\n                luActivityList={activityList}\r\n                marerialList={marerialList}\r\n                ownerList={ownerList}\r\n                buildingUseList={buildingUseList}\r\n                buildingSubUseList={buildingSubUseList}\r\n                buildingAdsList={buildingAdsList}\r\n                buildingAfterList={buildingAfterList}\r\n                onSubmit={handleSubmitValidate}\r\n                onClickClearForm={handleClearForm}\r\n                maxDate={maxDate}\r\n                minDate={minDate}\r\n                isSubmitError={isSubmitError}\r\n            />\r\n        </Fragment>\r\n    )\r\n}\r\n\r\nconst mapStateToProps = state => ({\r\n    _values: getFormValues('FormDraftBuilding')(state)\r\n})\r\n\r\nconst reduxFormParameter = {\r\n    form: 'FormDraftBuilding',\r\n    validate: validateFormDraftBLDG\r\n};\r\n\r\nexport default compose(\r\n    connect(mapStateToProps, null),\r\n    reduxForm(reduxFormParameter),\r\n)(FormDraft);","import React from 'react'\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport { Field } from 'redux-form';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport SelectFieldRedux from '../../../../../../../Controls/Containers/SelectFieldRedux';\r\nimport Button from '../../../../../../../Controls/Containers/Button';\r\nimport TextFieldRedux from '../../../../../../../Controls/Containers/TextFieldRedux';\r\nimport ReduxFormDatePickerThai from '../../../../../../../Controls/Containers/Picker/ReduxFormDatePickerThai';\r\nimport ErrorSubmit from '../../../../../../../Controls/Containers/ErrorSubmit'\r\n// const LabelRequire = ({ label }) => <label>{label}<label style={{ color: 'red' }} >*</label></label>\r\n// const LabelName = ({ label }) => <label>{label}</label>\r\n\r\nconst FormDraftTwoView = ({\r\n    classes,\r\n    handleSubmit,\r\n    onSubmit,\r\n    districtList = [],\r\n    subDistrictList = [],\r\n    onClickBackForm,\r\n    handleDistrict,\r\n    onSubdistrictChange,\r\n    isSubmitError,\r\n    handleClickBack,\r\n    onSurveyDateChange\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root} >\r\n            <Field\r\n                name=\"BL_NAME\"\r\n                label=\"ชื่ออาคาร\"\r\n                component={TextFieldRedux}\r\n                required\r\n            />\r\n            <Field\r\n                name=\"BL_SUBNAME\"\r\n                label=\"ชื่ออาคาร(ย่อ)\"\r\n                component={TextFieldRedux}\r\n            />\r\n            <Field\r\n                name=\"BL_HOUSENUM\"\r\n                label=\"บ้านเลขที่\"\r\n                component={TextFieldRedux}\r\n            />\r\n            <Field\r\n                name=\"BL_VILLNUM\"\r\n                label=\"หมู่ที่\"\r\n                component={TextFieldRedux}\r\n            />\r\n            <Field\r\n                name=\"BL_VILLAGE\"\r\n                label=\"หมู่บ้าน\"\r\n                component={TextFieldRedux}\r\n            />\r\n            <Field\r\n                name=\"TROK\"\r\n                label=\"ตรอก\"\r\n                component={TextFieldRedux}\r\n            />\r\n            <Field\r\n                name=\"BL_SOI\"\r\n                label=\"ซอย\"\r\n                component={TextFieldRedux}\r\n            />\r\n            <Field\r\n                name=\"BL_ROAD\"\r\n                label=\"ถนน\"\r\n                component={TextFieldRedux}\r\n            />\r\n            <Field\r\n                name=\"PROVINCE\"\r\n                label=\"จังหวัด\"\r\n                component={TextFieldRedux}\r\n                disabled\r\n            />\r\n           \r\n            <Field\r\n                // name=\"BL_DISTRICT\"\r\n                name=\"DISTRICT_ID\"\r\n                label=\"เขต\"\r\n                component={SelectFieldRedux}\r\n                data={districtList}\r\n                onChange={(evt) => handleDistrict(evt)}\r\n                keyData={{ value: \"id\", label: \"name\" }}\r\n            />\r\n            <Field\r\n                // name=\"BL_SUB_DISTRICT\"\r\n                name=\"SUBDISTRICT_ID\"\r\n                label=\"แขวง\"\r\n                component={SelectFieldRedux}\r\n                onChange={onSubdistrictChange}\r\n                data={subDistrictList}\r\n                keyData={{ value: \"id\", label: \"name\" }}\r\n            />\r\n            <Field\r\n                name=\"BL_POSTCODE\"\r\n                label=\"รหัสไปรษณีย์\"\r\n                component={TextFieldRedux}\r\n            />\r\n            <Field\r\n                name=\"SURVEY_DATE\"\r\n                label=\"วันที่สำรวจ\"\r\n                component={ReduxFormDatePickerThai}\r\n                onChange = {onSurveyDateChange}\r\n                maxDate={new Date()}\r\n                required\r\n            />\r\n            <Field\r\n                name=\"UPDATE_YEAR\"\r\n                label=\"ปีที่สำรวจ(พ.ศ.)\"\r\n                component={TextFieldRedux}\r\n                // placeholder={'พ.ศ. 2562'}\r\n            />\r\n            {/* <form onSubmit={handleSubmit(onSubmit)} className={classes.rootForm}> */}\r\n\r\n\r\n\r\n            {/* <Grid container className={classes.root} >\r\n            <Grid xs={5} item>\r\n                <LabelName label=\"จังหวัด\" />\r\n            </Grid>\r\n            <Grid xs={7} item>\r\n                <LabelName label=\"กรุงเทพมหานคร\" />\r\n            </Grid>\r\n            </Grid> */}\r\n\r\n\r\n\r\n\r\n            {/* </form> */}\r\n\r\n            <Grid container justify=\"center\" spacing={24} className={classes.divFooter}>\r\n            {(isSubmitError) &&\r\n                    <Grid item xs={12}>\r\n                        <Field\r\n                            name=\"errorForm\"\r\n                            component={ErrorSubmit}\r\n                        />\r\n                    </Grid>}\r\n                    <Grid item>\r\n                    <Button\r\n                        label=\"ยกเลิก\"\r\n                        //   color=\"black\"\r\n                        onClick={handleClickBack}\r\n                    />\r\n                </Grid>\r\n\r\n                <Grid item>\r\n                    <Button\r\n                        label=\"ก่อนหน้า\"\r\n                        //   color=\"black\"\r\n                        onClick={onClickBackForm}\r\n                    />\r\n                </Grid>\r\n                <Grid item>\r\n                    <Button\r\n                        type=\"submit\"\r\n                        label=\"บันทึก\"\r\n                        onClick={onSubmit}\r\n                    />\r\n                </Grid>\r\n            </Grid>\r\n        </Grid>\r\n\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        padding: '10px',\r\n        // backgroundColor: '#f2f2f2',\r\n        // '& div:first-child':{\r\n        //     marginTop: \"0px\",\r\n        //     }\r\n    },\r\n    rootForm: {\r\n        width: '100%',\r\n        height: '100%'\r\n    },\r\n    row: {\r\n        height: \"50px\",\r\n        width: \"100%\",\r\n        marginTop: \"15px\",\r\n\r\n    },\r\n    row_2: {\r\n\r\n    },\r\n    multiRow: {\r\n        height: \"70px\",\r\n        width: \"100%\",\r\n        marginTop: \"5px\",\r\n    },\r\n    colLabel: {\r\n        fontSize: '14px',\r\n        paddingTop: '5px'\r\n    },\r\n    colLabel_Sub: {\r\n        textAlign: 'center'\r\n    },\r\n    divFooter: {\r\n        marginTop: \"10px\",\r\n        marginBottom: \"10px\"\r\n    }\r\n}))(FormDraftTwoView)\r\n","import React, { Fragment,useState, useEffect, useRef } from 'react';\r\nimport { connect } from 'react-redux'\r\nimport { reduxForm, getFormValues } from \"redux-form\";\r\nimport { compose } from \"recompose\";\r\n\r\n//import component\r\nimport FormDraftTwoView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/DraftBuilding/Form/FormDraftTwoView'\r\n\r\n//import service - utils\r\nimport { fetchGet_ } from '../../../../../../../Utilities/ServiceUtils';\r\nimport { validateFormDraftBLDGStep2 } from '../../../../../../../Utilities/Validate';\r\n\r\n//import constants\r\nimport { ALERT_MESSAGE } from '../../../../../../../Constants/Constants'\r\n\r\nconst FormDraftTwo = ({\r\n    handleSubmit,\r\n    title,\r\n    onChangeForm,\r\n    keepIsAlertInconsistentAdminpoly=false,\r\n    setKeepIsAlertInconsistent,\r\n    setKeepAdminpolyStep2,\r\n    callBackSubmitForm,\r\n    _values,\r\n    initialize,\r\n    initialData,\r\n    setDataFormTwo,\r\n    districtCode,\r\n    subDistrictCode,\r\n    change,\r\n    showAlertFn,\r\n    hideAlertFn,\r\n    handleClickBack\r\n}) => {\r\n\r\n    //#region instant variable session (same this variable on class)\r\n    const refIsAlertInconsistentAdminpoly = useRef(false);//lock show one time alert\r\n    const refCurrentAdminpolyData = useRef({\r\n        districtCode: null,\r\n        subdistrictCode: null\r\n    });\r\n    //#endregion\r\n\r\n    //#region State Session\r\n    const [district, setDistrict] = useState();\r\n    const [subDistrict, setSubDistrict] = useState();\r\n    const [isSubmitError,setIsSubmitError] = useState(false);\r\n    //#endregion\r\n\r\n    const showAlert = (params) => {\r\n        if(showAlertFn){\r\n            showAlertFn(params);\r\n        }\r\n    }\r\n\r\n    const hideAlert = () => {\r\n        hideAlertFn();\r\n    }\r\n\r\n    const onhandleSubmit = async (res)=>{\r\n        res.PROVINCE_ID = \"10\"\r\n\r\n        //add key BL_DISTRICT\r\n        if(res.DISTRICT_ID){\r\n            district.every(districtITM => {\r\n                if(districtITM.id === res.DISTRICT_ID){\r\n                    res.BL_DISTRICT = districtITM.name;\r\n                    return false;//break\r\n                }\r\n                return true;//continune\r\n            })\r\n        }\r\n\r\n        //add key BL_SUB_DISTRICT\r\n        if(res.SUBDISTRICT_ID){\r\n            subDistrict.every(subdistrictITM => {\r\n                if(subdistrictITM.id === res.SUBDISTRICT_ID){\r\n                    res.BL_SUB_DISTRICT = subdistrictITM.name;\r\n                    return false;//break\r\n                }\r\n                return true;//continune\r\n            })\r\n        }\r\n       \r\n        callBackSubmitForm('two',res)\r\n    }\r\n\r\n    const handleBackForm = ()=>{\r\n        setDataFormTwo(_values)\r\n        onChangeForm(1)\r\n    }\r\n\r\n    useEffect(() => {\r\n        callService(`${process.env.REACT_APP_LU_DISTRICT}?provinceid=10`,setDistrict)\r\n        if(initialData){\r\n            if(districtCode){\r\n                callService(`${process.env.REACT_APP_LU_SUBDISTRICT}?provinceid=${initialData.PROVINCE_ID}&districtid=${districtCode}`,setSubDistrict)\r\n            }\r\n            else if(initialData.DISTRICT_ID){\r\n                callService(`${process.env.REACT_APP_LU_SUBDISTRICT}?provinceid=${initialData.PROVINCE_ID}&districtid=${initialData.DISTRICT_ID}`,setSubDistrict)        \r\n            }\r\n          \r\n            refCurrentAdminpolyData.current.districtCode = initialData.DISTRICT_ID;\r\n            refCurrentAdminpolyData.current.subdistrictCode = initialData.SUBDISTRICT_ID;\r\n\r\n            initialData.PROVINCE = 'กรุงเทพมหานคร'\r\n            initialize(initialData)\r\n        }else{\r\n            initialize({PROVINCE:'กรุงเทพมหานคร'})\r\n        }\r\n\r\n    }, [])\r\n\r\n    //detect การเปลี่ยนแปลงของ district\r\n    useEffect(() => {\r\n        callService(`${process.env.REACT_APP_LU_SUBDISTRICT}?provinceid=10&districtid=${districtCode}`,setSubDistrict)\r\n        refCurrentAdminpolyData.current.districtCode = districtCode;\r\n        if(keepIsAlertInconsistentAdminpoly){\r\n            refIsAlertInconsistentAdminpoly.current = keepIsAlertInconsistentAdminpoly;\r\n        }\r\n        else{\r\n            refIsAlertInconsistentAdminpoly.current = false;\r\n        }\r\n        \r\n        change(\"DISTRICT_ID\", districtCode)\r\n    }, [districtCode])\r\n\r\n    //detect การเปลี่ยนแปลงของ subdistrict\r\n    useEffect(() => {\r\n        refCurrentAdminpolyData.current.subdistrictCode = subDistrictCode;\r\n        if(keepIsAlertInconsistentAdminpoly){\r\n            refIsAlertInconsistentAdminpoly.current = keepIsAlertInconsistentAdminpoly;\r\n        }\r\n        else{\r\n            refIsAlertInconsistentAdminpoly.current = false;\r\n        }\r\n        change(\"SUBDISTRICT_ID\", subDistrictCode)\r\n    }, [subDistrictCode])\r\n\r\n    const callService = async (Url,Param) => {\r\n        try {\r\n            const response = await fetchGet_(Url);\r\n            const objResult = await response.json();\r\n            const resultDistrict = [];\r\n            await objResult.result.map(item => {\r\n                    resultDistrict.push({ id: item.value, name: item.name});\r\n\r\n                return true\r\n            })\r\n\r\n            await Param(resultDistrict);\r\n        } catch (err) {\r\n            Param([]);\r\n        }\r\n    }\r\n\r\n    const changeTextBoxValue = (name, value) => {\r\n        change(name, value)\r\n    }\r\n\r\n    const confirmDistrictChange = districtCode => {\r\n        refIsAlertInconsistentAdminpoly.current = true;\r\n        setKeepIsAlertInconsistent(true)\r\n        refCurrentAdminpolyData.current.districtCode = districtCode;\r\n        refCurrentAdminpolyData.current.subdistrictCode = null;\r\n        \r\n        callService(`${process.env.REACT_APP_LU_SUBDISTRICT}?provinceid=10&districtid=${districtCode}`, setSubDistrict);\r\n        changeTextBoxValue(\"DISTRICT_ID\", districtCode);\r\n        changeTextBoxValue(\"SUBDISTRICT_ID\", null);\r\n        hideAlert();\r\n        setKeepAdminpolyStep2({\r\n            districtCode: districtCode, \r\n            subdistrictCode: null\r\n        })\r\n    }\r\n\r\n    const confirmSubdistrictChange = subdistrictCode => {\r\n        refIsAlertInconsistentAdminpoly.current = true;\r\n        setKeepIsAlertInconsistent(true);\r\n        refCurrentAdminpolyData.current.subdistrictCode = subdistrictCode;\r\n        changeTextBoxValue('SUBDISTRICT_ID', subdistrictCode);\r\n        hideAlert();\r\n        setKeepAdminpolyStep2({\r\n            districtCode: refCurrentAdminpolyData.current.districtCode, \r\n            subdistrictCode: subdistrictCode\r\n        })\r\n    }\r\n\r\n    const cancelAdminpolyChange = () => {\r\n        if(refCurrentAdminpolyData.current.districtCode){\r\n            changeTextBoxValue(\"DISTRICT_ID\", refCurrentAdminpolyData.current.districtCode);\r\n            changeTextBoxValue(\"SUBDISTRICT_ID\", refCurrentAdminpolyData.current.subdistrictCode);\r\n        }\r\n        else{//กรณีที่เข้ามาครั้งแรกแล้วยังไม่มี current adminpoly\r\n            changeTextBoxValue('DISTRICT_ID', initialData.DISTRICT_ID);\r\n            changeTextBoxValue('SUBDISTRICT_ID', initialData.SUBDISTRICT_ID);\r\n        }\r\n\r\n        hideAlert();\r\n    }\r\n\r\n    const handleDistrict = async (evt) => {\r\n        const newDistrictCode = evt.target.value;\r\n        const isInconsistent = (refCurrentAdminpolyData.current.districtCode !== newDistrictCode);\r\n        if(isInconsistent){\r\n            if(!refIsAlertInconsistentAdminpoly.current && refCurrentAdminpolyData.current.districtCode){\r\n                showAlert({\r\n                    altMsg: ALERT_MESSAGE.QUESTION.WARNING_POINT,\r\n                    altType: 2,\r\n                    callbackConfirm: confirmDistrictChange,\r\n                    callbackClose: cancelAdminpolyChange,\r\n                    param: newDistrictCode\r\n                })\r\n            } else {\r\n                confirmDistrictChange(newDistrictCode);\r\n            }\r\n        }\r\n    }\r\n\r\n    const handleSubdistrictChange = evt => {\r\n        const newSubdistrictCode = evt.target.value;\r\n        const isInconsistent = (refCurrentAdminpolyData.current.subdistrictCode !== newSubdistrictCode);\r\n        if(isInconsistent){\r\n            if(!refIsAlertInconsistentAdminpoly.current && refCurrentAdminpolyData.current.subdistrictCode){\r\n                showAlert({\r\n                    altMsg: ALERT_MESSAGE.QUESTION.WARNING_POINT,\r\n                    altType: 2,\r\n                    callbackConfirm: confirmSubdistrictChange,\r\n                    callbackClose: cancelAdminpolyChange,\r\n                    param: newSubdistrictCode\r\n                })\r\n            } else {\r\n                confirmSubdistrictChange(newSubdistrictCode);\r\n            }\r\n        }\r\n    }\r\n\r\n    const handleSubmitValidate = () =>{\r\n        validateFormDraftBLDGStep2(_values)\r\n        handleSubmit(onhandleSubmit)()\r\n        setIsSubmitError(true)\r\n    }\r\n\r\n    const handleSurveyDateChange = (evt) => {\r\n        const update_year = `${Number(evt.getFullYear()) + 543}`;\r\n\r\n        change('UPDATE_YEAR', update_year)\r\n    }\r\n    \r\n    return (\r\n        <Fragment>\r\n            <FormDraftTwoView \r\n                title = { title }\r\n                // onSubmit={onhandleSubmit}\r\n                // handleSubmit={handleSubmit}\r\n                onSubmit={handleSubmitValidate}\r\n                onClickBackForm={handleBackForm}\r\n                handleDistrict={handleDistrict}\r\n                onSubdistrictChange={handleSubdistrictChange}\r\n                districtList={district}\r\n                subDistrictList={subDistrict}\r\n                isSubmitError={isSubmitError}\r\n                handleClickBack={handleClickBack}\r\n                onSurveyDateChange= {handleSurveyDateChange}\r\n            />\r\n        </Fragment>\r\n    )\r\n}\r\n\r\nconst mapStateToProps = state => ({\r\n    _values: getFormValues('FormDraftBuilding')(state),\r\n    initialValues: { PROVINCE: \"กรุงเทพมหานคร\" }\r\n})\r\n\r\nconst reduxFormParameter = {\r\n    form: 'FormDraftBuilding',\r\n    validate: validateFormDraftBLDGStep2,\r\n    \r\n};\r\n\r\nexport default compose(\r\n    connect(mapStateToProps, null),\r\n    reduxForm(reduxFormParameter),\r\n)(FormDraftTwo) \r\n","import React, {  Fragment, useState,useEffect, useRef } from 'react'\r\nimport { bindActionCreators } from 'redux';\r\nimport { connect } from 'react-redux';\r\nimport { compose } from 'recompose';\r\nimport withWidth from '@material-ui/core/withWidth';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport classnames from 'classnames';\r\nimport { isDirty } from 'redux-form';\r\n//import component\r\nimport AddDraftBuildingView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/DraftBuilding/Add/AddDraftBuildingView'\r\nimport WithAlertMessage from '../../../../../../../HOC/WithAlertMessage';\r\nimport AlertMessageSuper from '../../../../../../../Controls/Containers/AlertMessageSuper';\r\nimport FormDraft from '../Form/FormDraft';\r\nimport FormDraftTwo from '../Form/FormDraftTwo';\r\nimport Loading from '../../../../../../../Controls/Containers/Loading';\r\nimport WithLoading from '../../../../../../../HOC/WithLoading';\r\n\r\n//import action\r\nimport * as MapFunctions from '../../../../../../../Map/MapFunctions';\r\nimport * as MapAction from '../../../../../../../Actions/Web/Maps/MapAction';\r\nimport * as MenuAction from '../../../../../../../Actions/Web/MenuAction';\r\n\r\n//import service - utils\r\nimport * as DateTimeUtils from '../../../../../../../Utilities/DateTimeUtil';\r\nimport { fetchGet_ } from '../../../../../../../Utilities/ServiceUtils';\r\n\r\n//import constants\r\nimport { TABLE_MAPSHEET1K, ALERT_MESSAGE ,ACTIVE_FUNCTION} from '../../../../../../../Constants/Constants';\r\n\r\n//import tooltips\r\nimport Tooltip from '../../../../../../../Controls/Containers/Tooltip'\r\n\r\nconst AddDraftBuilding = withStyles(theme=>({\r\n    btnPolygone: {\r\n        width: \"40px\",\r\n        minHeight: \"40px\",\r\n        margin: \"5px\",\r\n        display: \"block\",\r\n        padding: 0,\r\n        backgroundSize: \"40px 40px\",\r\n        backgroundRepeat: \"no-repeat\",\r\n        backgroundPosition: \"center\"\r\n    },\r\n    btnAddNormal: {\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_add_normal@2x.png)`,\r\n        \"&:Hover\": {\r\n            backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_add_selected@2x.png)`\r\n        },\r\n        cursor: 'pointer'\r\n    },\r\n    btnAddSelected: {\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_add_selected@2x.png)`,\r\n        cursor: 'pointer'\r\n    },\r\n    btnEditNormal: {\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_edit_normal@2x.png)`,\r\n        \"&:Hover\": {\r\n            backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_edit_selected@2x.png)`\r\n        },\r\n        cursor: 'pointer'\r\n    },\r\n    btnEditSelected: {\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_edit_selected@2x.png)`,\r\n        cursor: 'pointer'\r\n    },\r\n    formControl: {\r\n        minWidth: \"100%\",\r\n    },\r\n    label: {\r\n        marginBottom: '5px'\r\n    },\r\n    red: {\r\n        color: \"red\"\r\n    },\r\n    formHelper: {\r\n        marginTop: '4px',\r\n        color: \"red\",\r\n        padding: '0px',\r\n    }\r\n}))(({...props}) => {\r\n\r\n    const keepAdminpolyStep2 = useRef({//เก็บตอนเปลี่ยน dropdown\r\n        districtCode:null,\r\n        subdistrictCode:null\r\n    })\r\n    const keepIsAlertInconsistentAdminpoly = useRef(false);//ใช้เก็บการสถานะการแจ้งเตือนเพียงครั้งเดียวถ้าเคยแจ้งเตือนแล้ว\r\n\r\n    const {title,onClickBack,mapAction,classes,isShowLoading,showLoading,hideLoading,dirtyFormAdd} = props\r\n    const [geometry,setGeometry]= useState({\r\n        geometry: null\r\n    });\r\n\r\n    const [formStep,setFormStep] = useState(1);\r\n    // const [isActiveDraw, setIsActiveDraw] = useState(false);\r\n    // const [isActiveEdit, setIsActiveEdit] = useState(false);\r\n    // const [drawComplet, setDrawComplet] = useState(false);\r\n    const [graphic, setGraphic] = useState();\r\n    const [data, setData] = useState({one:null,two:null});\r\n    const [districtCode, setDistrictCode] = useState(null);\r\n    const [subDistrictCode, setSubDistrictCode] = useState(null);\r\n    const [inBKK, setInBKK] = useState(true);\r\n\r\n    const setKeepAdminpolyStep2 = ({districtCode, subdistrictCode}) => {\r\n        keepAdminpolyStep2.current.districtCode = districtCode;\r\n        keepAdminpolyStep2.current.subdistrictCode = subdistrictCode;\r\n    }\r\n\r\n    const setKeepIsAlertInconsistent = isAlert => {\r\n        keepIsAlertInconsistentAdminpoly.current = isAlert;\r\n    }\r\n    \r\n    const handleCloseForm = ()=>{\r\n        mapAction.bindMapCommand(MapFunctions.clearGraphicDrawDraft);\r\n        props.menuAction.activeFunction(null)\r\n        onClickBack && onClickBack();\r\n    }\r\n\r\n    const handleClickBack = ()=>{\r\n        \r\n        // if(true){ //if (true)?????????????????\r\n        //     props.showAlert({ altMsg: ALERT_MESSAGE.QUESTION.CANCEL_FORM , altType: 2, callbackConfirm: handleCloseForm })\r\n        //     mapAction.bindMapCommand(MapFunctions.clearGraphicDrawDraft);\r\n        //     onClickBack();\r\n        // } \r\n        if(dirtyFormAdd || geometry.geometry){\r\n            props.showAlert({\r\n                altMsg: ALERT_MESSAGE.QUESTION.CANCEL_FORM,\r\n                altType: 2,\r\n                callbackConfirm: handleCloseForm\r\n            })\r\n        }else{\r\n            handleCloseForm()\r\n        }\r\n        hideLoading()\r\n    }\r\n\r\n    const managePanelForMobile = async (isDraw) => {\r\n        const { menuAction, width } = props;\r\n        if (width === 'sm' || width === 'xs') {\r\n            if (isDraw) {\r\n                await menuAction.closeMenuPanel();\r\n                await menuAction.openMenuMap();\r\n            } else {\r\n                await menuAction.openMenuPanel();\r\n                await menuAction.closeMenuMap();\r\n            }\r\n        }\r\n    }\r\n\r\n    useEffect(() => {\r\n        managePanelForMobile(false)\r\n    }, [])\r\n\r\n    const handleCallBackDrawPolygon =async (evt,graphic)=>{\r\n        showLoading()\r\n        managePanelForMobile(false)\r\n        // setIsActiveDraw(false)\r\n        setGraphic(graphic)\r\n        // setDrawComplet(true)\r\n        setGeometry({ geometry: evt.geometry })\r\n        await props.menuAction.activeFunction(null)\r\n        await mapAction.bindMapCommand(MapFunctions.drawDraftPolygon,{ status:false })\r\n        mapAction.bindMapCommand(MapFunctions.getDistrictAndSubDistrictFormPoint, { // save sub-district code\r\n            geometry: evt.geometry,\r\n            callbackFn: callbackGetDistrictAndSubDistrict\r\n        })\r\n    }\r\n    const callbackGetDistrictAndSubDistrict = (values)=>{\r\n        hideLoading()\r\n        mapAction.bindClearMapCommand()\r\n        if (values) {\r\n            if (!values.errMsg) {\r\n                setKeepAdminpolyStep2({\r\n                    districtCode: SUBDISTRICT_ID,\r\n                    subdistrictCode: DISTRICT_ID\r\n                });\r\n                setKeepIsAlertInconsistent(false);\r\n\r\n                const { SUBDISTRICT_ID, DISTRICT_ID } = values;\r\n                setSubDistrictCode(SUBDISTRICT_ID);\r\n                setDistrictCode(DISTRICT_ID);\r\n                setInBKK(true)\r\n\r\n            } else {\r\n               props.showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR })\r\n            }\r\n        } else {\r\n            setKeepAdminpolyStep2({\r\n                districtCode: null,\r\n                subdistrictCode: null\r\n            });\r\n            setKeepIsAlertInconsistent(false);\r\n\r\n            setInBKK(false)\r\n            setSubDistrictCode(null);\r\n            setDistrictCode(null);\r\n            props.showAlert({ altMsg: ALERT_MESSAGE.POPUP.OUT_OF_BKK })\r\n        }\r\n    }\r\n\r\n    const handleCallBackEditGraphic = (geometry,status) => {\r\n        // setIsActiveEdit(status)\r\n        setGeometry({ geometry: geometry })\r\n        mapAction.bindMapCommand(MapFunctions.getDistrictAndSubDistrictFormPoint, { // save sub-district code\r\n            geometry: geometry,\r\n            callbackFn: callbackGetDistrictAndSubDistrict\r\n        })\r\n    }\r\n\r\n    const handleCallBackSubmitForm = async (type,res)=>{\r\n        if(type === 'one') {//กด หน้าต่อไป (ฟอร์ม1) \r\n            await setData({...data,one:res})\r\n        } else { //กด บันทึก (ฟอร์ม2)\r\n            showLoading()\r\n            const returnedTarget = Object.assign(data.one, res);\r\n            returnedTarget.CREATION_DATE = DateTimeUtils.convertDatetimeToCallService(new Date()) \r\n            returnedTarget.CREATOR  = props.authenRdc.profile.userID\r\n            if(inBKK){\r\n                if(geometry.geometry){\r\n\r\n                    if(returnedTarget){\r\n                        for(let index in returnedTarget){\r\n                            returnedTarget[index] = returnedTarget[index] === \"\"?null:returnedTarget[index]\r\n                        }\r\n                    }\r\n                                await mapAction.bindMapCommand(MapFunctions.applyEditShapeDraftPolygon, { \r\n                                mode:'ADD',\r\n                                data:returnedTarget ,\r\n                                date:{dateOne:data.one.BL_DATE,dateTwo:res.SURVEY_DATE},\r\n                                geometry:geometry.geometry,\r\n                                callback:handleCallBackAddMap})\r\n                }else{\r\n                    props.showAlert({ altMsg: `${geometry.geometry ? ALERT_MESSAGE.POPUP.OUT_OF_BKK : ALERT_MESSAGE.POPUP.REQUEST_PIN_MAP}` })\r\n                    hideLoading()\r\n                }\r\n            } else {\r\n                props.showAlert({ altMsg: ALERT_MESSAGE.POPUP.OUT_OF_BKK })\r\n                hideLoading()\r\n            }\r\n        }          \r\n    }\r\n\r\n    const handleCallBackAddMap = (object)=>{\r\n        if(object && object.success){\r\n            callServiceSaveForm(object.objectId)\r\n\r\n            props.showAlert({ altMsg: ALERT_MESSAGE.POPUP.SAVE_SUCCESS, callbackClose: handleClickBack })\r\n        } else {\r\n            props.showAlert({ altMsg: `${ALERT_MESSAGE.POPUP.SAVE_FAIL} ${object.error.message}`})\r\n            hideLoading()\r\n        }\r\n    }\r\n \r\n    const callServiceSaveForm = (objectID) => {\r\n        fetchGet_(`${process.env.REACT_APP_UPDATE_MAPSHEET1K}?objectid=${objectID}&tablename=${TABLE_MAPSHEET1K.DRAFT_BLDG}`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(values => {\r\n                if (values && values.statusCode === 1) {\r\n                    props.showAlert({ altMsg: ALERT_MESSAGE.POPUP.SAVE_SUCCESS, callbackClose:handleCloseForm })\r\n                } else {\r\n                    props.showAlert({ altMsg: ALERT_MESSAGE.POPUP.SAVE_FAIL })\r\n                }\r\n            })\r\n            .catch(ex => {\r\n                props.showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR })\r\n                console.log('ex callServiceSaveForm', ex)\r\n            })\r\n            .finally(() => {\r\n                props.hideLoading();\r\n            })\r\n    }\r\n    const handleSetDataFormTwo = (res)=>{\r\n         setData({...data,two:res})\r\n    }\r\n    \r\n    const renderForm = ()=>{\r\n        switch (formStep) {\r\n            case 1:\r\n                return  (<FormDraft\r\n                callBackSubmitForm={handleCallBackSubmitForm}\r\n                handleClickBack={handleClickBack}\r\n                onChangeForm={onChangeForm}\r\n                initialData={data.one}\r\n            />)\r\n            case 2:\r\n                return(<FormDraftTwo \r\n                    keepIsAlertInconsistentAdminpoly={keepIsAlertInconsistentAdminpoly.current}\r\n                    setKeepIsAlertInconsistent={setKeepIsAlertInconsistent}\r\n                    setKeepAdminpolyStep2={setKeepAdminpolyStep2}\r\n                    callBackSubmitForm={handleCallBackSubmitForm}\r\n                    handleClickBack={handleClickBack}\r\n                    onChangeForm={onChangeForm} \r\n                    setDataFormTwo={handleSetDataFormTwo}\r\n                    initialData={data.two}  \r\n                    districtCode={keepAdminpolyStep2.current.districtCode ? keepAdminpolyStep2.current.districtCode : districtCode}\r\n                    subDistrictCode={keepAdminpolyStep2.current.districtCode ? keepAdminpolyStep2.current.subdistrictCode : subDistrictCode}\r\n                    showAlertFn={props.showAlert}\r\n                    hideAlertFn={props.hideAlert}\r\n                />)\r\n                \r\n            default:\r\n                break;\r\n        }\r\n    }\r\n\r\n    const onChangeForm = (key)=>{\r\n        setFormStep(key)\r\n    }\r\n\r\n    const handleDrawPolygon =async ()=>{\r\n        if(props.menuRdc.ActiveFunction === ACTIVE_FUNCTION.EDIT_GP_FORM){\r\n            await mapAction.bindMapCommand(MapFunctions.editGraphicDraftPolygonLine, { status:false })      \r\n                // setIsActiveEdit(false)\r\n        }\r\n\r\n        if(props.menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM){\r\n            // if(isActiveEdit){\r\n            //     await mapAction.bindMapCommand(MapFunctions.editGraphicDraftPolygonLine, { status:false })      \r\n            //     // setIsActiveEdit(false)\r\n            // }\r\n            // setIsActiveDraw(false)\r\n            await props.menuAction.activeFunction(null)\r\n            await mapAction.bindMapCommand(MapFunctions.drawDraftPolygon,{ status:false })\r\n        }else{\r\n            managePanelForMobile(true)\r\n            // setIsActiveDraw(true)\r\n            await props.menuAction.activeFunction(ACTIVE_FUNCTION.ADD_GP_FORM)\r\n            setTimeout(()=>{ // set timeout เพื่อแก้ปัญหา willunmount ของ maptool clear event draw\r\n                mapAction.bindMapCommand(MapFunctions.drawDraftPolygon, { callback: handleCallBackDrawPolygon,alertFn: props.showAlert})\r\n            },50)\r\n        }\r\n    }\r\n\r\n    const handleEditPolygon =async ()=>{\r\n        if(!graphic){\r\n            props.showAlert({ altMsg: \"ไม่มีกราฟฟิก\" })\r\n            return\r\n        }\r\n        \r\n        if(props.menuRdc.ActiveFunction === ACTIVE_FUNCTION.EDIT_GP_FORM){\r\n            await props.menuAction.activeFunction(null)\r\n            mapAction.bindMapCommand(MapFunctions.editGraphicDraftPolygonLine, { status:false,graphic, callback: handleCallBackEditGraphic,alertFn: props.showAlert} )            \r\n            // setIsActiveEdit(false)\r\n        }else{\r\n            managePanelForMobile(true)\r\n            // setIsActiveEdit(true)\r\n            // isActiveDraw && setIsActiveDraw(false)\r\n            await props.menuAction.activeFunction(ACTIVE_FUNCTION.EDIT_GP_FORM)\r\n            await mapAction.bindMapCommand(MapFunctions.drawDraftPolygon,{ status:false })\r\n            mapAction.bindMapCommand(MapFunctions.editGraphicDraftPolygonLine, { status:true,graphic, callback: handleCallBackEditGraphic,alertFn: props.showAlert} )\r\n        }\r\n    }\r\n\r\n    const renderbuttonCustom = ()=>{\r\n        return(\r\n            <Fragment>\r\n                <Tooltip title=\"วาดอาคารใหม่\" placement=\"bottom\">\r\n                    <div onClick={handleDrawPolygon} className={classnames(classes.btnPolygone, { [classes.btnAddNormal]: true },  { [classes.btnAddSelected]: props.menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM })}></div>\r\n                </Tooltip>\r\n                <Tooltip title=\"แก้ไขการวาดอาคาร\" placement=\"bottom\">\r\n                    <div onClick={handleEditPolygon} className={classnames(classes.btnPolygone, { [classes.btnEditNormal]: true },  { [classes.btnEditSelected]: props.menuRdc.ActiveFunction === ACTIVE_FUNCTION.EDIT_GP_FORM })}></div>\r\n                </Tooltip>\r\n            </Fragment>\r\n        )\r\n    }\r\n\r\n    return (\r\n        <Fragment>\r\n                <AddDraftBuildingView\r\n                    title={title}\r\n                    onClickBack={handleClickBack}\r\n                    formStep={formStep}\r\n                    buttonCustom={renderbuttonCustom()}\r\n                >\r\n                    {renderForm()}\r\n                </AddDraftBuildingView >\r\n                <AlertMessageSuper {...props} />\r\n                <Loading isShowLoading={isShowLoading} />\r\n            </Fragment>\r\n    )\r\n})\r\nconst mapStateToProps = state => ({\r\n    authenRdc: state.authen,\r\n    dirtyFormAdd: isDirty('FormDraftBuilding')(state),\r\n    menuRdc : state.menu\r\n})\r\nconst mapDispatchToProps = dispatch => ({\r\n    mapAction: bindActionCreators(MapAction, dispatch),\r\n    menuAction: bindActionCreators(MenuAction, dispatch)\r\n})\r\nconst enhance = compose(\r\n    connect(mapStateToProps, mapDispatchToProps),\r\n    withWidth(),//จะได้ props width มา\r\n    WithAlertMessage,\r\n    WithLoading,\r\n)\r\nexport default enhance(AddDraftBuilding)\r\n","import React from 'react';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport AppBarHeaderView from '../../../../AppBarHeaderView';\r\nimport { Scrollbars } from 'react-custom-scrollbars';\r\nconst SearchDraftBuildingView = ({\r\n    classes,\r\n    title,\r\n    children,\r\n    onClickBack\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root}>\r\n            <AppBarHeaderView\r\n                title={title}\r\n                onClickBack={onClickBack}\r\n            />\r\n            <Grid item xs={12} className={classes.body}>\r\n            <Scrollbars autoHide>\r\n                {children}\r\n                </Scrollbars>\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        height: '100%',\r\n    },\r\n    body: {\r\n        height: 'calc(100% - 45px)',\r\n        width: '100%'\r\n    }\r\n}))(SearchDraftBuildingView)\r\n","import React from 'react'\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport { Field } from 'redux-form';\r\nimport classnames from 'classnames';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport SelectFieldRedux from '../../../../../../../Controls/Containers/SelectFieldRedux';\r\nimport Button from '../../../../../../../Controls/Containers/Button';\r\nimport TextFieldRedux from '../../../../../../../Controls/Containers/TextFieldRedux';\r\nimport ReduxFormDatePickerThai from '../../../../../../../Controls/Containers/Picker/ReduxFormDatePickerThai';\r\nimport { BTN } from '../../../../../../../Constants/Constants'\r\n\r\nconst Form = ({\r\n    classes,\r\n    isActiveSelectInMap,\r\n    luDataType,\r\n    onSubmit,\r\n    handleSubmit,\r\n    onChangeDate,\r\n    maxDate,\r\n    minDate,\r\n    onClickSelectInMap,\r\n    onClickBack\r\n}) => (\r\n        <form onSubmit={handleSubmit(onSubmit)} className={classes.form}>\r\n            <Field\r\n                name=\"name\"\r\n                label=\"ชื่อ\"\r\n                component={TextFieldRedux}\r\n            />\r\n            <Field\r\n                name=\"buildingType\"\r\n                label=\"ประเภทอาคาร\"\r\n                component={SelectFieldRedux}\r\n                data={luDataType}\r\n\r\n            />\r\n            <Field\r\n                name=\"startDate\"\r\n                label=\"ช่วงเวลาสำรวจ\"\r\n                component={ReduxFormDatePickerThai}\r\n                onChange={(evt) => onChangeDate('startDate', evt)}\r\n                maxDate={maxDate}\r\n\r\n            />\r\n            <Field\r\n                name=\"endDate\"\r\n                label=\"ถึง\"\r\n                component={ReduxFormDatePickerThai}\r\n                onChange={(evt) => onChangeDate('endDate', evt)}\r\n                minDate={minDate}\r\n            />\r\n\r\n            {/* <Grid container justify=\"flex-end\" style={{ marginTop: '10px' }}>\r\n                <Grid item>\r\n                    <Button\r\n                        label=\"เลือกบนแผนที่\"\r\n                        color={isActiveSelectInMap ? \"black\" : \"green\"}\r\n                        onClick={onClickSelectInMap}\r\n                    />\r\n                </Grid>\r\n            </Grid> */}\r\n\r\n            <Grid container justify=\"center\" spacing={24} className={classes.footer}>\r\n                <Grid item>\r\n                    <Button\r\n                        label={BTN.TH.CANCEL}\r\n                        onClick={onClickBack}\r\n                    />\r\n                </Grid>\r\n                <Grid item>\r\n                    <Button\r\n                        type=\"submit\"\r\n                        label={BTN.TH.SEARCH}\r\n                    />\r\n                </Grid>\r\n                <Grid item>\r\n                    <Button\r\n                        label=\"เลือกบนแผนที่\"\r\n                        color={isActiveSelectInMap ? \"black\" : \"green\"}\r\n                        onClick={onClickSelectInMap}\r\n                    />\r\n                </Grid>\r\n            </Grid>\r\n        </form>\r\n    )\r\n\r\nconst SearchDraftBuildingView = ({\r\n    classes,\r\n    children,\r\n    isDisplay,\r\n    isActiveSelectInMap,\r\n    luDataType,\r\n    onSubmit,\r\n    handleSubmit,\r\n    onChangeDate,\r\n    maxDate,\r\n    minDate,\r\n    onClickSelectInMap,\r\n    onClickBack\r\n}) => {\r\n    return (\r\n        <Grid container className={classnames(classes.root, { [classes.hide]: !isDisplay })}>\r\n            <Grid item xs={12} className={classes.rootForm}>\r\n                <Form\r\n                    classes={classes}\r\n                    isActiveSelectInMap={isActiveSelectInMap}\r\n                    luDataType={luDataType}\r\n                    onSubmit={onSubmit}\r\n                    handleSubmit={handleSubmit}\r\n                    onChangeDate={onChangeDate}\r\n                    maxDate={maxDate}\r\n                    minDate={minDate}\r\n                    onClickSelectInMap={onClickSelectInMap}\r\n                    onClickBack={onClickBack}\r\n                />\r\n            </Grid>\r\n\r\n            <Grid item xs={12} className={classes.rootResult}>\r\n                {children}\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        height: '100%'\r\n    },\r\n    rootForm: {\r\n        padding: '10px',\r\n        height: '420px',\r\n    },\r\n    form: {\r\n        width: '100%',\r\n        height: '100%'\r\n    },\r\n    rootResult: {\r\n        height: 'calc(100% - 420px)'\r\n    },\r\n    footer: {\r\n        marginTop: \"10px\",\r\n        marginBottom: \"10px\"\r\n    },\r\n    row: {\r\n        height: \"50px\",\r\n        width: \"100%\",\r\n        marginTop: \"15px\",\r\n    },\r\n    multiRow: {\r\n        height: \"70px\",\r\n        width: \"100%\",\r\n        marginTop: \"5px\",\r\n    },\r\n    colLabel: {\r\n        fontSize: '14px',\r\n        paddingTop: '5px'\r\n    },\r\n    hide: {\r\n        display: 'none'\r\n    }\r\n}))(SearchDraftBuildingView)\r\n","import React, { Fragment } from 'react';\r\nimport { Scrollbars } from 'react-custom-scrollbars';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport ListItem from '@material-ui/core/ListItem';\r\nimport Delete from \"@material-ui/icons/Delete\";\r\nimport Edit from \"@material-ui/icons/Edit\";\r\nimport IconButton from '@material-ui/core/IconButton';\r\nimport Checkbox from '@material-ui/core/Checkbox';\r\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\r\nimport { green } from '@material-ui/core/colors';\r\nimport Divider from '@material-ui/core/Divider';\r\n\r\n//import tooltip\r\nimport Tooltip from '../../../../../../../Controls/Containers/Tooltip'\r\n\r\nconst ListResult = ({\r\n    classes,\r\n    listResult,\r\n    onClickListResult,\r\n    onClickEdit,\r\n    onClickDelete\r\n}) => {\r\n    if (listResult.length === 0) {\r\n        return <div className={classes.div_noData}>ไม่พบข้อมูล</div>\r\n    }\r\n    return (\r\n        <Grid item xs={12}>\r\n            {listResult.map((result, index) =>\r\n                <ListItem\r\n                    key={`result-${result.id}-${index}`}\r\n                    button\r\n                    divider={true}\r\n                    className={classes.menu_item}\r\n                    classes={{ gutters: classes.guttersItem }}\r\n                    onClick={onClickListResult(result)}\r\n                >\r\n                    <Grid container justify=\"space-between\">\r\n                        <Grid item className={classes.containerTxtResult} >\r\n                            <label className={classes.txtResult}>{`ชื่อ : ${result.attribute.BL_NAME}`}</label><br />\r\n                            <label className={classes.txtResult}>{`วันที่ : ${result.attribute.SURVEY_DATE_DISPLAY}`}</label>\r\n                        </Grid>\r\n                        <Grid item >\r\n                            <Tooltip title=\"แก้ไข\" placement=\"bottom\">\r\n                                <IconButton className={classes.iconButton} onClick={onClickEdit(result)} >\r\n                                    <Edit className={classes.icon} />\r\n                                </IconButton>\r\n                            </Tooltip>\r\n                            <Tooltip title=\"ลบ\" placement=\"bottom\">\r\n                                {<IconButton className={classes.iconButton} onClick={onClickDelete(result)} >\r\n                                    <Delete className={classes.icon} />\r\n                                </IconButton>}\r\n                            </Tooltip>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ListItem>\r\n            )}\r\n        </Grid>\r\n    )\r\n}\r\n\r\nconst ResultSearchDraftPointView = ({\r\n    classes,\r\n    listResult,\r\n    onClickListResult,\r\n    onClickEdit,\r\n    onClickDelete,\r\n    isCreate,\r\n    handleChangeCheckbox,\r\n    isUpdate\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root}>\r\n            <Grid item xs={12} className={classes.header}>\r\n                {`ผลลัพธ์จำนวน ${listResult.length} รายการ`}\r\n            </Grid>\r\n            <Grid item xs={12} className={classes.rootResult} >\r\n                <Scrollbars autoHide>\r\n                    {(listResult.length > 0 || (isCreate || isUpdate)) &&\r\n                        <Fragment>\r\n                            <FormControlLabel\r\n                                className={classes.checkbox}\r\n                                control={\r\n                                    <GreenCheckbox\r\n                                        checked={isCreate}\r\n                                        onChange={() => handleChangeCheckbox('create')}\r\n                                        value=\"create\"\r\n                                    />\r\n                                }\r\n                                label=\"รายการที่สร้าง\"\r\n                            />\r\n                            <FormControlLabel\r\n                                className={classes.checkbox}\r\n                                control={\r\n                                    <GreenCheckbox\r\n                                        checked={isUpdate}\r\n                                        onChange={() => handleChangeCheckbox('update')}\r\n                                        value=\"update\"\r\n                                    />\r\n                                    }\r\n                                label=\"รายการที่แก้ไข\"\r\n                            />\r\n                            <Divider />\r\n                        </Fragment>\r\n                    }\r\n                    <ListResult\r\n                        classes={classes}\r\n                        listResult={listResult}\r\n                        onClickListResult={onClickListResult}\r\n                        onClickEdit={onClickEdit}\r\n                        onClickDelete={onClickDelete}\r\n                    />\r\n                </Scrollbars >\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nconst GreenCheckbox = withStyles({\r\n    root: {\r\n      color: green[400],\r\n      '&$checked': {\r\n        color: green[600],\r\n      },\r\n    },\r\n    checked: {},\r\n})(props => <Checkbox color=\"default\" {...props} />);\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        width: '100%',\r\n        height: '100%'\r\n    },\r\n    rootResult: {\r\n        height: 'calc(100% - 25px)',\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            minHeight: '200px',\r\n            [`& input`]: {\r\n                height: 'calc(100% - 35px)',\r\n            },\r\n        },\r\n    },\r\n    header: {\r\n        height: '25px',\r\n        lineHeight: '25px',\r\n        width: '100%',\r\n        backgroundColor: theme.mainTheme.color3,\r\n        color: theme.mainTheme.color2,\r\n        textAlign: 'center',\r\n        fontSize: theme.textSize.subtitle\r\n    },\r\n    div_noData: {\r\n        width: '100%',\r\n        padding: '18px'\r\n    },\r\n    menu_item: {\r\n        '&:focus': {\r\n            backgroundColor: theme.mainTheme.color2\r\n        },\r\n        '&:hover': {\r\n            backgroundColor: theme.mainTheme.colorAH.colorHover,\r\n            color: theme.mainTheme.colorAH.colorTextHover\r\n        }\r\n    },\r\n    txtResult: {\r\n        fontSize: '14px',\r\n        margin: '0px',\r\n        lineHeight: '24px'\r\n    },\r\n    iconButton: {\r\n        height: \"35px\",\r\n        width: \"35px\",\r\n        marginTop: \"6px\"\r\n    },\r\n    icon: {\r\n        marginTop: '-6px'\r\n    },\r\n    guttersItem: {\r\n        padding: \"5px 10px\",\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            [`& input`]: {\r\n                padding: \"5px 20px\",\r\n            },\r\n        },\r\n    },\r\n    marginIcon: {\r\n        marginRight: '35px'\r\n    },\r\n    containerTxtResult: {\r\n        maxWidth: 'calc(100% - 70px)',\r\n        textOverflow: 'ellipsis',\r\n        whiteSpace: 'nowrap',\r\n        overflow: 'hidden',\r\n    },\r\n    checkbox: {\r\n        padding: '5px 10px'\r\n    }\r\n}))(ResultSearchDraftPointView)\r\n","import React, { Fragment, useState, useEffect } from 'react';\r\nimport { connect } from 'react-redux'\r\nimport { reduxForm, getFormValues } from \"redux-form\";\r\nimport { compose } from \"recompose\";\r\nimport { bindActionCreators } from 'redux';\r\nimport withWidth from '@material-ui/core/withWidth';\r\nimport { format } from \"date-fns\";\r\nimport enLocale from \"date-fns/locale/en-US\";\r\n\r\n//import component\r\nimport FormSearchDraftBuildingView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/DraftBuilding/Search/FormSearchDraftBuildingView';\r\nimport ResultSearchDraftView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/DraftBuilding/Search/ResultSearchDraftView';\r\nimport WithAlertMessage from '../../../../../../../HOC/WithAlertMessage';\r\nimport WithLoading from '../../../../../../../HOC/WithLoading';\r\nimport Loading from '../../../../../../../Controls/Containers/Loading';\r\nimport AlertMessageSuper from '../../../../../../../Controls/Containers/AlertMessageSuper';\r\n\r\n//import service - utils\r\nimport { validateFormSearchDraftBLDG } from '../../../../../../../Utilities/Validate';\r\nimport { convertDateTimeToDisplayDate } from '../../../../../../../Utilities/DateTimeUtil';\r\nimport { fetchGet_ } from '../../../../../../../Utilities/ServiceUtils';\r\n\r\n//import actions\r\nimport * as MapAction from '../../../../../../../Actions/Web/Maps/MapAction';\r\nimport * as MenuAction from '../../../../../../../Actions/Web/MenuAction';\r\nimport * as MapFunctions from '../../../../../../../Map/MapFunctions';\r\n\r\nconst SearchDraftBuilding = ({\r\n    isDisplay,\r\n    isShowLoading,\r\n    showAlert,\r\n    hideAlert,\r\n    showLoading,\r\n    hideLoading,\r\n    initialize,\r\n    mapAction,\r\n    menuAction,\r\n    panelContentDataRdc,\r\n    width,\r\n    title,\r\n    handleSubmit,\r\n    onEdit,\r\n    onDelete,\r\n    onDetail,\r\n    onClickBack,\r\n    authenRdc,\r\n    ...props\r\n}) => {\r\n    const [minDate, setMinDate] = useState();\r\n    const [maxDate, setMaxDate] = useState();\r\n    const [buildList, setBuildList] = useState([]);\r\n    const [isActiveSelectInMap, setActiveSelectInMap] = useState(false);\r\n    const [listResult, setListResult] = useState(null); // ให้ค่าเริ่มต้นเป็น null เพื่อใช้ในการปิดเปิด form ผลลัพธ์\r\n    const [isCreate, setIsCreate] = useState(false)\r\n    const [isUpdate, setIsUpdate] = useState(false)\r\n    const [listResultSearch, setListResultSearch] = useState(null);\r\n\r\n    useEffect(() => {\r\n        initailValuesFormReport();\r\n    }, [])\r\n\r\n    const initailValuesFormReport = () => {\r\n        callServiceBuildingType();\r\n    }\r\n\r\n    // ######################### SEARCH #########################\r\n\r\n    const callServiceBuildingType = async () => {\r\n        try {\r\n            const response = await fetchGet_(`${process.env.REACT_APP_SURVET_GET_BUILDING_TYPE}`);\r\n            const objResult = await response.json();\r\n\r\n            const resultDistrict = [];\r\n            await objResult.result.map(item => {\r\n                if (item.ID === 11 || item.ID === 12) {\r\n                    //ตัด string อาคารที่จดทะเบียน,อาคารที่ไม่จดทะเบียน เอาแค่ (แฟลต, หอพัก, อาคารชุด, แมนชั่น)\r\n                    resultDistrict.push({ id: item.value, name: `${item.name.split(\" \")[0]} ${item.name.split(\" \")[1]} ${item.name.split(\" \")[2]} ${item.name.split(\" \")[3]}ฯลฯ)` });\r\n                } else {\r\n                    resultDistrict.push({ id: item.value, name: item.name });\r\n\r\n                }\r\n                return true\r\n            })\r\n\r\n            await setBuildList(resultDistrict);\r\n        } catch (err) {\r\n            setBuildList([]);\r\n        }\r\n    }\r\n\r\n    const createCondition = values => {\r\n        let condition = \"\";\r\n\r\n        if (values.name) {\r\n            condition = condition + ` AND BL_NAME LIKE '%${values.name}%'`\r\n        }\r\n\r\n        if (values.buildingType) {\r\n            condition = condition + ` AND BL_TYPE = ${values.buildingType}`\r\n        }\r\n\r\n        if (values.startDate && values.endDate) {\r\n            const strStartDateUTC = `${format(new Date(values.startDate), 'yyyy-MM-dd', { locale: enLocale })} 00:00:00`\r\n            const strEndDateUTC = `${format(new Date(values.endDate), 'yyyy-MM-dd', { locale: enLocale })} 23:59:59`;\r\n            condition = condition + ` AND SURVEY_DATE BETWEEN timestamp '${strStartDateUTC}' AND timestamp '${strEndDateUTC}'`;\r\n        }\r\n\r\n        if (condition !== \"\") {\r\n            condition = \"1 = 1\" + condition\r\n        }\r\n\r\n        return condition\r\n    }\r\n\r\n    const onhandleSubmit = async (values) => {\r\n        showLoading();\r\n        const { currentPage } = panelContentDataRdc\r\n        // จะเอา layer แรกมา selection เท่านั้น\r\n        const selectionLayerID = currentPage.Layer && currentPage.Layer.length > 0 && currentPage.Layer[0].layerName\r\n\r\n        await mapAction.bindMapCommand(MapFunctions.cleardrawSpatialSearchDraft);\r\n        await mapAction.bindMapCommand(MapFunctions.selectionDraft, {\r\n            callback: callbackDrawSpatilaSearch,\r\n            type: \"BLDG\",\r\n            condition: createCondition(values),\r\n            selectionLayerID: selectionLayerID\r\n        })\r\n    }\r\n\r\n    const handleChangeDate = (type, evt) => {\r\n        if (type === 'startDate') {\r\n            setMinDate(evt)\r\n        } else {\r\n            setMaxDate(evt)\r\n        }\r\n    }\r\n\r\n    // ######################### SPATIAL SEARCH #########################\r\n\r\n    const handleClickSelectInMap = () => {\r\n\r\n        if (isActiveSelectInMap) {\r\n            mapAction.bindMapCommand(MapFunctions.cleardrawSpatialSearchDraft);\r\n        } else {\r\n            const { currentPage } = panelContentDataRdc\r\n            // จะเอา layer แรกมา selection เท่านั้น\r\n            const selectionLayerID = currentPage.Layer && currentPage.Layer.length > 0 && currentPage.Layer[0].layerName\r\n\r\n            mapAction.bindMapCommand(MapFunctions.drawSpatialSearchDraft, {\r\n                callback: callbackDrawSpatilaSearch,\r\n                type: \"BLDG\",\r\n                showLoading,\r\n                selectionLayerID: selectionLayerID\r\n            })\r\n            managePanelForMobile(true);\r\n        }\r\n\r\n        setActiveSelectInMap(!isActiveSelectInMap)\r\n    }\r\n\r\n    const managePanelForMobile = async (isDraw) => {\r\n        if (width === 'sm' || width === 'xs') {\r\n            if (isDraw) {\r\n                await menuAction.closeMenuPanel();\r\n                await menuAction.openMenuMap();\r\n            } else {\r\n                await menuAction.openMenuPanel();\r\n                await menuAction.closeMenuMap();\r\n            }\r\n        }\r\n    }\r\n\r\n    const converFormatDataMapservice = datas => {\r\n        if (datas) {\r\n            return datas.map(itm => ({\r\n                attribute: {\r\n                    ...itm.attributes,\r\n                    SURVEY_DATE_DISPLAY: convertDateTimeToDisplayDate(itm.attributes.SURVEY_DATE, \"d MMM yyyy\"),\r\n                    CREATION_DATE_DISPLAY: itm.attributes.CREATION_DATE ? convertDateTimeToDisplayDate(itm.attributes.CREATION_DATE, \"d MMM yyyy\") : \"\",\r\n                },\r\n                geometry: itm.geometry\r\n            }))\r\n        } else {\r\n            return []\r\n        }\r\n    }\r\n\r\n    const callbackDrawSpatilaSearch = async (features) => {\r\n        hideLoading();\r\n        const result = await converFormatDataMapservice(features)\r\n        mapAction.bindClearMapCommand();\r\n        setActiveSelectInMap(false);\r\n        managePanelForMobile(false);\r\n        setIsCreate(false);\r\n        setIsUpdate(false)\r\n        await setListResult(result);\r\n        await setListResultSearch(result)\r\n    }\r\n\r\n    // ######################### HANDLE  RESULT #########################\r\n\r\n    const handleClickListResult = values => evt => {\r\n        evt.stopPropagation()\r\n        onDetail && onDetail(values)\r\n    }\r\n\r\n    const handleClickEdit = values => evt => {\r\n        evt.stopPropagation()\r\n        onEdit && onEdit(values)\r\n    }\r\n\r\n    const handleClickDelete = values => evt => {\r\n        evt.stopPropagation()\r\n        onDelete && onDelete(values)\r\n    }\r\n\r\n    const handleChangeCheckbox = async (type) => {\r\n        switch(type) {\r\n            case \"create\":\r\n                filterListResult(!isCreate, isUpdate)\r\n                break;\r\n            case \"update\":\r\n                filterListResult(isCreate, !isUpdate)\r\n                break;\r\n            default:\r\n                break;\r\n        }\r\n    }\r\n\r\n    const filterListResult = async (create, update) => {\r\n        const userId = authenRdc.profile.userID\r\n        const filterResult = await listResultSearch.filter(item => {\r\n            return create && update ? \r\n                item.attribute.CREATOR === userId || item.attribute.UPDATER === userId :\r\n                create && !update ?\r\n                item.attribute.CREATOR === userId :\r\n                !create && update ?\r\n                item.attribute.UPDATER === userId :\r\n                item\r\n        })\r\n\r\n        await setListResult(filterResult)\r\n        await setIsCreate(create);\r\n        await setIsUpdate(update);\r\n    }\r\n    \r\n\r\n    return (\r\n        <Fragment>\r\n            <FormSearchDraftBuildingView\r\n                title={title}\r\n                isActiveSelectInMap={isActiveSelectInMap}\r\n                isDisplay={isDisplay}\r\n                luDataType={buildList}\r\n                handleSubmit={handleSubmit}\r\n                maxDate={maxDate}\r\n                minDate={minDate}\r\n                onChangeDate={handleChangeDate}\r\n                onSubmit={onhandleSubmit}\r\n                onClickSelectInMap={handleClickSelectInMap}\r\n                onClickBack={onClickBack}\r\n            >\r\n                {listResult && <ResultSearchDraftView\r\n                    listResult={listResult}\r\n                    onClickListResult={handleClickListResult}\r\n                    onClickEdit={handleClickEdit}\r\n                    onClickDelete={handleClickDelete}\r\n                    handleChangeCheckbox={handleChangeCheckbox}\r\n                    isCreate={isCreate}\r\n                    isUpdate={isUpdate}\r\n                />}\r\n            </FormSearchDraftBuildingView>\r\n            <AlertMessageSuper {...props} />\r\n            <Loading isShowLoading={isShowLoading} />\r\n        </Fragment>\r\n    )\r\n}\r\n\r\nconst mapStateToProps = state => ({\r\n    _values: getFormValues('FormDraftBuildingSearch')(state),\r\n    panelContentDataRdc: state.PanelContentData,\r\n    authenRdc: state.authen\r\n})\r\n\r\nconst mapDispathchToProps = dispatch => ({\r\n    mapAction: bindActionCreators(MapAction, dispatch),\r\n    menuAction: bindActionCreators(MenuAction, dispatch),\r\n})\r\n\r\nconst reduxFormParameter = {\r\n    form: 'FormDraftBuildingSearch',\r\n    validate: validateFormSearchDraftBLDG\r\n};\r\n\r\nexport default compose(\r\n    connect(mapStateToProps, mapDispathchToProps),\r\n    reduxForm(reduxFormParameter),\r\n    withWidth(),\r\n    WithAlertMessage,\r\n    WithLoading\r\n)(SearchDraftBuilding)\r\n","import React from 'react';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport BreadCrumb from '../../../../../../../Controls/Containers/BreadCrumb';\r\nimport { Scrollbars } from 'react-custom-scrollbars';\r\n\r\nconst DetailDraftBuildingView = ({\r\n    classes,\r\n    children,\r\n    formStep,\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root}>\r\n            <Grid item xs={12} className={classes.header}>\r\n                <BreadCrumb\r\n                    stepActive={formStep}\r\n                    listStep={[1, 2]}\r\n                />\r\n            </Grid>\r\n            <Grid item xs={12}>\r\n                <div className={classes.title}>\r\n                    <label>ข้อมูลอาคาร</label>\r\n                </div>\r\n            </Grid>\r\n            <Grid item xs={12} className={classes.body}>\r\n                <Scrollbars autoHide>\r\n                    {children}\r\n                </Scrollbars>\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        height: '100%',\r\n    },\r\n    header: {\r\n        height: '70px',\r\n    },\r\n    title: {\r\n        color: theme.mainTheme.color1,\r\n        textAlign: 'center',\r\n        fontSize: theme.textSize.title,\r\n        marginBottom: '15px',\r\n        marginTop: '10px'\r\n    },\r\n    btnRightTitle: {\r\n        position: 'absolute',\r\n        right: '10px',\r\n        top: '118px',\r\n        width: '40px',\r\n        height: '40px'\r\n    },\r\n    body: {\r\n        height: 'calc(100% - 120px)',\r\n        backgroundColor: '#f2f2f2'\r\n    }\r\n}))(DetailDraftBuildingView)\r\n","import React, { Fragment } from 'react';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport Button from '../../../../../../../Controls/Containers/Button';\r\nimport { BTN } from '../../../../../../../Constants/Constants'\r\nconst RowDeail = ({\r\n    classes,\r\n    isFirstRow,\r\n    label,\r\n    value,\r\n    unit,\r\n}) => (\r\n        <Grid container className={`${!isFirstRow && classes.row} `}>\r\n            <Grid item xs={5} className={classes.colLabel} >\r\n                {label}\r\n            </Grid>\r\n            {unit ? (<Fragment> <Grid item xs={4} className={classes.colValue}> {value}</Grid><Grid item xs={3}>{unit}</Grid></Fragment>) : (< Grid item xs={7}> {value} </Grid>)}\r\n        </Grid >\r\n    )\r\n\r\nconst DetailBuildingStepOneView = ({\r\n    classes,\r\n    detail,\r\n    onClickBack,\r\n    onChangeStep,\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root}>\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"ประเภทอาคาร\"\r\n                value={detail.BL_TYPE_DISPLAY && detail.BL_TYPE_DISPLAY}\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"ประเภทกิจกรรม\"\r\n                value={detail.BL_ACT_CODE_DISPLAY && detail.BL_ACT_CODE_DISPLAY}\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"ชื่อกิจกรรม\"\r\n                value={detail.BL_ACT_NAME && detail.BL_ACT_NAME}\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"หน้ากว้าง\"\r\n                unit=\"เมตร\"\r\n                value={detail.BL_FRONTAGE && detail.BL_FRONTAGE}\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"ความสูง\"\r\n                unit=\"เมตร\"\r\n                value={detail.BL_HEIGHT && detail.BL_HEIGHT}\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"ความลึก\"\r\n                unit=\"เมตร\"\r\n                value={detail.BL_DEPTH && detail.BL_DEPTH}\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"จำนวนชั้น\"\r\n                unit=\"ชั้น\"\r\n                value={detail.BL_NSTOREY && detail.BL_NSTOREY}\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"จำนวนที่พักอาศัย\"\r\n                unit=\"หน่วย\"\r\n                value={detail.BL_NUNIT && detail.BL_NUNIT}\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"จำนวนผู้พัก\"\r\n                unit=\"คน\"\r\n                value={detail.BL_NRESIDENT && detail.BL_NRESIDENT}\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"จำนวนแรงงาน\"\r\n                unit=\"คน\"\r\n                value={detail.BL_EMPLOY && detail.BL_EMPLOY}\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"พื้นที่อาคาร\"\r\n                unit=\"ตารางเมตร\"\r\n                value={detail.BL_AREA && Number(detail.BL_AREA).toLocaleString()}\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"กรรมสิทธิ์\"\r\n                value={detail.BL_OWNER_DISPLAY && detail.BL_OWNER_DISPLAY}\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"เลขที่ขออนุญาตปลูกสร้างอาคาร\"\r\n                value={detail.BL_PAGE_NO && detail.BL_PAGE_NO}\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"วันที่อนุญาตก่อสร้าง\"\r\n                value={detail.BL_DATE && detail.BL_DATE}\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"ประเภทวัสดุ\"\r\n                value={detail.BL_MATL_DISPLAY && detail.BL_MATL_DISPLAY}\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"การใช้ประโยชน์ฯ หลัก\"\r\n                value={detail.BL_MAIN_USE_DISPLAY && detail.BL_MAIN_USE_DISPLAY}\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"การใช้ประโยชน์ฯ อาคาร\"\r\n                value={detail.BL_USE_DISPLAY && detail.BL_USE_DISPLAY}\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"อาคารใหม่หรือต่อเติม\"\r\n                value={detail.BL_AFTER_CODE_DISPLAY && detail.BL_AFTER_CODE_DISPLAY}\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"ป้ายบนอาคาร\"\r\n                value={detail.BL_AD_DISPLAY && detail.BL_AD_DISPLAY}\r\n            />\r\n\r\n            <Grid container justify=\"center\" spacing={24} className={classes.footer} >\r\n                <Grid item>\r\n                    <Button\r\n                        label={BTN.TH.CANCEL}\r\n                        // color=\"black\"\r\n                        onClick={onClickBack}\r\n                    />\r\n                </Grid>\r\n                <Grid item>\r\n                    <Button\r\n                        label={BTN.TH.NEXT}\r\n                        onClick={onChangeStep(2)}\r\n                    />\r\n                </Grid>\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        padding: '0px 20px 20px 20px'\r\n    },\r\n    row: {\r\n        marginTop: '20px',\r\n    },\r\n    footer: {\r\n        marginTop: '10px',\r\n        marginBottom: '10px'\r\n    },\r\n    colLabel: {\r\n        fontWeight: 'bold'\r\n    },\r\n    colValue: {\r\n        wordWrap: \"break-word\"\r\n    }\r\n}))(DetailBuildingStepOneView)","import React, { Fragment } from 'react';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport Button from '../../../../../../../Controls/Containers/Button';\r\nimport { convertDateTimeToDisplayDate } from '../../../../../../../Utilities/DateTimeUtil';\r\nimport { BTN } from '../../../../../../../Constants/Constants'\r\n\r\nconst RowDeail = ({\r\n    classes,\r\n    isFirstRow,\r\n    label,\r\n    value,\r\n    unit,\r\n}) => (\r\n        <Grid container className={`${!isFirstRow && classes.row} `}>\r\n            <Grid item xs={5} className={classes.colLabel} >\r\n                {label}\r\n            </Grid>\r\n            {unit ? (<Fragment> <Grid item xs={4} className={classes.colValue}> {value}</Grid><Grid item xs={3}>{unit}</Grid></Fragment>) : (< Grid item xs={7}> {value} </Grid>)}\r\n        </Grid >\r\n    )\r\n\r\nconst DetailBuildingStepTwoView = ({\r\n    classes,\r\n    detail,\r\n    onClickBack,\r\n    onChangeStep,\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root}>\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"ชื่ออาคาร\"\r\n                value={detail.BL_NAME && detail.BL_NAME}\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"ชื่ออาคาร(ย่อ)\"\r\n                value={detail.BL_SUBNAME && detail.BL_SUBNAME}\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"บ้านเลขที่\"\r\n                value={detail.BL_HOUSENUM && detail.BL_HOUSENUM}\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"หมู่ที่\"\r\n                value={detail.BL_VILLNUM && detail.BL_VILLNUM}\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"หมู่บ้าน\"\r\n                value={detail.BL_VILLAGE && detail.BL_VILLAGE}\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"ตรอก\"\r\n                value={detail.TROK && detail.TROK}\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"ซอย\"\r\n                value={detail.BL_SOI && detail.BL_SOI}\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"ถนน\"\r\n                value={detail.BL_ROAD && detail.BL_ROAD}\r\n            />\r\n            \r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"จังหวัด\"\r\n                value=\"กรุงเทพมหานคร\"\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"เขต\"\r\n                value={detail.BL_DISTRICT && detail.BL_DISTRICT}\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"แขวง\"\r\n                value={detail.BL_SUB_DISTRICT && detail.BL_SUB_DISTRICT}\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"รหัสไปรษณีย์\"\r\n                value={detail.BL_POSTCODE && detail.BL_POSTCODE}\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"วันที่สำรวจ\"\r\n                value={detail.SURVEY_DATE && convertDateTimeToDisplayDate(detail.SURVEY_DATE, \"d MMM yyyy\")}\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"ปีที่สำรวจ\"\r\n                value={detail.UPDATE_YEAR && detail.UPDATE_YEAR}\r\n            />\r\n\r\n            <Grid container justify=\"center\" spacing={24} className={classes.footer} >\r\n                <Grid item>\r\n                    <Button\r\n                          label={BTN.TH.CANCEL}\r\n                        // color=\"black\"\r\n                        onClick={onClickBack}\r\n                    />\r\n                </Grid>\r\n                <Grid item>\r\n                    <Button\r\n                        label={BTN.TH.BACK}\r\n                        onClick={onChangeStep(1)}\r\n                    />\r\n                </Grid>\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        padding: '0px 20px 20px 20px'\r\n    },\r\n    row: {\r\n        marginTop: '20px',\r\n    },\r\n    footer: {\r\n        marginTop: '10px',\r\n        // marginTop:'10px'\r\n    },\r\n    colLabel: {\r\n        fontWeight: 'bold'\r\n    },\r\n    colValue: {\r\n        wordWrap: \"break-word\"\r\n    }\r\n}))(DetailBuildingStepTwoView)","import React, { Component } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { bindActionCreators } from 'redux';\r\n\r\n//import component\r\nimport DetailDraftBuildingView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/DraftBuilding/Detail/DetailDraftBuildingView';\r\nimport DetailBuildingStepOneView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/DraftBuilding/Detail/DetailBuildingStepOneView'\r\nimport DetailBuildingStepTwoView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/DraftBuilding/Detail/DetailBuildingStepTwoView';\r\n\r\n//import actions\r\nimport * as MapAction from '../../../../../../../Actions/Web/Maps/MapAction';\r\nimport * as MapFunctions from '../../../../../../../Map/MapFunctions';\r\n\r\nexport class DetailDraft extends Component {\r\n    constructor() {\r\n        super();\r\n        this.state = {\r\n            formStep: 1\r\n        }\r\n    }\r\n\r\n    componentDidMount() {\r\n        const { detail, mapAction } = this.props;\r\n        if (detail && detail.geometry) {\r\n            mapAction.bindMapCommand(MapFunctions.addGraphicDraft, {\r\n                evt: { geometry: detail.geometry },\r\n                type: \"polygon\"\r\n            });\r\n        }\r\n    }\r\n\r\n    handleChangeStep = step => evt => {\r\n        this.setState({ formStep: step })\r\n    }\r\n\r\n    renderChildren = () => {\r\n        const { formStep, } = this.state;\r\n        const { detail, onClickBack } = this.props;\r\n\r\n        switch (formStep) {\r\n            case 1:\r\n                return <DetailBuildingStepOneView\r\n                    detail={detail.attribute}\r\n                    onChangeStep={this.handleChangeStep}\r\n                    onClickBack={onClickBack}\r\n                />;\r\n            case 2:\r\n                return <DetailBuildingStepTwoView\r\n                    detail={detail.attribute}\r\n                    onChangeStep={this.handleChangeStep}\r\n                    onClickBack={onClickBack}\r\n                />;\r\n            default:\r\n                break;\r\n        }\r\n    }\r\n\r\n    render() {\r\n        const { formStep } = this.state;\r\n        const { detail, onClickBack } = this.props;\r\n\r\n        return (\r\n            <DetailDraftBuildingView\r\n                formStep={formStep}\r\n                detail={detail}\r\n                onClickBack={onClickBack}\r\n            >\r\n                {this.renderChildren()}\r\n            </DetailDraftBuildingView>\r\n        )\r\n    }\r\n}\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    mapAction: bindActionCreators(MapAction, dispatch)\r\n})\r\n\r\nexport default connect(null, mapDispatchToProps)(DetailDraft)\r\n","import React from 'react'\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { withStyles } from '@material-ui/core/styles'\r\n// import AppBarHeaderView from '../../../../AppBarHeaderView';\r\nimport BreadCrumb from '../../../../../../../Controls/Containers/BreadCrumb';\r\nimport { Scrollbars } from 'react-custom-scrollbars';\r\nconst EditDraftBuildingView = ({\r\n    classes,\r\n    title,\r\n    onClickBack,\r\n    children,\r\n    formStep,\r\n    buttonCustom\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root}>\r\n        {/* <AppBarHeaderView\r\n            title={title}\r\n            onClickBack={onClickBack}\r\n        /> */}\r\n        <BreadCrumb\r\n                    stepActive={formStep}\r\n                    listStep={[1, 2]}\r\n                />\r\n        {/* <div>{buttonCustom}</div> */}\r\n        <Grid container justify=\"flex-end\">\r\n            {buttonCustom}\r\n            {/* <div onClick={onDraw} className={classnames(classes.btnManageGraphic, { [classes.btnAreaNormal]: !isActiveDraw }, { [classes.btnAreaSelected]: isActiveDraw })}></div>\r\n            <div onClick={onEdit} className={classnames(classes.btnManageGraphic, { [classes.btnAreaNormal]: !isActiveEdit }, { [classes.btnAreaSelected]: isActiveEdit })}></div> */}\r\n        </Grid>\r\n        <Grid item xs={12} className={classes.body}>\r\n                <Scrollbars\r\n                autoHide={false}>\r\n                  {children}  \r\n                </Scrollbars>\r\n            \r\n        </Grid>\r\n    </Grid>\r\n    )\r\n}\r\n\r\nexport default  withStyles(theme => ({\r\n    root: {\r\n        height: '100%',\r\n    },\r\n    body: {\r\n        height: 'calc(100% - 110px)',\r\n    }\r\n}))(EditDraftBuildingView)\r\n","import React, { Fragment, useState,useEffect, useRef } from 'react'\r\nimport { bindActionCreators } from 'redux';\r\nimport { connect } from 'react-redux';\r\nimport { compose } from 'recompose';\r\nimport withWidth from '@material-ui/core/withWidth';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport classnames from 'classnames';\r\n\r\n//import component\r\nimport EditDraftBuildingView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/DraftBuilding/Edit/EditDraftBuildingView'\r\nimport WithAlertMessage from '../../../../../../../HOC/WithAlertMessage';\r\nimport AlertMessageSuper from '../../../../../../../Controls/Containers/AlertMessageSuper';\r\nimport FormDraft from '../Form/FormDraft';\r\nimport FormDraftTwo from '../Form/FormDraftTwo'\r\nimport WithLoading from '../../../../../../../HOC/WithLoading'\r\n\r\n//improt actions\r\nimport * as MapFunctions from '../../../../../../../Map/MapFunctions';\r\nimport * as MapAction from '../../../../../../../Actions/Web/Maps/MapAction';\r\nimport * as MenuAction from '../../../../../../../Actions/Web/MenuAction';\r\n\r\n//import service - utils\r\nimport * as DateTimeUtils from '../../../../../../../Utilities/DateTimeUtil';\r\nimport { fetchGet_ } from '../../../../../../../Utilities/ServiceUtils';\r\n\r\n//import constants\r\nimport { TABLE_MAPSHEET1K, ALERT_MESSAGE, ACTIVE_FUNCTION } from '../../../../../../../Constants/Constants';\r\n\r\n//import tooltip\r\nimport Tooltip from '../../../../../../../Controls/Containers/Tooltip'\r\n\r\nconst EditDraftBuilding = withStyles(theme=>({\r\n    btnPolygone: {\r\n        width: \"40px\",\r\n        minHeight: \"40px\",\r\n        margin: \"5px\",\r\n        display: \"block\",\r\n        padding: 0,\r\n        backgroundSize: \"40px 40px\",\r\n        backgroundRepeat: \"no-repeat\",\r\n        backgroundPosition: \"center\"\r\n    },\r\n    btnAddNormal: {\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_add_normal@2x.png)`,\r\n        \"&:Hover\": {\r\n            backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_add_selected@2x.png)`\r\n        },\r\n        cursor: 'pointer'\r\n    },\r\n    btnAddSelected: {\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_add_selected@2x.png)`,\r\n        cursor: 'pointer'\r\n    },\r\n    btnEditNormal: {\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_edit_normal@2x.png)`,\r\n        \"&:Hover\": {\r\n            backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_edit_selected@2x.png)`\r\n        },\r\n        cursor: 'pointer'\r\n    },\r\n    btnEditSelected: {\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_edit_selected@2x.png)`,\r\n        cursor: 'pointer'\r\n    },\r\n    formControl: {\r\n        minWidth: \"100%\",\r\n    },\r\n    red: {\r\n        color: \"red\"\r\n    },\r\n}))( ({...props}) => {\r\n\r\n    const keepAdminpolyStep2 = useRef({//เก็บตอนเปลี่ยน dropdown\r\n        districtCode:null,\r\n        subdistrictCode:null\r\n    })\r\n    const keepIsAlertInconsistentAdminpoly = useRef(false);//ใช้เก็บการสถานะการแจ้งเตือนเพียงครั้งเดียวถ้าเคยแจ้งเตือนแล้ว\r\n\r\n    const {title,onClickBack,mapAction,classes,detail} = props\r\n    const [geometry,setGeometry]= useState({\r\n        geometry: null\r\n    });\r\n    const [formStep,setFormStep] = useState(1);\r\n    // const [isActiveDraw, setIsActiveDraw] = useState(false);\r\n    // const [isActiveEdit, setIsActiveEdit] = useState(false);\r\n    const [graphic, setGraphic] = useState();\r\n    // const [drawComplet, setDrawComplet] = useState(false);\r\n    const [data, setData] = useState({one:null,two:null});\r\n    const [dataEdit, setDataEdit] = useState();\r\n    const [districtCode, setDistrictCode] = useState(null);\r\n    const [subDistrictCode, setSubDistrictCode] = useState(null);\r\n    const [inBKK, setInBKK] = useState(true);\r\n\r\n    const setKeepAdminpolyStep2 = ({districtCode, subdistrictCode}) => {\r\n        keepAdminpolyStep2.current.districtCode = districtCode;\r\n        keepAdminpolyStep2.current.subdistrictCode = subdistrictCode;\r\n    }\r\n\r\n    const setKeepIsAlertInconsistent = isAlert => {\r\n        keepIsAlertInconsistentAdminpoly.current = isAlert;\r\n    }\r\n\r\n    const renderForm = ()=>{\r\n        switch (formStep) {\r\n            case 1:\r\n                return  (<FormDraft\r\n                    callBackSubmitForm={handleCallBackSubmitForm}\r\n                    onChangeForm={onChangeForm}\r\n                    initialData={detail.attribute}\r\n                    handleClickBack={handleClickBack}\r\n                />)\r\n            case 2:\r\n                return(<FormDraftTwo\r\n                    keepIsAlertInconsistentAdminpoly={keepIsAlertInconsistentAdminpoly.current}\r\n                    setKeepIsAlertInconsistent={setKeepIsAlertInconsistent}\r\n                    setKeepAdminpolyStep2={setKeepAdminpolyStep2}\r\n                    callBackSubmitForm={handleCallBackSubmitForm}\r\n                    onChangeForm={onChangeForm} \r\n                    setDataFormTwo={handleSetDataFormTwo}\r\n                    initialData={detail.attribute}   \r\n                    districtCode={keepAdminpolyStep2.current.districtCode ? keepAdminpolyStep2.current.districtCode : districtCode}\r\n                    subDistrictCode={keepAdminpolyStep2.current.districtCode ? keepAdminpolyStep2.current.subdistrictCode : subDistrictCode}\r\n                    showAlertFn={props.showAlert}\r\n                    hideAlertFn={props.hideAlert}\r\n                    handleClickBack={handleClickBack}\r\n                />)\r\n                \r\n            default:\r\n                break;\r\n        }\r\n    }\r\n    const handleSetDataFormTwo = (res)=>{\r\n        setData({...data,two:res})\r\n   }\r\n    const onChangeForm = (key)=>{\r\n        setFormStep(key)\r\n    }\r\n   \r\n    const handleCallBackSubmitForm = async (type,res)=>{\r\n        if(type === 'one'){\r\n           Object.assign(dataEdit, res);\r\n            await setData({...data,one:res})\r\n        }else{\r\n            const returnedTarget = Object.assign(dataEdit, res);\r\n            returnedTarget.UPDATED_DATE = DateTimeUtils.convertDatetimeToCallService(new Date()) \r\n            returnedTarget.UPDATER  = props.authenRdc.profile.userID\r\n            props.showLoading();\r\n            if(geometry.geometry){\r\n                await mapAction.bindMapCommand(MapFunctions.applyEditShapeDraftPolygon, { \r\n                mode:'EDIT',\r\n                data:returnedTarget ,\r\n                date:{dateOne:data.one.BL_DATE,dateTwo:res.SURVEY_DATE},\r\n                geometry:geometry.geometry,\r\n                callback:handleCallBackAddMap})\r\n            }\r\n        }   \r\n    }\r\n\r\n    const handleCallBackAddMap = (object)=>{\r\n        callServiceSaveForm(dataEdit.OBJECTID)\r\n    }\r\n\r\n    const callServiceSaveForm = (objectID) => {\r\n        fetchGet_(`${process.env.REACT_APP_UPDATE_MAPSHEET1K}?objectid=${objectID}&tablename=${TABLE_MAPSHEET1K.DRAFT_BLDG}&isupdate=true`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(values => {\r\n                if (values && values.statusCode === 1) {\r\n                    props.showAlert({ altMsg: ALERT_MESSAGE.POPUP.SAVE_SUCCESS , callbackClose:handleCloseForm })\r\n                } else {\r\n                    props.showAlert({ altMsg: ALERT_MESSAGE.POPUP.SAVE_FAIL })\r\n                }\r\n                props.hideLoading();\r\n            })\r\n            .catch(ex => {\r\n                props.showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR })\r\n                console.log('ex callServiceSaveForm', ex)\r\n                props.hideLoading();\r\n            })\r\n            .finally(() => {\r\n                props.hideLoading();\r\n            })\r\n    }\r\n\r\n    const callbackGetDistrictAndSubDistrict = (values)=>{\r\n        mapAction.bindClearMapCommand()\r\n        if (values) {\r\n            if (!values.errMsg) {\r\n                setKeepAdminpolyStep2({\r\n                    districtCode: SUBDISTRICT_ID,\r\n                    subdistrictCode: DISTRICT_ID\r\n                });\r\n                setKeepIsAlertInconsistent(false);\r\n                const { SUBDISTRICT_ID, DISTRICT_ID } = values;\r\n                setSubDistrictCode(SUBDISTRICT_ID);\r\n                setDistrictCode(DISTRICT_ID);\r\n                setInBKK(true)\r\n            } else {\r\n               props.showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR })\r\n            }\r\n        } else {\r\n            setKeepAdminpolyStep2({\r\n                districtCode: null,\r\n                subdistrictCode: null\r\n            });\r\n            setKeepIsAlertInconsistent(false);\r\n            setInBKK(false)\r\n            setSubDistrictCode(null);\r\n            setDistrictCode(null);\r\n            props.showAlert({ altMsg: ALERT_MESSAGE.POPUP.OUT_OF_BKK })\r\n        }\r\n    }\r\n\r\n    const managePanelForMobile = async (isDraw) => {\r\n        const { menuAction, width } = props;\r\n        if (width === 'sm' || width === 'xs') {\r\n            if (isDraw) {\r\n                await menuAction.closeMenuPanel();\r\n                await menuAction.openMenuMap();\r\n            } else {\r\n                await menuAction.openMenuPanel();\r\n                await menuAction.closeMenuMap();\r\n            }\r\n        }\r\n    }\r\n\r\n    const handleCallBackEditGraphic = (geometry,status) => {\r\n        // setIsActiveEdit(status)\r\n        setGeometry({ geometry: geometry })\r\n\r\n        mapAction.bindMapCommand(MapFunctions.getDistrictAndSubDistrictFormPoint, { // save sub-district code\r\n            geometry: geometry,\r\n            callbackFn: callbackGetDistrictAndSubDistrict\r\n        })\r\n    }\r\n    \r\n    const handleCloseForm = async ()=>{\r\n        await mapAction.bindMapCommand(MapFunctions.clearGraphicDrawDraft);\r\n        // await props.menuAction.activeFunction(null)\r\n        onClickBack && onClickBack();\r\n    }\r\n\r\n    const handleCallBackDrawPolygoninitial = (evt,graphicinFnc)=>{\r\n        setGeometry({ geometry: evt.geometry })\r\n        setGraphic(graphicinFnc)\r\n    }\r\n\r\n    const handleCallBackDrawPolygon =async (evt,graphicinFnc)=>{\r\n        managePanelForMobile(false)\r\n        // setIsActiveDraw(false)\r\n        setGraphic(graphicinFnc)\r\n        // setDrawComplet(true)\r\n\r\n        setGeometry({ geometry: evt.geometry })\r\n        await props.menuAction.activeFunction(null)\r\n        await mapAction.bindMapCommand(MapFunctions.drawDraftPolygon, {status:false })  \r\n        mapAction.bindMapCommand(MapFunctions.getDistrictAndSubDistrictFormPoint, { // save sub-district code\r\n            geometry: evt.geometry,\r\n            callbackFn: callbackGetDistrictAndSubDistrict\r\n        })\r\n    }\r\n\r\n    const handleClickBack = () => {\r\n        handleCloseForm();\r\n    }\r\n\r\n    const handleDrawPolygon =async ()=>{\r\n        // if(isActiveDraw){ // ปิดการวาด\r\n        //     setIsActiveDraw(false)\r\n        //     await mapAction.bindMapCommand(MapFunctions.drawDraftPolygon, {status:false })            \r\n        // }else{ // เปิดการวาด\r\n        //     if(isActiveEdit){\r\n        //         await mapAction.bindMapCommand(MapFunctions.editGraphicDraftPolygonLine, { status:false })      \r\n        //         setIsActiveEdit(false)\r\n        //     }          \r\n        //     setIsActiveDraw(true)\r\n        //     managePanelForMobile(true)\r\n        //     await mapAction.bindMapCommand(MapFunctions.drawDraftPolygon, { callback: handleCallBackDrawPolygon })\r\n        // }\r\n        if(props.menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM){\r\n            await props.menuAction.activeFunction(null)\r\n            await mapAction.bindMapCommand(MapFunctions.drawDraftPolygon,{ status:false })\r\n        }else{\r\n            managePanelForMobile(true)\r\n            await mapAction.bindMapCommand(MapFunctions.editGraphicDraftPolygonLine, { status:false })    \r\n            await props.menuAction.activeFunction(ACTIVE_FUNCTION.ADD_GP_FORM)\r\n            setTimeout(()=>{ // set timeout เพื่อแก้ปัญหา willunmount ของ maptool clear event draw\r\n                mapAction.bindMapCommand(MapFunctions.drawDraftPolygon, { callback: handleCallBackDrawPolygon,alertFn: props.showAlert})\r\n            },50)\r\n        }\r\n    }\r\n\r\n    const handleEditPolygon =async ()=>{\r\n        // if(isActiveEdit){ // ปิดการแก้ไข\r\n        //     setIsActiveEdit(false)\r\n        //     mapAction.bindMapCommand(MapFunctions.editGraphicDraftPolygonLine, { status:false,graphic })            \r\n        // }else{ // เปิดการแก้ไข\r\n        //     if(isActiveDraw){\r\n        //         setIsActiveDraw(false)\r\n        //         await mapAction.bindMapCommand(MapFunctions.drawDraftPolygon, {status:false })  \r\n        //     }\r\n        //     setIsActiveEdit(true)\r\n        //     managePanelForMobile(true)\r\n        //     mapAction.bindMapCommand(MapFunctions.editGraphicDraftPolygonLine, { status:true,graphic, callback: handleCallBackEditGraphic })\r\n        // }\r\n\r\n\r\n        if(!graphic){\r\n            props.showAlert({ altMsg: \"ไม่มีกราฟฟิก\" })\r\n            return\r\n        }\r\n        \r\n        if(props.menuRdc.ActiveFunction === ACTIVE_FUNCTION.EDIT_GP_FORM){\r\n            await props.menuAction.activeFunction(null)\r\n            mapAction.bindMapCommand(MapFunctions.editGraphicDraftPolygonLine, { status:false,graphic })               \r\n        }else{\r\n            managePanelForMobile(true)\r\n            await props.menuAction.activeFunction(ACTIVE_FUNCTION.EDIT_GP_FORM)\r\n            await mapAction.bindMapCommand(MapFunctions.drawDraftPolygon,{ status:false })\r\n            mapAction.bindMapCommand(MapFunctions.editGraphicDraftPolygonLine, { status:true,graphic, callback: handleCallBackEditGraphic })\r\n        }\r\n    }\r\n\r\n    const renderbuttonCustom = ()=>{\r\n        return (\r\n            <Fragment>\r\n                <Tooltip title=\"วาดอาคารใหม่\" placement=\"bottom\">\r\n                    <div onClick={handleDrawPolygon} className={classnames(classes.btnPolygone, { [classes.btnAddNormal]: true },  { [classes.btnAddSelected]: props.menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM })}></div>\r\n                </Tooltip>\r\n                <Tooltip title=\"แก้ไขการวาดอาคาร\" placement=\"bottom\">\r\n                    <div onClick={handleEditPolygon} className={classnames(classes.btnPolygone, { [classes.btnEditNormal]: true },  { [classes.btnEditSelected]: props.menuRdc.ActiveFunction === ACTIVE_FUNCTION.EDIT_GP_FORM })}></div>\r\n                </Tooltip>\r\n            </Fragment>\r\n        )\r\n    }\r\n\r\n    useEffect( () => {\r\n        managePanelForMobile(false)\r\n        setDataEdit(detail.attribute)\r\n        if(detail.attribute){\r\n            setKeepAdminpolyStep2({\r\n                districtCode: detail.attribute.DISTRICT_ID,\r\n                subdistrictCode: detail.attribute.SUBDISTRICT_ID\r\n            });\r\n        }\r\n     \r\n        mapAction.bindMapCommand(MapFunctions.addGraphicDraft, {evt:{geometry:detail.geometry},callback: handleCallBackDrawPolygoninitial,type:\"polygon\"})      \r\n    }, [])\r\n\r\n    return (\r\n        <Fragment>\r\n            <EditDraftBuildingView\r\n                title={title}\r\n                onClickBack={handleClickBack}\r\n                formStep={formStep}\r\n                buttonCustom={renderbuttonCustom()}\r\n            >\r\n                {renderForm()}\r\n            </EditDraftBuildingView >\r\n            <AlertMessageSuper {...props} />\r\n        </Fragment>\r\n    )\r\n})\r\n\r\nconst mapStateToProps = state => ({\r\n    authenRdc: state.authen,\r\n    menuRdc:state.menu\r\n})\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    mapAction: bindActionCreators(MapAction, dispatch),\r\n    menuAction: bindActionCreators(MenuAction, dispatch)\r\n})\r\n\r\nconst enhance = compose(\r\n    connect(mapStateToProps, mapDispatchToProps),\r\n    withWidth(),//จะได้ props width มา\r\n    WithAlertMessage,\r\n    WithLoading\r\n)\r\n\r\nexport default enhance(EditDraftBuilding)\r\n","import React, { Component, Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { bindActionCreators } from 'redux';\r\nimport { compose } from 'recompose';\r\nimport { isDirty } from 'redux-form';\r\n\r\nimport * as MapAction from '../../../../../../../Actions/Web/Maps/MapAction';\r\nimport * as MapFunctions from '../../../../../../../Map/MapFunctions';\r\nimport * as  MenuAction from '../../../../../../../Actions/Web/MenuAction';\r\nimport { LISTGRAPHICLAYER, ALERT_MESSAGE } from '../../../../../../../Constants/Constants';\r\nimport { fetchGet_ } from '../../../../../../../Utilities/ServiceUtils';\r\nimport WithAlertMessage from '../../../../../../../HOC/WithAlertMessage';\r\nimport AlertMessageSuper from '../../../../../../../Controls/Containers/AlertMessageSuper';\r\nimport Loading from '../../../../../../../Controls/Containers/Loading';\r\nimport WithLoading from '../../../../../../../HOC/WithLoading';\r\nimport SearchDraftBuildingView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/DraftBuilding/Search/SearchDraftBuildingView';\r\nimport FormSearchDraftBuilding from './FormSearchDraftBuilding';\r\nimport DetailDraftBuilding from '../Detail/DetailDraftBuilding';\r\nimport EditDraftBuilding from '../Edit/EditDraftBuilding';\r\nimport {convertDateTimeToDisplayDate} from '../../../../../../../Utilities/DateTimeUtil'\r\n\r\nconst PAGE = {\r\n    SEARCH_DRAFT_BLDG: \"ค้นหาและแก้ไขข้อมูล\",\r\n    DETAIL_DRAFT_BLDG: \"ข้อมูล\",\r\n    EDIT_DRAFT_BLDG: \"แก้ไขข้อมูล\",\r\n}\r\n\r\nexport class SearchDraftBuilding extends Component {\r\n    constructor() {\r\n        super();\r\n        this.state = {\r\n            page: PAGE.SEARCH_DRAFT_BLDG,\r\n            detailView: null,\r\n            detailEdit: null,\r\n\r\n            luBuildingType: [],\r\n            luActivityType: [],\r\n            luMaterailType: [],\r\n            luBuildingUseType: [],\r\n            luBuildingAds: [],\r\n            luBuildingAfter: [],\r\n        }\r\n    }\r\n\r\n    componentDidMount() {\r\n        this.callServiceLookup();\r\n    }\r\n\r\n    // ############## LOOKUP ################\r\n    callServiceLookup = () => {\r\n        const pmsLuBuildingType = fetchGet_(process.env.REACT_APP_SURVET_GET_BUILDING_TYPE) // ปรเภทอาคาร\r\n        const pmsLuActivityType = fetchGet_(process.env.REACT_APP_SURVEY_LU_ACTIVITY) // ประเภทกิจกรรม\r\n        const pmsLuMaterailType = fetchGet_(process.env.REACT_APP_CAH_GET_BLDG_MARERIAL) // ประเภทวัสดุ (เอาของ CAH มา)\r\n        const pmsLuBuildingUseType = fetchGet_(process.env.REACT_APP_SURVEY_LU_BUILDING_USE_TYPE) // ประเภทวัสดุ (เอาของ CAH มา)\r\n        const pmsLuBuildingAds = fetchGet_(process.env.REACT_APP_SURVEY_LU_BUILDING_ADS) // อาคารใหม่หรือต่อเติม\r\n        const pmsLuBuildingAfter = fetchGet_(process.env.REACT_APP_SURVEY_LU_BUILDING_AFTER) // ป้ายบนอาคาร\r\n        const pmsLuOwner = fetchGet_(process.env.REACT_APP_SURVEY_LU_BUILDING_OWNER) // ป้ายบนอาคาร\r\n\r\n        Promise.all([\r\n            pmsLuBuildingType,\r\n            pmsLuActivityType,\r\n            pmsLuMaterailType,\r\n            pmsLuBuildingUseType,\r\n            pmsLuBuildingAds,\r\n            pmsLuBuildingAfter,\r\n            pmsLuOwner\r\n        ])\r\n            .then(res => {\r\n                if (res.some(item => !item.ok)) {\r\n                    throw res;\r\n                }\r\n                return Promise.all(res.map(resItem => resItem.json()));\r\n            })\r\n            .then(values => {\r\n                this.setState({\r\n                    luBuildingType: values[0].result ? values[0].result : [],\r\n                    luActivityType: values[1].result ? values[1].result : [],\r\n                    luMaterailType: values[2].result ? values[2].result : [],\r\n                    luBuildingUseType: values[3].result ? values[3].result : [],\r\n                    luBuildingAds: values[4].result ? values[4].result : [],\r\n                    luBuildingAfter: values[5].result ? values[5].result : [],\r\n                    luOwner: values[6].result ? values[6].result : [],\r\n                })\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceLookup searchDraftBuilding', ex)\r\n            })\r\n    }\r\n\r\n    callServiceBuildingSubUseType = BuildingUseType => {\r\n        return fetchGet_(`${process.env.REACT_APP_SURVEY_LU_BUILDING_SUBUSE_TYPE}?BuildingUseType=${BuildingUseType}`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json()\r\n            })\r\n            .then(values => {\r\n                if (values && values.result) {\r\n                    return values.result\r\n                } else {\r\n                    return []\r\n                }\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceBuildingSubUseType', ex)\r\n                return []\r\n            })\r\n    }\r\n\r\n    // ############## MANAGE PAGE ##############\r\n\r\n    handleBackToMenu = async () => { //เข้าเมื่อกดปุ่ม < บน panel โดยที่หน้า search,detail,edit ใช้ panel เดียวกัน\r\n        const { page } = this.state;\r\n        const {  mapAction, onClickBack,dirtyFormAdd,showAlert,hideAlert } = this.props;\r\n\r\n        switch (page) {\r\n            case PAGE.SEARCH_DRAFT_BLDG:\r\n                onClickBack && onClickBack();\r\n                break;\r\n            case PAGE.DETAIL_DRAFT_BLDG:\r\n                mapAction.bindMapCommand(MapFunctions.clearGraphic, [LISTGRAPHICLAYER.GRAPHICLAYER_DRAFT]);\r\n                this.setState({ page: PAGE.SEARCH_DRAFT_BLDG, detailView: null })\r\n                break;\r\n            case PAGE.EDIT_DRAFT_BLDG:\r\n                // จะเอา layer แรกมา selection เท่านั้น\r\n                if(dirtyFormAdd){\r\n                    showAlert({ altMsg: ALERT_MESSAGE.QUESTION.CANCEL_FORM,altType: 2, callbackConfirm: ()=>{\r\n                        hideAlert();\r\n                        this.closeFormEdit()\r\n                    }})\r\n                }else{\r\n                    this.closeFormEdit()\r\n                }\r\n                break;\r\n            default:\r\n                onClickBack && onClickBack(); //back ไปยังหน้า menu\r\n                break;\r\n        }\r\n    }\r\n\r\n    closeFormEdit = async () =>{\r\n        const {  mapAction,menuAction, panelContentDataRdc } = this.props;\r\n        const { currentPage } = panelContentDataRdc\r\n\r\n        const layerID = currentPage.Layer && currentPage.Layer.length > 0 && currentPage.Layer[0].layerName\r\n        await mapAction.bindMapCommand(MapFunctions.clearGraphicDrawDraft);\r\n        await mapAction.bindMapCommand(MapFunctions.refreshMap, { layerID: layerID })\r\n        await menuAction.activeFunction(null)\r\n        mapAction.bindClearMapCommand()\r\n        this.setState({ page: PAGE.SEARCH_DRAFT_BLDG, detailEdit: null })\r\n    }\r\n\r\n    renderChildren = () => {\r\n        const { page, detailView, detailEdit } = this.state;\r\n        let element = null\r\n        if (page === PAGE.DETAIL_DRAFT_BLDG) {\r\n            element = <DetailDraftBuilding\r\n                detail={detailView}\r\n                onClickBack={this.handleBackToMenu}\r\n            />\r\n        } else if (page === PAGE.EDIT_DRAFT_BLDG) {\r\n            element = <EditDraftBuilding\r\n                detail={detailEdit}\r\n                onClickBack={this.handleBackToMenu}\r\n            />\r\n        }\r\n\r\n        return (\r\n            <Fragment>\r\n                <FormSearchDraftBuilding\r\n                    isDisplay={page === PAGE.SEARCH_DRAFT_BLDG}\r\n                    onDetail={this.handleDetail}\r\n                    onDelete={this.handleDelete}\r\n                    onEdit={this.handleEdit}\r\n                    onClickBack={this.handleBackToMenu}\r\n                />\r\n                {element}\r\n            </Fragment>\r\n        )\r\n    }\r\n\r\n    // ############## MANAGE RESULT ##############\r\n\r\n    mapLookUpData = async (attribute) => {\r\n        const { luBuildingType, luActivityType, luMaterailType, luBuildingUseType, luBuildingAds, luBuildingAfter, luOwner } = this.state;\r\n        let luBuildingSubUseType = []\r\n\r\n        if (attribute.BL_USE && attribute.BL_MAIN_USE) {\r\n            luBuildingSubUseType = await this.callServiceBuildingSubUseType(attribute.BL_MAIN_USE)\r\n        }\r\n\r\n        const buildingUseType = attribute.BL_MAIN_USE && luBuildingUseType.find(itm => {\r\n            return itm.value === attribute.BL_MAIN_USE.toString();\r\n        });\r\n        const buildingSubUseType = attribute.BL_USE && luBuildingSubUseType.find(itm => {\r\n            return itm.value === attribute.BL_USE.toString();\r\n        });\r\n        const buildingType = attribute.BL_TYPE && luBuildingType.find(itm => {\r\n            return itm.value === attribute.BL_TYPE.toString();\r\n        });\r\n        const activity = attribute.BL_ACT_CODE && luActivityType.find(itm => {\r\n            return itm.value === attribute.BL_ACT_CODE.toString();\r\n        });\r\n        const materail = attribute.BL_MATL && luMaterailType.find(itm => {\r\n            return itm.value === attribute.BL_MATL.toString();\r\n        });\r\n        const buildingAds = attribute.BL_AD && luBuildingAds.find(itm => {\r\n            return itm.value === attribute.BL_AD.toString();\r\n        });\r\n        const buildingAfter = attribute.BL_AFTER_CODE && luBuildingAfter.find(itm => {\r\n            return itm.value === attribute.BL_AFTER_CODE.toString();\r\n        });\r\n        const owner = attribute.BL_OWNER && luOwner.find(itm => {\r\n            return itm.value === attribute.BL_OWNER.toString();\r\n        });\r\n\r\n        return {\r\n            BL_TYPE_DISPLAY: buildingType && buildingType.name,\r\n            BL_ACT_CODE_DISPLAY: activity && activity.name,\r\n            BL_MATL_DISPLAY: materail && materail.name,\r\n            BL_USE_DISPLAY: buildingSubUseType && buildingSubUseType.name,\r\n            BL_MAIN_USE_DISPLAY: buildingUseType && buildingUseType.name,\r\n            BL_AD_DISPLAY: buildingAds && buildingAds.name,\r\n            BL_AFTER_CODE_DISPLAY: buildingAfter && buildingAfter.name,\r\n            BL_OWNER_DISPLAY: owner && owner.name\r\n        }\r\n    }\r\n\r\n    handleDetail = async values => {\r\n        // if(values.attribute.BL_DATE && values.attribute.BL_DATE !== \"\"){\r\n        //     values.attribute.BL_DATE = convertDateTimeToDisplayDate(values.attribute.BL_DATE,\"d MMM yyyy\")\r\n        // }\r\n        this.setState({\r\n            page: PAGE.DETAIL_DRAFT_BLDG,\r\n            detailView: { \r\n                ...values, \r\n                attribute: { \r\n                ...values.attribute, \r\n                BL_DATE: values.attribute.BL_DATE && convertDateTimeToDisplayDate(values.attribute.BL_DATE,\"d MMM yyyy\"),\r\n                ...await this.mapLookUpData(values.attribute) \r\n            }},\r\n        })\r\n    }\r\n\r\n    handleDelete = values => {\r\n        const { hideAlert, showAlert, showLoading } = this.props;\r\n        showAlert({\r\n            altMsg: `${ALERT_MESSAGE.QUESTION.DELETE} ${values.attribute.BL_NAME}`,\r\n            altType: 2,\r\n            callbackConfirm: () => {\r\n                hideAlert();\r\n                showLoading();\r\n                this.callServiceDeleteFeature(values.attribute.OBJECTID)\r\n            }\r\n        })\r\n    }\r\n\r\n    callServiceDeleteFeature = (objectID) => {\r\n        const { showAlert, hideLoading } = this.props;\r\n        const formData = new FormData();\r\n        formData.append(\"objectIds\", objectID);\r\n        formData.append(\"rollbackOnFailure\", true);\r\n        formData.append(\"f\", \"json\");\r\n\r\n        fetch(`${window.CONFIG_URL_GIS.DRAFT_BLDG}/deleteFeatures`, {\r\n            method: \"POST\",\r\n            body: formData\r\n        })\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(result => {\r\n                if (result && result.deleteResults && result.deleteResults[0].success) {\r\n                    showAlert({ altMsg: \"ลบข้อมูลสำเร็จ\" })\r\n                    this.props.mapAction.bindMapCommand(MapFunctions.reSearchDraft);\r\n                } else {\r\n                    showAlert({ altMsg: \"ลบข้อมูลไม่สำเร็จ กรุณาลองใหม่อีกครั้ง\" })\r\n                }\r\n            })\r\n            .catch(ex => {\r\n                showAlert({ altMsg: \"ลบข้อมูลไม่สำเร็จ กรุณาลองใหม่อีกครั้ง\" })\r\n                console.log(\"ex callServiceDeleteFeature\", ex);\r\n            })\r\n            .finally(() => {\r\n                hideLoading();\r\n            })\r\n    }\r\n\r\n    handleEdit = values => {\r\n        this.setState({\r\n            page: PAGE.EDIT_DRAFT_BLDG,\r\n            detailEdit: values\r\n        })\r\n    }\r\n\r\n    render() {\r\n        const { title, isShowLoading } = this.props;\r\n        return (\r\n            <Fragment>\r\n                <SearchDraftBuildingView\r\n                    title={title}\r\n                    onClickBack={this.handleBackToMenu}\r\n                >\r\n                    {this.renderChildren()}\r\n                </SearchDraftBuildingView>\r\n                <AlertMessageSuper {...this.props} />\r\n                <Loading isShowLoading={isShowLoading} />\r\n            </Fragment>\r\n        )\r\n    }\r\n}\r\n\r\nconst mapStateToProps = state => ({\r\n    panelContentDataRdc: state.PanelContentData,\r\n    dirtyFormAdd: isDirty('FormDraftBuilding')(state),\r\n})\r\n\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    mapAction: bindActionCreators(MapAction, dispatch),\r\n    menuAction : bindActionCreators(MenuAction,dispatch)\r\n})\r\n\r\nexport default compose(\r\n    WithAlertMessage,\r\n    WithLoading,\r\n    connect(mapStateToProps, mapDispatchToProps)\r\n)(SearchDraftBuilding)","import React, { Fragment } from 'react';\r\n// import { Scrollbars } from 'react-custom-scrollbars';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { withStyles } from '@material-ui/core/styles';\r\n// import Button from '@material-ui/core/Button';\r\n// import classnames from 'classnames';\r\nimport { Field } from \"redux-form\";\r\n\r\nimport SelectField from '../../../../../../../Controls/Containers/SelectFieldRedux';\r\nimport TextField from '../../../../../../../Controls/Containers/TextFieldRedux'\r\nimport AppBarHeaderView from '../../../../AppBarHeaderView';\r\nimport ReduxFormDatePickerThai from '../../../../../../../Controls/Containers/Picker/ReduxFormDatePickerThai'\r\nimport Button from '../../../../../../../Controls/Containers/Button';\r\nimport { Scrollbars } from 'react-custom-scrollbars'\r\nimport { BTN } from '../../../../../../../Constants/Constants'\r\nconst SurveyReportView = ({\r\n    classes,\r\n    onClickBack,\r\n    title,\r\n    onChangeDate,\r\n    onChangeAdminPoly,\r\n    maxDate,\r\n    minDate,\r\n    listSurveyName,\r\n    listDistrict,\r\n    listSubDistrict,\r\n    listSurveyLayer,\r\n    onClickSubmit,\r\n    onClickReset\r\n}) => {\r\n\r\n    return (\r\n        <Fragment>\r\n            <Grid container className={classes.root}>\r\n                <AppBarHeaderView\r\n                    title={title}\r\n                    onClickBack={onClickBack}\r\n                />\r\n                <Grid container className={classes.container} >\r\n                    <Scrollbars\r\n                        autoHide={true}\r\n                        universal={true}\r\n                    >\r\n                        <Grid container className={classes.content} >\r\n\r\n\r\n                            <Field\r\n                                label={'วันที่'}\r\n                                name={'startDate'}\r\n                                component={ReduxFormDatePickerThai}\r\n                                onChange={(evt) => onChangeDate('startDate', evt)}\r\n                                // data={yearList}\r\n                                // val={value}\r\n                                maxDate={maxDate}\r\n                                required\r\n                            />\r\n                            <Field\r\n\r\n                                name={'endDate'}\r\n                                label={'ถึงวันที่'}\r\n                                component={ReduxFormDatePickerThai}\r\n                                onChange={(evt) => onChangeDate('endDate', evt)}\r\n                                // data={yearList}\r\n                                // val={value}\r\n                                minDate={minDate}\r\n                                required\r\n                            />\r\n                            <Field\r\n                                label={'ชื่อผู้สำรวจ'}\r\n                                name={'surveyName'}\r\n                                component={SelectField}\r\n                                // onChange={onChangeAdminPoly('district')}\r\n                                // onChange={onValueChange('district')}\r\n                                data={listSurveyName}\r\n                            // required\r\n                            />\r\n                            <Field\r\n                                label={'เขต'}\r\n                                name={'district'}\r\n                                component={SelectField}\r\n                                onChange={(evt) => onChangeAdminPoly('district', evt)}\r\n                                // onChange={onValueChange('district')}\r\n                                data={listDistrict}\r\n                            // required\r\n                            />\r\n                            <Field\r\n                                label={'แขวง'}\r\n                                name={'subDistrict'}\r\n                                component={SelectField}\r\n                                // onChange={onChangeAdminPoly('district')}\r\n                                // onChange={onValueChange('district')}\r\n                                data={listSubDistrict}\r\n                            // required\r\n                            />\r\n                            <Field\r\n                                label={'ระวาง'}\r\n                                name={'rawang'}\r\n                                component={TextField}\r\n                            // onChange={onChangeAdminPoly('district')}\r\n                            // onChange={onValueChange('district')}\r\n                            // data={listSubDistrict}\r\n                            // required\r\n                            />\r\n                            <Field\r\n                                label={'ชั้นข้อมูล'}\r\n                                name={'surveyLayer'}\r\n                                component={SelectField}\r\n                                // onChange={onChangeAdminPoly('district')}\r\n                                // onChange={onValueChange('district')}\r\n                                data={listSurveyLayer}\r\n                                required\r\n                            />\r\n\r\n                            {/* //// Button //// */}\r\n                            <Grid container justify=\"center\" spacing={24} className={classes.divFooter} >\r\n                                <Grid item>\r\n                                    <Button\r\n                                        label={BTN.TH.CANCEL}\r\n                                        onClick={onClickBack}\r\n                                    />\r\n                                </Grid>\r\n                                <Grid item>\r\n                                    <Button\r\n                                        label={BTN.TH.SEARCH}\r\n                                        onClick={onClickSubmit}\r\n                                    />\r\n                                </Grid>\r\n                            </Grid>\r\n                            {/* ////////////// */}\r\n                        </Grid>\r\n                    </Scrollbars>\r\n                </Grid>\r\n            </Grid>\r\n        </Fragment>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        position: 'absolute',\r\n        top: 0,\r\n        bottom: 0,\r\n        right: 0,\r\n        left: 0\r\n    },\r\n    label: {\r\n        maginLeft: '10px'\r\n    },\r\n    container: {\r\n        magin: '10px',\r\n        height: 'calc(100% - 45px)'\r\n    },\r\n    content: {\r\n        width: \"100%\",\r\n        padding: \"10px\"\r\n    },\r\n    divFooter: {\r\n        marginTop: \"10px\",\r\n        marginBottom: \"10px\"\r\n    },\r\n}))(SurveyReportView)","import Excel from \"exceljs/dist/es5/exceljs.browser\";\r\n\r\nexport default({datasource=[], formatDate, layer}) => {\r\n    const startRowHeader = 1; //ใช้กำหนดแถวที่เป็นหัวเรื่อง\r\n    // const startRowHeaderTable = 5;//ใช้กำหนดแถวที่จะเป็นหัวตาราง\r\n    const workbook = new Excel.Workbook();//สร้าง instance\r\n    const worksheet = workbook.addWorksheet('sheet', {//จำเป็นต้องตั้งค่าส่วนนี้\r\n        pageSetup:{\r\n            paperSize: 9, //follow documentation the 9 value is A4\r\n            orientation:'portrait'//แนวตั้ง\r\n        }\r\n    });\r\n    workbook.creator = 'PMR-WEB';//ผู้สร้าง\r\n    workbook.lastModifiedBy = 'PMR-WEB';//ผู้แก้ไขล่าสุด\r\n\r\n    const headerTable = [\r\n        { key: 'no', name: 'ลำดับที่', width: 10},\r\n        { key: 'name', name: 'ชื่อข้อมูล', width: 30},\r\n        { key: 'surveyType', name: 'ประเภท', width: 30},\r\n        { key: 'surveyorName', name: 'ชื่อผู้สำรวจ', width: 30},\r\n        { key: 'surveyDate', name: 'วันที่สำรวจ', width: 30},\r\n        { key: 'districtName', name: 'เขต', width: 30},\r\n        { key: 'subdistrictName', name: 'แขวง', width: 30},\r\n        { key: 'mapsheer1k', name: 'ระวาง', width: 30}\r\n    ]\r\n    \r\n    const downloadProcess = () => {\r\n        workbook.xlsx.writeBuffer().then(function (xls64data) {\r\n            const blob = new Blob([xls64data],\r\n              { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });\r\n            const url = window.URL.createObjectURL(blob);\r\n            const anchor = document.createElement('a');\r\n            document.body.appendChild(anchor); //for firefox ref: https://stackoverflow.com/questions/41805095/excel-export-not-working-on-firefox-but-working-fine-in-google-crome/41806544\r\n            anchor.href = url;\r\n            anchor.download = 'รายงานการสำรวจ.xlsx';\r\n            var isIE = /*@cc_on!@*/false || !!document.documentMode;\r\n            var isEdge = !isIE && !!window.StyleMedia;\r\n            if(isEdge){\r\n                anchor.click();\r\n                anchor.change();\r\n            } else {\r\n                anchor.click();\r\n            }\r\n            window.URL.revokeObjectURL(url);//เมื่อใช้ URL.createObjectURL แล้วต้องเรียกคำสั่งนี้เพื่อให้ Browser รู้ว่าจะไม่เก็บ Reference file อีกต่อไป\r\n        });\r\n    }\r\n\r\n    const setCellBorder = (row, colKey) => {\r\n        row.getCell(colKey).border = {\r\n            top: {style:'thin'},\r\n            left: {style:'thin'},\r\n            bottom: {style:'thin'},\r\n            right: {style:'thin'}\r\n        };\r\n    }\r\n\r\n    const generateHeader = () => {\r\n        const columns = headerTable.length;\r\n\r\n        worksheet.mergeCells(startRowHeader, 1, startRowHeader, columns);\r\n        const row = worksheet.getRow(startRowHeader);\r\n        row.getCell(columns).value = `วันที่ ${formatDate}`;\r\n        row.getCell(columns).alignment = { vertical: 'middle', horizontal: 'right' };\r\n\r\n        const lastRow = worksheet.lastRow._number + 1;\r\n        worksheet.mergeCells(lastRow, 1, lastRow, columns);\r\n        const topicRow = worksheet.getRow(lastRow);\r\n        topicRow.getCell(columns).value = `รายงานการสำรวจข้อมูล ชั้นข้อมูล ${layer}`;\r\n        topicRow.getCell(columns).alignment = { vertical: 'middle', horizontal: 'center' }\r\n    }\r\n\r\n    const generateColumns = () => {\r\n        worksheet.columns = headerTable.map((item) => {\r\n            return {\r\n                key: item.key,\r\n                width: item.width\r\n            }\r\n        })\r\n    }\r\n\r\n    const generateTableHeader = () => {\r\n        generateColumns();\r\n        const startRowTableHeader = worksheet.lastRow._number + 1;\r\n\r\n        const row = worksheet.getRow(startRowTableHeader);\r\n        headerTable.map(item => {\r\n            row.getCell(item.key).value = item.name\r\n            row.getCell(item.key).alignment = { vertical: 'middle', horizontal: 'center' };\r\n            row.getCell(item.key).fill = {\r\n                type: 'pattern',\r\n                pattern: 'solid',\r\n                fgColor: {\r\n                    argb:'005E9A50'\r\n                }\r\n            }\r\n            setCellBorder(row, item.key)\r\n        })\r\n    }\r\n\r\n    const generateTableContent = () => {\r\n        datasource.forEach((item,index) => {\r\n            item.no = index+1;\r\n            worksheet.addRow(item)\r\n            \r\n             //set style\r\n            const lastRowNumber = worksheet.lastRow._number;\r\n            const row = worksheet.getRow(lastRowNumber);\r\n            worksheet.lastRow._cells.forEach(cell => {\r\n                setCellBorder(row, cell.col);\r\n                row.getCell(cell.col).alignment = { wrapText: true, vertical: 'top' };\r\n                if(item.no%2 !== 0){\r\n                    row.getCell(cell.col).fill = {\r\n                        type: 'pattern',\r\n                        pattern: 'solid',\r\n                        fgColor: {\r\n                            argb: '0098DAA8'\r\n                        }\r\n                    }\r\n                }\r\n            })\r\n        })\r\n    }\r\n\r\n    const generateTable = () => {\r\n        generateTableHeader();\r\n        generateTableContent();\r\n    }\r\n\r\n    const generateContentProcess = () => {\r\n        generateHeader();\r\n        generateTable();\r\n    }\r\n\r\n    const mainProcess = () => {\r\n        generateContentProcess();\r\n        downloadProcess();\r\n    }\r\n\r\n    mainProcess();\r\n}\r\n\r\n","import React, {useState, useEffect, Fragment} from 'react'\r\nimport { connect } from 'react-redux'\r\nimport { reduxForm, getFormValues } from \"redux-form\";\r\nimport { compose } from \"recompose\";\r\nimport moment from 'moment'\r\n\r\n//import service - utils\r\nimport { fetchGet_, fetchPost_ } from '../../../../../../../Utilities/ServiceUtils'\r\nimport { convertDatetimeToCallService } from '../../../../../../../Utilities/DateTimeUtil'\r\n\r\n//import component\r\nimport SurveyReportView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/Report/SurveyReport/SurveyReportView'\r\nimport SurveyReportExcel from './SurveyReportExcel'\r\nimport WithLoading from '../../../../../../../HOC/WithLoading'\r\nimport Loading from '../../../../../../../Controls/Containers/Loading'\r\nimport WithAlertMessage from '../../../../../../../HOC/WithAlertMessage';\r\nimport AlertMessageSuper from '../../../../../../../Controls/Containers/AlertMessageSuper';\r\n\r\n//import validate\r\nimport { surveyReportValidate } from '../../../../../../../Utilities/Validate'\r\nimport { convertDateTimeToDisplayDate } from '../../../../../../../Utilities/DateTimeUtil';\r\n\r\n//variable\r\nconst PROVINCE_CODE = '10';\r\n\r\n//initial form\r\nconst dateInitial = new Date();\r\nconst initialValues = {\r\n    startDate: dateInitial,\r\n    endDate: dateInitial,\r\n}\r\n\r\nconst SurveyReport = (props) => {\r\n\r\n    const {\r\n        change,\r\n        onClickBack,\r\n        title,\r\n        handleSubmit,\r\n        reset,\r\n        showAlert,\r\n        isShowLoading\r\n    } = props;\r\n\r\n    moment.locale('th');\r\n    const dateReport = new Date();\r\n    const formatDate = `${moment(dateReport).format('D MMMM')} ${parseInt(moment().format('YYYY')) + 543}`\r\n\r\n    const [district, setDistrict] = useState([]);\r\n    const [subDistrict, setSubDistrict] = useState([]);\r\n    const [listSurveyName, setListSurveyName] = useState([]);\r\n    const [listSurveyLayer, setListSurveyLayer] = useState([]);\r\n\r\n    const [minDate, setMinDate] = useState();\r\n    const [maxDate, setMaxDate] = useState();\r\n\r\n    useEffect(() => {\r\n        initailValuesFormReport();\r\n    }, [])\r\n\r\n    const initailValuesFormReport = () => {\r\n        callServiceDistrict();\r\n        callServiceSurveyLayer();\r\n        callServiceSurveyName();\r\n    }\r\n\r\n    //----------------- change format date time @startDate for request -------------------------//\r\n    const timeStartDate = (date) => {\r\n        const newDate = new Date(date);\r\n        newDate.setHours('00');\r\n        newDate.setMinutes('00');\r\n        newDate.setSeconds('00');\r\n\r\n        return newDate\r\n    }\r\n\r\n    //----------------- change format date time @endDate for request ---------------------------//\r\n    const timeEndDate = (date) => {\r\n        const newDate = new Date(date);\r\n        newDate.setHours('23');\r\n        newDate.setMinutes('59');\r\n        newDate.setSeconds('59');\r\n\r\n        return newDate\r\n    }\r\n\r\n    //------------- change format (date without time) for disply in excel ---------------//\r\n    const manageDateTimeResult = (data) => {\r\n        const newFormatDateTime = data.map(item => {\r\n            const date = convertDateTimeToDisplayDate(item.surveyDate);\r\n            item.surveyDate = date.slice(0, date.length - 9)\r\n\r\n            return item\r\n        })\r\n\r\n        return newFormatDateTime\r\n    }\r\n\r\n    //---------------------- set mindate and maxdate for startDate - endDate --------------------//\r\n    const handleChangeDate = (type, evt) => {\r\n        if (type === 'startDate') {\r\n            setMinDate(evt)\r\n        } else {\r\n            setMaxDate(evt)\r\n        }\r\n    }\r\n\r\n    //--------------------------- call service subdistrict when district change -------------------//\r\n    const handleChangeAdminPoly = (type, evt) => {\r\n        const districtCode = evt.target.value;\r\n\r\n        switch(type) {\r\n            case \"district\":\r\n                setSubDistrict([]);\r\n                change('subDistrict', 0);\r\n                callServiceSubDistrict(districtCode)\r\n                break;\r\n            default:\r\n                break;\r\n        }\r\n    }\r\n\r\n    //-------------------------- call service lookup (survey name) ------------------------------------// \r\n    const callServiceSurveyName = async () => {\r\n        try {\r\n            const response = await fetchGet_(`${process.env.REACT_APP_SURVEY_GET_SURVEYOR_NAME}`);\r\n            const objResult = await response.json();\r\n\r\n            const resultSurveyName = [];\r\n            await objResult.result.map(item => {\r\n                resultSurveyName.push( {id: item.value, name: item.name} )\r\n\r\n                return true\r\n            })\r\n\r\n            await setListSurveyName(resultSurveyName);\r\n        } catch(err) {\r\n            setListSurveyName([])\r\n            console.log('err call service lookup/surveyorName', err)\r\n        }\r\n    }\r\n\r\n    //------------------------------------ call service lookup (survey name)-----------------------------//\r\n    const callServiceSurveyLayer = async () => {\r\n        try {\r\n            const response = await fetchGet_(`${process.env.REACT_APP_SURVEY_LU_LAYER_REPORT}`);\r\n            const objResult = await response.json();\r\n\r\n            const resultSurveyLayer = [];\r\n            await objResult.result.map(item => {\r\n                resultSurveyLayer.push({ id: item.value, name: item.name });\r\n\r\n                return true\r\n            })\r\n\r\n            await setListSurveyLayer(resultSurveyLayer);\r\n        } catch(err) {\r\n            setListSurveyLayer([]);\r\n            console.log('err call service lookup/layer', err)\r\n        }\r\n    }\r\n\r\n    //------------------------------ call service adminpoly district && subdiatrict -------------------------//\r\n    const callServiceDistrict = async () => {\r\n        try {\r\n            const response = await fetchGet_(`${process.env.REACT_APP_LU_DISTRICT}?provinceid=${PROVINCE_CODE}`);\r\n            const objResult = await response.json();\r\n\r\n            const resultDistrict = [];\r\n            await objResult.result.map(item => {\r\n                resultDistrict.push({ id: item.value, name: item.name });\r\n\r\n                return true\r\n            })\r\n\r\n            await setDistrict(resultDistrict);\r\n\r\n        } catch (err) {\r\n            setDistrict([]);\r\n        }\r\n    }\r\n\r\n    const callServiceSubDistrict = async (districtCode) => {\r\n        try {\r\n            const response = await fetchGet_(`${process.env.REACT_APP_LU_SUBDISTRICT}?provinceid=${PROVINCE_CODE}&districtid=${districtCode}`)\r\n            const objResult = await response.json();\r\n\r\n            const resultSubDistrict = [];\r\n            await objResult.result.map(item => {\r\n                resultSubDistrict.push({ id: item.value, name: item.name });\r\n\r\n                return true\r\n            })\r\n\r\n            await setSubDistrict(resultSubDistrict);\r\n\r\n        } catch (err) {\r\n            setSubDistrict([])\r\n        }\r\n    }\r\n\r\n    //------------------------------- call service request data for export survey report (excel)--------------//\r\n    const callServiceRequestReport = async (param) => {\r\n        try {\r\n            const response = await fetchPost_(`${process.env.REACT_APP_SURVEY_REPORT}`, param)\r\n            const objResult = await response.json();\r\n\r\n            return objResult\r\n        } catch(err) {\r\n            console.log('err call service report/DraftReport', err)\r\n        }\r\n    }\r\n\r\n    //-------------------- when click submit in form ------------------------------//\r\n    const handleClickSubmitReport = async (values) => {\r\n        const param = {\r\n            layerSurvey: values.surveyLayer,\r\n            mapsheet1k: values.rawang ? values.rawang: null,\r\n            subdistrictID: values.subDistrict ? `${values.subDistrict}`: null,\r\n            districtID: values.district ? `${values.district}`: null,\r\n            surveyorID: values.surveyName ? values.surveyName: null,\r\n            startTimeStamp: convertDatetimeToCallService(timeStartDate(values.startDate)),\r\n            endTimeStamp: convertDatetimeToCallService(timeEndDate(values.endDate))\r\n        }\r\n\r\n        const filterFindLayerName = listSurveyLayer.filter(item => {\r\n            return item.id === values.surveyLayer\r\n        })\r\n        \r\n        const layer = filterFindLayerName[0].name;\r\n\r\n        const result = await callServiceRequestReport(param);\r\n        if(result) {\r\n            const datasource = await manageDateTimeResult(result)\r\n            await SurveyReportExcel({datasource, formatDate, layer});\r\n        } else {\r\n            showAlert({ altMsg: `ไม่พบข้อมูล ชั้นข้อมูล ${layer} ระหว่างวันที่ท่านเลือก`})\r\n        }\r\n    }\r\n\r\n    //--------------------- when click reset in form --------------------// \r\n    const handleClickResetReport = () => {\r\n        reset();\r\n\r\n        initailValuesFormReport();\r\n    }\r\n\r\n    //--------------------- when click back --------------------------//\r\n    const handleClickBack = () => {\r\n        onClickBack();\r\n    }\r\n\r\n    return (\r\n        <Fragment>\r\n            <SurveyReportView \r\n                onClickBack = { handleClickBack }\r\n                title = { title }\r\n                onChangeDate = { handleChangeDate }\r\n                onChangeAdminPoly = { handleChangeAdminPoly }\r\n                minDate = { minDate }\r\n                maxDate = { maxDate }\r\n                listSurveyName = { listSurveyName }\r\n                listDistrict = { district }\r\n                listSubDistrict = { subDistrict }\r\n                listSurveyLayer = { listSurveyLayer }\r\n                onClickSubmit = { handleSubmit(handleClickSubmitReport) }\r\n                onClickReset = { handleClickResetReport }\r\n            />\r\n            <AlertMessageSuper {...props} />\r\n            <Loading isShowLoading={isShowLoading} />\r\n        </Fragment>\r\n    )\r\n}\r\n\r\nconst mapStateToProps = state => ({\r\n    _values: getFormValues('SurveyReport')(state)\r\n})\r\n\r\nconst reduxFormParameter = {\r\n    form: 'SurveyReport',\r\n    validate: surveyReportValidate,\r\n    initialValues: initialValues\r\n};\r\n\r\nexport default compose(\r\n    connect(mapStateToProps, null),\r\n    reduxForm(reduxFormParameter),\r\n    WithAlertMessage,\r\n    WithLoading\r\n)(SurveyReport);","import React, { Fragment } from 'react';\r\n// import { Scrollbars } from 'react-custom-scrollbars';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport { Field } from 'redux-form';\r\nimport classnames from 'classnames';\r\n\r\n//import component\r\nimport TextField from '../../../../../../../Controls/Containers/TextFieldRedux'\r\nimport SelectField from '../../../../../../../Controls/Containers/SelectFieldRedux';\r\nimport Button from '../../../../../../../Controls/Containers/Button';\r\nimport ReduxFormDatePickerThai from '../../../../../../../Controls/Containers/Picker/ReduxFormDatePickerThai';\r\nimport { BTN } from '../../../../../../../Constants/Constants';\r\n\r\n//import tooltip\r\nimport Tooltip from '../../../../../../../Controls/Containers/Tooltip'\r\n\r\nconst StepInputLandMark = ({\r\n    classes,\r\n    onClickSubmit,\r\n    listDistrict,\r\n    listSubDistrict,\r\n    onChangeAdminPoly,\r\n    listTypeOfLandMark,\r\n    numberOfLandMark,\r\n    isActiveDraw,\r\n    isActiveEdit,\r\n    onDraw,\r\n    onEdit,\r\n    onClickBack,\r\n    onSurveyDateChange\r\n}) => {\r\n\r\n    return (\r\n        <Fragment>\r\n            <Grid container style={{ width: '100%', padding: '10px' }}>\r\n                <Grid container justify=\"flex-end\" className={classes.rootBtnDraft} >\r\n                    <Tooltip title=\"กำหนดตำแหน่งใหม่\" placement=\"bottom\">\r\n                        <div onClick={onDraw} className={classnames(classes.btnManageGraphic, { [classes.btnAddNormal]: !isActiveDraw }, { [classes.btnAddSelected]: isActiveDraw })}></div>\r\n                    </Tooltip>\r\n                    <Tooltip title=\"แก้ไขตำแหน่ง\" placement=\"bottom\">\r\n                        <div onClick={onEdit} className={classnames(classes.btnManageGraphic, { [classes.btnEditNormal]: !isActiveEdit }, { [classes.btnEditSelected]: isActiveEdit })}></div>\r\n                    </Tooltip>\r\n                </Grid>\r\n                {numberOfLandMark&&<Field\r\n                    name=\"numberOfLandMark\"\r\n                    label=\"รหัสสถานที่สำคัญ\"\r\n                    component={TextField}\r\n                    disabled\r\n                />}\r\n                <Field\r\n                    name=\"typeOfLandMark\"\r\n                    label=\"ประเภทสถานที่สำคัญ\"\r\n                    component={SelectField}\r\n                    data={listTypeOfLandMark}\r\n                    required\r\n                />\r\n                <Field\r\n                    name=\"nameOfLandMark\"\r\n                    label=\"ชื่อสถานที่สำคัญ\"\r\n                    component={TextField}\r\n                    maxLength={100}\r\n                    required\r\n                />\r\n                <Field\r\n                    name=\"district\"\r\n                    label=\"เขต\"\r\n                    component={SelectField}\r\n                    onChangeValue={onChangeAdminPoly}\r\n                    data={listDistrict}\r\n                    required\r\n                />\r\n                <Field\r\n                    name=\"subDistrict\"\r\n                    label=\"แขวง\"\r\n                    component={SelectField}\r\n                    data={listSubDistrict}\r\n                    required\r\n                />\r\n                 <Field\r\n                    name={'surveyDate'}\r\n                    label=\"วันที่สำรวจ\"\r\n                    component={ReduxFormDatePickerThai}\r\n                    onChange={onSurveyDateChange}\r\n                    maxDate={new Date()}\r\n                />\r\n                <Field\r\n                    name=\"surveyYear\"\r\n                    label=\"ปีที่สำรวจ\"\r\n                    component={TextField}\r\n                    maxLength={10}\r\n                />\r\n               \r\n                <Grid container justify=\"center\" spacing={24} className={classes.divFooter}>\r\n                    <Grid item>\r\n                        <Button\r\n                            label={BTN.TH.CANCEL}\r\n                            onClick={onClickBack}\r\n                        />\r\n                    </Grid>\r\n                    <Grid item>\r\n                        <Button\r\n                            type=\"submit\"\r\n                            label={BTN.TH.SAVE}\r\n                            onClick={onClickSubmit}\r\n                        />\r\n                    </Grid>\r\n\r\n                </Grid>\r\n            </Grid>\r\n        </Fragment>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    labelText: {\r\n        display: 'flex',\r\n        alignItems: 'center',\r\n        fontSize: '14px'\r\n    },\r\n    containnerRow: {\r\n        height: '50px',\r\n        width: '100%',\r\n        marginBottom: '15px'\r\n    },\r\n    asterisk: {\r\n        color: \"red\"\r\n    },\r\n    divFooter: {\r\n        marginTop: '10px',\r\n        marginBottom: '10px'\r\n    },\r\n    textLabel: {\r\n        marginTop: '10px'\r\n    },\r\n    rootBtnDraft: {\r\n        height: \"50px\",\r\n        width: \"100%\",\r\n        marginTop: \"15px\",\r\n        marginBottom: '20px'\r\n    },\r\n    btnManageGraphic: {\r\n        width: \"40px\",\r\n        minHeight: \"40px\",\r\n        margin: \"5px\",\r\n        display: \"block\",\r\n        padding: 0,\r\n        backgroundSize: \"40px 40px\",\r\n        backgroundRepeat: \"no-repeat\",\r\n        backgroundPosition: \"center\"\r\n    },\r\n    btnAddNormal: {\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_add_normal@2x.png)`,\r\n        \"&:Hover\": {\r\n            backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_add_selected@2x.png)`\r\n        },\r\n        cursor: 'pointer'\r\n    },\r\n    btnAddSelected: {\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_add_selected@2x.png)`,\r\n        cursor: 'pointer'\r\n    },\r\n    btnEditNormal: {\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_edit_normal@2x.png)`,\r\n        \"&:Hover\": {\r\n            backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_edit_selected@2x.png)`\r\n        },\r\n        cursor: 'pointer'\r\n    },\r\n    btnEditSelected: {\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_edit_selected@2x.png)`,\r\n        cursor: 'pointer'\r\n    },\r\n}))(StepInputLandMark)","import React, { Fragment } from 'react';\r\n// import { Scrollbars } from 'react-custom-scrollbars';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { withStyles } from '@material-ui/core/styles';\r\n// import Button from '@material-ui/core/Button';\r\n// import classnames from 'classnames';\r\n// import { Field } from \"redux-form\";\r\n\r\n// import SelectField from '../../../../../../../Controls/Containers/SelectFieldRedux';\r\n// import TextField from '../../../../../../../Controls/Containers/TextFieldRedux'\r\nimport AppBarHeaderView from '../../../../AppBarHeaderView';\r\n// import ReduxFormDatePickerThai from '../../../../../../../Controls/Containers/Picker/ReduxFormDatePickerThai'\r\nimport { Scrollbars } from 'react-custom-scrollbars'\r\n\r\n//import component view\r\n// import StepDrawLandMark from '../StepLandMark/StepDrawLandMark'\r\nimport StepInputLandMark from '../StepLandMark/StepInputLandMark'\r\n\r\nconst LandMarkView = ({\r\n    classes,\r\n    onClickBack,\r\n    title,\r\n    onClickSubmit,\r\n    listDistrict,\r\n    listSubDistrict,\r\n    onChangeAdminPoly,\r\n    listTypeOfLandMark,\r\n    initialValues,\r\n    onClickReset,\r\n    numberOfLandMark,\r\n    isActiveDraw,\r\n    isActiveEdit,\r\n    onDraw,\r\n    onEdit,\r\n    onSurveyDateChange\r\n}) => {\r\n\r\n    return (\r\n        <Fragment>\r\n            <Grid container className={classes.root}>\r\n                <AppBarHeaderView \r\n                    title={title}\r\n                    onClickBack = {onClickBack} \r\n                />\r\n                <Grid container className={classes.content}>\r\n                    <Scrollbars \r\n                        autoHide={false}\r\n                        universal={true}\r\n                    >\r\n                        <StepInputLandMark  \r\n                            onClickSubmit = { onClickSubmit }\r\n                            onClickBack={onClickBack}\r\n                            listDistrict = { listDistrict }\r\n                            listSubDistrict = { listSubDistrict }\r\n                            onChangeAdminPoly = { onChangeAdminPoly }\r\n                            listTypeOfLandMark = { listTypeOfLandMark }\r\n                            initialValues = { initialValues }\r\n                            onClickReset = { onClickReset }\r\n                            numberOfLandMark = { numberOfLandMark }\r\n                            isActiveDraw={isActiveDraw}\r\n                            isActiveEdit={isActiveEdit}\r\n                            onDraw={onDraw}\r\n                            onEdit={onEdit}\r\n                            onSurveyDateChange={onSurveyDateChange}\r\n                        />\r\n                </Scrollbars>\r\n                </Grid>\r\n            </Grid>\r\n        </Fragment>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        position: 'absolute',\r\n        top: 0,\r\n        bottom: 0,\r\n        right: 0,\r\n        left: 0\r\n    },\r\n    content: {\r\n        position: 'relative',\r\n        height: 'calc(100% - 45px)'\r\n    },\r\n}))(LandMarkView)","import React, { Fragment, useState, useEffect } from 'react'\r\nimport { connect } from 'react-redux'\r\nimport { reduxForm, getFormValues, isDirty } from \"redux-form\";\r\nimport { compose } from \"recompose\";\r\nimport { bindActionCreators } from 'redux';\r\nimport withWidth from '@material-ui/core/withWidth';\r\n\r\n//import action\r\nimport * as MapFunctions from '../../../../../../../Map/MapFunctions';\r\nimport * as MapAction from '../../../../../../../Actions/Web/Maps/MapAction';\r\nimport * as MenuAction from '../../../../../../../Actions/Web/MenuAction'\r\n\r\n//import component\r\nimport LandMarkView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/LandMark/Add/LandMarkView'\r\nimport WithAlertMessage from '../../../../../../../HOC/WithAlertMessage';\r\nimport AlertMessageSuper from '../../../../../../../Controls/Containers/AlertMessageSuper';\r\nimport WithLoading from '../../../../../../../HOC/WithLoading';\r\nimport Loading from '../../../../../../../Controls/Containers/Loading'\r\n\r\n//import validate\r\nimport { landMarkValidate } from '../../../../../../../Utilities/Validate'\r\n\r\n//import service and utils\r\nimport { fetchGet_ } from '../../../../../../../Utilities/ServiceUtils'\r\n\r\n//import constants\r\nimport { ALERT_MESSAGE, TABLE_MAPSHEET1K, ACTIVE_FUNCTION } from '../../../../../../../Constants/Constants'\r\n\r\n//import const for this component\r\nconst PROVINCE_CODE = '10'\r\n\r\n//initial form\r\nconst initialValues = {\r\n    surveyDate: new Date(),\r\n    surveyYear: `${new Date().getFullYear() + 543}`\r\n}\r\n\r\nconst LandMark = (props) => {\r\n\r\n    const {\r\n        change,\r\n        handleSubmit,\r\n        onClickBack,\r\n        title,\r\n        mapAction,\r\n        showAlert,\r\n        hideAlert,\r\n        _values,\r\n        authenRdc,\r\n        isShowLoading,\r\n        showLoading,\r\n        hideLoading,\r\n        reset,\r\n        width,\r\n        menuAction,\r\n        menuRdc,\r\n        dirty\r\n    } = props\r\n\r\n    const [geometry, setGeometry] = useState();\r\n    const [isPointOnMapBKK, setIsPointOnMapBKK] = useState(false);\r\n    const [district, setDistrict] = useState([]);\r\n    const [subDistrict, setSubDistrict] = useState([]);\r\n    const [typeOfLandMark, setTypeOfLandMark] = useState([])\r\n    const [districtAndSubDistrictCode, setDistrictAndSubDistrictCode] = useState();\r\n    // const [isActiveDraw, setIsActiveDraw] = useState(false);\r\n    // const [isActiveEdit, setIsActiveEdit] = useState(false);\r\n    const [graphic, setGraphic] = useState(null)\r\n\r\n\r\n    useEffect(() => {\r\n        showLoading();\r\n        initailForm();\r\n    }, [])\r\n\r\n    const initailForm = async () => {\r\n        await callServiceDistrict();\r\n        await callServiceTypeOfLandMark();\r\n        await hideLoading();\r\n    }\r\n\r\n    const managePanelForMobile = async (isDraw) => {\r\n        if (width === 'sm' || width === 'xs') {\r\n            if (isDraw) {\r\n                await menuAction.closeMenuPanel();\r\n                await menuAction.openMenuMap();\r\n            } else {\r\n                await menuAction.openMenuPanel();\r\n                await menuAction.closeMenuMap();\r\n            }\r\n        }\r\n    }\r\n\r\n    //-------------------------- call service adminpoly - district and subdistrict -------------------------------//\r\n    const callServiceDistrict = async () => {\r\n        try {\r\n            const response = await fetchGet_(`${process.env.REACT_APP_LU_DISTRICT}?provinceid=${PROVINCE_CODE}`);\r\n            const objResult = await response.json();\r\n\r\n            const resultDistrict = [];\r\n            await objResult.result.map(item => {\r\n                resultDistrict.push({ id: item.value, name: item.name });\r\n\r\n                return true\r\n            })\r\n\r\n            await setDistrict(resultDistrict);\r\n        } catch (err) {\r\n            console.log('err call service district', err)\r\n            setDistrict([]);\r\n        }\r\n    }\r\n\r\n    const callServiceSubDistrict = async (districtCode) => {\r\n        showLoading();\r\n        try {\r\n            const response = await fetchGet_(`${process.env.REACT_APP_LU_SUBDISTRICT}?provinceid=${PROVINCE_CODE}&districtid=${districtCode}`)\r\n            const objResult = await response.json();\r\n\r\n            const resultSubDistrict = [];\r\n            await objResult.result.map(item => {\r\n                resultSubDistrict.push({ id: item.value, name: item.name });\r\n\r\n                return true\r\n            })\r\n\r\n            await setSubDistrict(resultSubDistrict);\r\n            await hideLoading()\r\n        } catch (err) {\r\n            console.log('err call service subdistrict', err)\r\n            setSubDistrict([])\r\n            hideLoading();\r\n        }\r\n    }\r\n\r\n    //---------------------- call service lookup landmark --------------------------------//\r\n    const callServiceTypeOfLandMark = async () => {\r\n        try {\r\n            const response = await fetchGet_(`${process.env.REACT_APP_SURVEY_LU_TYPE_LANDMARK}`);\r\n            const objResult = await response.json();\r\n\r\n            const resultTypeOfLandMark = [];\r\n            await objResult.result.map(item => {\r\n                resultTypeOfLandMark.push({ id: item.value, name: item.name });\r\n\r\n                return true\r\n            })\r\n\r\n            await setTypeOfLandMark(resultTypeOfLandMark)\r\n        } catch (err) {\r\n            console.log('err call service lookup/landmarkType', err)\r\n            setTypeOfLandMark([])\r\n        }\r\n    }\r\n\r\n    //----------------------------------- draw graphic first time ----------------//\r\n    const handleDrawOnMap = async () => {\r\n        // if (isActiveDraw) { // ปิดการวาด\r\n        //     setIsActiveDraw(false)\r\n        //     mapAction.bindMapCommand(MapFunctions.deActivateDraftPnt)\r\n        // } else { // เปิดการวาด\r\n        //     if (isActiveEdit) {\r\n        //         setIsActiveEdit(false)\r\n        //         await mapAction.bindMapCommand(MapFunctions.clearEditDraftPnt)\r\n        //     }\r\n        //     managePanelForMobile(true)\r\n        //     setIsActiveDraw(true)\r\n        //     mapAction.bindMapCommand(MapFunctions.drawDraftPnt, { callback: handleCallBackDrawLandMark })\r\n        // }\r\n\r\n        if(menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM){\r\n            menuAction.activeFunction(null)\r\n            mapAction.bindMapCommand(MapFunctions.deActivateDraftPnt)\r\n        }else{\r\n            managePanelForMobile(true)\r\n            menuAction.activeFunction(ACTIVE_FUNCTION.ADD_GP_FORM)\r\n            menuRdc.ActiveFunction === ACTIVE_FUNCTION.EDIT_GP_FORM && await mapAction.bindMapCommand(MapFunctions.clearEditDraftPnt)\r\n            setTimeout(()=>{ // set timeout เพื่อแก้ปัญหา willunmount ของ maptool clear event draw\r\n                mapAction.bindMapCommand(MapFunctions.drawDraftPnt, { callback: handleCallBackDrawLandMark })\r\n            },50)\r\n        }\r\n    }\r\n\r\n    const handleEditGraphic = async () => {\r\n        if (graphic) {\r\n            // if (isActiveEdit) { // ปิดการแก้ไข\r\n            //     mapAction.bindMapCommand(MapFunctions.clearEditDraftPnt)\r\n            //     setIsActiveEdit(false)\r\n            // } else { // เปิดการแก้ไข\r\n            //     if (isActiveDraw) {\r\n            //         setIsActiveDraw(false)\r\n            //         await mapAction.bindMapCommand(MapFunctions.deActivateDraftPnt)\r\n            //     }\r\n            //     managePanelForMobile(true)\r\n            //     mapAction.bindMapCommand(\r\n            //         MapFunctions.editGraphicDraftPnt,\r\n            //         { graphic, callback: handleCallBackEditGraphic }\r\n            //     )\r\n            //     setIsActiveEdit(true)\r\n            // }\r\n\r\n            if(menuRdc.ActiveFunction === ACTIVE_FUNCTION.EDIT_GP_FORM){\r\n                mapAction.bindMapCommand(MapFunctions.clearEditDraftPnt)\r\n                menuAction.activeFunction(null)\r\n            }else{\r\n                menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM && mapAction.bindMapCommand(MapFunctions.deActivateDraftPnt)\r\n                managePanelForMobile(true)\r\n                mapAction.bindMapCommand(\r\n                    MapFunctions.editGraphicDraftPnt,\r\n                    { graphic, callback: handleCallBackEditGraphic }\r\n                )\r\n                menuAction.activeFunction(ACTIVE_FUNCTION.EDIT_GP_FORM)\r\n            }\r\n        } else {\r\n            showAlert({ altMsg: ALERT_MESSAGE.POPUP.REQUEST_PIN_MAP })\r\n        }\r\n    }\r\n\r\n    //------------------------- standby edit and get district - subdistrict of point -------------//\r\n    const handleCallBackDrawLandMark =async (evt, graphic) => {\r\n        await mapAction.bindMapCommand(MapFunctions.deActivateDraftPnt)\r\n        menuAction.activeFunction(null)\r\n        // setIsActiveDraw(false)\r\n        managePanelForMobile(false)\r\n        setGraphic(graphic)\r\n        mapAction.bindMapCommand(\r\n            MapFunctions.getDistrictAndSubDistrictFormPoint,\r\n            {\r\n                geometry: evt.geometry,\r\n                callbackFn: setDistrictAndSubDistrictOfLandmark\r\n            }\r\n        )\r\n        setGeometry(evt.geometry)\r\n    }\r\n\r\n    //--------------------- edit point -----------------------//\r\n    const handleCallBackEditGraphic = (geometry) => {\r\n        showLoading();\r\n        mapAction.bindMapCommand(\r\n            MapFunctions.getDistrictAndSubDistrictFormPoint,\r\n            {\r\n                geometry: geometry,\r\n                callbackFn: setDistrictAndSubDistrictOfLandmark\r\n            }\r\n        )\r\n        setGeometry(geometry)\r\n    }\r\n\r\n    //------------------- save district - subdistrict of point ---------------------------//\r\n    const setDistrictAndSubDistrictOfLandmark = async (result, geometry) => {\r\n        mapAction.bindClearMapCommand()\r\n        if (result) {\r\n            if (result.SUBDISTRICT_ID) {\r\n                setDistrictAndSubDistrictCode(result.SUBDISTRICT_ID);\r\n                setIsPointOnMapBKK(true);\r\n                const { DISTRICT_ID, SUBDISTRICT_ID } = result;\r\n                // console.log(' DISTRICT_ID, SUBDISTRICT_ID ',  DISTRICT_ID, SUBDISTRICT_ID )\r\n\r\n                await callServiceSubDistrict(DISTRICT_ID);\r\n\r\n                await change('district', DISTRICT_ID);\r\n                await change('subDistrict', SUBDISTRICT_ID);\r\n                await hideLoading();\r\n            } else {\r\n                hideLoading();\r\n                showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR })\r\n            }\r\n\r\n        } else {\r\n            setIsPointOnMapBKK(false)\r\n            showAlert({ altMsg: ALERT_MESSAGE.POPUP.OUT_OF_BKK })\r\n            change('district', null);\r\n            change('subDistrict', null);\r\n            hideLoading();\r\n        }\r\n    }\r\n\r\n    //----------------- change district --------------------//\r\n    const handleChangeAdminPoly = (evt) => {\r\n        const districtCode = evt.target.value;\r\n\r\n        setSubDistrict([]);\r\n        change('subDistrict', null);\r\n        callServiceSubDistrict(districtCode)\r\n    }\r\n\r\n    //-------------------- process save ---------------------------//\r\n    const handleClickSubmit = (values) => {\r\n        if (isPointOnMapBKK) {\r\n            reCheckGeometry(values);\r\n        } else {\r\n            showAlert({ altMsg: `${geometry ? ALERT_MESSAGE.POPUP.OUT_OF_BKK : ALERT_MESSAGE.POPUP.REQUEST_PIN_MAP}` })\r\n        }\r\n    }\r\n\r\n    const reCheckGeometry = (values) => {\r\n        const { subDistrict } = _values;\r\n        const disSubCode = subDistrict;\r\n\r\n        if (disSubCode !== districtAndSubDistrictCode) {\r\n            showAlert({ altMsg: ALERT_MESSAGE.QUESTION.WARNING_POINT, altType: 2, callbackConfirm: () => { saveLandmark(values) } })\r\n        } else {\r\n            saveLandmark(values);\r\n        }\r\n    }\r\n\r\n    const saveLandmark = (values) => {\r\n        hideAlert();\r\n        showLoading();\r\n        callMapServiceSaveLandMark({\r\n            geometry,\r\n            id: values.numberOfLandMark,\r\n            name: values.nameOfLandMark,\r\n            type: values.typeOfLandMark,\r\n            district: values.district,\r\n            subDistrict: values.subDistrict,\r\n            year: values.surveyYear,\r\n            date: values.surveyDate,\r\n            user: authenRdc.profile && authenRdc.profile.userID ? authenRdc.profile.userID : \"\",\r\n        })\r\n    }\r\n\r\n    const callMapServiceSaveLandMark = (param) => {\r\n        mapAction.bindMapCommand(MapFunctions.applyEditLandMark, {\r\n            geometry: param.geometry,\r\n            id: param.id,\r\n            code: param.code,\r\n            type: param.type,\r\n            name: param.name,\r\n            district: param.district,\r\n            subDistrict: param.subDistrict,\r\n            year: param.year,\r\n            date: param.date,\r\n            user: param.user,\r\n            mode: \"ADD\",\r\n            callback: callBackSaveLandMark\r\n        })\r\n    }\r\n\r\n    const callBackSaveLandMark = (values) => {\r\n        if (values && values.success) {\r\n            callServiceSaveForm(values.objectId)\r\n        } else {\r\n            showAlert({ altMsg: ALERT_MESSAGE.POPUP.SAVE_FAIL })\r\n            hideLoading();\r\n        }\r\n    }\r\n\r\n    const callServiceSaveForm = (objectId) => {\r\n        fetchGet_(`${process.env.REACT_APP_UPDATE_MAPSHEET1K}?objectid=${objectId}&tablename=${TABLE_MAPSHEET1K.LANDMARK}`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(values => {\r\n                if (values && values.statusCode === 1) {\r\n                    showAlert({ altMsg: ALERT_MESSAGE.POPUP.SAVE_SUCCESS, callbackClose: handleClickBack })\r\n                } else {\r\n                    showAlert({ altMsg: ALERT_MESSAGE.POPUP.SAVE_FAIL })\r\n                }\r\n            })\r\n            .catch(ex => {\r\n                showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR })\r\n                console.log('ex callServiceSaveForm', ex)\r\n            })\r\n            .finally(() => {\r\n                hideLoading();\r\n            })\r\n    }\r\n\r\n    //---------------------------- process click in form ------------------------------//\r\n    const handleClickBack = () => {\r\n        if(dirty) {\r\n            showAlert({\r\n                altMsg: ALERT_MESSAGE.QUESTION.CANCEL_FORM, altType: 2, callbackConfirm: () => {\r\n                    menuAction.activeFunction(null)\r\n                    mapAction.bindMapCommand(MapFunctions.clearGraphicDrawDraft);\r\n                    onClickBack();\r\n                }\r\n            })\r\n        } else {\r\n            menuAction.activeFunction(null)\r\n            mapAction.bindMapCommand(MapFunctions.clearGraphicDrawDraft);\r\n            onClickBack();\r\n        }\r\n        \r\n    }\r\n\r\n    const handleClickReset = () => {\r\n        reset();\r\n    }\r\n\r\n    //-------------- date - year ---------------------------------------------------------//\r\n    const handleSurveyDateChange = (evt) => {\r\n        const update_year = `${Number(evt.getFullYear()) + 543}`;\r\n        change('surveyYear', update_year)\r\n    }\r\n\r\n    return (\r\n        <Fragment>\r\n            <LandMarkView\r\n                onClickBack={handleClickBack}\r\n                title={title}\r\n                onClickSubmit={handleSubmit(handleClickSubmit)}\r\n                listDistrict={district}\r\n                listSubDistrict={subDistrict}\r\n                onChangeAdminPoly={handleChangeAdminPoly}\r\n                listTypeOfLandMark={typeOfLandMark}\r\n                onClickReset={handleClickReset}\r\n                isActiveDraw={menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM}\r\n                isActiveEdit={menuRdc.ActiveFunction === ACTIVE_FUNCTION.EDIT_GP_FORM}\r\n                onDraw={handleDrawOnMap}\r\n                onEdit={handleEditGraphic}\r\n                onSurveyDateChange = {handleSurveyDateChange }\r\n            />\r\n            <AlertMessageSuper {...props} />\r\n            <Loading isShowLoading={isShowLoading} />\r\n        </Fragment>\r\n    )\r\n}\r\n\r\nconst mapStateToProps = state => ({\r\n    _values: getFormValues('LandMark')(state),\r\n    authenRdc: state.authen,\r\n    menuRdc: state.menu,\r\n    dirty: isDirty('LandMark')(state),\r\n})\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    mapAction: bindActionCreators(MapAction, dispatch),\r\n    menuAction: bindActionCreators(MenuAction, dispatch),\r\n})\r\n\r\nconst reduxFormParameter = {\r\n    form: 'LandMark',\r\n    validate: landMarkValidate,\r\n    enableReinitialize: true,\r\n    initialValues: initialValues\r\n};\r\n\r\nexport default compose(\r\n    connect(mapStateToProps, mapDispatchToProps),\r\n    reduxForm(reduxFormParameter),\r\n    withWidth(),\r\n    WithAlertMessage,\r\n    WithLoading\r\n)(LandMark);\r\n","import React, { Fragment } from 'react';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport { Field } from 'redux-form';\r\n\r\n//import component\r\nimport TextField from '../../../../../../../Controls/Containers/TextFieldRedux'\r\nimport SelectField from '../../../../../../../Controls/Containers/SelectFieldRedux';\r\nimport Button from '../../../../../../../Controls/Containers/Button'\r\nimport ReduxFormDatePickerThai from '../../../../../../../Controls/Containers/Picker/ReduxFormDatePickerThai'\r\nimport { BTN } from '../../../../../../../Constants/Constants';\r\n\r\nconst LandMarkFormSearch = ({\r\n    classes,\r\n    listTypeOfLandMark,\r\n    onClickSubmit,\r\n    // onClickReset,\r\n    onChangeDate,\r\n    minDate,\r\n    maxDate,\r\n    onClickSelectInMap,\r\n    isActiveSelectInMap,\r\n    onClickBack\r\n}) => {\r\n\r\n    return (\r\n        <Fragment>\r\n            <Grid container className={classes.root}>\r\n                <Field\r\n                    name=\"nameOfLandMark\"\r\n                    label='ชื่อ'\r\n                    component={TextField}\r\n                />\r\n\r\n                <Field\r\n                    name=\"typeOfLandMark\"\r\n                    label='ประเภท'\r\n                    component={SelectField}\r\n                    data={listTypeOfLandMark}\r\n                />\r\n\r\n                <Field\r\n                    name={'startDate'}\r\n                    label='ช่วงเวลาสำรวจ'\r\n                    component={ReduxFormDatePickerThai}\r\n                    onChange={(evt) => onChangeDate('startDate', evt)}\r\n                    maxDate={maxDate}\r\n                />\r\n                <Field\r\n                    name={'endDate'}\r\n                    label='ถึง'\r\n                    component={ReduxFormDatePickerThai}\r\n                    onChange={(evt) => onChangeDate('endDate', evt)}\r\n                    minDate={minDate}\r\n                />\r\n                {/* <Grid container justify=\"flex-end\" style={{ marginTop: '5px', marginBottom: '5px' }}>\r\n                    <Grid item>\r\n                        <Button\r\n                            label=\"เลือกบนแผนที่\"\r\n                            color={isActiveSelectInMap ? \"black\" : \"green\"}\r\n                            onClick={onClickSelectInMap}\r\n                        />\r\n                    </Grid>\r\n                </Grid> */}\r\n\r\n                {/* </Grid> */}\r\n                <Grid container justify=\"center\" spacing={24} className={classes.divFooter}>\r\n                    <Grid item>\r\n                        <Button\r\n                            // color=\"black\"\r\n                            label={BTN.TH.CANCEL}\r\n                            onClick={onClickBack}\r\n                            className={classes.btnRegister}\r\n                        />\r\n                    </Grid>\r\n                    <Grid item>\r\n                        <Button\r\n                            type=\"submit\"\r\n                            label={BTN.TH.SEARCH}\r\n                            className={classes.btnLogin}\r\n                            onClick={onClickSubmit}\r\n                        />\r\n                    </Grid>\r\n                    <Grid item>\r\n                        <Button\r\n                            label=\"เลือกบนแผนที่\"\r\n                            color={isActiveSelectInMap ? \"black\" : \"green\"}\r\n                            onClick={onClickSelectInMap}\r\n                        />\r\n                    </Grid>\r\n                </Grid>\r\n\r\n            </Grid>\r\n\r\n        </Fragment>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        padding: \"10px\",\r\n        width: '100%',\r\n    },\r\n    labelText: {\r\n        display: 'flex',\r\n        // justifyContent: 'center',\r\n        alignItems: 'center',\r\n        fontSize: '14px'\r\n    },\r\n    containnerRow: {\r\n        height: '64px',\r\n        width: '100%',\r\n        marginBottom: '15px'\r\n    },\r\n    asterisk: {\r\n        color: \"red\"\r\n    },\r\n    divFooter: {\r\n        marginBottom: '10px',\r\n        marginTop: \"10px\"\r\n    }\r\n}))(LandMarkFormSearch)","import React, { Fragment } from 'react'\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport ListItem from '@material-ui/core/ListItem';\r\nimport DeleteIcon from '@material-ui/icons/Delete';\r\nimport EditIcon from '@material-ui/icons/Edit';\r\nimport IconButton from '@material-ui/core/IconButton';\r\nimport { Scrollbars } from 'react-custom-scrollbars'\r\nimport Checkbox from '@material-ui/core/Checkbox';\r\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\r\nimport { green } from '@material-ui/core/colors';\r\nimport Divider from '@material-ui/core/Divider';\r\n\r\n//import tooltip\r\nimport Tooltip from '../../../../../../../Controls/Containers/Tooltip'\r\n\r\nconst ListResult = ({ classes, result, from, onClickListResult, onEdit, onDelete }) => {\r\n    if (!result || result.length === 0) {\r\n        return <div className={classes.div_noData}>ไม่พบข้อมูล</div>\r\n    } else {\r\n        return (\r\n            <Grid item xs={12}>\r\n                {result.map((itm, ind) =>\r\n                    <ListItem\r\n                        key={`result-${ind}`}\r\n                        button\r\n                        divider={true}\r\n                        className={classes.menu_item}\r\n                        classes={{ gutters: classes.guttersItem }}\r\n                        onClick={(evt) => onClickListResult(itm, evt)}\r\n                    >\r\n                        <Grid container justify=\"space-between\" alignItems=\"center\">\r\n                            <Grid item className={classes.containerTxtResult}>\r\n                                <label className={classes.txtResult}>{`ชื่อ : ${itm.nameOfLandMark}`}</label><br />\r\n                                <label className={classes.txtResult}>{`วันที่ : ${itm.surveyDateDisplay}`}</label>\r\n                            </Grid>\r\n                            <Grid item>\r\n                                <Tooltip title=\"แก้ไข\" placement=\"bottom\">\r\n                                    <IconButton className={classes.iconButton} onClick={(evt) => onEdit(itm, evt)}>\r\n                                        <EditIcon className={classes.iconEdit} />\r\n                                    </IconButton>\r\n                                </Tooltip>\r\n                                <Tooltip title=\"ลบ\" placement=\"bottom\">\r\n                                    <IconButton className={classes.iconButton} onClick={(evt) => onDelete(itm, evt)}>\r\n                                        <DeleteIcon className={classes.iconEdit} />\r\n                                    </IconButton>\r\n                                </Tooltip>\r\n                            </Grid>\r\n                        </Grid>\r\n                    </ListItem>\r\n                )}\r\n            </Grid>\r\n        )\r\n    }\r\n}\r\n\r\nconst LandMarkResultSearch = (props) => {\r\n    const { result, classes, onClickItem, onEdit, onDelete, isCreate, isUpdate, handleChangeCheckbox } = props;\r\n\r\n    return (\r\n        <Grid container className={classes.root}>\r\n            <Grid item xs={12} className={classes.header}>\r\n                {`พบผลลัพธ์จำนวน ${result ? result.length.toLocaleString() : 0} รายการ`}\r\n            </Grid>\r\n            <Grid item xs={12} className={classes.rootResult} >\r\n                <Scrollbars\r\n                    autoHide\r\n                >\r\n                    {(result && result.length > 0 || (isCreate || isUpdate)) &&\r\n                        <Fragment>\r\n                            <FormControlLabel\r\n                                className={classes.checkbox}\r\n                                control={\r\n                                    <GreenCheckbox\r\n                                        checked={isCreate}\r\n                                        onChange={() => handleChangeCheckbox('create')}\r\n                                        value=\"create\"\r\n                                    />\r\n                                }\r\n                                label=\"รายการที่สร้าง\"\r\n                            />\r\n                            <FormControlLabel\r\n                                className={classes.checkbox}\r\n                                control={\r\n                                    <GreenCheckbox\r\n                                        checked={isUpdate}\r\n                                        onChange={() => handleChangeCheckbox('update')}\r\n                                        value=\"update\"\r\n                                    />\r\n                                    }\r\n                                label=\"รายการที่แก้ไข\"\r\n                            />\r\n                            <Divider />\r\n                        </Fragment>\r\n                    }\r\n                    <ListResult\r\n                        classes={classes}\r\n                        result={result}\r\n                        // from={from}\r\n                        onClickListResult={onClickItem}\r\n                        onEdit={onEdit}\r\n                        onDelete={onDelete}\r\n                    />\r\n                </Scrollbars>\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nconst GreenCheckbox = withStyles({\r\n    root: {\r\n      color: green[400],\r\n      '&$checked': {\r\n        color: green[600],\r\n      },\r\n    },\r\n    checked: {},\r\n})(props => <Checkbox color=\"default\" {...props} />);\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        width: '100%',\r\n        height: '100%',\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            height: 'calc(100% - 16px)',\r\n        },\r\n    },\r\n    rootResult: {\r\n        height: 'calc(100% - 25px)',\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            minHeight: \"200px\",\r\n            [`& input`]: {\r\n                height: 'calc(100% - 35px)',\r\n            },\r\n        },\r\n        position: 'relative',\r\n    },\r\n    header: {\r\n        height: '25px',\r\n        lineHeight: '25px',\r\n        width: '100%',\r\n        backgroundColor: theme.mainTheme.color3,\r\n        color: theme.mainTheme.color2,\r\n        textAlign: 'center',\r\n        fontSize: theme.textSize.subtitle\r\n    },\r\n    div_noData: {\r\n        width: '100%',\r\n        padding: '18px'\r\n    },\r\n    menu_item: {\r\n        paddingRight: 0,\r\n        '&:focus': {\r\n            backgroundColor: theme.mainTheme.color2\r\n        },\r\n        '&:hover': {\r\n            backgroundColor: theme.mainTheme.colorAH.colorHover,\r\n            color: theme.mainTheme.colorAH.colorTextHover\r\n        }\r\n    },\r\n    txtResult: {\r\n        fontSize: '14px',\r\n        margin: '0px',\r\n        lineHeight: '24px'\r\n    },\r\n    containerTxtResult: {\r\n        maxWidth: 'calc(100% - 70px)',\r\n        textOverflow: 'ellipsis',\r\n        whiteSpace: 'nowrap',\r\n        overflow: 'hidden',\r\n    },\r\n    iconButton: {\r\n        height: \"35px\",\r\n        width: \"35px\",\r\n        // marginTop: \"6px\"\r\n    },\r\n    iconEdit: {\r\n        marginTop: '-8px'\r\n    },\r\n    guttersItem: {\r\n        padding: \"5px 10px\",\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            [`& input`]: {\r\n                padding: \"5px 20px\",\r\n            },\r\n        },\r\n    },\r\n    checkbox: {\r\n        padding: '5px 10px'\r\n    }\r\n}))(LandMarkResultSearch)","import React, { Fragment } from 'react';\r\n// import { Scrollbars } from 'react-custom-scrollbars';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { withStyles } from '@material-ui/core/styles';\r\n\r\nimport AppBarHeaderView from '../../../../AppBarHeaderView';\r\nimport { Scrollbars } from 'react-custom-scrollbars'\r\n\r\n//import component\r\nimport LandMarkFormSearch from './LandMarkFormSearch'\r\nimport LandMarkResultSearch from './LandMarkResultSearch'\r\n\r\nconst LandMarkSearchView = ({\r\n    classes,\r\n    title,\r\n    onClickBack,\r\n    listTypeOfLandMark,\r\n    onClickReset,\r\n    onClickSubmit,\r\n    onChangeDate,\r\n    minDate,\r\n    maxDate,\r\n    resultSearch,\r\n    openResultView,\r\n    onEditResultSearch,\r\n    onDeleteResultSearch,\r\n    onClickOpenResultSearch,\r\n    isActiveSelectInMap,\r\n    onClickSelectInMap,\r\n    isCreate,\r\n    isUpdate,\r\n    handleChangeCheckbox\r\n}) => {\r\n    \r\n    return (\r\n        <Fragment>\r\n            {/* <div container style={{width: '100%', height: '100%'}}> */}\r\n                <AppBarHeaderView \r\n                    title={title}\r\n                    onClickBack = {onClickBack} \r\n                />\r\n                {/* <div style={{position: 'relative'}}> */}\r\n                <Grid item xs={12} className={classes.body}>\r\n                <Scrollbars autoHide>\r\n                    <LandMarkFormSearch \r\n                        listTypeOfLandMark = { listTypeOfLandMark }\r\n                        onClickSubmit = { onClickSubmit }\r\n                        onClickReset = { onClickReset }\r\n                        onChangeDate = { onChangeDate }\r\n                        minDate = { minDate }\r\n                        maxDate = { maxDate }\r\n                        isActiveSelectInMap = { isActiveSelectInMap }\r\n                        onClickSelectInMap = { onClickSelectInMap }\r\n                        onClickBack={onClickBack}\r\n                    />\r\n                     <div style={{position: 'relative', height: 'calc(100% - 429px)' }}>\r\n                        {openResultView &&\r\n                            <LandMarkResultSearch \r\n                                result = { resultSearch }\r\n                                onEdit = { onEditResultSearch }\r\n                                onDelete = { onDeleteResultSearch }\r\n                                onClickItem = { onClickOpenResultSearch }\r\n                                isUpdate = { isUpdate }\r\n                                isCreate = { isCreate }\r\n                                handleChangeCheckbox = { handleChangeCheckbox }\r\n                            />\r\n                        }\r\n                    </div>\r\n                    </Scrollbars>\r\n                {/* </div> */}\r\n                </Grid>\r\n                {/* <div style={{position: 'relative', height: 'calc(100% - 429px)' }}>\r\n                    {openResultView &&\r\n                        <LandMarkResultSearch \r\n                            result = { resultSearch }\r\n                            onEdit = { onEditResultSearch }\r\n                            onDelete = { onDeleteResultSearch }\r\n                            onClickItem = { onClickOpenResultSearch }\r\n                        />\r\n                    }\r\n                </div> */}\r\n            {/* </Grid> */}\r\n        </Fragment>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    body: {\r\n        height: 'calc(100% - 45px)',\r\n        width: '100%'\r\n    }\r\n}))(LandMarkSearchView)","import React from 'react';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport Button from '../../../../../../../Controls/Containers/Button';\r\nimport { BTN } from '../../../../../../../Constants/Constants';\r\nimport AppBarHeaderView from '../../../../../../../Presentationals/Web/Panel/AppBarHeaderView';\r\n\r\n\r\nconst RowDeail = ({\r\n    classes,\r\n    label,\r\n    value,\r\n}) => (\r\n        <Grid container wrap=\"nowrap\" className={classes.row} >\r\n            <Grid item xs={5} className={classes.colLabel} >\r\n                {label}\r\n            </Grid>\r\n            < Grid item xs={7} style={{ wordWrap: \"break-word\" }}>\r\n                {value}\r\n            </Grid>\r\n        </Grid >\r\n    )\r\n\r\nconst LandMarkViewMode = ({\r\n    classes,\r\n    data,\r\n    title,\r\n    onClickBack\r\n}) => {\r\n\r\n    return (\r\n        <Grid container className={classes.root} direction=\"row\">\r\n            {/* <Grid item xs={12}> */}\r\n            <AppBarHeaderView\r\n                title={title}\r\n                onClickBack={onClickBack}\r\n            />\r\n            {/* </Grid> */}\r\n\r\n            <Grid item xs={12} className={classes.rootBody} >\r\n                <RowDeail\r\n                    classes={classes}\r\n                    label=\"รหัสสถานที่สำคัญ\"\r\n                    value={data && data.number}\r\n                />\r\n\r\n                <RowDeail\r\n                    classes={classes}\r\n                    label=\"ประเภทสถานที่สำคัญ\"\r\n                    value={data && data.typeName}\r\n                />\r\n\r\n                <RowDeail\r\n                    classes={classes}\r\n                    label=\"ชื่อสถานที่สำคัญ\"\r\n                    value={data && data.name}\r\n                />\r\n\r\n                <RowDeail\r\n                    classes={classes}\r\n                    label=\"จังหวัด\"\r\n                    value=\"กรุงเทพมหานคร\"\r\n                />\r\n\r\n                <RowDeail\r\n                    classes={classes}\r\n                    label=\"เขต\"\r\n                    value={data && data.districtName}\r\n                />\r\n\r\n                <RowDeail\r\n                    classes={classes}\r\n                    label=\"แขวง\"\r\n                    value={data && data.subDistrictName}\r\n                />\r\n\r\n                <RowDeail\r\n                    classes={classes}\r\n                    label=\"ปีที่สำรวจ\"\r\n                    value={data && data.surveyYear}\r\n                />\r\n\r\n                <RowDeail\r\n                    classes={classes}\r\n                    label=\"วันที่สำรวจ\"\r\n                    value={data && data.surveyDate}\r\n                />\r\n\r\n\r\n                <Grid container justify=\"center\" className={classes.footer} >\r\n                    <Button\r\n                        label={BTN.TH.CANCEL}\r\n\r\n                        onClick={onClickBack}\r\n                    />\r\n                </Grid>\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        width: '100%',\r\n        height: '100%'\r\n    },\r\n    rootBody: {\r\n        padding: '0px 10px 10px 10px',\r\n        height: 'calc(100% - 47px)'\r\n    },\r\n    row: {\r\n        marginTop: '20px',\r\n    },\r\n    footer: {\r\n        marginTop: '20px',\r\n        marginBottom: '10px'\r\n    },\r\n    colLabel: {\r\n        fontWeight: 'bold'\r\n    },\r\n}))(LandMarkViewMode)","import React, { useState, useEffect, Fragment } from 'react'\r\nimport { connect } from 'react-redux'\r\nimport { reduxForm, getFormValues } from \"redux-form\";\r\nimport EsriLoader from \"esri-loader\";\r\nimport { compose } from \"recompose\";\r\nimport { bindActionCreators } from 'redux'\r\nimport withWidth from '@material-ui/core/withWidth';\r\n\r\n//import service utils\r\nimport { fetchGet_ } from '../../../../../../../Utilities/ServiceUtils'\r\n\r\n//import Component\r\nimport LandMarkView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/LandMark/Add/LandMarkView'\r\nimport LandMarkViewMode from '../ViewMode/LandMarkViewMode'\r\n\r\n//import constants\r\nimport { ALERT_MESSAGE, TABLE_MAPSHEET1K, ACTIVE_FUNCTION } from '../../../../../../../Constants/Constants'\r\n\r\n//import map process\r\nimport * as MapFunctions from '../../../../../../../Map/MapFunctions'\r\nimport * as MapAction from '../../../../../../../Actions/Web/Maps/MapAction'\r\nimport * as MenuAction from '../../../../../../../Actions/Web/MenuAction';\r\n\r\n//import component\r\nimport WithAlertMessage from '../../../../../../../HOC/WithAlertMessage'\r\nimport AlertMessageSuper from '../../../../../../../Controls/Containers/AlertMessageSuper';\r\nimport WithLoading from '../../../../../../../HOC/WithLoading'\r\nimport Loading from '../../../../../../../Controls/Containers/Loading'\r\nimport { convertDateTimeToDisplayDate } from '../../../../../../../Utilities/DateTimeUtil'\r\n\r\n//import validate\r\nimport { landMarkValidate } from '../../../../../../../Utilities/Validate'\r\n\r\n//constants\r\nconst PROVINCE_CODE = '10'\r\n\r\nconst ManageResultSearch = (props) => {\r\n\r\n    const {\r\n        title,\r\n        onClickBack,\r\n        data,\r\n        openComponent,\r\n        mapAction,\r\n        reset,\r\n        change,\r\n        showLoading,\r\n        hideLoading,\r\n        isShowLoading,\r\n        showAlert,\r\n        hideAlert,\r\n        authenRdc,\r\n        handleSubmit,\r\n        _values,\r\n        menuAction,\r\n        width,\r\n        menuRdc\r\n    } = props;\r\n\r\n    const [district, setDistrict] = useState([]);\r\n    const [subDistrict, setSubDistrict] = useState([]);\r\n    const [typeOfLandMark, setTypeOfLandMark] = useState([]);\r\n    const [geometry, setGeometry] = useState();\r\n    const [isPointOnMapBKK, setIsPointOnMapBKK] = useState(true);\r\n    const [dataForViewMode, setDataForViewMode] = useState();\r\n    // const [isActiveDraw, setIsActiveDraw] = useState(false);\r\n    // const [isActiveEdit, setIsActiveEdit] = useState(false);\r\n    const [graphic, setGraphic] = useState(null)\r\n    const [districtAndSubDistrictCode, setDistrictAndSubDistrictCode] = useState();\r\n\r\n    useEffect(() => {\r\n        showLoading();\r\n        initailValuesFormEdit();\r\n    }, [])\r\n\r\n    useEffect(() => {\r\n        if (district.length > 0 && subDistrict.length > 0 && typeOfLandMark.length > 0 && openComponent === 2) {\r\n            manageDataForViewMode();\r\n        }\r\n    }, [district, subDistrict, typeOfLandMark])\r\n\r\n    const initailValuesFormEdit = async () => {\r\n        const { geometry, subDistrict } = data\r\n        await callServiceDistrict();\r\n        await callServiceSubDistrict(data.district);\r\n        await callServiceTypeOfLandMark();\r\n        await drawGraphic(geometry.x, geometry.y, geometry.spatialReference);\r\n        setDistrictAndSubDistrictCode(subDistrict)\r\n        await hideLoading()\r\n    }\r\n\r\n    const drawGraphic = (longitude, latitude, spatialReference) => {\r\n        EsriLoader.loadModules([\r\n            \"esri/geometry/Point\",\r\n            \"esri/geometry/webMercatorUtils\",\r\n            \"esri/SpatialReference\"\r\n        ], window.MAP_OPTION)\r\n            .then(([\r\n                Point,\r\n                webMercatorUtils,\r\n                SpatialReference\r\n            ]) => {\r\n\r\n                if (!spatialReference || spatialReference.wkid !== 102100) {\r\n                    const geoMercator = webMercatorUtils.lngLatToXY(longitude, latitude);\r\n                    longitude = geoMercator[0]\r\n                    latitude = geoMercator[1]\r\n                }\r\n                const point = new Point(longitude, latitude, new SpatialReference({ wkid: 102100, latestWkid: 3857 }));\r\n                mapAction.bindMapCommand(MapFunctions.addGraphicDraft, {\r\n                    evt: { geometry: point },\r\n                    type: 'point',\r\n                    callback: handleCallBackDrawPntInitial\r\n                });\r\n            })\r\n    }\r\n\r\n    const managePanelForMobile = async (isDraw) => {\r\n        if (width === 'sm' || width === 'xs') {\r\n            if (isDraw) {\r\n                await menuAction.closeMenuPanel();\r\n                await menuAction.openMenuMap();\r\n            } else {\r\n                await menuAction.openMenuPanel();\r\n                await menuAction.closeMenuMap();\r\n            }\r\n        }\r\n    }\r\n\r\n    const handleCallBackDrawPntInitial = (evt, graphic) => {\r\n        if (openComponent === 1) {\r\n            setGraphic(graphic)\r\n            setGeometry(evt.geometry)\r\n        }\r\n    }\r\n\r\n    const handleCallBackEditGraphic = (geometry) => {\r\n        mapAction.bindMapCommand(\r\n            MapFunctions.getDistrictAndSubDistrictFormPoint,\r\n            {\r\n                geometry: geometry,\r\n                callbackFn: setDistrictAndSubDistrictOfLandmark\r\n            }\r\n        )\r\n        setGeometry(geometry)\r\n    }\r\n\r\n    const setDistrictAndSubDistrictOfLandmark = async (result, geometry) => {\r\n        mapAction.bindClearMapCommand()\r\n        showLoading();\r\n        if (result) {\r\n            setDistrictAndSubDistrictCode(result.SUBDISTRICT_ID);\r\n            setIsPointOnMapBKK(true)\r\n            const { DISTRICT_ID, SUBDISTRICT_ID } = result;\r\n\r\n            await callServiceSubDistrict(DISTRICT_ID);\r\n\r\n            await change('district', DISTRICT_ID);\r\n            await change('subDistrict', SUBDISTRICT_ID);\r\n            await hideLoading();\r\n\r\n        } else {\r\n            setIsPointOnMapBKK(false)\r\n            showAlert({ altMsg: ALERT_MESSAGE.POPUP.OUT_OF_BKK })\r\n            change('district', -1);\r\n            change('subDistrict', -1);\r\n            hideLoading();\r\n        }\r\n    }\r\n\r\n    const callServiceDistrict = async () => {\r\n        try {\r\n            const response = await fetchGet_(`${process.env.REACT_APP_LU_DISTRICT}?provinceid=${PROVINCE_CODE}`);\r\n            const objResult = await response.json();\r\n\r\n            const resultDistrict = [];\r\n            await objResult.result.map(item => {\r\n                resultDistrict.push({ id: item.value, name: item.name });\r\n\r\n                return true\r\n            })\r\n\r\n            await setDistrict(resultDistrict);\r\n        } catch (err) {\r\n            setDistrict([]);\r\n        }\r\n    }\r\n\r\n    const callServiceSubDistrict = async (districtCode) => {\r\n        showLoading();\r\n        try {\r\n            const response = await fetchGet_(`${process.env.REACT_APP_LU_SUBDISTRICT}?provinceid=${PROVINCE_CODE}&districtid=${districtCode}`)\r\n            const objResult = await response.json();\r\n\r\n            const resultSubDistrict = [];\r\n            await objResult.result.map(item => {\r\n                resultSubDistrict.push({ id: item.value, name: item.name });\r\n\r\n                return true\r\n            })\r\n\r\n            await setSubDistrict(resultSubDistrict);\r\n            await hideLoading();\r\n        } catch (err) {\r\n            setSubDistrict([])\r\n        }\r\n    }\r\n\r\n    //---------------------- call service lookup landmark --------------------------------//\r\n    const callServiceTypeOfLandMark = async () => {\r\n        showLoading();\r\n        try {\r\n            const response = await fetchGet_(`${process.env.REACT_APP_SURVEY_LU_TYPE_LANDMARK}`);\r\n            const objResult = await response.json();\r\n\r\n            const resultTypeOfLandMark = [];\r\n            await objResult.result.map(item => {\r\n                resultTypeOfLandMark.push({ id: item.value, name: item.name });\r\n\r\n                return true\r\n            })\r\n\r\n            await setTypeOfLandMark(resultTypeOfLandMark);\r\n            await hideLoading();\r\n        } catch (err) {\r\n            console.log('err call service lookup/landmarkType', err)\r\n            setTypeOfLandMark([])\r\n            hideLoading();\r\n        }\r\n    }\r\n\r\n    const manageDataForViewMode = () => {\r\n        const districtName = district.filter((item) => {\r\n            return item.id === data.district\r\n        })\r\n\r\n        const subDistrictName = subDistrict.filter((item) => {\r\n            return item.id === data.subDistrict\r\n        })\r\n\r\n        const typeName = typeOfLandMark.filter((item) => {\r\n            return item.id.toLocaleString() === data.typeOfLandMark.toLocaleString()\r\n        })\r\n\r\n        const surveyDateFormat = convertDateTimeToDisplayDate(data.surveyDate);\r\n\r\n        const newData = {\r\n            number: data.numberOfLandMark,\r\n            typeName: typeName.length > 0 ? typeName[0].name : null,\r\n            name: data.nameOfLandMark,\r\n            districtName: districtName.length > 0 ? districtName[0].name : null,\r\n            subDistrictName: subDistrictName.length > 0 ? subDistrictName[0].name : null,\r\n            surveyYear: data.surveyYear,\r\n            surveyDate: surveyDateFormat.slice(0, surveyDateFormat.length - 9)\r\n        }\r\n\r\n        setDataForViewMode(newData)\r\n    }\r\n\r\n    const handleCallBackClose = async () => {\r\n        menuAction.activeFunction(null)\r\n        await mapAction.bindMapCommand(MapFunctions.clearGraphicDrawDraft);\r\n        await mapAction.bindMapCommand(MapFunctions.cleardrawSpatialSearchDraft);\r\n        await mapAction.bindClearMapCommand();\r\n\r\n        await onClickBack()\r\n    }\r\n\r\n    const handleResetFormEdit = () => {\r\n        reset();\r\n    }\r\n\r\n    const handleSubmitFormEdit = (values) => {\r\n        if (isPointOnMapBKK) {\r\n            reCheckGeometry(values)\r\n        } else {\r\n            showAlert({ altMsg: `${geometry ? ALERT_MESSAGE.POPUP.OUT_OF_BKK : ALERT_MESSAGE.POPUP.REQUEST_PIN_MAP}` })\r\n        }\r\n    }\r\n\r\n    const reCheckGeometry = (values) => {\r\n        const { subDistrict } = _values;\r\n        const disSubCode = subDistrict;\r\n\r\n        if (disSubCode !== districtAndSubDistrictCode) {\r\n            showAlert({\r\n                altMsg: ALERT_MESSAGE.QUESTION.WARNING_POINT,\r\n                altType: 2,\r\n                callbackConfirm: () => { saveEditModeInLandMark(values) }\r\n            })\r\n        } else {\r\n            saveEditModeInLandMark(values)\r\n        }\r\n    }\r\n\r\n    const saveEditModeInLandMark = (values) => {\r\n        hideAlert();\r\n        showLoading();\r\n        callMapServiceSaveLandMark({\r\n            geometry,\r\n            objectId: data.objectId,\r\n            id: values.numberOfLandMark,\r\n            name: values.nameOfLandMark,\r\n            type: values.typeOfLandMark,\r\n            district: values.district,\r\n            subDistrict: values.subDistrict,\r\n            year: values.surveyYear,\r\n            date: values.surveyDate,\r\n            user: authenRdc.profile && authenRdc.profile.userID ? authenRdc.profile.userID : \"\",\r\n        })\r\n    }\r\n\r\n    const callMapServiceSaveLandMark = (param) => {\r\n        mapAction.bindMapCommand(MapFunctions.applyEditLandMark, {\r\n            objectId: param.objectId,\r\n            geometry: param.geometry,\r\n            id: param.id,\r\n            code: param.code,\r\n            type: param.type,\r\n            name: param.name,\r\n            district: param.district,\r\n            subDistrict: param.subDistrict,\r\n            year: param.year,\r\n            date: param.date,\r\n            user: param.user,\r\n            mode: \"EDIT\",\r\n            callback: callBackSaveLandMark\r\n        })\r\n    }\r\n\r\n    const callBackSaveLandMark = (values) => {\r\n        if(values){\r\n            callServiceSaveForm(data.objectId)\r\n        }else{\r\n            hideLoading();\r\n            showAlert({ altMsg: ALERT_MESSAGE.POPUP.SAVE_FAIL })\r\n        }\r\n    }\r\n\r\n    const callServiceSaveForm = (objectId) => {\r\n        fetchGet_(`${process.env.REACT_APP_UPDATE_MAPSHEET1K}?objectid=${objectId}&tablename=${TABLE_MAPSHEET1K.LANDMARK}&isupdate=true`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(values => {\r\n                if (values && values.statusCode === 1) {\r\n                    showAlert({ altMsg: ALERT_MESSAGE.POPUP.SAVE_SUCCESS, callbackClose: handleClickBack })\r\n                } else {\r\n                    showAlert({ altMsg: ALERT_MESSAGE.POPUP.SAVE_FAIL })\r\n                }\r\n            })\r\n            .catch(ex => {\r\n                showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR })\r\n                console.log('ex callServiceSaveForm', ex)\r\n            })\r\n            .finally(() => {\r\n                hideLoading();\r\n            })\r\n    }\r\n\r\n    const handleClickBack = async () => {\r\n        await mapAction.bindMapCommand(MapFunctions.clearGraphicDrawDraft);\r\n        await mapAction.bindClearMapCommand();\r\n        onClickBack();\r\n    }\r\n\r\n    const handleDrawOnMap = async () => {\r\n        // if (isActiveDraw) { // ปิดการวาด\r\n        //     setIsActiveDraw(false)\r\n        //     mapAction.bindMapCommand(MapFunctions.deActivateDraftPnt)\r\n        // } else { // เปิดการวาด\r\n        //     if (isActiveEdit) {\r\n        //         setIsActiveEdit(false)\r\n        //         await mapAction.bindMapCommand(MapFunctions.clearEditDraftPnt)\r\n        //     }\r\n        //     managePanelForMobile(true)\r\n        //     setIsActiveDraw(true)\r\n        //     mapAction.bindMapCommand(MapFunctions.drawDraftPnt, { callback: handleCallBackDrawPnt })\r\n        // }\r\n        if(menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM){\r\n            menuAction.activeFunction(null)\r\n            mapAction.bindMapCommand(MapFunctions.deActivateDraftPnt)\r\n        }else{\r\n            managePanelForMobile(true)\r\n            menuAction.activeFunction(ACTIVE_FUNCTION.ADD_GP_FORM)\r\n            menuRdc.ActiveFunction === ACTIVE_FUNCTION.EDIT_GP_FORM && await mapAction.bindMapCommand(MapFunctions.clearEditDraftPnt)\r\n            setTimeout(()=>{ // set timeout เพื่อแก้ปัญหา willunmount ของ maptool clear event draw\r\n                mapAction.bindMapCommand(MapFunctions.drawDraftPnt, { callback: handleCallBackDrawPnt })\r\n            },50)\r\n        }\r\n    }\r\n\r\n    const handleEditGraphic = async () => {\r\n        // if (graphic) {\r\n        //     if (isActiveEdit) { // ปิดการแก้ไข\r\n        //         mapAction.bindMapCommand(MapFunctions.clearEditDraftPnt)\r\n        //         setIsActiveEdit(false)\r\n        //     } else { // เปิดการแก้ไข\r\n        //         if (isActiveDraw) {\r\n        //             setIsActiveDraw(false)\r\n        //             await mapAction.bindMapCommand(MapFunctions.deActivateDraftPnt)\r\n        //         }\r\n        //         managePanelForMobile(true)\r\n        //         mapAction.bindMapCommand(\r\n        //             MapFunctions.editGraphicDraftPnt,\r\n        //             { graphic, callback: handleCallBackEditGraphic }\r\n        //         )\r\n        //         setIsActiveEdit(true)\r\n        //     }\r\n        // } else {\r\n        //     showAlert({ altMsg: \"กรุณากำหนดตำแหน่ง\" })\r\n        // }\r\n\r\n        if (graphic) {\r\n            if (menuRdc.ActiveFunction === ACTIVE_FUNCTION.EDIT_GP_FORM) { // ปิดการแก้ไข\r\n                mapAction.bindMapCommand(MapFunctions.clearEditDraftPnt)\r\n                menuAction.activeFunction(null)\r\n            } else { // เปิดการแก้ไข\r\n                menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM && await mapAction.bindMapCommand(MapFunctions.deActivateDraftPnt)\r\n                managePanelForMobile(true)\r\n                menuAction.activeFunction(ACTIVE_FUNCTION.EDIT_GP_FORM)\r\n                mapAction.bindMapCommand(\r\n                    MapFunctions.editGraphicDraftPnt,\r\n                    { graphic, callback: handleCallBackEditGraphic }\r\n                )\r\n            }\r\n        } else {\r\n            showAlert({ altMsg: \"กรุณากำหนดตำแหน่ง\" })\r\n        }\r\n    }\r\n\r\n    const handleCallBackDrawPnt = async (evt, graphic) => {\r\n        if (openComponent === 1) {\r\n            setGraphic(graphic)\r\n            setGeometry(evt.geometry)\r\n            managePanelForMobile(false);\r\n            // setIsActiveDraw(false);\r\n            await mapAction.bindMapCommand(MapFunctions.deActivateDraftPnt)\r\n            menuAction.activeFunction(null)\r\n            mapAction.bindMapCommand(\r\n                MapFunctions.getDistrictAndSubDistrictFormPoint,\r\n                {\r\n                    geometry: geometry,\r\n                    callbackFn: setDistrictAndSubDistrictOfLandmark\r\n                }\r\n            )\r\n        }\r\n    }\r\n    \r\n    //-------------- date - year ---------------------------------------------------------//\r\n    const handleSurveyDateChange = (evt) => {\r\n        const update_year = `${Number(evt.getFullYear()) + 543}`;\r\n        change('surveyYear', update_year)\r\n    }\r\n\r\n    return (\r\n        <Fragment>\r\n            {openComponent === 1 ?\r\n                <LandMarkView\r\n                    title={title}\r\n                    onClickBack={handleCallBackClose}\r\n                    listDistrict={district}\r\n                    listSubDistrict={subDistrict}\r\n                    listTypeOfLandMark={typeOfLandMark}\r\n                    onClickReset={handleResetFormEdit}\r\n                    onClickSubmit={handleSubmit(handleSubmitFormEdit)}\r\n                    numberOfLandMark={data.numberOfLandMark}\r\n                    isActiveDraw={menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM}\r\n                    isActiveEdit={menuRdc.ActiveFunction === ACTIVE_FUNCTION.EDIT_GP_FORM}\r\n                    onDraw={handleDrawOnMap}\r\n                    onEdit={handleEditGraphic}\r\n                    onSurveyDateChange={handleSurveyDateChange}\r\n                /> :\r\n                <LandMarkViewMode\r\n                    title={title}\r\n                    data={dataForViewMode}\r\n                    onClickBack={handleClickBack}\r\n                />\r\n            }\r\n            <AlertMessageSuper {...props} />\r\n            <Loading isShowLoading={isShowLoading} />\r\n        </Fragment>\r\n\r\n    )\r\n\r\n}\r\n\r\nconst mapStateToProps = state => ({\r\n    _values: getFormValues('LandMark')(state),\r\n    authenRdc: state.authen,\r\n    menuRdc: state.menu\r\n})\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    mapAction: bindActionCreators(MapAction, dispatch),\r\n    menuAction: bindActionCreators(MenuAction, dispatch),\r\n})\r\n\r\nconst reduxFormParameter = {\r\n    form: 'LandMark',\r\n    enableReinitialize: true,\r\n    validate: landMarkValidate\r\n};\r\n\r\nexport default compose(\r\n    connect(mapStateToProps, mapDispatchToProps),\r\n    reduxForm(reduxFormParameter),\r\n    withWidth(),\r\n    WithAlertMessage,\r\n    WithLoading\r\n)(ManageResultSearch);\r\n","import React, { useState, useEffect, Fragment } from 'react'\r\nimport { connect } from 'react-redux'\r\nimport { reduxForm, getFormValues } from \"redux-form\";\r\nimport { compose } from \"recompose\";\r\nimport { bindActionCreators } from 'redux';\r\nimport { format } from \"date-fns\";\r\nimport enLocale from \"date-fns/locale/en-US\";\r\nimport withWidth from '@material-ui/core/withWidth';\r\n\r\n//import service utils\r\nimport { fetchGet_ } from '../../../../../../../Utilities/ServiceUtils'\r\n\r\n//import actions\r\nimport * as MapAction from '../../../../../../../Actions/Web/Maps/MapAction'\r\nimport * as MapFunctions from '../../../../../../../Map/MapFunctions'\r\nimport * as MenuAction from '../../../../../../../Actions/Web/MenuAction'\r\n\r\n//import component\r\nimport LandMarkSearchView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/LandMark/Search/LandMarkSearchView'\r\nimport ManageResultSearch from './ManageResultSearch'\r\nimport WithLoading from '../../../../../../../HOC/WithLoading'\r\nimport Loading from '../../../../../../../Controls/Containers/Loading'\r\nimport WithAlertMessage from '../../../../../../../HOC/WithAlertMessage';\r\nimport AlertMessageSuper from '../../../../../../../Controls/Containers/AlertMessageSuper';\r\n\r\n//import validate\r\nimport { landMarkSearchValidate } from '../../../../../../../Utilities/Validate';\r\nimport { convertDateTimeToDisplayDate } from '../../../../../../../Utilities/DateTimeUtil';\r\n\r\n//constants\r\nimport { ALERT_MESSAGE } from '../../../../../../../Constants/Constants'\r\nconst TYPE = 'LANDMARK'\r\n\r\nconst LandMarkSearch = (props) => {\r\n    const {\r\n        handleSubmit,\r\n        change,\r\n        reset,\r\n        title,\r\n        onClickBack,\r\n        showLoading,\r\n        hideLoading,\r\n        isShowLoading,\r\n        mapAction,\r\n        showAlert,\r\n        hideAlert,\r\n        menuAction,\r\n        width,\r\n        panelContentDataRdc,\r\n        authenRdc\r\n    } = props;\r\n\r\n    const [listTypeOfLandMark, setListTypeOfLandMark] = useState([]);\r\n    const [minDate, setMinDate] = useState();\r\n    const [maxDate, setMaxDate] = useState();\r\n    const [openResultView, setOpenResultView] = useState(false);\r\n    const [resultSearch, setResultSearch] = useState(null);\r\n    const [openEditOrView, setOpenEditOrView] = useState(0); //0 = close, 1 = edit, 2 = view\r\n    const [dataItem, setDataItem] = useState();\r\n    const [isActiveSelectInMap, setIsActiveSelectInMap] = useState(false);\r\n    const [isCreate, setIsCreate] = useState(false);\r\n    const [isUpdate, setIsUpdate] = useState(false);\r\n    const [listResultSearch, setListResultSearch] = useState(null)\r\n\r\n    useEffect(() => {\r\n        showLoading();\r\n        initialFormSearch();\r\n    }, [])\r\n\r\n    const initialFormSearch = async () => {\r\n        await callServiceTypeOfLandMark();\r\n        await change('typeOfLandMark', null);\r\n        await hideLoading();\r\n    }\r\n\r\n    const managePanelForMobile = async (isDraw) => {\r\n        if (width === 'sm' || width === 'xs') {\r\n            if (isDraw) {\r\n                await menuAction.closeMenuPanel();\r\n                await menuAction.openMenuMap();\r\n            } else {\r\n                await menuAction.openMenuPanel();\r\n                await menuAction.closeMenuMap();\r\n            }\r\n        }\r\n    }\r\n\r\n    //---------------------- call service lookup landmark --------------------------------//\r\n    const callServiceTypeOfLandMark = async () => {\r\n        try {\r\n            const response = await fetchGet_(`${process.env.REACT_APP_SURVEY_LU_TYPE_LANDMARK}`);\r\n            const objResult = await response.json();\r\n\r\n            const resultTypeOfLandMark = [];\r\n            await objResult.result.map(item => {\r\n                resultTypeOfLandMark.push({ id: item.value, name: item.name });\r\n\r\n                return true\r\n            })\r\n\r\n            await setListTypeOfLandMark(resultTypeOfLandMark)\r\n        } catch (err) {\r\n            console.log('err call service lookup/landmarkType', err)\r\n            setListTypeOfLandMark([])\r\n        }\r\n    }\r\n\r\n    //------------------------ call service delete ------------------------//\r\n    const callServiceDeleteFeature = (objectId) => {\r\n        showLoading();\r\n        const formData = new FormData();\r\n        formData.append(\"objectIds\", objectId);\r\n        formData.append(\"rollbackOnFailure\", true);\r\n        formData.append(\"f\", \"json\");\r\n\r\n        fetch(`${window.CONFIG_URL_GIS.LANDMARK}/deleteFeatures`, {\r\n            method: \"POST\",\r\n            body: formData\r\n        })\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(result => {\r\n                if (result && result.deleteResults && result.deleteResults[0].success) {\r\n                    showAlert({ altMsg: ALERT_MESSAGE.POPUP.DELETE_SUCCESS })\r\n                    mapAction.bindMapCommand(MapFunctions.reSearchDraft);\r\n                } else {\r\n                    showAlert({ altMsg: ALERT_MESSAGE.POPUP.DELETE_FAIL })\r\n                }\r\n            })\r\n            .catch(ex => {\r\n                showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR })\r\n                console.log(\"ex callServiceDeleteFeature\", ex);\r\n            })\r\n            .finally(() => {\r\n                hideLoading();\r\n            })\r\n    }\r\n\r\n    //----------------- set startdate endDate for search----------------------------//\r\n    const setDateForFirstTime = (type, evt) => {\r\n        const date = new Date();\r\n        switch (type) {\r\n            case 'startDate':\r\n                if (evt > date) {\r\n                    change('endDate', evt);\r\n                } else {\r\n                    change('endDate', date);\r\n                }\r\n                break;\r\n            case 'endDate':\r\n                if (evt > date) {\r\n                    change('startDate', date);\r\n                } else {\r\n                    change('startDate', evt)\r\n                }\r\n                break;\r\n            default:\r\n                break;\r\n        }\r\n    }\r\n\r\n    //------------------- set mindate maxdate --------------------------//\r\n    const handleChangeDate = (type, evt) => {\r\n        if (!maxDate && !minDate) {\r\n            setDateForFirstTime(type, evt);\r\n        }\r\n        switch (type) {\r\n            case 'startDate':\r\n                setMinDate(evt);\r\n                break;\r\n            case 'endDate':\r\n                setMaxDate(evt);\r\n                break;\r\n            default:\r\n                break;\r\n        }\r\n    }\r\n\r\n    //-------------------------- prepair format data for use ----------------------//\r\n    const manageData = (data) => {\r\n        const dataFormSearch = data.map(item => {\r\n            return {\r\n                objectId: item.attributes.OBJECTID,\r\n                numberOfLandMark: item.attributes.LMRK_ID,\r\n                typeOfLandMark: item.attributes.LMRK_CODE,\r\n                nameOfLandMark: item.attributes.LMRK_NAME,\r\n                district: item.attributes.DISTRICT_ID,\r\n                subDistrict: item.attributes.SUBDISTRICT_ID,\r\n                surveyYear: item.attributes.UPDATE_YEAR,\r\n                surveyDate: item.attributes.SURVEY_DATE,\r\n                surveyDateDisplay: item.attributes.SURVEY_DATE ? convertDateTimeToDisplayDate(item.attributes.SURVEY_DATE, \"d MMM yyyy\") : \"\",\r\n                geometry: item.geometry,\r\n                creator: item.attributes.CREATOR,\r\n                updater: item.attributes.UPDATER\r\n            }\r\n        })\r\n\r\n        return dataFormSearch\r\n    }\r\n\r\n    //-------------------- when spatial finish--------------//\r\n    const callBackDrawSpatialSearch = async (features) => {\r\n        if (features[0] === 'over') {\r\n            hideLoading();\r\n            showAlert({ altMsg: `${ALERT_MESSAGE.POPUP.OUT_OF_LAND} 1 ตร.กม.` });\r\n        } else {\r\n            const data = await manageData(features);\r\n\r\n            managePanelForMobile(false)\r\n            setIsCreate(false);\r\n            setIsUpdate(false);\r\n            await mapAction.bindClearMapCommand();\r\n            await setOpenResultView(true)\r\n            await setIsActiveSelectInMap(false);\r\n            await setResultSearch(data)\r\n            await setListResultSearch(data)\r\n            await hideLoading();\r\n        }\r\n    }\r\n\r\n    //------------------- prepair constructure for search --------------//\r\n    const createCondition = (values) => {\r\n        let condition = \"\";\r\n\r\n        if (values.nameOfLandMark) {\r\n            condition = condition + ` AND LMRK_NAME LIKE '%${values.nameOfLandMark}%'`\r\n        }\r\n\r\n        if (values.typeOfLandMark) {\r\n            condition = condition + ` AND LMRK_CODE = ${values.typeOfLandMark}`\r\n        }\r\n\r\n        if (values.startDate && values.endDate) {\r\n            const strStartDateUTC = `${format(new Date(values.startDate), 'yyyy-MM-dd', { locale: enLocale })} 00:00:00`\r\n            const strEndDateUTC = `${format(new Date(values.endDate), 'yyyy-MM-dd', { locale: enLocale })} 23:59:59`;\r\n            condition = condition + ` AND SURVEY_DATE BETWEEN timestamp '${strStartDateUTC}' AND timestamp '${strEndDateUTC}'`;\r\n        }\r\n\r\n        if (condition !== \"\") {\r\n            condition = \"1 = 1\" + condition\r\n        }\r\n\r\n        return condition\r\n    }\r\n\r\n    //------------------------ process click in form and map ----------------------------//\r\n    const onClickSelectInMap = () => {\r\n        if (isActiveSelectInMap) {\r\n            mapAction.bindMapCommand(MapFunctions.cleardrawSpatialSearchDraft);\r\n        } else {\r\n            managePanelForMobile(true)\r\n            const { currentPage } = panelContentDataRdc\r\n            // จะเอา layer แรกมา selection เท่านั้น\r\n            const selectionLayerID = currentPage.Layer && currentPage.Layer.length > 0 && currentPage.Layer[0].layerName\r\n            mapAction.bindMapCommand(MapFunctions.drawSpatialSearchDraft, {\r\n                callback: callBackDrawSpatialSearch,\r\n                type: TYPE,\r\n                showLoading,\r\n                selectionLayerID: selectionLayerID\r\n            })\r\n        }\r\n\r\n        setIsActiveSelectInMap(!isActiveSelectInMap)\r\n    }\r\n\r\n    const handleSubmitSearch = async (values) => {\r\n        showLoading()\r\n        setOpenResultView(true);\r\n        const { currentPage } = panelContentDataRdc\r\n        // จะเอา layer แรกมา selection เท่านั้น\r\n        const selectionLayerID = currentPage.Layer && currentPage.Layer.length > 0 && currentPage.Layer[0].layerName\r\n\r\n        await mapAction.bindMapCommand(MapFunctions.cleardrawSpatialSearchDraft);\r\n        await mapAction.bindMapCommand(MapFunctions.selectionDraft, {\r\n            callback: callBackDrawSpatialSearch,\r\n            type: TYPE,\r\n            condition: createCondition(values),\r\n            selectionLayerID: selectionLayerID\r\n        })\r\n    }\r\n\r\n    const handleEditResultSearch = async (item, evt) => {\r\n        evt.stopPropagation();\r\n        await setDataItem(item)\r\n        await setOpenEditOrView(1);\r\n    }\r\n\r\n    const handleDeleteResultSearch = (item, evt) => {\r\n        // console.log('item', item)\r\n        evt.stopPropagation();\r\n        showAlert({\r\n            altMsg: `${ALERT_MESSAGE.QUESTION.DELETE} ${item.nameOfLandMark} ?`,\r\n            altType: 2,\r\n            callbackConfirm: () => {\r\n                hideAlert();\r\n                callServiceDeleteFeature(item.objectId)\r\n            }\r\n        })\r\n    }\r\n\r\n    const handleOpenDetailResultSearch = async (item, evt) => {\r\n        evt.stopPropagation();\r\n        await setDataItem(item)\r\n        await setOpenEditOrView(2);\r\n    }\r\n\r\n    const handleCloseAndOpenForm = () => {\r\n        setOpenEditOrView(0)\r\n        menuAction.activeFunction(null)\r\n        mapAction.bindClearMapCommand();\r\n        mapAction.bindMapCommand(MapFunctions.reSearchDraft)\r\n    }\r\n\r\n    const handleResetFormSearch = (evt) => {\r\n        evt.stopPropagation();\r\n        reset();\r\n\r\n        change('typeOfLandMark', null);\r\n        change('startDate', null);\r\n        change('endDate', null);\r\n        setMaxDate(null);\r\n        setMinDate(null)\r\n    }\r\n\r\n    const handleClickBack = async () => {\r\n        await mapAction.bindMapCommand(MapFunctions.cleardrawSpatialSearchDraft)\r\n        await mapAction.bindClearMapCommand();\r\n        onClickBack()\r\n    }\r\n\r\n    const handleChangeCheckbox = async (type) => {\r\n        switch(type) {\r\n            case \"create\":\r\n                filterListResult(!isCreate, isUpdate)\r\n                break;\r\n            case \"update\":\r\n                filterListResult(isCreate, !isUpdate)\r\n                break;\r\n            default:\r\n                break;\r\n        }\r\n    }\r\n\r\n    const filterListResult = async (create, update) => {\r\n        const userId = authenRdc.profile.userID;\r\n\r\n        const filterResult = await listResultSearch.filter(item => {\r\n            return create && update ? \r\n                item.creator === userId || item.updater === userId :\r\n                create && !update ?\r\n                item.creator === userId :\r\n                !create && update ?\r\n                item.updater === userId :\r\n                item\r\n        })\r\n\r\n        await setResultSearch(filterResult);\r\n        await setIsCreate(create);\r\n        await setIsUpdate(update)\r\n    }\r\n\r\n    if (!openEditOrView) {\r\n        return (\r\n            <Fragment>\r\n                <LandMarkSearchView\r\n                    title={title}\r\n                    onClickBack={handleClickBack}\r\n                    listTypeOfLandMark={listTypeOfLandMark}\r\n                    onClickSubmit={handleSubmit(handleSubmitSearch)}\r\n                    onClickReset={handleResetFormSearch}\r\n                    onChangeDate={handleChangeDate}\r\n                    minDate={minDate}\r\n                    maxDate={maxDate}\r\n                    openResultView={openResultView}\r\n                    resultSearch={resultSearch}\r\n                    onEditResultSearch={handleEditResultSearch}\r\n                    onDeleteResultSearch={handleDeleteResultSearch}\r\n                    onClickOpenResultSearch={handleOpenDetailResultSearch}\r\n                    isActiveSelectInMap={isActiveSelectInMap}\r\n                    onClickSelectInMap={onClickSelectInMap}\r\n                    isCreate={isCreate}\r\n                    isUpdate={isUpdate}\r\n                    handleChangeCheckbox={handleChangeCheckbox}\r\n                />\r\n                <AlertMessageSuper {...props} />\r\n                <Loading isShowLoading={isShowLoading} />\r\n            </Fragment>\r\n        )\r\n    } else {\r\n        return (\r\n            <ManageResultSearch\r\n                title={title}\r\n                onClickBack={handleCloseAndOpenForm}\r\n                initialValues={dataItem}\r\n                openComponent={openEditOrView}\r\n                data={dataItem}\r\n            />\r\n        )\r\n    }\r\n}\r\n\r\nconst mapStateToProps = state => ({\r\n    _values: getFormValues('LandMarkSearch')(state),\r\n    panelContentDataRdc: state.PanelContentData,\r\n    authenRdc: state.authen\r\n})\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    mapAction: bindActionCreators(MapAction, dispatch),\r\n    menuAction: bindActionCreators(MenuAction, dispatch),\r\n})\r\n\r\nconst reduxFormParameter = {\r\n    form: 'LandMarkSearch',\r\n    validate: landMarkSearchValidate,\r\n    enableReinitialize: true\r\n};\r\n\r\nexport default compose(\r\n    connect(mapStateToProps, mapDispatchToProps),\r\n    reduxForm(reduxFormParameter),\r\n    withWidth(),\r\n    WithAlertMessage,\r\n    WithLoading\r\n)(LandMarkSearch);","import React from 'react';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport { Field } from 'redux-form';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport SelectFieldRedux from '../../../../../../../Controls/Containers/SelectFieldRedux';\r\nimport Button from '../../../../../../../Controls/Containers/Button';\r\nimport TextFieldRedux from '../../../../../../../Controls/Containers/TextFieldRedux';\r\nimport ReduxFormDatePickerThai from '../../../../../../../Controls/Containers/Picker/ReduxFormDatePickerThai';\r\nimport classnames from 'classnames';\r\n\r\n//import tooltip\r\nimport Tooltip from '../../../../../../../Controls/Containers/Tooltip'\r\n\r\nconst FormDraftView = ({\r\n    classes,\r\n    luDataType,\r\n    luDistrict,\r\n    luSubDistrict,\r\n    onSubmit,\r\n    handleSubmit,\r\n    onClickClearForm,\r\n    onEditLine,\r\n    onDrawLine,\r\n    onChangeDistrict,\r\n    onChangeSubDistrict,\r\n    isActiveDraw,\r\n    isActiveEdit\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root} >\r\n            <form onSubmit={handleSubmit(onSubmit)} className={classes.rootForm}>\r\n                <Grid container justify=\"flex-end\" className={classes.row}>\r\n                    <Tooltip title=\"วาดเส้นใหม่\" placement=\"bottom\">\r\n                        <div onClick={onDrawLine} className={classnames(classes.btnManageGraphic, { [classes.btnAddNormal]: !isActiveDraw }, { [classes.btnAddSelected]: isActiveDraw })}></div>\r\n                    </Tooltip>\r\n                    <Tooltip title=\"แก้ไขการวาดเส้น\" placement=\"bottom\">\r\n                        <div onClick={onEditLine} className={classnames(classes.btnManageGraphic, { [classes.btnEditNormal]: !isActiveEdit }, { [classes.btnEditSelected]: isActiveEdit })}></div>\r\n                    </Tooltip>\r\n                </Grid>\r\n\r\n                <Field\r\n                    name=\"name\"\r\n                    label=\"ชื่อ\"\r\n                    maxLength={100}\r\n                    component={TextFieldRedux}\r\n                    required\r\n                />\r\n\r\n                <Field\r\n                    label=\"ประเภทข้อมูล\"\r\n                    name=\"dataType\"\r\n                    component={SelectFieldRedux}\r\n                    data={luDataType}\r\n                    keyData={{ value: \"value\", label: \"name\" }}\r\n                    required\r\n                />\r\n\r\n                <Field\r\n                    name=\"description\"\r\n                    label=\"รายละเอียด\"\r\n                    component={TextFieldRedux}\r\n                    maxLength={300}\r\n                    multiline\r\n                    rows={2}\r\n                />\r\n\r\n                <Field\r\n                    name=\"date\"\r\n                    label=\"วันที่สำรวจ\"\r\n                    component={ReduxFormDatePickerThai}\r\n                    maxDate={new Date()}\r\n                    required\r\n                />\r\n\r\n                <Field\r\n                    name=\"province\"\r\n                    label=\"จังหวัด\"\r\n                    component={TextFieldRedux}\r\n                    disabled\r\n                />\r\n\r\n                <Field\r\n                    name=\"districtID\"\r\n                    component={SelectFieldRedux}\r\n                    onChangeValue={onChangeDistrict}\r\n                    data={luDistrict}\r\n                    label=\"เขต\"\r\n                    keyData={{ value: \"value\", label: \"name\" }}\r\n                    required\r\n                />\r\n\r\n                <Field\r\n                    name=\"subDistrictID\"\r\n                    label=\"แขวง\"\r\n                    component={SelectFieldRedux}\r\n                    onChangeValue={onChangeSubDistrict}\r\n                    data={luSubDistrict}\r\n                    keyData={{ value: \"value\", label: \"name\" }}\r\n                    required\r\n                />\r\n\r\n                <Grid container justify=\"center\" spacing={24} className={classes.footer}>\r\n                    <Grid item>\r\n                        <Button\r\n                            label=\"ยกเลิก\"\r\n                            onClick={onClickClearForm}\r\n                        />\r\n                    </Grid>\r\n                    <Grid item>\r\n                        <Button\r\n                            type=\"submit\"\r\n                            label=\"บันทึก\"\r\n                        />\r\n                    </Grid>\r\n                </Grid>\r\n            </form>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        padding: '10px'\r\n\r\n    },\r\n    rootForm: {\r\n        width: '100%',\r\n        height: '100%'\r\n    },\r\n    row: {\r\n        height: \"50px\",\r\n        width: \"100%\",\r\n        marginTop: \"15px\",\r\n    },\r\n    multiRow: {\r\n        height: \"70px\",\r\n        width: \"100%\",\r\n        marginTop: \"5px\",\r\n    },\r\n    colLabel: {\r\n        fontSize: '14px',\r\n        paddingTop: '5px'\r\n    },\r\n    btnManageGraphic: {\r\n        width: \"40px\",\r\n        minHeight: \"40px\",\r\n        margin: \"5px\",\r\n        display: \"block\",\r\n        padding: 0,\r\n        backgroundSize: \"40px 40px\",\r\n        backgroundRepeat: \"no-repeat\",\r\n        backgroundPosition: \"center\"\r\n    },\r\n    btnAddNormal: {\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_add_normal@2x.png)`,\r\n        \"&:Hover\": {\r\n            backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_add_selected@2x.png)`\r\n        },\r\n        cursor: 'pointer'\r\n    },\r\n    btnAddSelected: {\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_add_selected@2x.png)`,\r\n        cursor: 'pointer'\r\n    },\r\n    btnEditNormal: {\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_edit_normal@2x.png)`,\r\n        \"&:Hover\": {\r\n            backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_edit_selected@2x.png)`\r\n        },\r\n        cursor: 'pointer'\r\n    },\r\n    btnEditSelected: {\r\n        backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_edit_selected@2x.png)`,\r\n        cursor: 'pointer'\r\n    },\r\n    formControl: {\r\n        minWidth: \"100%\",\r\n    },\r\n    label: {\r\n        marginBottom: '5px'\r\n    },\r\n    red: {\r\n        color: \"red\"\r\n    },\r\n    formHelper: {\r\n        marginTop: '4px',\r\n        color: \"red\",\r\n        padding: '0px',\r\n    },\r\n    footer: {\r\n        marginTop: '10px',\r\n        marginBottom: '10px'\r\n    }\r\n}))(FormDraftView)\r\n","import React, { Component, Fragment } from 'react';\r\nimport { reduxForm } from 'redux-form';\r\nimport PropTypes from 'prop-types';\r\n\r\n//import component\r\nimport FormDraftView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/DraftLine/Form/FormDraftView';\r\nimport WithAlertMessage from '../../../../../../../HOC/WithAlertMessage';\r\nimport AlertMessageSuper from '../../../../../../../Controls/Containers/AlertMessageSuper';\r\n\r\n//import service - utils\r\nimport { validateFormDraftPnt } from '../../../../../../../Utilities/Validate';\r\nimport { fetchGet_ } from '../../../../../../../Utilities/ServiceUtils';\r\n\r\n//import constants\r\nimport { ALERT_MESSAGE } from '../../../../../../../Constants/Constants';\r\n\r\n/*\r\n    1. ส่ง urlLookupDataType เพื่อดึงข้อมูล lookup มาแสดงใน droupdown ประเภทข้อมูล\r\n    2. ส่ง callBackSubmitForm เพื่อส่งค่าในฟรอมกลับไปยัง component ที่เรียกใช้\r\n*/\r\n\r\nexport class FormDraft extends Component {\r\n    constructor(props) {\r\n        super(props)\r\n\r\n        this.isAlertAdminpolyInconsistent = false;//เป็นตัวล็อคให้ alert แจ้งเตือนครั้งเดียว\r\n        this.currentAdminpolyData = {\r\n            districtCode: null,\r\n            subdistrictCode: null\r\n        }\r\n\r\n        this.state = {\r\n            luDataType: [],\r\n            luDistrict: [],\r\n            luSubDistrict: []\r\n        }\r\n    }\r\n\r\n    componentDidMount() {\r\n        this.callServiceGetLupDataType();\r\n        const { initializeValue, initialize } = this.props;\r\n        \r\n        if (initializeValue) {\r\n            initialize({\r\n                name: initializeValue.name,\r\n                date: initializeValue.date,\r\n                dataType: initializeValue.type,\r\n                description: initializeValue.detail,\r\n                districtID: initializeValue.districtID,\r\n                subDistrictID: initializeValue.subDistrictID,\r\n                province: \"กรุงเทพมหานคร\"\r\n            })\r\n            initializeValue.districtID && this.callServiceSubDistrict(initializeValue.districtID);\r\n\r\n            //เก็บค่าปัจจุบันของ adminpoly\r\n            this.currentAdminpolyData.districtCode = initializeValue.districtID;\r\n            this.currentAdminpolyData.subdistrictCode = initializeValue.subDistrictID\r\n        }\r\n        this.callServiceDistrict();\r\n    }\r\n\r\n    componentWillReceiveProps(nextProps) {\r\n        const { districtID, subDistrictID, change } = this.props;\r\n        if (districtID !== nextProps.districtID) {\r\n            this.currentAdminpolyData.districtCode = nextProps.districtID;\r\n            this.currentAdminpolyData.subdistrictCode = null;\r\n            this.isAlertAdminpolyInconsistent = false;\r\n\r\n            change(\"districtID\", nextProps.districtID)\r\n            this.callServiceSubDistrict(nextProps.districtID)\r\n        }\r\n\r\n        if (subDistrictID !== nextProps.subDistrictID) {\r\n            this.currentAdminpolyData.subdistrictCode = nextProps.subDistrictID;\r\n            this.isAlertAdminpolyInconsistent = false;\r\n\r\n            change(\"subDistrictID\", nextProps.subDistrictID)\r\n        }\r\n    }\r\n\r\n    callServiceDistrict = () => {\r\n        fetchGet_(`${process.env.REACT_APP_LU_DISTRICT}?provinceid=10`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(data => {\r\n                this.setState({\r\n                    luDistrict: data && data.result ? data.result : []\r\n                })\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceDistric', ex)\r\n            })\r\n    }\r\n\r\n    callServiceSubDistrict = (districtID) => {\r\n        fetchGet_(`${process.env.REACT_APP_LU_SUBDISTRICT}?provinceid=10&districtid=${districtID}`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(data => {\r\n                this.setState({\r\n                    luSubDistrict: data && data.result ? data.result : []\r\n                })\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceSubDistric', ex)\r\n            })\r\n    }\r\n\r\n    changeTextBoxValue = (name, value) => {\r\n        this.props.change(name, value)\r\n    }\r\n\r\n    confirmDistrictChange = districtCode => {\r\n        this.isAlertAdminpolyInconsistent = true;\r\n        this.currentAdminpolyData.districtCode = districtCode;\r\n        this.currentAdminpolyData.subdistrictCode = null;\r\n        this.callServiceSubDistrict(districtCode);\r\n        this.changeTextBoxValue(\"districtID\", districtCode);\r\n        this.changeTextBoxValue('subDistrictID', null);\r\n        this.props.hideAlert();\r\n    }\r\n\r\n    confirmSubdistrictChange = subdistrictCode => {\r\n        this.isAlertAdminpolyInconsistent = true;\r\n        this.currentAdminpolyData.subdistrictCode = subdistrictCode;\r\n        this.changeTextBoxValue('subDistrictID', subdistrictCode);\r\n        this.props.hideAlert();\r\n    }\r\n\r\n    cancelAdminpolyChange = () => {\r\n        if (this.currentAdminpolyData.districtCode) {\r\n            this.changeTextBoxValue(\"districtID\", this.currentAdminpolyData.districtCode);\r\n            this.changeTextBoxValue(\"subDistrictID\", this.currentAdminpolyData.subdistrictCode);\r\n        }\r\n        else {//กรณีที่เข้ามาครั้งแรกแล้วยังไม่มี current adminpoly\r\n            const { initialValues } = this.props;\r\n            this.changeTextBoxValue('districtID', initialValues.districtID);\r\n            this.changeTextBoxValue('subDistrictID', initialValues.subDistrictID);\r\n        }\r\n\r\n        this.props.hideAlert();\r\n    }\r\n\r\n    handleChangeDistrict = evt => {\r\n        const newDistrictCode = evt.target.value;\r\n        const { showAlert } = this.props;\r\n        const isInconsistent = (this.currentAdminpolyData.districtCode !== newDistrictCode);\r\n        if (isInconsistent) {\r\n            if (!this.isAlertAdminpolyInconsistent && this.currentAdminpolyData.districtCode) {\r\n                showAlert({\r\n                    altMsg: ALERT_MESSAGE.QUESTION.WARNING_POINT,\r\n                    altType: 2,\r\n                    callbackConfirm: this.confirmDistrictChange,\r\n                    callbackClose: this.cancelAdminpolyChange,\r\n                    param: newDistrictCode\r\n                })\r\n            }\r\n            else {\r\n                this.confirmDistrictChange(newDistrictCode);\r\n            }\r\n        }\r\n    }\r\n\r\n    handleChangeSubDistrict = evt => {\r\n        const newSubdistrictCode = evt.target.value;\r\n        const { showAlert } = this.props;\r\n        const isInconsistent = (this.currentAdminpolyData.subdistrictCode !== newSubdistrictCode);\r\n        if (isInconsistent) {\r\n            if (!this.isAlertAdminpolyInconsistent && this.currentAdminpolyData.subdistrictCode) {\r\n                showAlert({\r\n                    altMsg: ALERT_MESSAGE.QUESTION.WARNING_POINT,\r\n                    altType: 2,\r\n                    callbackConfirm: this.confirmSubdistrictChange,\r\n                    callbackClose: this.cancelAdminpolyChange,\r\n                    param: newSubdistrictCode\r\n                })\r\n            }\r\n            else {\r\n                this.confirmSubdistrictChange(newSubdistrictCode);\r\n            }\r\n        }\r\n    }\r\n\r\n    callServiceGetLupDataType = () => {\r\n        fetchGet_(this.props.urlLookupDataType)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(({ result }) => {\r\n                if (result) {\r\n                    this.setState({\r\n                        luDataType: result\r\n                    })\r\n                }\r\n            })\r\n            .catch(ex => { console.log('ex callServiceGetLupDataType', ex) })\r\n    }\r\n\r\n    handleSubmit = values => {\r\n        const { callBackSubmitForm } = this.props;\r\n        callBackSubmitForm && callBackSubmitForm(values)\r\n    }\r\n\r\n    onEditLine = () => {\r\n        const { onEditLine } = this.props;\r\n        onEditLine()\r\n    }\r\n    onDrawLine = () => {\r\n        const { onDrawLine } = this.props;\r\n        onDrawLine()\r\n    }\r\n\r\n    render() {\r\n        const { handleSubmit, isActiveDraw, isActiveEdit, onClickBack } = this.props;\r\n        const { luDataType, luDistrict, luSubDistrict } = this.state;\r\n\r\n        return (\r\n            <Fragment>\r\n                <FormDraftView\r\n                    luDataType={luDataType}\r\n                    handleSubmit={handleSubmit}\r\n                    onSubmit={this.handleSubmit}\r\n                    onClickClearForm={onClickBack}\r\n                    onEditLine={this.onEditLine}\r\n                    onDrawLine={this.onDrawLine}\r\n                    isActiveDraw={isActiveDraw}\r\n                    isActiveEdit={isActiveEdit}\r\n                    luDistrict={luDistrict}\r\n                    luSubDistrict={luSubDistrict}\r\n                    onChangeDistrict={this.handleChangeDistrict}\r\n                    onChangeSubDistrict={this.handleChangeSubDistrict}\r\n                />\r\n                <AlertMessageSuper {...this.props} />\r\n            </Fragment>\r\n        )\r\n    }\r\n}\r\n\r\nFormDraft.propTypes = {\r\n    luDataType: PropTypes.array, // [{id:\"\",name:\"\"}]\r\n    callBackSubmitForm: PropTypes.func\r\n}\r\n\r\nconst reduxFormParameter = {\r\n    form: \"formDraft\",\r\n    validate: validateFormDraftPnt,\r\n    initialValues: { province: \"กรุงเทพมหานคร\" }\r\n};\r\n\r\nexport default WithAlertMessage(reduxForm(reduxFormParameter)(FormDraft))\r\n\r\n\r\n\r\n","import React from 'react';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { withStyles } from '@material-ui/core/styles'\r\nimport AppBarHeaderView from '../../../../AppBarHeaderView';\r\nimport { Scrollbars } from 'react-custom-scrollbars';\r\nconst AddDraftPointView = ({\r\n    classes,\r\n    title,\r\n    children,\r\n    onClickBack\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root}>\r\n            <AppBarHeaderView\r\n                title={title}\r\n                onClickBack={onClickBack}\r\n            />\r\n            <Grid item xs={12} className={classes.body}>\r\n                \r\n                <Scrollbars\r\n                    autoHide={false}>\r\n                {children}\r\n                </Scrollbars>\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        height: '100%',\r\n    },\r\n    body: {\r\n        height: 'calc(100% - 45px)',\r\n        width:'100%'\r\n    }\r\n}))(AddDraftPointView)\r\n","import React, { Component, Fragment } from 'react'\r\nimport { bindActionCreators } from 'redux';\r\nimport { connect } from 'react-redux';\r\nimport { compose } from 'recompose';\r\nimport withWidth from '@material-ui/core/withWidth';\r\nimport { isDirty } from 'redux-form';\r\n\r\n//import component\r\nimport FormDraft from '../Form/FormDraft';\r\nimport AddDraftLineView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/DraftLine/Add/AddDraftLineView';\r\nimport WithAlertMessage from '../../../../../../../HOC/WithAlertMessage';\r\nimport AlertMessageSuper from '../../../../../../../Controls/Containers/AlertMessageSuper';\r\n\r\nimport Loading from '../../../../../../../Controls/Containers/Loading';\r\nimport WithLoading from '../../../../../../../HOC/WithLoading';\r\n\r\n//import service - utils\r\nimport { fetchGet_ } from '../../../../../../../Utilities/ServiceUtils';\r\n\r\n//import actions\r\nimport * as MapFunctions from '../../../../../../../Map/MapFunctions';\r\nimport * as MapAction from '../../../../../../../Actions/Web/Maps/MapAction';\r\nimport * as MenuAction from '../../../../../../../Actions/Web/MenuAction';\r\n\r\n//import constanst\r\nimport { TABLE_MAPSHEET1K, ALERT_MESSAGE , ACTIVE_FUNCTION} from '../../../../../../../Constants/Constants';\r\n\r\nexport class AddDraftLine extends Component {\r\n    constructor() {\r\n        super();\r\n        this.state = {\r\n            geometry: null,\r\n            graphic: null,\r\n            // isActiveDraw: false,\r\n            // isActiveEdit: false,\r\n            districtID: null,\r\n            subDistrictID: null,\r\n            isLocalBKK: false,\r\n            distanceLine: 0\r\n        }\r\n    }\r\n\r\n    managePanelForMobile = async (isDraw) => {\r\n        const { menuAction, width } = this.props;\r\n        if (width === 'sm' || width === 'xs') {\r\n            if (isDraw) {\r\n                await menuAction.closeMenuPanel();\r\n                await menuAction.openMenuMap();\r\n            } else {\r\n                await menuAction.openMenuPanel();\r\n                await menuAction.closeMenuMap();\r\n            }\r\n        }\r\n    }\r\n\r\n    handleCallBackSubmitForm = values => {\r\n        const { geometry, distanceLine, isLocalBKK } = this.state;\r\n        const { showAlert, authenRdc, showLoading, hideLoading } = this.props;\r\n        showLoading();\r\n        if (geometry) {\r\n            if (isLocalBKK) {\r\n                if (distanceLine < 10) {\r\n                    this.callMapServiceSaveline({\r\n                        geometry,\r\n                        date: values.date,\r\n                        name: values.name,\r\n                        type: values.dataType,\r\n                        description: values.description,\r\n                        districtID: values.districtID,\r\n                        subDistrictID: values.subDistrictID,\r\n                        userID: authenRdc.profile && authenRdc.profile.userID ? authenRdc.profile.userID : \"\"\r\n                    });\r\n                } else {\r\n                    showAlert({ altMsg: `${ALERT_MESSAGE.POPUP.OUT_OF_LAND} 10 กม.` })\r\n                    hideLoading()\r\n                }\r\n\r\n            } else {\r\n                showAlert({ altMsg: ALERT_MESSAGE.POPUP.OUT_OF_BKK })\r\n                hideLoading()\r\n            }\r\n        } else {\r\n            \r\n            showAlert({ altMsg: ALERT_MESSAGE.POPUP.REQUEST_PIN_MAP })\r\n            hideLoading()\r\n        }\r\n    }\r\n\r\n    callMapServiceSaveline = ({ geometry, date, name, type, description, userID, districtID, subDistrictID }) => {\r\n        const { panelContentDataRdc, mapAction } = this.props;\r\n        const { currentPage } = panelContentDataRdc\r\n        const selectionLayerID = currentPage.Layer && currentPage.Layer.length > 0 && currentPage.Layer[0].layerName\r\n        // step 1 save point into map service\r\n        mapAction.bindMapCommand(MapFunctions.applyEditShapeDraftLine, {\r\n            date, name, type, description, districtID, subDistrictID,\r\n            geometry: geometry,\r\n            callback: this.callBackSaveLine,\r\n            mode: \"ADD\",\r\n            userID,\r\n            selectionLayerID\r\n        })\r\n    }\r\n\r\n    callBackSaveLine = (values) => {\r\n        const { showAlert, mapAction, hideLoading } = this.props;\r\n        mapAction.bindClearMapCommand();\r\n        if (values && values.success) {\r\n            this.callServiceSaveForm(values.objectId)\r\n        } else {\r\n            showAlert({ altMsg: ALERT_MESSAGE.POPUP.SAVE_FAIL })\r\n            hideLoading()\r\n        }\r\n    }\r\n\r\n    callServiceSaveForm = (objectID) => {\r\n        const { showAlert, hideLoading } = this.props;\r\n        fetchGet_(`${process.env.REACT_APP_UPDATE_MAPSHEET1K}?objectid=${objectID}&tablename=${TABLE_MAPSHEET1K.DRAFT_LINE}`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(values => {\r\n                if (values && values.statusCode === 1) {\r\n                    showAlert({ altMsg: ALERT_MESSAGE.POPUP.SAVE_SUCCESS, callbackClose: this.handleCloseForm })\r\n                } else {\r\n                    showAlert({ altMsg: ALERT_MESSAGE.POPUP.SAVE_FAIL })\r\n                }\r\n            })\r\n            .catch(ex => {\r\n                showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR })\r\n                console.log('ex callServiceSaveForm', ex)\r\n            })\r\n            .finally(() => {\r\n                hideLoading();\r\n            })\r\n    }\r\n\r\n    handleCloseForm = () => {\r\n        const { mapAction,menuAction, onClickBack } = this.props;\r\n        mapAction.bindMapCommand(MapFunctions.clearGraphicDrawDraft);\r\n        menuAction.activeFunction(null)\r\n        onClickBack && onClickBack();\r\n    }\r\n\r\n    handleClickBack = () => {\r\n        const { dirtyFormAdd, showAlert } = this.props;\r\n\r\n        if (dirtyFormAdd) {\r\n            showAlert({\r\n                altMsg: ALERT_MESSAGE.QUESTION.CANCEL_FORM,\r\n                altType: 2,\r\n                callbackConfirm: this.handleCloseForm\r\n            })\r\n        } else {\r\n            this.handleCloseForm();\r\n        }\r\n    }\r\n\r\n    handleEditLine = async () => {\r\n        const { mapAction,menuRdc,menuAction } = this.props\r\n        const { graphic } = this.state\r\n\r\n        // if (isActiveEdit) { // ปิดการ edit\r\n        //     mapAction.bindMapCommand(MapFunctions.editGraphicDraftLine, { graphic, isActivateEdit: false })\r\n        // } else { // เปิดการ edit\r\n        //     this.managePanelForMobile(true)\r\n        //     await mapAction.bindMapCommand(MapFunctions.drawDraftLine, { isActivateDraw: false })\r\n        //     mapAction.bindMapCommand(MapFunctions.editGraphicDraftLine, { graphic, callback: this.handleCallBackEditGraphic })\r\n        // }\r\n\r\n        // this.setState(prevState => ({\r\n        //     isActiveEdit: !prevState.isActiveEdit,\r\n        //     isActiveDraw: false\r\n        // }))\r\n\r\n        if(menuRdc.ActiveFunction === ACTIVE_FUNCTION.EDIT_GP_FORM){\r\n            menuAction.activeFunction(null)\r\n            mapAction.bindMapCommand(MapFunctions.editGraphicDraftLine, { graphic, isActivateEdit: false })\r\n        }else{\r\n            this.managePanelForMobile(true)\r\n            menuAction.activeFunction(ACTIVE_FUNCTION.EDIT_GP_FORM)\r\n            await mapAction.bindMapCommand(MapFunctions.drawDraftLine, { isActivateDraw: false })\r\n            mapAction.bindMapCommand(MapFunctions.editGraphicDraftLine, { graphic, callback: this.handleCallBackEditGraphic })\r\n        }\r\n    }\r\n\r\n\r\n    handleCallBackEditGraphic = (geometry, distance) => {\r\n        const { showAlert,menuAction } = this.props\r\n        if (geometry) {\r\n            this.props.mapAction.bindMapCommand(MapFunctions.getDistrictAndSubDistrictFormPoint, { // save sub-district code\r\n                geometry: geometry,\r\n                callbackFn: this.callbackGetDistrictAndSubDistrict\r\n            })\r\n            this.setState({ geometry: geometry, distanceLine: distance }) //เก็บ distance เพื่อเอาไปเช็คตอนจังหวะกด save form\r\n\r\n            if (distance > 10) { //alert เตือนหาก ความยาวเส้นเกิน 10 กม.\r\n                showAlert({ altMsg: `${ALERT_MESSAGE.POPUP.OUT_OF_LAND} 10 กิโลเมตร`, altType: 1 })\r\n            }\r\n        } else {\r\n            // this.setState({ isActiveEdit: false })\r\n            menuAction.activeFunction(null)\r\n            showAlert({ altMsg: ALERT_MESSAGE.POPUP.REQUEST_PIN_MAP , altType: 1, callbackConfirm: this.handleCloseForm })\r\n        }\r\n    }\r\n\r\n    handleDrawLine = async () => {\r\n        const { mapAction, menuAction ,menuRdc} = this.props;\r\n        const { graphic } = this.state\r\n\r\n        // if (isActiveDraw) { // ปิดการวาด\r\n        //     mapAction.bindMapCommand(MapFunctions.drawDraftLine, { isActivateDraw: false })\r\n        // } else { // เปิดการวาด\r\n        //     this.managePanelForMobile(true)\r\n        //     await mapAction.bindMapCommand(MapFunctions.editGraphicDraftLine, { isActivateEdit: false, graphic })\r\n        //     mapAction.bindMapCommand(MapFunctions.drawDraftLine, { callback: this.handleCallBackDrawLine })\r\n        // }\r\n\r\n        // this.setState(prevState => ({\r\n        //     isActiveEdit: false,\r\n        //     isActiveDraw: !prevState.isActiveDraw\r\n        // }))\r\n\r\n        if(menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM){\r\n            menuAction.activeFunction(null)\r\n            mapAction.bindMapCommand(MapFunctions.drawDraftLine, { isActivateDraw: false })\r\n        }else{\r\n            this.managePanelForMobile(true)\r\n            menuAction.activeFunction(ACTIVE_FUNCTION.ADD_GP_FORM)\r\n            await mapAction.bindMapCommand(MapFunctions.editGraphicDraftLine, { isActivateEdit: false, graphic })\r\n            setTimeout(()=>{ // set timeout เพื่อแก้ปัญหา willunmount ของ maptool clear event draw\r\n                mapAction.bindMapCommand(MapFunctions.drawDraftLine, { callback: this.handleCallBackDrawLine })\r\n            },50)\r\n        }\r\n    }\r\n\r\n    handleCallBackDrawLine = async (evt, graphic) => {\r\n        const { mapAction, showLoading, showAlert,menuAction } = this.props;\r\n        this.managePanelForMobile(false)\r\n        if (evt) {\r\n            showLoading();\r\n            menuAction.activeFunction(null)\r\n            await mapAction.bindMapCommand(MapFunctions.getDistrictAndSubDistrictFormPoint, { // save sub-district code\r\n                geometry: evt.geometry,\r\n                callbackFn: this.callbackGetDistrictAndSubDistrict\r\n            })\r\n            this.setState({\r\n                geometry: evt.geometry,\r\n                graphic: graphic,\r\n                // isActiveDraw: false,\r\n                distanceLine: 0 // set ค่า distanceLine ให้กลับเป็น0\r\n            })\r\n        } else {\r\n            showAlert({ altMsg: \"ระยะทางเกิน 10 กิโลเมตร\" })\r\n        }\r\n    }\r\n\r\n    callbackGetDistrictAndSubDistrict = (values) => {\r\n        this.props.mapAction.bindClearMapCommand()\r\n        this.props.hideLoading();\r\n        if (values) {\r\n            if (!values.errMsg) {\r\n                const { SUBDISTRICT_ID, DISTRICT_ID } = values;\r\n                const subDistrictCode = SUBDISTRICT_ID;\r\n                const districtCode = DISTRICT_ID;\r\n                this.setState({\r\n                    districtID: districtCode,\r\n                    subDistrictID: subDistrictCode,\r\n                    isLocalBKK: true\r\n                })\r\n            } else {\r\n                this.props.showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR })\r\n            }\r\n        } else {\r\n            this.props.showAlert({ altMsg: ALERT_MESSAGE.POPUP.OUT_OF_BKK })\r\n            this.setState({\r\n                districtID: null,\r\n                subDistrictID: null,\r\n                isLocalBKK: false\r\n            })\r\n        }\r\n    }\r\n\r\n    render() {\r\n        const { title, isShowLoading, menuRdc } = this.props;\r\n        const { districtID, subDistrictID } = this.state\r\n        return (\r\n            <Fragment>\r\n                <AddDraftLineView\r\n                    title={title}\r\n                    onClickBack={this.handleClickBack}\r\n                >\r\n                    <FormDraft\r\n                        onClickBack={this.handleClickBack}\r\n                        urlLookupDataType={process.env.REACT_APP_SURVEY_LU_DRAFT_LINE_TYPE}\r\n                        callBackSubmitForm={this.handleCallBackSubmitForm}\r\n                        onEditLine={this.handleEditLine}\r\n                        onDrawLine={this.handleDrawLine}\r\n                        isActiveDraw={menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM}\r\n                        isActiveEdit={menuRdc.ActiveFunction === ACTIVE_FUNCTION.EDIT_GP_FORM}\r\n                        districtID={districtID}\r\n                        subDistrictID={subDistrictID}\r\n                    />\r\n                </AddDraftLineView >\r\n                <AlertMessageSuper {...this.props} />\r\n                <Loading isShowLoading={isShowLoading} />\r\n            </Fragment>\r\n        )\r\n    }\r\n}\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    mapAction: bindActionCreators(MapAction, dispatch),\r\n    menuAction: bindActionCreators(MenuAction, dispatch),\r\n})\r\n\r\nconst mapStateToProps = state => ({\r\n    authenRdc: state.authen,\r\n    panelContentDataRdc: state.PanelContentData,\r\n    menuRdc:state.menu,\r\n    dirtyFormAdd: isDirty('formDraft')(state)\r\n})\r\n\r\nconst enhance = compose(\r\n    connect(mapStateToProps, mapDispatchToProps),\r\n    withWidth(),//จะได้ props width มา\r\n    WithAlertMessage,\r\n    WithLoading\r\n)\r\n\r\nexport default enhance(AddDraftLine)\r\n","import React from 'react';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport AppBarHeaderView from '../../../../AppBarHeaderView';\r\nimport { Scrollbars } from 'react-custom-scrollbars';\r\n\r\nconst SearchDraftLineView = ({\r\n    classes,\r\n    title,\r\n    children,\r\n    onClickBack\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root}>\r\n            <AppBarHeaderView\r\n                title={title}\r\n                onClickBack={onClickBack}\r\n            />\r\n            <Grid item xs={12} className={classes.body}>\r\n                <Scrollbars autoHide>\r\n                    {children}\r\n                </Scrollbars>\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        height: '100%',\r\n    },\r\n    body: {\r\n        height: 'calc(100% - 45px)',\r\n        width: '100%'\r\n    }\r\n}))(SearchDraftLineView)\r\n","import React from 'react';\r\nimport { Field } from 'redux-form';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport classnames from 'classnames';\r\n\r\nimport TextFieldRedux from '../../../../../../../Controls/Containers/TextFieldRedux';\r\nimport SelectFieldRedux from '../../../../../../../Controls/Containers/SelectFieldRedux';\r\nimport ReduxFormDatePickerThai from '../../../../../../../Controls/Containers/Picker/ReduxFormDatePickerThai';\r\nimport Button from '../../../../../../../Controls/Containers/Button';\r\n\r\nconst Form = ({\r\n    classes,\r\n    isActiveSelectInMap,\r\n    luDataType,\r\n    startDate,\r\n    endDate,\r\n\r\n    handleSubmit,\r\n    onSubmit,\r\n    onClickClearForm,\r\n    onClickSelectInMap\r\n}) => {\r\n    return <form onSubmit={handleSubmit(onSubmit)} className={classes.form}>\r\n        <Field\r\n            label=\"ชื่อ\"\r\n            name=\"name\"\r\n            component={TextFieldRedux}\r\n        />\r\n        <Field\r\n            label=\"ประเภทข้อมูล\"\r\n            name=\"dataType\"\r\n            component={SelectFieldRedux}\r\n            data={luDataType}\r\n            keyData={{ value: \"value\", label: \"name\" }}\r\n        />\r\n        <Field\r\n            label=\"ช่วงเวลาสำรวจ\"\r\n            name=\"startDate\"\r\n            component={ReduxFormDatePickerThai}\r\n            maxDate={endDate}\r\n        />\r\n        <Field\r\n            label=\"ถึง\"\r\n            name=\"endDate\"\r\n            component={ReduxFormDatePickerThai}\r\n            minDate={startDate}\r\n        />\r\n\r\n        {/* <Grid container justify=\"flex-end\" style={{ marginTop: '10px' }}>\r\n            <Grid item>\r\n                <Button\r\n                    label=\"เลือกบนแผนที่\"\r\n                    color={isActiveSelectInMap ? \"black\" : \"green\"}\r\n                    onClick={onClickSelectInMap}\r\n                />\r\n            </Grid>\r\n        </Grid> */}\r\n\r\n        <Grid container justify=\"center\" spacing={24} className={classes.footer}>\r\n            <Grid item>\r\n                <Button\r\n                    label=\"ยกเลิก\"\r\n                    onClick={onClickClearForm}\r\n                />\r\n            </Grid>\r\n            <Grid item>\r\n                <Button\r\n                    type=\"submit\"\r\n                    label=\"ค้นหา\"\r\n                />\r\n            </Grid>\r\n            <Grid item>\r\n                <Button\r\n                    label=\"เลือกบนแผนที่\"\r\n                    color={isActiveSelectInMap ? \"black\" : \"green\"}\r\n                    onClick={onClickSelectInMap}\r\n                />\r\n            </Grid>\r\n        </Grid>\r\n    </form>\r\n}\r\n\r\nconst FormSearchDraftView = ({\r\n    classes,\r\n    children,\r\n    isDisplay,\r\n    isActiveSelectInMap,\r\n    luDataType,\r\n    startDate,\r\n    endDate,\r\n\r\n    handleSubmit,\r\n    onSubmit,\r\n    onClickClearForm,\r\n    onClickSelectInMap\r\n}) => {\r\n    return (\r\n        <Grid container className={classnames(classes.root, { [classes.hide]: !isDisplay })}>\r\n            <Grid item xs={12} className={classes.rootForm}>\r\n                <Form\r\n                    classes={classes}\r\n                    isActiveSelectInMap={isActiveSelectInMap}\r\n                    luDataType={luDataType}\r\n                    startDate={startDate}\r\n                    endDate={endDate}\r\n                    handleSubmit={handleSubmit}\r\n                    onSubmit={onSubmit}\r\n                    onClickClearForm={onClickClearForm}\r\n                    onClickSelectInMap={onClickSelectInMap}\r\n                />\r\n            </Grid>\r\n\r\n            <Grid item xs={12} className={classes.rootResult}>\r\n                {children}\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        // padding: '10px',\r\n        height: '100%'\r\n    },\r\n    rootForm: {\r\n        padding: '10px',\r\n        // height: '455px',\r\n        height: '420px',\r\n    },\r\n    form: {\r\n        width: '100%',\r\n        height: '100%'\r\n    },\r\n    rootResult: {\r\n        // height: 'calc(100% - 455px)'\r\n        height: 'calc(100% - 420px)'\r\n    },\r\n    hide: {\r\n        display: 'none'\r\n    },\r\n    row: {\r\n        height: \"50px\",\r\n        width: \"100%\",\r\n        marginTop: \"15px\",\r\n    },\r\n    multiRow: {\r\n        height: \"70px\",\r\n        width: \"100%\",\r\n        marginTop: \"5px\",\r\n    },\r\n    colLabel: {\r\n        fontSize: '14px',\r\n        paddingTop: '5px'\r\n    },\r\n    footer: {\r\n        // width: \"100%\",\r\n        // padding: \"15px 0px 0px 0px\",\r\n        marginTop: '10px',\r\n        marginBottom: '10px'\r\n    }\r\n}))(FormSearchDraftView)\r\n","import React, { Fragment } from 'react';\r\nimport { Scrollbars } from 'react-custom-scrollbars';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport ListItem from '@material-ui/core/ListItem';\r\nimport Delete from \"@material-ui/icons/Delete\";\r\nimport Edit from \"@material-ui/icons/Edit\";\r\nimport IconButton from '@material-ui/core/IconButton';\r\nimport Checkbox from '@material-ui/core/Checkbox';\r\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\r\nimport { green } from '@material-ui/core/colors';\r\nimport Divider from '@material-ui/core/Divider';\r\n\r\n//import tooltip\r\nimport Tooltip from '../../../../../../../Controls/Containers/Tooltip'\r\n\r\nconst ListResult = ({\r\n    classes,\r\n    listResult,\r\n    onClickListResult,\r\n    onClickEdit,\r\n    onClickDelete\r\n}) => {\r\n    if (listResult.length === 0) {\r\n        return <div className={classes.div_noData}>ไม่พบข้อมูล</div>\r\n    }\r\n\r\n    return (\r\n        <Grid item xs={12}>\r\n            {listResult.map((result, index) =>\r\n                <ListItem\r\n                    key={`result-${result.id}-${index}`}\r\n                    button\r\n                    divider={true}\r\n                    className={classes.menu_item}\r\n                    classes={{ gutters: classes.guttersItem }}\r\n                    onClick={onClickListResult(result)}\r\n                >\r\n                    <Grid container justify=\"space-between\">\r\n                        <Grid item className={classes.containerTxtResult} >\r\n                            <label className={classes.txtResult}>{`ชื่อ : ${result.name}`}</label><br />\r\n                            <label className={classes.txtResult}>{`วันที่ : ${result.dateDisplay}`}</label>\r\n                        </Grid>\r\n                        <Grid item >\r\n                            <Tooltip title=\"แก้ไข\" placement=\"bottom\">\r\n                                <IconButton className={classes.iconButton} onClick={onClickEdit(result)} >\r\n                                    <Edit className={classes.icon} />\r\n                                </IconButton>\r\n                            </Tooltip>\r\n                            <Tooltip title=\"ลบ\" placement=\"bottom\">\r\n                                {<IconButton className={classes.iconButton} onClick={onClickDelete(result)} >\r\n                                    <Delete className={classes.icon} />\r\n                                </IconButton>}\r\n                            </Tooltip>\r\n                        </Grid>\r\n                    </Grid>\r\n                </ListItem>\r\n            )}\r\n        </Grid>\r\n    )\r\n}\r\n\r\nconst ResultSearchDraftPointView = ({\r\n    classes,\r\n    listResult,\r\n    onClickListResult,\r\n    onClickEdit,\r\n    onClickDelete,\r\n    isCreate,\r\n    isUpdate,\r\n    handleChangeCheckbox\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root}>\r\n            <Grid item xs={12} className={classes.header}>\r\n                {`ผลลัพธ์จำนวน ${listResult.length} รายการ`}\r\n            </Grid>\r\n            <Grid item xs={12} className={classes.rootResult} >\r\n                <Scrollbars autoHide>\r\n                    {(listResult.length > 0 || (isCreate || isUpdate)) &&\r\n                        <Fragment>\r\n                            <FormControlLabel\r\n                                className={classes.checkbox}\r\n                                control={\r\n                                    <GreenCheckbox\r\n                                        checked={isCreate}\r\n                                        onChange={() => handleChangeCheckbox('create')}\r\n                                        value=\"create\"\r\n                                    />\r\n                                }\r\n                                label=\"รายการที่สร้าง\"\r\n                            />\r\n                            <FormControlLabel\r\n                                className={classes.checkbox}\r\n                                control={\r\n                                    <GreenCheckbox\r\n                                        checked={isUpdate}\r\n                                        onChange={() => handleChangeCheckbox('update')}\r\n                                        value=\"update\"\r\n                                    />\r\n                                    }\r\n                                label=\"รายการที่แก้ไข\"\r\n                            />\r\n                            <Divider />\r\n                        </Fragment>\r\n                    }\r\n                    <ListResult\r\n                        classes={classes}\r\n                        listResult={listResult}\r\n                        onClickListResult={onClickListResult}\r\n                        onClickEdit={onClickEdit}\r\n                        onClickDelete={onClickDelete}\r\n                    />\r\n                </Scrollbars >\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nconst GreenCheckbox = withStyles({\r\n    root: {\r\n      color: green[400],\r\n      '&$checked': {\r\n        color: green[600],\r\n      },\r\n    },\r\n    checked: {},\r\n})(props => <Checkbox color=\"default\" {...props} />);\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        width: '100%',\r\n        height: '100%'\r\n    },\r\n    rootResult: {\r\n        height: 'calc(100% - 25px)',\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            minHeight: '200px',\r\n            [`& input`]: {\r\n                height: 'calc(100% - 35px)',\r\n            },\r\n        },\r\n    },\r\n    header: {\r\n        height: '25px',\r\n        lineHeight: '25px',\r\n        width: '100%',\r\n        backgroundColor: theme.mainTheme.color3,\r\n        color: theme.mainTheme.color2,\r\n        textAlign: 'center',\r\n        fontSize: theme.textSize.subtitle\r\n    },\r\n    div_noData: {\r\n        width: '100%',\r\n        padding: '18px'\r\n    },\r\n    menu_item: {\r\n        '&:focus': {\r\n            backgroundColor: theme.mainTheme.color2\r\n        },\r\n        '&:hover': {\r\n            backgroundColor: theme.mainTheme.colorAH.colorHover,\r\n            color: theme.mainTheme.colorAH.colorTextHover\r\n        }\r\n    },\r\n    txtResult: {\r\n        fontSize: '14px',\r\n        margin: '0px',\r\n        lineHeight: '24px'\r\n    },\r\n    iconButton: {\r\n        height: \"35px\",\r\n        width: \"35px\",\r\n        marginTop: \"6px\"\r\n    },\r\n    icon: {\r\n        marginTop: '-6px'\r\n    },\r\n    guttersItem: {\r\n        padding: \"5px 10px\",\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            [`& input`]: {\r\n                padding: \"5px 20px\",\r\n            },\r\n        },\r\n    },\r\n    marginIcon: {\r\n        marginRight: '35px'\r\n    },\r\n    containerTxtResult: {\r\n        maxWidth: 'calc(100% - 70px)',\r\n        textOverflow: 'ellipsis',\r\n        whiteSpace: 'nowrap',\r\n        overflow: 'hidden',\r\n    },\r\n    checkbox: {\r\n        padding: '5px 10px'\r\n    }\r\n}))(ResultSearchDraftPointView)\r\n","import React, { Component, Fragment } from 'react';\r\nimport { reduxForm, getFormValues } from 'redux-form';\r\nimport { connect } from 'react-redux';\r\nimport { compose } from 'recompose';\r\nimport { bindActionCreators } from 'redux';\r\nimport withWidth from '@material-ui/core/withWidth';\r\nimport { format } from \"date-fns\";\r\nimport enLocale from \"date-fns/locale/en-US\";\r\n\r\n//import component\r\nimport FormSearchDraftView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/DraftLine/Search/FormSearchDraftView';\r\nimport WithAlertMessage from '../../../../../../../HOC/WithAlertMessage';\r\nimport WithLoading from '../../../../../../../HOC/WithLoading';\r\nimport Loading from '../../../../../../../Controls/Containers/Loading';\r\nimport AlertMessageSuper from '../../../../../../../Controls/Containers/AlertMessageSuper';\r\nimport ResultSearchDraftView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/DraftLine/Search/ResultSearchDraftView';\r\n\r\n//improt actions\r\nimport * as MapAction from '../../../../../../../Actions/Web/Maps/MapAction';\r\nimport * as MapFunctions from '../../../../../../../Map/MapFunctions';\r\nimport * as MenuAction from '../../../../../../../Actions/Web/MenuAction';\r\n\r\n//import service - utils\r\nimport { validateFormSearchDraftPnt } from '../../../../../../../Utilities/Validate';\r\nimport { convertDateTimeToDisplayDate } from '../../../../../../../Utilities/DateTimeUtil';\r\nimport { fetchGet_ } from '../../../../../../../Utilities/ServiceUtils';\r\n\r\n/*  \r\n    FormSearchDraft จะจัดการตั้งแต่ การค้นหาไปจนถึงการแสดงผลลัพธ์\r\n    โดย props ที่รับมีดังนี้\r\n    1. urlServiceSearchResult คือ url service ที่ใช้ในการหาค่าผลลัพผธ์\r\n    2. urlLookupDataType  คือ url service ที่ใช้ในการดึงรายการ lookup ประเภทข้อมูล\r\n    3. type คือ ชนิดของข้อมูลที่จะใช้ในการ selection layer \r\n    4. onDetail คือ ฟังก์ชันที่จะ callback เมื่อกดที่ list รายการ\r\n    5. onEdit คือ ฟังก์ชันที่จะ callback เมื่อกดปุ่ม edit\r\n    6. onDelete คือ ฟังก์ชันที่จะ callback เมื่อกดปุ่ม delete\r\n*/\r\n\r\nexport class FormSearcgDraft extends Component {\r\n    constructor() {\r\n        super();\r\n        this.state = {\r\n            luDataType: [],\r\n            listResult: null, // default เป็น null เพื่อใช้สำหรับการเช็ค ซ่อน/แสดง ผลลัพธ์\r\n            isActiveSelectInMap: false,\r\n            isCreate: false,\r\n            isUpdate: false,\r\n            listResultSearch: null\r\n        }\r\n    }\r\n\r\n    componentDidMount() {\r\n        this.callServiceGetLupDataType();\r\n    }\r\n\r\n    // ###################### SERVICE ######################\r\n    callServiceGetLupDataType = () => {\r\n        fetchGet_(this.props.urlLookupDataType)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(({ result }) => {\r\n                if (result) {\r\n                    this.setState({\r\n                        luDataType: result\r\n                    })\r\n                }\r\n            })\r\n            .catch(ex => { console.log('ex callServiceGetLupDataType', ex) })\r\n    }\r\n\r\n    // ###################### SEARCH ######################\r\n    managePanelForMobile = async (isDraw) => {\r\n        const { menuAction, width } = this.props;\r\n        if (width === 'sm' || width === 'xs') {\r\n            if (isDraw) {\r\n                await menuAction.closeMenuPanel();\r\n                await menuAction.openMenuMap();\r\n            } else {\r\n                await menuAction.openMenuPanel();\r\n                await menuAction.closeMenuMap();\r\n            }\r\n        }\r\n    }\r\n\r\n    handleClickSelecIntMap = () => {\r\n        const { isActiveSelectInMap } = this.state;\r\n        const { mapAction, type, showLoading, panelContentDataRdc } = this.props;\r\n\r\n        if (isActiveSelectInMap) {\r\n            mapAction.bindMapCommand(MapFunctions.cleardrawSpatialSearchDraft);\r\n        } else {\r\n            const { currentPage } = panelContentDataRdc\r\n            // จะเอา layer แรกมา selection เท่านั้น\r\n            const selectionLayerID = currentPage.Layer && currentPage.Layer.length > 0 && currentPage.Layer[0].layerName\r\n\r\n            mapAction.bindMapCommand(MapFunctions.drawSpatialSearchDraft, {\r\n                callback: this.callbackDrawSpatilaSearch,\r\n                type: type,\r\n                showLoading,\r\n                selectionLayerID\r\n            })\r\n            this.managePanelForMobile(true)\r\n        }\r\n        this.setState(prevState => ({\r\n            isActiveSelectInMap: !prevState.isActiveSelectInMap\r\n        }))\r\n    }\r\n\r\n    getDataTypeByID = dataTypeID => {\r\n        const { luDataType } = this.state;\r\n        if (dataTypeID) {\r\n            dataTypeID = dataTypeID.toString();\r\n            const luDataTypeFilter = luDataType.filter(itm => itm.value === dataTypeID)\r\n            return luDataTypeFilter.length > 0 ? luDataTypeFilter[0].name : \"\";\r\n        } else {\r\n            return \"\"\r\n        }\r\n    }\r\n\r\n    converFormatDataMapservice = datas => {\r\n        return datas.map(itm => ({\r\n            id: itm.attributes.DRAFT_LINE_ID,\r\n            objectID: itm.attributes.OBJECTID,\r\n            name: itm.attributes.NAME,\r\n            type: itm.attributes.TYPE,\r\n            typeDisplay: this.getDataTypeByID(itm.attributes.TYPE),\r\n            date: itm.attributes.SURVEY_DATE,\r\n            dateDisplay: itm.attributes.SURVEY_DATE ? convertDateTimeToDisplayDate(itm.attributes.SURVEY_DATE, \"d MMM yyyy\") : \"\",\r\n            latitude: itm.geometry && itm.geometry.y,\r\n            longitude: itm.geometry && itm.geometry.x,\r\n            spatialReference: itm.geometry && itm.geometry.spatialReference,\r\n            detail: itm.attributes.DESCRIPTION,\r\n            geometry: itm.geometry,\r\n            graphic: itm,\r\n            districtID: itm.attributes.DISTRICT_ID && itm.attributes.DISTRICT_ID,\r\n            subDistrictID: itm.attributes.SUBDISTRICT_ID && itm.attributes.SUBDISTRICT_ID,\r\n            updater: itm.attributes.UPDATER,\r\n            creator: itm.attributes.CREATOR\r\n        }))\r\n    }\r\n\r\n    callbackDrawSpatilaSearch = async (features) => {\r\n        const { hideLoading, mapAction } = this.props;\r\n        hideLoading();\r\n        mapAction.bindClearMapCommand()\r\n        const result = await this.converFormatDataMapservice(features)\r\n\r\n        await this.setState({\r\n            isActiveSelectInMap: false,\r\n            listResult: result,\r\n            listResultSearch: result,\r\n            isCreate: false,\r\n            isUpdate: false\r\n        })\r\n        this.managePanelForMobile(false)\r\n    }\r\n\r\n    createCondition = values => {\r\n        let condition = \"\";\r\n\r\n        if (values.name) {\r\n            condition = condition + ` AND NAME LIKE '%${values.name}%'`\r\n        }\r\n\r\n        if (values.dataType) {\r\n            condition = condition + ` AND TYPE = ${values.dataType}`\r\n        }\r\n\r\n        if (values.startDate && values.endDate) {\r\n            const strStartDateUTC = `${format(new Date(values.startDate), 'yyyy-MM-dd', { locale: enLocale })} 00:00:00`\r\n            const strEndDateUTC = `${format(new Date(values.endDate), 'yyyy-MM-dd', { locale: enLocale })} 23:59:59`;\r\n            condition = condition + ` AND SURVEY_DATE BETWEEN timestamp '${strStartDateUTC}' AND timestamp '${strEndDateUTC}'`;\r\n        }\r\n\r\n        if (condition !== \"\") {\r\n            condition = \"1 = 1\" + condition\r\n        }\r\n\r\n        return condition\r\n    }\r\n\r\n    handleSubmit = async values => {\r\n        const { type, mapAction, showLoading, panelContentDataRdc } = this.props;\r\n        const { currentPage } = panelContentDataRdc\r\n        // จะเอา layer แรกมา selection เท่านั้น\r\n        const selectionLayerID = currentPage.Layer && currentPage.Layer.length > 0 && currentPage.Layer[0].layerName\r\n\r\n        showLoading();\r\n        await mapAction.bindMapCommand(MapFunctions.cleardrawSpatialSearchDraft);\r\n        await mapAction.bindMapCommand(MapFunctions.selectionDraft, {\r\n            callback: this.callbackDrawSpatilaSearch,\r\n            type: type,\r\n            condition: this.createCondition(values),\r\n            selectionLayerID: selectionLayerID\r\n        })\r\n    }\r\n\r\n    // ###################  HANDLE RESULT  ##################\r\n    handleDetail = values => evt => {\r\n        evt.stopPropagation()\r\n        const { onDetail } = this.props;\r\n        onDetail && onDetail(values)\r\n    }\r\n\r\n    handleEdit = values => evt => {\r\n        evt.stopPropagation()\r\n        const { onEdit } = this.props;\r\n        onEdit && onEdit(values)\r\n    }\r\n\r\n    handleDelete = values => evt => {\r\n        evt.stopPropagation()\r\n        const { onDelete } = this.props;\r\n        onDelete && onDelete(values)\r\n    }\r\n\r\n    handleChangeCheckbox = async (type) => {\r\n        const { isCreate, isUpdate } = this.state;\r\n        switch(type) {\r\n            case \"create\":\r\n                this.filterListResult(!isCreate, isUpdate)\r\n                break;\r\n            case \"update\":\r\n                this.filterListResult(isCreate, !isUpdate)\r\n                break;\r\n            default:\r\n                break;\r\n        }\r\n    }\r\n\r\n    filterListResult = async (create, update) => {\r\n        const userId = this.props.authenRdc.profile.userID;\r\n        const { listResultSearch } = this.state;\r\n\r\n        const filterResult = await listResultSearch.filter(item => {\r\n            return create && update ? \r\n                item.creator === userId || item.updater === userId :\r\n                create && !update ?\r\n                item.creator === userId :\r\n                !create && update ?\r\n                item.updater === userId :\r\n                item\r\n        })\r\n\r\n        await this.setState({\r\n            listResult: filterResult,\r\n            isCreate: create,\r\n            isUpdate: update\r\n        })\r\n    }\r\n\r\n    render() {\r\n        const { handleSubmit, _values, isDisplay, isShowLoading ,onClickBack} = this.props;\r\n        const { listResult, luDataType, isActiveSelectInMap, isCreate, isUpdate } = this.state;\r\n        return (\r\n            <Fragment>\r\n                <FormSearchDraftView\r\n                    isDisplay={isDisplay}\r\n                    isActiveSelectInMap={isActiveSelectInMap}\r\n                    luDataType={luDataType}\r\n                    endDate={_values && _values.endDate && _values.endDate}\r\n                    startDate={_values && _values.startDate && _values.startDate}\r\n\r\n                    handleSubmit={handleSubmit}\r\n                    onSubmit={this.handleSubmit}\r\n                    onClickClearForm={onClickBack}\r\n                    onClickSelectInMap={this.handleClickSelecIntMap}\r\n                >\r\n                    {listResult && <ResultSearchDraftView\r\n                        isDisplay={isDisplay}\r\n                        listResult={listResult}\r\n                        onClickListResult={this.handleDetail}\r\n                        onClickEdit={this.handleEdit}\r\n                        onClickDelete={this.handleDelete}\r\n                        isCreate={isCreate}\r\n                        isUpdate={isUpdate}\r\n                        handleChangeCheckbox={this.handleChangeCheckbox}\r\n                    />}\r\n                </FormSearchDraftView>\r\n                <AlertMessageSuper {...this.props} />\r\n                <Loading isShowLoading={isShowLoading} />\r\n            </Fragment>\r\n        )\r\n    }\r\n}\r\n\r\nconst reduxFormParameter = {\r\n    form: \"formSearchDraft\",\r\n    validate: validateFormSearchDraftPnt\r\n};\r\n\r\nconst mapStateToProps = state => ({\r\n    _values: getFormValues('formSearchDraft')(state),\r\n    panelContentDataRdc: state.PanelContentData,\r\n    authenRdc: state.authen\r\n})\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    mapAction: bindActionCreators(MapAction, dispatch),\r\n    menuAction: bindActionCreators(MenuAction, dispatch)\r\n})\r\n\r\nexport default compose(\r\n    WithAlertMessage,\r\n    WithLoading,\r\n    reduxForm(reduxFormParameter),\r\n    connect(mapStateToProps, mapDispatchToProps),\r\n    withWidth()\r\n)(FormSearcgDraft)\r\n","import React from 'react';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport Button from '../../../../../../../Controls/Containers/Button';\r\nimport { BTN } from '../../../../../../../Constants/Constants'\r\nconst RowDeail = ({\r\n    classes,\r\n    label,\r\n    value,\r\n}) => (\r\n        <Grid container wrap=\"nowrap\" className={classes.row} >\r\n            <Grid item xs={5} className={classes.colLabel} >\r\n                {label}\r\n            </Grid>\r\n            < Grid item xs={7} style={{ wordWrap: \"break-word\" }}>\r\n                {value}\r\n            </Grid>\r\n        </Grid >\r\n    )\r\n\r\nconst DetailDraftView = ({\r\n    classes,\r\n    detail,\r\n    onClickBack\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root}>\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"ชื่อ\"\r\n                value={detail.name && detail.name}\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"ประเภทข้อมูล\"\r\n                value={detail.typeDisplay && detail.typeDisplay}\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"รายละเอียด\"\r\n                value={detail.detail && detail.detail}\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"วันที่สำรวจ\"\r\n                value={detail.dateDisplay && detail.dateDisplay}\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"จังหวัด\"\r\n                value=\"กรุงเทพมหานคร\"\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"เขต\"\r\n                value={detail.districtDisplay && detail.districtDisplay}\r\n            />\r\n\r\n            <RowDeail\r\n                classes={classes}\r\n                label=\"แขวง\"\r\n                value={detail.subDistrictDisplay && detail.subDistrictDisplay}\r\n            />\r\n\r\n            <Grid container justify=\"center\" className={classes.footer} >\r\n                <Button\r\n                    label={BTN.TH.CANCEL}\r\n                    // color=\"black\"\r\n                    onClick={onClickBack}\r\n                />\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        padding: '10px'\r\n    },\r\n    row: {\r\n        marginTop: '20px',\r\n    },\r\n    footer: {\r\n        marginTop: '20px',\r\n        marginBottom: '10px'\r\n    },\r\n    colLabel: {\r\n        fontWeight: 'bold'\r\n    },\r\n}))(DetailDraftView)","import React, { Component } from 'react';\r\nimport EsriLoader from \"esri-loader\";\r\nimport { connect } from 'react-redux';\r\nimport { bindActionCreators } from 'redux';\r\n\r\n//import component\r\nimport DetailDraftView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/DraftLine/Detail/DetailDraftView';\r\n\r\n//import actions\r\nimport * as MapAction from '../../../../../../../Actions/Web/Maps/MapAction';\r\nimport * as MapFunctions from '../../../../../../../Map/MapFunctions';\r\n\r\nexport class DetailDraft extends Component {\r\n\r\n    componentDidMount() {\r\n        const { detail } = this.props;\r\n        this.drawGraphic(detail.geometry)\r\n    }\r\n\r\n    drawGraphic = (geometry) => {\r\n        EsriLoader.loadModules([\r\n            \"esri/geometry/Polyline\",\r\n            \"esri/SpatialReference\",\r\n            \"esri/toolbars/draw\"\r\n        ], window.MAP_OPTION)\r\n            .then(([\r\n                Polyline,\r\n            ]) => {\r\n                const { mapAction } = this.props;\r\n                \r\n                const polylineJson = {\r\n                    \"paths\": geometry.paths,\r\n                    \"spatialReference\": geometry.spatialReference\r\n                };\r\n                var polyline = new Polyline(polylineJson);\r\n                mapAction.bindMapCommand(MapFunctions.addGraphicDraftLineForDetail, {\r\n                    evt: { geometry: polyline },\r\n                });\r\n            })\r\n    }\r\n\r\n    render() {\r\n        const { detail, onClickBack } = this.props;\r\n        return (\r\n            <DetailDraftView\r\n                detail={detail}\r\n                onClickBack={onClickBack}\r\n            />\r\n        )\r\n    }\r\n}\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    mapAction: bindActionCreators(MapAction, dispatch)\r\n})\r\n\r\nexport default connect(null, mapDispatchToProps)(DetailDraft)\r\n","import React, { Component, Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { bindActionCreators } from 'redux';\r\nimport { compose } from 'recompose';\r\nimport withWidth from '@material-ui/core/withWidth';\r\nimport EsriLoader from \"esri-loader\";\r\n\r\n//import component\r\nimport Loading from '../../../../../../../Controls/Containers/Loading';\r\nimport WithLoading from '../../../../../../../HOC/WithLoading';\r\nimport AlertMessageSuper from '../../../../../../../Controls/Containers/AlertMessageSuper';\r\nimport WithAlertMessage from '../../../../../../../HOC/WithAlertMessage';\r\nimport FormDraft from '../Form/FormDraft';\r\n\r\n//import actions\r\nimport * as MapAction from '../../../../../../../Actions/Web/Maps/MapAction';\r\nimport * as MapFunctions from '../../../../../../../Map/MapFunctions';\r\nimport * as MenuAction from '../../../../../../../Actions/Web/MenuAction';\r\n\r\n//import service - utils\r\nimport { fetchGet_ } from '../../../../../../../Utilities/ServiceUtils';\r\n\r\n//import constanst\r\nimport { TABLE_MAPSHEET1K, ALERT_MESSAGE ,ACTIVE_FUNCTION} from '../../../../../../../Constants/Constants';\r\n\r\nclass EditDraftLine extends Component {\r\n    constructor(props) {\r\n        super()\r\n        this.state = {\r\n            geometry: null,\r\n            graphic: null,\r\n            // isActiveEdit: false,\r\n            // isActiveDraw: false,\r\n            districtID: props.detail.districtID,\r\n            subDistrictID: props.detail.subDistrictID,\r\n            isLocalBKK: true, //default เป็น true เพราะกรณีไม่ขยับจุด\r\n            distanceLine: 0\r\n        }\r\n    }\r\n\r\n    componentDidMount() {\r\n        const { detail } = this.props;\r\n        this.drawGraphic(detail.geometry)\r\n    }\r\n\r\n    componentWillUnmount = async () => {\r\n        const { mapAction } = this.props;\r\n        await mapAction.bindMapCommand(MapFunctions.clearGraphicDrawDraft)\r\n        await mapAction.bindClearMapCommand();\r\n    }\r\n\r\n    managePanelForMobile = async (isDraw) => {\r\n        const { menuAction, width } = this.props;\r\n        if (width === 'sm' || width === 'xs') {\r\n            if (isDraw) {\r\n                await menuAction.closeMenuPanel();\r\n                await menuAction.openMenuMap();\r\n            } else {\r\n                await menuAction.openMenuPanel();\r\n                await menuAction.closeMenuMap();\r\n            }\r\n        }\r\n    }\r\n\r\n    drawGraphic = (geometry) => {\r\n        EsriLoader.loadModules([\r\n            \"esri/geometry/Polyline\",\r\n            \"esri/toolbars/draw\"\r\n        ], window.MAP_OPTION)\r\n            .then(([\r\n                Polyline,\r\n                Draw\r\n            ]) => {\r\n                const { mapAction } = this.props;\r\n\r\n                const polylineJson = {\r\n                    \"paths\": geometry.paths,\r\n                    \"spatialReference\": geometry.spatialReference\r\n                };\r\n                var polyline = new Polyline(polylineJson);\r\n                mapAction.bindMapCommand(MapFunctions.addGraphicDraft, {\r\n                    evt: { geometry: polyline },\r\n                    type: Draw.LINE,\r\n                    callback: this.handleCallBackDrawLine\r\n                });\r\n            })\r\n    }\r\n\r\n    handleEditLine = async () => {\r\n        const { mapAction,menuAction,menuRdc } = this.props\r\n        const { graphic } = this.state\r\n\r\n        // if (isActiveEdit) { // ปิดการ edit\r\n        //     mapAction.bindMapCommand(MapFunctions.editGraphicDraftLine, { graphic, isActivateEdit: false })\r\n        // } else { // เปิดการ edit\r\n        //     this.managePanelForMobile(true)\r\n        //     await mapAction.bindMapCommand(MapFunctions.drawDraftLine, { isActivateDraw: false })\r\n        //     mapAction.bindMapCommand(MapFunctions.editGraphicDraftLine, { graphic, callback: this.handleCallBackEditGraphic })\r\n        // }\r\n\r\n        // this.setState(prevState => ({\r\n        //     isActiveEdit: !prevState.isActiveEdit,\r\n        //     isActiveDraw: false\r\n        // }))\r\n        if(menuRdc.ActiveFunction === ACTIVE_FUNCTION.EDIT_GP_FORM){\r\n            menuAction.activeFunction(null)\r\n            mapAction.bindMapCommand(MapFunctions.editGraphicDraftLine, { graphic, isActivateEdit: false })\r\n        }else{\r\n            this.managePanelForMobile(true)\r\n            menuAction.activeFunction(ACTIVE_FUNCTION.EDIT_GP_FORM)\r\n            await mapAction.bindMapCommand(MapFunctions.drawDraftLine, { isActivateDraw: false })\r\n            mapAction.bindMapCommand(MapFunctions.editGraphicDraftLine, { graphic, callback: this.handleCallBackEditGraphic })\r\n        }\r\n    }\r\n\r\n    handleDrawLine = async () => {\r\n        const { mapAction, menuAction ,menuRdc} = this.props;\r\n        const { graphic } = this.state\r\n\r\n        // if (isActiveDraw) { // ปิดการวาด\r\n        //     mapAction.bindMapCommand(MapFunctions.drawDraftLine, { isActivateDraw: false })\r\n        // } else { // เปิดการวาด\r\n        //     this.managePanelForMobile(true)\r\n        //     await mapAction.bindMapCommand(MapFunctions.editGraphicDraftLine, { isActivateEdit: false, graphic })\r\n        //     mapAction.bindMapCommand(MapFunctions.drawDraftLine, { callback: this.handleCallBackDrawLine })\r\n        // }\r\n\r\n        // this.setState(prevState => ({\r\n        //     isActiveEdit: false,\r\n        //     isActiveDraw: !prevState.isActiveDraw\r\n        // }))\r\n\r\n        if(menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM){\r\n            menuAction.activeFunction(null)\r\n            mapAction.bindMapCommand(MapFunctions.drawDraftLine, { isActivateDraw: false })            \r\n        }else{\r\n            this.managePanelForMobile(true)\r\n            menuAction.activeFunction(ACTIVE_FUNCTION.ADD_GP_FORM)\r\n            await mapAction.bindMapCommand(MapFunctions.editGraphicDraftLine, { isActivateEdit: false, graphic })\r\n            setTimeout(()=>{ // set timeout เพื่อแก้ปัญหา willunmount ของ maptool clear event draw\r\n                mapAction.bindMapCommand(MapFunctions.drawDraftLine, { callback: this.handleCallBackDrawLine })\r\n            },50)\r\n        }\r\n    }\r\n\r\n    handleCallBackDrawLine = async (evt, graphic) => {\r\n        // const { isActiveDraw } = this.state;\r\n        const { showAlert, mapAction,menuRdc,menuAction } = this.props;\r\n        if (evt) {\r\n            // if (isActiveDraw) {\r\n            if(menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM){\r\n                this.managePanelForMobile(false)\r\n                await mapAction.bindMapCommand(MapFunctions.drawDraftLine, { isActivateDraw: false })\r\n                mapAction.bindMapCommand(MapFunctions.getDistrictAndSubDistrictFormPoint, { // save sub-district code\r\n                    geometry: evt.geometry,\r\n                    callbackFn: this.callbackGetDistrictAndSubDistrict\r\n                })\r\n                menuAction.activeFunction(null)\r\n            }\r\n            this.setState({\r\n                geometry: evt.geometry,\r\n                graphic: graphic,\r\n                // isActiveEdit: false,\r\n                // isActiveDraw: false,\r\n                distanceLine: 0 // set ค่า distanceLine ให้กลับเป็น0\r\n            })\r\n        } else {\r\n            showAlert({ altMsg: `${ALERT_MESSAGE.POPUP.OUT_OF_LAND} 10 กิโลเมตร` })\r\n        }\r\n    }\r\n\r\n    handleCallBackEditGraphic = (geometry, distance) => {\r\n        const { showAlert } = this.props\r\n        this.managePanelForMobile(false)\r\n        if (geometry) {\r\n            this.props.showLoading();\r\n            this.props.mapAction.bindMapCommand(MapFunctions.getDistrictAndSubDistrictFormPoint, { // save sub-district code\r\n                geometry: geometry,\r\n                callbackFn: this.callbackGetDistrictAndSubDistrict\r\n            })\r\n\r\n            this.setState({ geometry: geometry, distanceLine: distance }) //เก็บ distance เพื่อเอาไปเช็คตอนจังหวะกด save form\r\n\r\n            if (distance > 10) { //alert เตือนหาก ความยาวเส้นเกิน 10 กม.\r\n                showAlert({ altMsg: `${ALERT_MESSAGE.POPUP.OUT_OF_LAND} 10 กิโลเมตร`, altType: 1 })\r\n            }\r\n        } else {\r\n            showAlert({ altMsg: ALERT_MESSAGE.POPUP.REQUEST_PIN_MAP , altType: 1, callbackConfirm: this.handleCloseForm })\r\n        }\r\n    }\r\n\r\n    callbackGetDistrictAndSubDistrict = (values) => {\r\n        this.props.mapAction.bindClearMapCommand()\r\n        this.props.hideLoading();\r\n        if (values) {\r\n            if (!values.errMsg) {\r\n                const { SUBDISTRICT_ID, DISTRICT_ID } = values;\r\n                this.setState({\r\n                    districtID: DISTRICT_ID,\r\n                    subDistrictID: SUBDISTRICT_ID,\r\n                    isLocalBKK: true\r\n                })\r\n            } else {\r\n                this.props.showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR })\r\n            }\r\n        } else {\r\n            this.props.showAlert({ altMsg: ALERT_MESSAGE.POPUP.OUT_OF_BKK })\r\n            this.setState({\r\n                districtID: null,\r\n                subDistrictID: null,\r\n                isLocalBKK: false\r\n            })\r\n        }\r\n    }\r\n\r\n\r\n    handleCallBackSubmitForm = values => {\r\n        const { geometry, distanceLine, isLocalBKK } = this.state;\r\n        const { mapAction, detail, authenRdc, showLoading, hideLoading, showAlert, panelContentDataRdc } = this.props;\r\n        // จะเอา layer แรกมา selection เท่านั้น\r\n        showLoading()\r\n        if (isLocalBKK) {\r\n            if (distanceLine < 10) {\r\n                const { currentPage } = panelContentDataRdc\r\n                const selectionLayerID = currentPage.Layer && currentPage.Layer.length > 0 && currentPage.Layer[0].layerName\r\n                mapAction.bindMapCommand(MapFunctions.applyEditShapeDraftLine, {\r\n                    date: values.date,\r\n                    name: values.name,\r\n                    description: values.description,\r\n                    type: values.dataType,\r\n                    objectID: detail.objectID,\r\n                    geometry: geometry,\r\n                    callback: this.callBackSaveLine,\r\n                    mode: \"EDIT\",\r\n                    districtID: values.districtID,\r\n                    subDistrictID: values.subDistrictID,\r\n                    userID: authenRdc.profile && authenRdc.profile.userID ? authenRdc.profile.userID : \"\",\r\n                    selectionLayerID\r\n                })\r\n            } else {\r\n                showAlert({ altMsg: `${ALERT_MESSAGE.POPUP.OUT_OF_LAND} 10 กิโลเมตร` })\r\n                hideLoading()\r\n            }\r\n\r\n        } else {\r\n            showAlert({ altMsg: ALERT_MESSAGE.POPUP.OUT_OF_BKK })\r\n            hideLoading()\r\n        }\r\n\r\n\r\n    }\r\n\r\n    callBackSaveLine = values => {\r\n        const { detail } = this.props;\r\n        this.callServiceSaveMapsheet(detail.objectID)\r\n\r\n    }\r\n\r\n    callServiceSaveMapsheet = (objectID) => {\r\n        const { showAlert, onClearForm, hideLoading } = this.props;\r\n        fetchGet_(`${process.env.REACT_APP_UPDATE_MAPSHEET1K}?objectid=${objectID}&tablename=${TABLE_MAPSHEET1K.DRAFT_LINE}&isupdate=true`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(values => {\r\n                if (values && values.statusCode === 1) {\r\n                    showAlert({ altMsg: ALERT_MESSAGE.POPUP.SAVE_SUCCESS, callbackClose: onClearForm })\r\n                } else {\r\n                    showAlert({ altMsg: ALERT_MESSAGE.POPUP.SAVE_FAIL })\r\n                }\r\n            })\r\n            .catch(ex => {\r\n                showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR })\r\n                console.log('ex callServiceSaveForm', ex)\r\n            })\r\n            .finally(() => {\r\n                hideLoading();\r\n            })\r\n    }\r\n\r\n    render() {\r\n        const { detail, isShowLoading, onClickBack,menuRdc } = this.props;\r\n        const { districtID, subDistrictID } = this.state\r\n\r\n        return (\r\n            <Fragment>\r\n                <FormDraft\r\n                    urlLookupDataType={process.env.REACT_APP_SURVEY_LU_DRAFT_LINE_TYPE}\r\n                    callBackSubmitForm={this.handleCallBackSubmitForm}\r\n                    initializeValue={detail}\r\n                    onEditLine={this.handleEditLine}\r\n                    onDrawLine={this.handleDrawLine}\r\n                    isActiveEdit={menuRdc.ActiveFunction === ACTIVE_FUNCTION.EDIT_GP_FORM}\r\n                    isActiveDraw={menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM}\r\n                    districtID={districtID}\r\n                    subDistrictID={subDistrictID}\r\n                    onClickBack={onClickBack}\r\n                />\r\n                <AlertMessageSuper {...this.props} />\r\n                <Loading isShowLoading={isShowLoading} />\r\n            </Fragment>\r\n        )\r\n    }\r\n}\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    mapAction: bindActionCreators(MapAction, dispatch),\r\n    menuAction: bindActionCreators(MenuAction, dispatch),\r\n})\r\n\r\nconst mapStateToProps = state => ({\r\n    authenRdc: state.authen,\r\n    panelContentDataRdc: state.PanelContentData,\r\n    menuRdc : state.menu\r\n})\r\n\r\nexport default compose(\r\n    connect(mapStateToProps, mapDispatchToProps),\r\n    withWidth(),//จะได้ props width มา\r\n    WithAlertMessage,\r\n    WithLoading\r\n)(EditDraftLine)\r\n","import React, { Component, Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { bindActionCreators } from 'redux';\r\nimport { compose } from 'recompose';\r\nimport { isDirty } from 'redux-form';\r\n\r\n//improt component\r\nimport SearchDraftLineView from '../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/DraftLine/Search/SearchDraftLineView';\r\nimport WithAlertMessage from '../../../../../../../HOC/WithAlertMessage';\r\nimport AlertMessageSuper from '../../../../../../../Controls/Containers/AlertMessageSuper';\r\nimport FormSearchDraft from './FormSearchDraft';\r\nimport DetailDraft from '../Detail/DetailDraft';\r\nimport EditDraftLine from '../Edit/EditDraftLine';\r\n\r\n//import actions\r\nimport * as MapAction from '../../../../../../../Actions/Web/Maps/MapAction';\r\nimport * as MapFunctions from '../../../../../../../Map/MapFunctions';\r\nimport * as MenuAction from '../../../../../../../Actions/Web/MenuAction';\r\n\r\n//import service - utils\r\nimport { fetchGet_ } from '../../../../../../../Utilities/ServiceUtils';\r\n\r\n//improt constans\r\nimport { ALERT_MESSAGE } from '../../../../../../../Constants/Constants';\r\n\r\nconst PAGE = {\r\n    SEARCH_DRAFT_LINE: \"ค้นหาและแก้ไขข้อมูล\",\r\n    DETAIL_DRAFT_LINE: \"ข้อมูล\",\r\n    EDIT_DRAFT_LINE: \"แก้ไขข้อมูล\",\r\n}\r\n\r\nclass SearchDraftLine extends Component {\r\n    constructor() {\r\n        super();\r\n        this.state = {\r\n            page: PAGE.SEARCH_DRAFT_LINE,\r\n            detailView: null,\r\n            detailEdit: null,\r\n            luDistrict: []\r\n        }\r\n    }\r\n\r\n    componentDidMount() {\r\n        this.callServiceDistrict();\r\n    }\r\n\r\n    callServiceDistrict = () => {\r\n        fetchGet_(`${process.env.REACT_APP_LU_DISTRICT}?provinceid=10`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(data => {\r\n                this.setState({\r\n                    luDistrict: data && data.result ? data.result : []\r\n                })\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceDistric', ex)\r\n            })\r\n    }\r\n\r\n    callServiceSubDistrict = (districtID) => {\r\n        return fetchGet_(`${process.env.REACT_APP_LU_SUBDISTRICT}?provinceid=10&districtid=${districtID}`)\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(data => {\r\n                if (data && data.result) {\r\n                    return data.result\r\n                } else {\r\n                    return []\r\n                }\r\n            })\r\n            .catch(ex => {\r\n                console.log('ex callServiceSubDistric', ex)\r\n                return []\r\n            })\r\n    }\r\n\r\n    mapLookUpDetail = async (values) => {\r\n        const { luDistrict } = this.state;\r\n        const luSubDistrict = await this.callServiceSubDistrict(values.districtID)\r\n\r\n        const districtDisplay = values.districtID && luDistrict.find(itm => {\r\n            return itm.value === values.districtID.toString();\r\n        });\r\n\r\n        const subDistrictDisplay = values.subDistrictID && luSubDistrict.find(itm => {\r\n            return itm.value === values.subDistrictID.toString();\r\n        });\r\n\r\n        return {\r\n            districtDisplay: (districtDisplay) ? districtDisplay.name : \" \",\r\n            subDistrictDisplay: (subDistrictDisplay) ? subDistrictDisplay.name : \" \",\r\n        }\r\n    }\r\n\r\n    handleDetail = async values => {\r\n        this.setState({ detailView: { ...values, ...await this.mapLookUpDetail(values) } })\r\n        this.changePage(PAGE.DETAIL_DRAFT_LINE)\r\n    }\r\n\r\n    handleEdit = values => {\r\n        this.setState({ detailEdit: values })\r\n        this.changePage(PAGE.EDIT_DRAFT_LINE)\r\n    }\r\n\r\n    handleDelete = values => {\r\n        const { hideAlert, showAlert } = this.props;\r\n        showAlert({\r\n            altMsg: `${ALERT_MESSAGE.QUESTION.DELETE} ${values.name} ?`,\r\n            altType: 2,\r\n            callbackConfirm: () => {\r\n                hideAlert();\r\n                this.callServiceDeleteFeature(values.objectID)\r\n            }\r\n        })\r\n    }\r\n\r\n    callServiceDeleteFeature = (objectID) => {\r\n        const { showAlert } = this.props;\r\n        const formData = new FormData();\r\n        formData.append(\"objectIds\", objectID);\r\n        formData.append(\"rollbackOnFailure\", true);\r\n        formData.append(\"f\", \"json\");\r\n\r\n        fetch(`${window.CONFIG_URL_GIS.DRAFT_LINE}/deleteFeatures`, {\r\n            method: \"POST\",\r\n            body: formData\r\n        })\r\n            .then(res => {\r\n                if (!res.ok) {\r\n                    throw res.status\r\n                }\r\n                return res.json();\r\n            })\r\n            .then(result => {\r\n                if (result && result.deleteResults && result.deleteResults[0].success) {\r\n                    showAlert({ altMsg: ALERT_MESSAGE.POPUP.DELETE_SUCCESS })\r\n                    this.props.mapAction.bindMapCommand(MapFunctions.reSearchDraft);\r\n                } else {\r\n                    showAlert({ altMsg: ALERT_MESSAGE.POPUP.DELETE_FAIL })\r\n                }\r\n            })\r\n            .catch(ex => {\r\n                showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR })\r\n                console.log(\"ex callServiceDeleteFeature\", ex);\r\n            });\r\n    }\r\n\r\n    changePage = page => {\r\n        this.setState({\r\n            page: page\r\n        })\r\n    }\r\n\r\n    handleBackToMenu = async () => { //เข้าเมื่อกดปุ่ม < บน panel โดยที่หน้า search,detail,edit ใช้ panel เดียวกัน\r\n        const { page } = this.state;\r\n        const { showAlert, mapAction, onClickBack, dirtyFormEdit } = this.props;\r\n\r\n        switch (page) {\r\n            case PAGE.SEARCH_DRAFT_LINE:\r\n                onClickBack && onClickBack(); //back ไปยังหน้า menu\r\n                break;\r\n            case PAGE.DETAIL_DRAFT_LINE:\r\n                this.setState({ detailView: null })\r\n                mapAction.bindMapCommand(MapFunctions.clearGraphicDrawDraft);\r\n                this.changePage(PAGE.SEARCH_DRAFT_LINE)\r\n                break;\r\n            case PAGE.EDIT_DRAFT_LINE:\r\n                if (dirtyFormEdit) {\r\n                    showAlert({\r\n                        altMsg: ALERT_MESSAGE.QUESTION.CANCEL_FORM,\r\n                        altType: 2,\r\n                        callbackConfirm: this.clearEdit\r\n                    })\r\n                } else {\r\n                    this.clearEdit();\r\n                }\r\n                break;\r\n            default:\r\n                onClickBack && onClickBack(); //back ไปยังหน้า menu\r\n                break;\r\n        }\r\n    }\r\n\r\n    clearEdit = () => {\r\n        const { hideAlert, mapAction,menuAction } = this.props;\r\n        this.setState({ detailEdit: null })\r\n        mapAction.bindMapCommand(MapFunctions.reSearchDraft);\r\n        menuAction.activeFunction(null)\r\n        this.changePage(PAGE.SEARCH_DRAFT_LINE)\r\n        hideAlert();\r\n    }\r\n\r\n    renderChildren = () => {\r\n        // การ render children จะเลือก render เฉพาะ detail และ edit เท่านั้น \r\n        // หน้า form นั้นจะถูก render แต่จะเพียงแค่ซ่อนแสดงเท่านั้นเพื่อให้คงสถานะ state อยู่\r\n        const { page, detailView, detailEdit } = this.state;\r\n        let element = null\r\n\r\n        if (page === PAGE.DETAIL_DRAFT_LINE) {\r\n            element = <DetailDraft detail={detailView} onClickBack={this.handleBackToMenu} />\r\n        } else if (page === PAGE.EDIT_DRAFT_LINE) {\r\n            element = <EditDraftLine detail={detailEdit} onClickBack={this.handleBackToMenu} onClearForm={this.clearEdit} />\r\n        }\r\n\r\n        return (\r\n            <Fragment>\r\n                <FormSearchDraft\r\n                    onClickBack={this.handleBackToMenu}\r\n                    isDisplay={page === PAGE.SEARCH_DRAFT_LINE}\r\n                    urlServiceSearchResult=\"\"\r\n                    urlLookupDataType={process.env.REACT_APP_SURVEY_LU_DRAFT_LINE_TYPE}\r\n                    type=\"LINE\"\r\n                    onDetail={this.handleDetail}\r\n                    onDelete={this.handleDelete}\r\n                    onEdit={this.handleEdit}\r\n                />\r\n                {element}\r\n            </Fragment>\r\n        )\r\n    }\r\n\r\n    render() {\r\n        const { title } = this.props;\r\n\r\n        return (\r\n            <Fragment>\r\n                <SearchDraftLineView\r\n                    title={title}\r\n                    onClickBack={this.handleBackToMenu}\r\n                >\r\n                    {this.renderChildren()}\r\n                </SearchDraftLineView>\r\n                <AlertMessageSuper {...this.props} />\r\n            </Fragment>\r\n        )\r\n    }\r\n}\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    mapAction: bindActionCreators(MapAction, dispatch),\r\n    menuAction: bindActionCreators(MenuAction,dispatch)\r\n})\r\n\r\nconst mapSateToProps = state => ({\r\n    dirtyFormEdit: isDirty('formDraft')(state)\r\n})\r\n\r\nexport default compose(\r\n    WithAlertMessage,\r\n    connect(mapSateToProps, mapDispatchToProps)\r\n)(SearchDraftLine)","import { fetchGet_, fetchPost_ } from '../../../../../../Utilities/ServiceUtils';\r\n\r\nexport const callServiceSubDistrict = (districtID) => {\r\n    return fetchGet_(`${process.env.REACT_APP_LU_SUBDISTRICT}?provinceid=10&districtid=${districtID}`)\r\n        .then(res => {\r\n            if (!res.ok) {\r\n                throw res.status\r\n            }\r\n            return res.json();\r\n        })\r\n        .then(data => {\r\n            if (data && data.result) {\r\n                return data.result\r\n            }\r\n        })\r\n        .catch(ex => {\r\n            console.log('ex callServiceSubDistric', ex)\r\n        })\r\n}\r\n\r\nexport const callServiceDistrict = () => {\r\n    return fetchGet_(`${process.env.REACT_APP_LU_DISTRICT}?provinceid=10`)\r\n        .then(res => {\r\n            if (!res.ok) {\r\n                throw res.status\r\n            }\r\n            return res.json();\r\n        })\r\n        .then(data => {\r\n            if (data && data.result) {\r\n                return data.result\r\n            }\r\n        })\r\n        .catch(ex => {\r\n            console.log('ex callServiceDistric', ex)\r\n        })\r\n}\r\n\r\nexport const callServiceSearchHouseNo = ({ houseName = \"\", houseNumber = \"\", districtID =\"\", subdistrictID=\"\" }) => {\r\n    return fetchPost_(process.env.REACT_APP_GET_HOUSE_NUMBER, {\r\n        houseName,\r\n        houseNumber,\r\n        districtID,\r\n        subdistrictID\r\n    })\r\n        .then(res => {\r\n            if (!res.ok) {\r\n                throw res.status\r\n            }\r\n            return res.json();\r\n        })\r\n        .then(data => {\r\n            if (data && data.result) {\r\n                return data.result\r\n            }\r\n        })\r\n        .catch(ex => {\r\n            console.log('ex callServiceSearchHouseNO', ex)\r\n        })\r\n}\r\n","import React from 'react';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { Field } from \"redux-form\";\r\nimport { withStyles } from '@material-ui/styles';\r\nimport SelectField from '../../../../../../Controls/Containers/SelectFieldRedux';\r\nimport TextField from '../../../../../../Controls/Containers/TextFieldRedux';\r\nimport Button from '../../../../../../Controls/Containers/Button';\r\n\r\nconst FormSearchHouseNoView = ({\r\n    classes,\r\n    handleSubmit,\r\n    luDistrict,\r\n    luSubDistrict,\r\n    onChangeDistrict,\r\n    onSubmit,\r\n    onClickBack,\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.rootFormSearch}>\r\n            <form onSubmit={handleSubmit(onSubmit)} className={classes.form}>\r\n                <Grid item xs={12}>\r\n                    <Field\r\n                        label=\"ชื่ออาคาร\"\r\n                        name=\"houseName\"\r\n                        component={TextField}\r\n                        maxLength = {150}\r\n                    />\r\n                </Grid>\r\n\r\n                <Grid item xs={12}>\r\n                    <Field\r\n                        label=\"บ้านเลขที่\"\r\n                        name=\"houseNumber\"\r\n                        component={TextField}\r\n                        maxLength = {20}\r\n                    />\r\n                </Grid>\r\n\r\n                <Grid item xs={12}>\r\n                    <Field\r\n                        label={\"เขต\"}\r\n                        name=\"districtID\"\r\n                        component={SelectField}\r\n                        onChangeValue={onChangeDistrict}\r\n                        data={luDistrict}\r\n                        keyData={{ value: \"value\", label: \"name\" }}\r\n                    />\r\n                </Grid>\r\n\r\n                <Grid item xs={12}>\r\n                    <Field\r\n                        label={\"แขวง\"}\r\n                        name=\"subDistrictID\"\r\n                        component={SelectField}\r\n                        data={luSubDistrict}\r\n                        keyData={{ value: \"value\", label: \"name\" }}\r\n                    />\r\n                </Grid>\r\n\r\n                <Grid container justify=\"center\" spacing={24} >\r\n                    <Grid item>\r\n                        <Button\r\n                            label=\"ยกเลิก\"\r\n                            onClick={onClickBack}\r\n                        />\r\n                    </Grid>\r\n                    <Grid item>\r\n                        <Button\r\n                            type=\"submit\"\r\n                            label=\"ค้นหา\"\r\n                        />\r\n                    </Grid>\r\n                </Grid>\r\n            </form>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    rootFormSearch: {\r\n        height: '300px'\r\n    },\r\n    form: {\r\n        width: '100%'\r\n    },\r\n    btnCancel: {\r\n        marginLeft: '10px',\r\n    },\r\n}))(FormSearchHouseNoView)\r\n","import React from 'react';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { withStyles } from '@material-ui/styles';\r\nimport AppBarHeaderView from '../../../AppBarHeaderView';\r\nimport FormSearchHouseNoView from './FormSearchHouseNoView';\r\n\r\nconst SearchHouseNoView = ({\r\n    classes,\r\n    children,\r\n    title,\r\n    type,\r\n    luDistrict,\r\n    luSubDistrict,\r\n    handleSubmit,\r\n    onSubmit,\r\n    onClickBack,\r\n    onChangeDistrict\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root}>\r\n            <AppBarHeaderView\r\n                title={title}\r\n                onClickBack={onClickBack}\r\n            />\r\n\r\n            {/*########### FORM ###########*/}\r\n            <Grid container className={classes.rootForm}>\r\n                <FormSearchHouseNoView\r\n                    type={type} \r\n                    luDistrict={luDistrict}\r\n                    luSubDistrict={luSubDistrict}\r\n                    handleSubmit={handleSubmit}\r\n                    onSubmit={onSubmit}\r\n                    onClickBack={onClickBack} //ถ้าไม่ส่งจะไม่แสดงปุ่มยกเลิก\r\n                    onChangeDistrict={onChangeDistrict}\r\n                />\r\n            </Grid>\r\n\r\n            {/*########### RESULT ###########*/}\r\n            <Grid container className={classes.containerResult}>\r\n                {children}\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        width: '100%',\r\n        height: '100%',\r\n        position:'relative'\r\n    },\r\n    rootForm: {\r\n        padding: '10px',\r\n        height:'390px',\r\n        width:'100%',\r\n        position:'relative'\r\n    },\r\n    containerResult: {\r\n        width:'100%',\r\n        position: 'relative',\r\n        height: '100%'\r\n    },\r\n    form: {\r\n        width: '100%'\r\n    },\r\n    btnCancel: {\r\n        marginLeft: '10px',\r\n    },\r\n}))(SearchHouseNoView)\r\n\r\n","import React from 'react';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport ListItem from '@material-ui/core/ListItem';\r\nimport { Scrollbars } from \"react-custom-scrollbars\";\r\n\r\nconst ResultSearchHouseNoView = ({\r\n    classes,\r\n    results,\r\n    onClickResult\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root}>\r\n            <Grid item xs={12} className={classes.header}>\r\n                {`ผลลัพธ์จำนวน ${results.length} รายการ`}\r\n            </Grid>\r\n\r\n            <Grid item xs={12} className={classes.body}>\r\n                <Scrollbars>\r\n                    {results.length === 0 ? <div className={classes.noData}>ไม่พบข้อมูล</div> :\r\n                        results.map((result, index) => (\r\n                            <ListItem\r\n                                button\r\n                                key={`houseNo-${result.id}-${index}`}\r\n                                divider={true}\r\n                                className={classes.item}\r\n                                classes={{ root: classes.rootItem, gutters: classes.guttersItem }}\r\n                                onClick={onClickResult(result)}>\r\n                                {`บ้านเลขที่ : ${result.houseNumber ? result.houseNumber : \"\"} ชื่อ : ${result.houseName ? result.houseName : \"\"}`}<br />\r\n                                {`ถนน : ${result.road ? result.road : \"\"} ซอย : ${result.soi ? result.soi : \"\"}`}<br />\r\n                                {`เขต : ${result.district ? result.district : \"\"}  แขวง : ${result.subDistrict ? result.subDistrict : \"\"}`}\r\n                            </ListItem>\r\n                        ))}\r\n                </Scrollbars>\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        height: 'calc(100% - 435px)',\r\n    },\r\n    rootItem: {\r\n        fontSize: '14px'\r\n    },\r\n    header: {\r\n        height: '25px',\r\n        lineHeight: '25px',\r\n        width: '100%',\r\n        backgroundColor: theme.mainTheme.color3,\r\n        color: theme.mainTheme.color2,\r\n        textAlign: 'center',\r\n        fontSize: theme.textSize.subtitle\r\n    },\r\n    body: {\r\n        height: 'calc(100% - 25px)'\r\n    },\r\n    noData: {\r\n        margin: '18px'\r\n    },\r\n    item: {\r\n        '&:focus': {\r\n            backgroundColor: theme.mainTheme.color2\r\n        },\r\n        '&:hover': {\r\n            backgroundColor: theme.mainTheme.colorAH.colorHover,\r\n            color: theme.mainTheme.colorAH.colorTextHover\r\n        }\r\n    },\r\n    itemActive: {\r\n        backgroundColor: theme.mainTheme.colorAH.colorActive,\r\n        color: theme.mainTheme.colorAH.colorTextActive,\r\n        '&:focus': {\r\n            backgroundColor: theme.mainTheme.colorAH.colorActive\r\n        },\r\n    },\r\n    guttersItem: {\r\n        paddingTop: '5px',\r\n        paddingBottom: '5px'\r\n    }\r\n}))(ResultSearchHouseNoView)\r\n","import React, { Component } from 'react';\r\nimport { bindActionCreators } from \"redux\";\r\nimport { connect } from \"react-redux\";\r\n\r\nimport * as MapAction from '../../../../../../Actions/Web/Maps/MapAction';\r\nimport * as MapFunction from '../../../../../../Map/MapFunctions';\r\nimport * as LocatorUtil from '../../../../../../Utilities/LocatorUtil';\r\nimport ResultSearchHouseNoView from '../../../../../../Presentationals/Web/Panel/Menu/MenuContent/SearchHouseNo/ResultSearchHouseNoView';\r\n\r\nexport class ResultSearchHouseNo extends Component {\r\n\tconstructor() {\r\n\t\tsuper();\r\n\t\tthis.state = {\r\n\t\t\tresultActive: null\r\n\t\t}\r\n\t}\r\n\r\n\tcomponentDidMount() {\r\n\t\tconst { refResultSearcLandInfo } = this.props;\r\n\t\tif (refResultSearcLandInfo) {\r\n\t\t\trefResultSearcLandInfo(this)\r\n\t\t}\r\n\t}\r\n\r\n\tmakeLocatorRingsExtent = (str) => {\r\n\t\tlet tmpString = str;\r\n\t\tlet listPoint = [];\r\n\t\ttmpString = tmpString.replace(\"POLYGON (( \", \"\").replace(\"))\", \"\");\r\n\t\tconst listPointString = tmpString.split(',');\r\n\t\tlistPoint = listPointString.map(item => {\r\n\t\t\tconst listXY = item.trim().split(' ');\r\n\t\t\tconst x = parseFloat(listXY[0]);\r\n\t\t\tconst y = parseFloat(listXY[1]);\r\n\t\t\treturn [x, y];\r\n\t\t})\r\n\t\treturn listPoint\r\n\t}\r\n\r\n\r\n\thandleClickResult = value => evt => {\r\n\t\tconst { mapAction, showLoading, hideLoading } = this.props\r\n\t\tmapAction.bindMapCommand(MapFunction.zoomLandplot, {\r\n\t\t\trings: this.makeLocatorRingsExtent(value.shape),\r\n\t\t\tdrawRings: LocatorUtil.makeLocatorRings(value.shape),\r\n\t\t\ttype: value.shapeType,\r\n\t\t\tcallbackFn: this.handleCallbackGetGeometry,\r\n\t\t\tlandNo: `${value.houseNumber ? value.houseNumber : \"\"}`,\r\n\t\t\tshowLoading,\r\n\t\t\thideLoading\r\n\t\t});\r\n\t}\r\n\r\n\thandleCallbackGetGeometry = (geometry) => {\r\n\t\tconst { mapAction } = this.props\r\n\t\tmapAction.bindClearMapCommand()\r\n\t}\r\n\r\n\trender() {\r\n\t\tconst { isScrollbars, results, typeSearch } = this.props;\r\n\r\n\t\treturn (\r\n\t\t\t<ResultSearchHouseNoView\r\n\t\t\t\tisScrollbars={isScrollbars}\r\n\t\t\t\tresults={results}\r\n\t\t\t\ttypeSearch={typeSearch}\r\n\t\t\t\tonClickResult={this.handleClickResult}\r\n\t\t\t/>\r\n\t\t)\r\n\t}\r\n}\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n\tmapAction: bindActionCreators(MapAction, dispatch),\r\n});\r\n\r\nexport default connect(\r\n\tnull,\r\n\tmapDispatchToProps\r\n)(ResultSearchHouseNo);\r\n","import React, { Component, Fragment } from 'react'\r\nimport { reduxForm } from \"redux-form\";\r\nimport { compose } from \"recompose\";\r\nimport { connect } from \"react-redux\";\r\nimport { searchHouseNoValidate } from '../../../../../../Utilities/Validate';\r\nimport * as ApiSearchHouseNo from './ApiSearchHouseNo';\r\nimport SearchHouseNoView from '../../../../../../Presentationals/Web/Panel/Menu/MenuContent/SearchHouseNo/SearchHouseNoView';\r\nimport WithLoading from '../../../../../../HOC/WithLoading';\r\nimport ResultSearchHouseNo from './ResultSearchHouseNo';\r\nimport Loading from '../../../../../../Controls/Containers/Loading';\r\n\r\nclass SearchHouseNo extends Component {\r\n\r\n    constructor() {\r\n        super();\r\n        this.state = {\r\n            luDistrict: [],\r\n            luSubDistrict: [],\r\n            results: null\r\n        }\r\n    }\r\n\r\n    componentDidMount = async () => {\r\n        const district = await ApiSearchHouseNo.callServiceDistrict()\r\n        this.setState({\r\n            luDistrict: district ? district : []\r\n        })\r\n    }\r\n\r\n\r\n    handleChangeDistrict = async (evt) => {\r\n        const subDistrict = await ApiSearchHouseNo.callServiceSubDistrict(evt.target.value)\r\n        this.setState({\r\n            luSubDistrict: subDistrict ? subDistrict : []\r\n        })\r\n        this.props.change(\"subDistrictID\", \"\")\r\n    }\r\n\r\n    handleSubmit = async values => {\r\n        this.props.showLoading();\r\n        const results = await ApiSearchHouseNo.callServiceSearchHouseNo({\r\n            houseName: values.houseName,\r\n            houseNumber: values.houseNumber,\r\n            districtID: values.districtID,\r\n            subdistrictID: values.subDistrictID\r\n        })\r\n\r\n        this.setState({\r\n            results: results ? results : []\r\n        })\r\n        this.props.hideLoading();\r\n    }\r\n\r\n    render() {\r\n        const { luDistrict, luSubDistrict, results } = this.state;\r\n        const { title, onClickBack, handleSubmit, isShowLoading, showLoading, hideLoading } = this.props;\r\n\r\n        return (\r\n            <Fragment>\r\n                <SearchHouseNoView\r\n                    title={title}\r\n                    luDistrict={luDistrict}\r\n                    luSubDistrict={luSubDistrict}\r\n                    handleSubmit={handleSubmit}\r\n                    onSubmit={this.handleSubmit}\r\n                    onClickBack={onClickBack}\r\n                    onChangeDistrict={this.handleChangeDistrict}\r\n                >\r\n                    {results && <ResultSearchHouseNo\r\n                        results={results}\r\n                        showLoading={showLoading}\r\n                        hideLoading={hideLoading}\r\n                    />}\r\n                </SearchHouseNoView>\r\n                <Loading isShowLoading={isShowLoading} />\r\n            </Fragment>\r\n        )\r\n    }\r\n}\r\n\r\nconst mapDispathToProps = dispatch => ({\r\n\r\n})\r\n\r\nconst reduxFormParameter = {\r\n    form: \"SearchHouseNo\",\r\n    validate: searchHouseNoValidate,\r\n};\r\n\r\n\r\n\r\nconst enhance = compose(\r\n    connect(\r\n        null,\r\n        mapDispathToProps\r\n    ),\r\n    reduxForm(reduxFormParameter),\r\n    WithLoading\r\n);\r\n\r\nexport default enhance(SearchHouseNo)\r\n","import React, { Component } from \"react\";\r\nimport { bindActionCreators } from \"redux\";\r\nimport { connect } from \"react-redux\";\r\nimport { Scrollbars } from \"react-custom-scrollbars\";\r\nimport SubPanelLayout from \"../../../../SubPanelLayout\";\r\nimport * as MapAction from \"../../../../../../../Actions/Web/Maps/MapAction\";\r\nimport * as MapFunctions from \"../../../../../../../Map/MapFunctions\";\r\nimport { fetchGet_ } from \"../../../../../../../Utilities/ServiceUtils\";\r\nimport LandusePlanView from \"../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/AskTheCityPlan/Detail/LandusePlanView\";\r\nimport WithLoading from \"../../../../../../../HOC/WithLoading\";\r\nimport Loading from \"../../../../../../../Controls/Containers/Loading\";\r\nimport OtherPlanView from \"../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/AskTheCityPlan/Detail/OtherPlanView\";\r\nimport BangkokCanonView from \"../../../../../../../Presentationals/Web/Panel/Menu/MenuContent/AskTheCityPlan/Detail/BangkokCanonView\";\r\nimport TermsOfUse from \"./TermsOfUse\";\r\n\r\nclass DetailShortcut extends Component {\r\n    constructor(props) {\r\n        super(props);\r\n        this.state = {\r\n            isSelected: null,\r\n            isOpenTermsOfUse: false,\r\n            termsOfUseId: null,\r\n        };\r\n    }\r\n\r\n    handleClick = (index) => (e) => {\r\n        if (index == this.state.isSelected) {\r\n            //กรณีเลือกตัวเดิมจะเป็นการปิด\r\n            this.setState((state) => ({\r\n                isSelected: null,\r\n            }));\r\n        } else {\r\n            this.setState((state) => ({\r\n                isSelected: index,\r\n            }));\r\n        }\r\n    };\r\n\r\n    handleClickPDF = () => {\r\n        window.open(window.CONFIG_URL_LANDUSEPLAN_PDF, \"DownloadPDF\");\r\n    };\r\n\r\n    handleClickTermsOfUse = (value) => (e) => {\r\n        this.setState({\r\n            isOpenTermsOfUse: true,\r\n            termsOfUseId: value.feature.attributes.LUP_ZONE,\r\n        });\r\n    };\r\n    handleClickTermsOfUseBack = (evt) => {\r\n        evt.stopPropagation();\r\n        this.setState({\r\n            isOpenTermsOfUse: false,\r\n        });\r\n    };\r\n    handleClickExtent = (item) => (evt) => {\r\n        evt.stopPropagation();\r\n        const { mapAction } = this.props;\r\n        mapAction.bindMapCommand(\r\n            MapFunctions.landuseExtent,\r\n            item.feature.geometry\r\n        );\r\n    };\r\n\r\n    handleClickDownloadReqPDF = (val) => (e) => {\r\n        fetchGet_(`${process.env.REACT_APP_GET_REQ_PDF}?zone=${val.value}`)\r\n            .then((res) => {\r\n                if (!res.ok) {\r\n                    throw res.status;\r\n                }\r\n                return res.json();\r\n            })\r\n            .then((result) => {\r\n                window.open(result.url);\r\n            })\r\n            .catch((ex) => {\r\n                console.log(\"ex getReqPDF\", ex);\r\n            });\r\n    };\r\n\r\n    handleClickDrawGraphic = (val, displayText = \"\") => async (e) => {\r\n        e.stopPropagation();\r\n        val.displayText = displayText;\r\n        const { mapAction } = this.props;\r\n        await mapAction.bindMapCommand(MapFunctions.drawGraphicCityPlan, {\r\n            obj: val,\r\n            loadingFunction: {\r\n                showLoading: this.props.showLoading,\r\n                hideLoading: this.props.hideLoading,\r\n            },\r\n        });\r\n\r\n        mapAction.bindClearMapCommand();\r\n    };\r\n\r\n    onClickDrawGraphicOther = (val, displayText = \"\") => async (evt) => {\r\n        val.displayText = displayText;\r\n        const { mapAction } = this.props;\r\n        await mapAction.bindMapCommand(MapFunctions.drawGraphicCityPlan, {\r\n            obj: val,\r\n            loadingFunction: {\r\n                showLoading: this.props.showLoading,\r\n                hideLoading: this.props.hideLoading,\r\n            },\r\n        });\r\n        mapAction.bindClearMapCommand();\r\n    };\r\n\r\n    handlePdfClick = (value) => (e) => {\r\n        window.open(\r\n            `${window.CONFIG_URL_BANGKOK_CANON_PDF}${\r\n                value.feature.attributes.BDCTL_URL\r\n            }`,\r\n            \"DownloadBangkokCanonPDF\"\r\n        );\r\n    };\r\n\r\n    render() {\r\n        const { isSelected, isOpenTermsOfUse, termsOfUseId } = this.state;\r\n        const { data } = this.props;\r\n        //พวก id เดี๋ยวอาจจะใส่เป็นconfig\r\n        const landUseData = data.landUse.filter((itm) => itm.layerId == 11); //ข้อมูลพื้นที่การใช้ประโยชน์ที่ดิน\r\n        const communicationAndtransportationData = data.landUse.filter(\r\n            (itm) => itm.layerId === 9 || itm.layerId === 10\r\n        ); //ข้อมูลโครงการหลัก(กรณีพบผังคมนาคมขนส่ง ทั้ง line และ polygon)\r\n        const trainData = data.landUse.filter((itm) => itm.layerId == 1); //ข้อมูลรถไฟฟ้าในระยะ500เมตร\r\n\r\n        landUseData.forEach((itm) => {\r\n            if (\r\n                itm.feature.attributes.LUP_USE === null ||\r\n                itm.feature.attributes.LUP_USE === \"\" ||\r\n                itm.feature.attributes.LUP_USE === undefined ||\r\n                itm.feature.attributes.LUP_USE === \"Null\"\r\n            ) {\r\n                itm.feature.attributes.LUP_USE = \"-\";\r\n            }\r\n            if (\r\n                itm.feature.attributes.LUP_ZONE === null ||\r\n                itm.feature.attributes.LUP_ZONE === \"\" ||\r\n                itm.feature.attributes.LUP_ZONE === undefined ||\r\n                itm.feature.attributes.LUP_ZONE === \"Null\"\r\n            ) {\r\n                itm.feature.attributes.LUP_ZONE = \"-\";\r\n            }\r\n            if (\r\n                itm.feature.attributes.LUP_SUBZONE === null ||\r\n                itm.feature.attributes.LUP_SUBZONE === \"\" ||\r\n                itm.feature.attributes.LUP_SUBZONE === undefined ||\r\n                itm.feature.attributes.LUP_SUBZONE === \"Null\"\r\n            ) {\r\n                itm.feature.attributes.LUP_SUBZONE = \"-\";\r\n            }\r\n        });\r\n\r\n        const publicUtilityPlanData = data.other.filter(\r\n            (itm) => itm.layerId === 3 || itm.layerId === 4 || itm.layerId === 5\r\n        ); //ข้อมูลผังสาธารณูประโภค\r\n        const wasteWaterTreatmentData = data.other.filter(\r\n            (itm) => itm.layerId === 6\r\n        ); //ข้อมูลพื้นที่บำบัดน้ำเสีย\r\n        const openSpaceData = data.other.filter((itm) => itm.layerId === 7); //ข้อมูลผังที่โล่ง\r\n\r\n        publicUtilityPlanData.forEach((itm) => {\r\n            if (\r\n                itm.feature.attributes.PUP_PRJ_TYPE === null ||\r\n                itm.feature.attributes.PUP_PRJ_TYPE === \"\" ||\r\n                itm.feature.attributes.PUP_PRJ_TYPE === undefined ||\r\n                itm.feature.attributes.PUP_PRJ_TYPE === \"Null\"\r\n            ) {\r\n                itm.feature.attributes.PUP_PRJ_TYPE = \"-\";\r\n            }\r\n            if (\r\n                itm.feature.attributes.PUP_PRJ === null ||\r\n                itm.feature.attributes.PUP_PRJ === \"\" ||\r\n                itm.feature.attributes.PUP_PRJ === undefined ||\r\n                itm.feature.attributes.PUP_PRJ === \"Null\"\r\n            ) {\r\n                itm.feature.attributes.PUP_PRJ = \"-\";\r\n            }\r\n            if (\r\n                itm.feature.attributes.PUP_NAME === null ||\r\n                itm.feature.attributes.PUP_NAME === \"\" ||\r\n                itm.feature.attributes.PUP_NAME === undefined ||\r\n                itm.feature.attributes.PUP_NAME === \"Null\"\r\n            ) {\r\n                itm.feature.attributes.PUP_NAME = \"-\";\r\n            }\r\n        });\r\n\r\n        wasteWaterTreatmentData.forEach((itm) => {\r\n            if (\r\n                itm.feature.attributes.PUP_PRJ === null ||\r\n                itm.feature.attributes.PUP_PRJ === \"\" ||\r\n                itm.feature.attributes.PUP_PRJ === undefined ||\r\n                itm.feature.attributes.PUP_PRJ === \"Null\"\r\n            ) {\r\n                itm.feature.attributes.PUP_PRJ = \"-\";\r\n            }\r\n            if (\r\n                itm.feature.attributes.PUP_PRJ_NAME === null ||\r\n                itm.feature.attributes.PUP_PRJ_NAME === \"\" ||\r\n                itm.feature.attributes.PUP_PRJ_NAME === undefined ||\r\n                itm.feature.attributes.PUP_PRJ_NAME === \"Null\"\r\n            ) {\r\n                itm.feature.attributes.PUP_PRJ_NAME = \"-\";\r\n            }\r\n        });\r\n        openSpaceData.forEach((itm) => {\r\n            if (\r\n                itm.feature.attributes.OPS_ZONE === null ||\r\n                itm.feature.attributes.OPS_ZONE === \" \" ||\r\n                itm.feature.attributes.OPS_ZONE === undefined ||\r\n                itm.feature.attributes.OPS_ZONE === \"Null\"\r\n            ) {\r\n                itm.feature.attributes.OPS_ZONE = \"-\";\r\n            }\r\n            if (\r\n                itm.feature.attributes.OPS_SUBZONE === null ||\r\n                itm.feature.attributes.OPS_SUBZONE === \" \" ||\r\n                itm.feature.attributes.OPS_SUBZONE === undefined ||\r\n                itm.feature.attributes.OPS_SUBZONE === \"Null\"\r\n            ) {\r\n                itm.feature.attributes.OPS_SUBZONE = \"-\";\r\n            }\r\n            if (\r\n                itm.feature.attributes.OPS_NAME === null ||\r\n                itm.feature.attributes.OPS_NAME === \" \" ||\r\n                itm.feature.attributes.OPS_NAME === undefined ||\r\n                itm.feature.attributes.OPS_NAME === \"Null\"\r\n            ) {\r\n                itm.feature.attributes.OPS_NAME = \"-\";\r\n            }\r\n        });\r\n\r\n        const canonData = data.canon;\r\n\r\n        canonData.forEach((itm) => {\r\n            if (\r\n                itm.feature.attributes.BDCTL_CODE === null ||\r\n                itm.feature.attributes.BDCTL_CODE === \" \" ||\r\n                itm.feature.attributes.BDCTL_CODE === undefined ||\r\n                itm.feature.attributes.BDCTL_CODE === \"Null\"\r\n            ) {\r\n                itm.feature.attributes.BDCTL_CODE = \"-\";\r\n            }\r\n            if (\r\n                itm.feature.attributes.BDCTL_TYPE === null ||\r\n                itm.feature.attributes.BDCTL_TYPE === \" \" ||\r\n                itm.feature.attributes.BDCTL_TYPE === undefined ||\r\n                itm.feature.attributes.BDCTL_TYPE === \"Null\"\r\n            ) {\r\n                itm.feature.attributes.BDCTL_TYPE = \"-\";\r\n            }\r\n            if (\r\n                itm.feature.attributes.AREA_ZONE === null ||\r\n                itm.feature.attributes.AREA_ZONE === \" \" ||\r\n                itm.feature.attributes.AREA_ZONE === undefined ||\r\n                itm.feature.attributes.AREA_ZONE === \"Null\"\r\n            ) {\r\n                itm.feature.attributes.AREA_ZONE = \"-\";\r\n            }\r\n\r\n            if (\r\n                itm.feature.attributes.BDCTL_NAME === null ||\r\n                itm.feature.attributes.BDCTL_NAME === \" \" ||\r\n                itm.feature.attributes.BDCTL_NAME === undefined ||\r\n                itm.feature.attributes.BDCTL_NAME === \"Null\"\r\n            ) {\r\n                itm.feature.attributes.BDCTL_NAME = \"-\";\r\n            }\r\n            if (\r\n                itm.feature.attributes.BDCTL_URL === null ||\r\n                itm.feature.attributes.BDCTL_URL === \" \" ||\r\n                itm.feature.attributes.BDCTL_URL === undefined ||\r\n                itm.feature.attributes.BDCTL_URL === \"Null\"\r\n            ) {\r\n                itm.feature.attributes.BDCTL_URL = \"-\";\r\n            }\r\n        });\r\n\r\n        const { menuRdc } = this.props;\r\n\r\n        return (\r\n            <div\r\n                style={{\r\n                    height: \"calc(100% - 50px)\",\r\n                    backgroundColor: \"#FFF\",\r\n                }}>\r\n                <Loading isShowLoading={this.props.isShowLoading} />\r\n                <Scrollbars autoHide={true}>\r\n                    {isOpenTermsOfUse ? (\r\n                        <SubPanelLayout\r\n                            isOpen={isOpenTermsOfUse}\r\n                            onHideClickModile={this.handleClickTermsOfUseBack}\r\n                            title={\"ข้อกำหนดการใช้ประโยชน์\"}\r\n                            subPanelTitle={\"ข้อกำหนดการใช้ประโยชน์\"}\r\n                            onBackClick={this.handleClickTermsOfUseBack}>\r\n                            <TermsOfUse termsOfUseId={termsOfUseId} />\r\n                        </SubPanelLayout>\r\n                    ) : (\r\n                        <>\r\n                            {data.landUse.length !== 0 && (\r\n                                <LandusePlanView\r\n                                    landUseData={landUseData}\r\n                                    communicationAndtransportationData={\r\n                                        communicationAndtransportationData\r\n                                    }\r\n                                    trainData={trainData}\r\n                                    onListClick={this.handleClick}\r\n                                    isSelected={isSelected}\r\n                                    onClickPDF={this.handleClickPDF}\r\n                                    onClickTermsOfUse={\r\n                                        this.handleClickTermsOfUse\r\n                                    }\r\n                                    onClickDownloadReqPDF={\r\n                                        this.handleClickDownloadReqPDF\r\n                                    }\r\n                                    onClickDrawGraphic={\r\n                                        this.handleClickDrawGraphic\r\n                                    }\r\n                                    shortcut={menuRdc.Shortcut}\r\n                                />\r\n                            )}\r\n                            {data.other.length !== 0 && (\r\n                                <OtherPlanView\r\n                                    publicUtilityPlanData={\r\n                                        publicUtilityPlanData\r\n                                    }\r\n                                    wasteWaterTreatmentData={\r\n                                        wasteWaterTreatmentData\r\n                                    }\r\n                                    openSpaceData={openSpaceData}\r\n                                    onClickDrawGraphic={\r\n                                        this.handleClickDrawGraphic\r\n                                    }\r\n                                    shortcut={menuRdc.Shortcut}\r\n                                />\r\n                            )}\r\n                            {data.canon.length !== 0 && (\r\n                                <BangkokCanonView\r\n                                    canonData={canonData}\r\n                                    onPdfClick={this.handlePdfClick}\r\n                                    onClickDrawGraphic={\r\n                                        this.handleClickDrawGraphic\r\n                                    }\r\n                                    shortcut={menuRdc.Shortcut}\r\n                                />\r\n                            )}\r\n                        </>\r\n                    )}\r\n                </Scrollbars>\r\n            </div>\r\n        );\r\n    }\r\n}\r\n\r\nconst mapStateToProps = (state) => ({\r\n    menuRdc: state.menu,\r\n});\r\n\r\nconst mapDispatchToProps = (dispatch) => ({\r\n    mapAction: bindActionCreators(MapAction, dispatch),\r\n});\r\n\r\nexport default WithLoading(\r\n    connect(\r\n        mapStateToProps,\r\n        mapDispatchToProps\r\n    )(DetailShortcut)\r\n);\r\n","import React, { Fragment } from \"react\";\r\nimport { bindActionCreators } from \"redux\";\r\nimport { connect } from \"react-redux\";\r\nimport * as MapAction from \"../../../../../../Actions/Web/Maps/MapAction\";\r\nimport * as SatisfactionAndStatisticAction from \"../../../../../../Actions/Web/Panel/SatisfactionAndStatisticAction\";\r\nimport * as AuthenAction from \"../../../../../../Actions/Authentications/AuthenAction\";\r\nimport WithLoading from \"../../../../../../HOC/WithLoading\";\r\nimport Loading from \"../../../../../../Controls/Containers/Loading\";\r\n\r\nimport DetailShortcut from \"./Deatail/DetailShortcut\";\r\n\r\nconst ResultShortcut = ({ result, isShowLoading }) => {\r\n    const layerSequence = window.CONFIG_COMPREHENSIVE_PLAN.LAYER_SEQUENCE;\r\n\r\n    const handleBackDetail = () => {};\r\n\r\n    const handleClickClosePanel = () => {};\r\n\r\n    const checkRenderSubPanelLayout = () => {\r\n        if (\r\n            result.canon.length !== 0 ||\r\n            result.landUse.length !== 0 ||\r\n            result.other.length !== 0\r\n        ) {\r\n            return (\r\n                <>\r\n                    <DetailShortcut\r\n                        data={result}\r\n                        isOpen={true}\r\n                        handleBackDetail={handleBackDetail}\r\n                        headerName={layerSequence.landUse.name}\r\n                        onHideClickPanel={handleClickClosePanel}\r\n                    />\r\n                </>\r\n            );\r\n        } else {\r\n            return (\r\n                <div style={{ width: \"100%\", padding: \"18px\" }}>\r\n                    ไม่พบข้อมูล\r\n                </div>\r\n            );\r\n        }\r\n    };\r\n\r\n    return (\r\n        <Fragment>\r\n            <Loading isShowLoading={isShowLoading} />\r\n\r\n            {checkRenderSubPanelLayout()}\r\n        </Fragment>\r\n    );\r\n};\r\nconst mapStateToProps = (state) => ({\r\n    authenRdc: state.authen,\r\n    satisfactionAndStatisticRdc: state.SatisfactionAndStatisticReducer,\r\n});\r\nconst mapDispatchToProps = (dispatch) => ({\r\n    authenAction: bindActionCreators(AuthenAction, dispatch),\r\n    mapAction: bindActionCreators(MapAction, dispatch),\r\n    SatisfactionAndStatisticAction: bindActionCreators(\r\n        SatisfactionAndStatisticAction,\r\n        dispatch\r\n    ),\r\n});\r\n\r\nexport default WithLoading(\r\n    connect(\r\n        mapStateToProps,\r\n        mapDispatchToProps\r\n    )(ResultShortcut)\r\n);\r\n","import React, { useState, useEffect } from \"react\";\r\nimport { connect } from \"react-redux\";\r\nimport { bindActionCreators } from \"redux\";\r\nimport { compose } from \"recompose\";\r\nimport WithAskTheCityPlanReducer from \"../../../../../../HOC/ConnectReducer/WithAskTheCityPlanReducer\";\r\nimport * as MenuConstants from \"../../../../../../Constants/MenuConstants\";\r\nimport * as Mapfunction from \"../../../../../../Map/MapFunctions\";\r\nimport * as MenuAction from \"../../../../../../Actions/Web/MenuAction\";\r\n\r\nimport RouteConfig from \"../../../../../../Config/AppRoute/RouteConfig\";\r\nimport AppBarHeaderView from \"../../../../../../Presentationals/Web/Panel/AppBarHeaderView\";\r\n\r\nimport ResultShortcut from \"./ResultShortcut\";\r\nimport Loading from \"../../../../../../Controls/Containers/Loading\";\r\n\r\nlet isSaveAskForBusinessGlobal = false;\r\nconst AskWithShortcut = ({\r\n    AskTheCityPlanReducer,\r\n    menuAction,\r\n    isLoadMapComplete,\r\n}) => {\r\n    const [isFindData, setFindData] = useState(false); //เอาไว้เช็คเมื่อค้นหาแล้วไม่พบข้อมูล\r\n    const [isSaveAskForBusiness, setSaveAskForBusinessLocal] = useState(false);\r\n    const [geometry, setGeometry] = useState(null);\r\n\r\n    const { state, mapAction, askTheCityPlanAction } = AskTheCityPlanReducer;\r\n\r\n    useEffect(() => {\r\n        if (isLoadMapComplete) {\r\n            genCurrentOnClick(MenuConstants.MODE_DRAW.POINT);\r\n        }\r\n    }, [isLoadMapComplete]);\r\n\r\n    const setSaveAskForBusiness = (bool) => {\r\n        setSaveAskForBusinessLocal(bool);\r\n        isSaveAskForBusinessGlobal = bool;\r\n    };\r\n\r\n    const makeDataResult = (result) => {\r\n        const layerSequence = window.CONFIG_COMPREHENSIVE_PLAN.LAYER_SEQUENCE;\r\n        const canon = [],\r\n            landUse = [],\r\n            other = [];\r\n\r\n        result.forEach((itm) => {\r\n            if (layerSequence.canon.layerID.indexOf(itm.layerId) !== -1) {\r\n                canon.push(itm);\r\n            } else if (\r\n                layerSequence.landUse.layerID.indexOf(itm.layerId) !== -1\r\n            ) {\r\n                landUse.push(itm);\r\n            } else if (\r\n                layerSequence.other.layerID.indexOf(itm.layerId) !== -1\r\n            ) {\r\n                other.push(itm);\r\n            }\r\n        });\r\n        return { canon, landUse, other };\r\n    };\r\n\r\n    const callbackIdentifyComprehensivePlanResult = (result, geometry) => {\r\n        mapAction.bindClearMapCommand();\r\n        menuAction.openBtnPrintmap();\r\n        askTheCityPlanAction.saveDatatAskTheCityPlan(makeDataResult(result));\r\n        setGeometry(geometry);\r\n        setFindData(true);\r\n    };\r\n\r\n    const handleDrawMapComplete = (evt) => {\r\n        setFindData(false);\r\n        setSaveAskForBusiness(false);\r\n\r\n        mapAction.bindClearMapCommand();\r\n        if (evt) {\r\n            mapAction.bindMapCommand(Mapfunction.IdentifyComprehensivePlanCMP, {\r\n                geometry: evt.geometry,\r\n                callbackFn: callbackIdentifyComprehensivePlanResult,\r\n            });\r\n            menuAction.openMenuPanel();\r\n        }\r\n    };\r\n\r\n    const genCurrentOnClick = (type) => {\r\n        mapAction.bindMapCommand(Mapfunction.getResultCurrent, {\r\n            callback: handleDrawMapComplete,\r\n            type: type,\r\n            isMobileView: true,\r\n            callBackFailed: onClickBack,\r\n        });\r\n    };\r\n\r\n    const handleClickClearResult = () => {};\r\n\r\n    const onClickBack = () => {\r\n        window.location.href = window.ROOT_SYSTEM_URL + RouteConfig.CMPMobile;\r\n    };\r\n\r\n    return (\r\n        <>\r\n            <AppBarHeaderView\r\n                title=\"สอบถามผังเมืองรวม กรุงเทพมหานคร\"\r\n                onClickBack={onClickBack}\r\n            />\r\n            {isFindData && (\r\n                <ResultShortcut\r\n                    result={state}\r\n                    isMenuActive={true}\r\n                    isFindData={isFindData}\r\n                    onClickClearResult={handleClickClearResult}\r\n                    isPeople={true} //เช็คว่าเป็นประชาชนหรือเจ้าหน้าที่\r\n                />\r\n            )}\r\n            <Loading isShowLoading={!isFindData} />\r\n        </>\r\n    );\r\n};\r\n\r\nconst mapStateToProps = (state) => ({ menuRdc: state.menu });\r\n\r\nconst mapDispatchToProps = (dispatch) => ({\r\n    menuAction: bindActionCreators(MenuAction, dispatch),\r\n});\r\n\r\nexport default compose(\r\n    connect(\r\n        mapStateToProps,\r\n        mapDispatchToProps\r\n    ),\r\n    WithAskTheCityPlanReducer\r\n)(AskWithShortcut);\r\n","import React, { Fragment } from 'react';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport AppBarHeaderView from '../../../../../../Presentationals/Web/Panel/AppBarHeaderView';\r\nimport { withStyles } from '@material-ui/core';\r\nimport Button from '../../../../../../Controls/Containers/Button';\r\nimport ClearIcon from '@material-ui/icons/Clear';\r\nimport { BTN } from '../../../../../../Constants/Constants';\r\nimport { Field } from 'redux-form';\r\nimport CloudUpload from '@material-ui/icons/CloudUpload';\r\nimport TextField from '../../../../../../Controls/Containers/TextFieldRedux';\r\n\r\nconst CustomClearIcon = withStyles((theme) => ({\r\n  root: {\r\n    width: 15,\r\n    cursor: 'default',\r\n  },\r\n}))(ClearIcon);\r\n\r\nconst ImportOSSView = ({\r\n  classes,\r\n  title,\r\n  children,\r\n  onClickBack,\r\n  hasValue,\r\n  fileName,\r\n  onChange,\r\n  onClearUpload,\r\n  handleSubmit,\r\n  handleSubmitForm,\r\n  onClickUpload,\r\n  inputUploadRef,\r\n  refUploadForm,\r\n}) => {\r\n  return (\r\n    <Grid container className={classes.root}>\r\n      <AppBarHeaderView\r\n        // title={page}\r\n        title={title}\r\n        onClickBack={onClickBack}\r\n      />\r\n      <Grid item xs={12} className={`${classes.body} ${classes.rootForm}`}>\r\n        <form encType='multipart/form-data' method='post' ref={refUploadForm}>\r\n          <input id='inFile' type='file' name='file' ref={inputUploadRef} onChange={onChange} hidden />\r\n        </form>\r\n        <form onSubmit={handleSubmit(handleSubmitForm)}>\r\n          <Field name='importOSS' label='เลือกไฟล์ CSV จากระบบ OSS' component={TextField} icon={<CloudUpload />} onClick={onClickUpload} required />\r\n          <div className={classes.btnGroup}>\r\n            <Button variant='contained' label={BTN.TH.CANCEL} onClick={onClearUpload} />\r\n            <Button type='submit' label={BTN.TH.SAVE} />\r\n          </div>\r\n        </form>\r\n        <div className={classes.stepLine} />\r\n      </Grid>\r\n    </Grid>\r\n  );\r\n};\r\n\r\nexport default withStyles((theme) => ({\r\n  root: {\r\n    // height: '100%',\r\n  },\r\n  rootForm: {\r\n    padding: '15px',\r\n    display: 'flex',\r\n    flexDirection: 'column',\r\n    gap: '10px',\r\n  },\r\n  body: {\r\n    height: 'calc(100% - 45px)',\r\n  },\r\n  btnGroup: {\r\n    display: 'flex',\r\n    justifyContent: 'center',\r\n    gap: '10px',\r\n  },\r\n  stepLine: {\r\n    border: '1px solid rgba(0, 0, 0, 0.38)',\r\n  },\r\n}))(ImportOSSView);\r\n","import React, { Component } from 'react'\r\nimport classnames from 'classnames'\r\nimport './css/pagination.css'\r\nimport Typography from '@material-ui/core/Typography'\r\n\r\nimport * as arrowLeftDisabled from './img/pagination/page_arrow_left_disabled.png';\r\nimport * as arrowLeftLastDisabled from './img/pagination/page_arrow_left_last_disabled.png';\r\nimport * as arrowLeftLastNormal from './img/pagination/page_arrow_left_last_normal.png';\r\nimport * as arrowLeftNormal from './img/pagination/page_arrow_left_normal.png';\r\nimport * as arrowRightDisabled from './img/pagination/page_arrow_right_disabled.png';\r\nimport * as arrowRightLastDisabled from './img/pagination/page_arrow_right_last_disabled.png';\r\nimport * as arrowRightLastNormal from './img/pagination/page_arrow_right_last_normal.png';\r\nimport * as arrowRightNormal from './img/pagination/page_arrow_right_normal.png';\r\n\r\nconst images = {\r\n    arrowLeftDisabled : arrowLeftDisabled,\r\n    arrowLeftLastDisabled : arrowLeftLastDisabled,\r\n    arrowLeftLastNormal : arrowLeftLastNormal,\r\n    arrowLeftNormal : arrowLeftNormal,\r\n    arrowRightDisabled : arrowRightDisabled,\r\n    arrowRightLastDisabled : arrowRightLastDisabled,\r\n    arrowRightLastNormal : arrowRightLastNormal,\r\n    arrowRightNormal : arrowRightNormal,\r\n}\r\n\r\nclass Pagination extends Component {\r\n\r\n    onPageChange = (page) => {\r\n        const { onPageChange, count } = this.props\r\n        if(page >= 1 && page <= count )\r\n            onPageChange(page)\r\n    }\r\n\r\n    createGoToFirstPageButton = () => {\r\n        const {  page } = this.props\r\n        const imagePath = `arrowLeftLast${page === 1 ? 'Disabled':'Normal'}`\r\n        return (\r\n            <div\r\n                className=\"pagination-button button-prev\"\r\n                onClick={() => this.onPageChange(1)}\r\n            >\r\n                <img src={images[imagePath]} width='20px' alt=\"\"/>\r\n            </div>\r\n        )\r\n    }\r\n\r\n    createGoToPrevPageButton = () => {\r\n        const { page } = this.props\r\n        const imagePath = `arrowLeft${page === 1 ? 'Disabled':'Normal'}`\r\n        return (\r\n            <div\r\n                className=\"pagination-button button-prev\"\r\n                onClick={() => this.onPageChange(page - 1)}\r\n            >\r\n                <img src={images[imagePath]} width='20px' alt=\"\"/>\r\n            </div>\r\n        )\r\n    }\r\n\r\n    createGoToNextPageButton = () => {\r\n        const { page, count } = this.props\r\n        const imagePath = `arrowRight${page === count ? 'Disabled':'Normal'}`\r\n        return (\r\n            <div\r\n                className=\"pagination-button button-prev\"\r\n                onClick={() => this.onPageChange(page + 1)}\r\n            >\r\n                <img src={images[imagePath]} width='20px' alt=\"\"/>\r\n            </div>\r\n        )\r\n    }\r\n\r\n    createGoToLastPageButton = () => {\r\n        const { page, count } = this.props\r\n        const imagePath = `arrowRightLast${page === count ? 'Disabled':'Normal'}`\r\n        return (\r\n            <div\r\n                className=\"pagination-button button-prev\"\r\n                onClick={() => this.onPageChange(count)}\r\n            >\r\n                <img src={images[imagePath]} width='20px' alt=\"\"/>\r\n            </div>\r\n        )\r\n    }\r\n\r\n    createPages = () => {\r\n        const { total, rowPerPage, page } = this.props\r\n        let pages = []\r\n        for (let i = 0; i <= total/rowPerPage; i++) {\r\n            pages.push(\r\n                <li\r\n                    key={i}\r\n                    onClick={() => this.onPageChange(i+1)}\r\n                    className={classnames('pagination-list-item', 'pagination-button', {\r\n                        active: i+1 === page\r\n                    })}\r\n                >\r\n                    {i+1}\r\n                </li>\r\n            )}\r\n        return pages.filter( ( item, index ) => index + 1 === page )\r\n    }\r\n\r\n    render() {\r\n        const { \r\n            count \r\n        } = this.props\r\n\r\n        const pages = this.createPages()\r\n        const firstPage = this.createGoToFirstPageButton()\r\n        const prevPage = this.createGoToPrevPageButton()\r\n        const nextPage = this.createGoToNextPageButton()\r\n        const lastPage = this.createGoToLastPageButton()\r\n        return (\r\n            <div id=\"pagination-container\">\r\n                <div id=\"pagination\" style={window.innerWidth < 376 ? {width: '2%', maxWidth: 0, minWidth: 0}: {width: '100%'}}>\r\n                    {firstPage}\r\n                    {prevPage}\r\n                    <div className=\"pagination-text page-label\">\r\n                        <Typography variant=\"body1\">\r\n                            หน้า\r\n                        </Typography>\r\n                    </div>\r\n                    <ul id=\"pagination-list\">\r\n                        {pages}\r\n                    </ul>\r\n                    <div className=\"pagination-text\">\r\n                        <Typography variant=\"body1\">\r\n                            จาก\r\n                        </Typography>\r\n                        <div className=\"count-lable\">\r\n                            {count}\r\n                        </div>\r\n                    </div>\r\n                    {nextPage}\r\n                    {lastPage}\r\n                </div>\r\n            </div>\r\n        );\r\n    }\r\n}\r\n\r\nexport default Pagination;","import React, { Component } from 'react';\r\n\r\nclass TextColumn extends Component {\r\n    render() {\r\n\r\n        const { value, width, align } = this.props;\r\n\r\n        return (\r\n            <div className=\"table_cell text-column\" style={{width: width, textAlign: align}}>\r\n                {value}\r\n            </div>\r\n        );\r\n    }\r\n}\r\n\r\nexport default TextColumn;","import React, { Component } from 'react';\r\n\r\nclass NumberColumn extends Component {\r\n    render() {\r\n\r\n        const { value, width, align, digit = 0 } = this.props;\r\n\r\n        return (\r\n            <div className=\"table_cell number-column\" style={{width: width, textAlign: align}}>\r\n                { isNaN(value) ? value : this.numberFormat(Number(value), digit)}\r\n            </div>\r\n        );\r\n    }\r\n\r\n    numberFormat(amount, decimalCount = 2, decimal = \".\", thousands = \",\") {\r\n        try {\r\n          decimalCount = Math.abs(decimalCount);\r\n          decimalCount = isNaN(decimalCount) ? 2 : decimalCount;\r\n      \r\n          const negativeSign = amount < 0 ? \"-\" : \"\";\r\n      \r\n          let i = parseInt(amount = Math.abs(Number(amount) || 0).toFixed(decimalCount)).toString();\r\n          let j = (i.length > 3) ? i.length % 3 : 0;\r\n      \r\n          return negativeSign + (j ? i.substr(0, j) + thousands : '') + i.substr(j).replace(/(\\d{3})(?=\\d)/g, \"$1\" + thousands) + (decimalCount ? decimal + Math.abs(amount - i).toFixed(decimalCount).slice(2) : \"\");\r\n        } catch (e) {\r\n        }\r\n      };\r\n}\r\n\r\nexport default NumberColumn;","import React, { Component } from 'react';\r\n\r\nclass ImageColumn extends Component {\r\n    render() {\r\n\r\n        const { value, width, align } = this.props;\r\n\r\n        return (\r\n            <div className=\"table_cell image-column\" style={{width: width, textAlign: align}}>\r\n                <img src={value} alt=\"\" title=\"\" />\r\n            </div>\r\n        );\r\n    }\r\n}\r\n\r\nexport default ImageColumn;","import React from 'react'\r\nimport Delete from \"@material-ui/icons/Delete\";\r\nimport Edit from \"@material-ui/icons/Edit\";\r\nimport IconButton from '@material-ui/core/IconButton';\r\nimport { withStyles } from '@material-ui/core';\r\n\r\nconst ButtonColumn = ({\r\n  classes,\r\n  value,\r\n  width,\r\n  align,\r\n  onClickRow,\r\n  conditionHideEdit\r\n}) => {\r\n  const renderButton = ()=>{\r\n    let buttonList = []\r\n    let isCondition = conditionHideEdit(value)\r\n      if(isCondition){\r\n        buttonList.push( <IconButton onClick={() => onClickRow(value, 'edit')} >\r\n        <Edit className={classes.btn} />\r\n      </IconButton>)\r\n      }\r\n\r\n\r\n      buttonList.push(<IconButton onClick={() => onClickRow(value, 'delete')} >\r\n      <Delete className={classes.btn} />\r\n    </IconButton>)\r\n      \r\n    return(buttonList)\r\n  }\r\n  return (\r\n    <div className=\"table_cell text-column\" style={{ width: width, textAlign: align }}>\r\n    {conditionHideEdit?renderButton():<div>\r\n      <IconButton onClick={() => onClickRow(value, 'edit')} >\r\n        <Edit className={classes.btn} />\r\n      </IconButton>\r\n      <IconButton onClick={() => onClickRow(value, 'delete')} >\r\n        <Delete className={classes.btn} />\r\n      </IconButton></div>}\r\n    </div>\r\n  )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n  btn: {\r\n    width: '15px', height: '15px'\r\n  }\r\n}))(ButtonColumn)\r\n","import React from 'react'\r\n\r\nconst ButtonPopupColumn = ({\r\n    value,\r\n    width,\r\n    align,\r\n    onClickRow,\r\n    data,\r\n}) => {\r\n\r\n    return (\r\n        <div \r\n            className=\"table_cell text-column\" style={{ width: width, textAlign: align, textDecoration: 'underline', cursor: 'pointer', color: '#0000ff' }}\r\n            onClick={() => onClickRow(value, 'system')}\r\n        >\r\n            {data && data.userGroupName}\r\n        </div>\r\n    )\r\n}\r\n\r\nexport default ButtonPopupColumn\r\n","import React from 'react';\r\nimport IconButton from '@material-ui/core/IconButton';\r\nimport { withStyles } from '@material-ui/core';\r\nimport VisibilityIcon from '@material-ui/icons/Visibility';\r\nimport SearchIcon from '@material-ui/icons/Search';\r\n\r\nconst ButtonViewColumn = ({ classes, value, width, align, onClickRow }) => {\r\n  return (\r\n    <div className='table_cell text-column' style={{ width: width, textAlign: align }}>\r\n      <div>\r\n        <IconButton onClick={() => onClickRow(value, 'edit')}>\r\n          <SearchIcon className={classes.btn} />\r\n        </IconButton>\r\n      </div>\r\n    </div>\r\n  );\r\n};\r\n\r\nexport default withStyles((theme) => ({\r\n  btn: {\r\n    width: '15px',\r\n    height: '15px',\r\n  },\r\n}))(ButtonViewColumn);\r\n","import React, { Component, Fragment } from \"react\";\r\nimport PropTypes from \"prop-types\";\r\nimport \"./css/datatable.css\";\r\nimport \"./css/animation.css\";\r\nimport Scrollbar from \"react-custom-scrollbars\";\r\n\r\nimport Pagination from \"./Pagination\";\r\nimport * as ColumnConstants from \"./ColumnConstants\";\r\n\r\nimport * as ImgSortBoth from \"./img/sort/sort_both.png\";\r\nimport * as ImgSortAsc from \"./img/sort/sort_asc.png\";\r\nimport * as ImgSortDesc from \"./img/sort/sort_desc.png\";\r\n\r\nimport TextColumn from \"./Columns/TextColumn\";\r\nimport NumberColumn from \"./Columns/NumberColumn\";\r\nimport ImageColumn from \"./Columns/ImageColumn\";\r\nimport ButtonColumn from \"./Columns/ButtonColumn\";\r\nimport ButtonPopupColumn from \"./Columns/ButtonPopupColumn\";\r\nimport ButtonViewColumn from \"./Columns/ButtonViewColumn\";\r\n\r\nconst DEFAULT_FUNC = (fnKey, defaultVal) => {\r\n    return function(...params) {\r\n        // console.log(fnKey, params);\r\n\r\n        if (defaultVal) return defaultVal;\r\n    };\r\n};\r\n\r\nclass DataTable extends Component {\r\n    constructor(props) {\r\n        super(props);\r\n\r\n        this.state = { rowSlideId: null };\r\n\r\n        this.DEFAULT_BTN_CTRL_WIDTH = 80;\r\n        this.countRow = 0;\r\n        this.handleSort = this.handleSort.bind(this);\r\n    }\r\n\r\n    componentDidUpdate(prevProps, prevState) {\r\n        // const {handleRowPerPage, rowPerPage} = this.props\r\n        // if(this.countRow > 0 && rowPerPage !== this.countRow) {\r\n        //     handleRowPerPage(this.countRow)\r\n        // }\r\n\r\n        const { rowSlideId } = this.state;\r\n\r\n        if (rowSlideId !== null && prevState.rowSlideId === rowSlideId) {\r\n            this.setState({ rowSlideId: null });\r\n        }\r\n    }\r\n\r\n    slideRow(id) {\r\n        const { rowSlideId } = this.state;\r\n        if (rowSlideId === id) {\r\n            this.setState({ rowSlideId: null });\r\n        } else {\r\n            this.setState({ rowSlideId: id });\r\n        }\r\n    }\r\n\r\n    handleSort(colId) {\r\n        if (this.props.type === `admin`) {\r\n            // console.log(\"colId\", colId)\r\n        } else {\r\n            const {\r\n                columns,\r\n                sortColumn,\r\n                sortType,\r\n                handleSort = DEFAULT_FUNC(\"handleSort\"),\r\n            } = this.props;\r\n\r\n            if (columns[colId].sort !== false) {\r\n                if (columns[colId].data === sortColumn) {\r\n                    handleSort(\r\n                        columns[colId].data,\r\n                        sortType === \"asc\" ? \"desc\" : \"asc\"\r\n                    );\r\n                } else {\r\n                    handleSort(columns[colId].data, \"asc\");\r\n                }\r\n            }\r\n        }\r\n    }\r\n\r\n    displaySort(colId) {\r\n        const { columns, sortColumn, sortType } = this.props;\r\n\r\n        let img = ImgSortBoth;\r\n\r\n        if (columns[colId].data === sortColumn) {\r\n            if (sortType === \"asc\") {\r\n                img = ImgSortAsc;\r\n            } else {\r\n                img = ImgSortDesc;\r\n            }\r\n        }\r\n\r\n        return img;\r\n    }\r\n\r\n    getPosition(ref) {\r\n        var intViewportHeight = window.innerHeight;\r\n        if (ref != null) {\r\n            if (ref.offsetTop + ref.offsetHeight <= intViewportHeight - 397) {\r\n                this.countRow++;\r\n            }\r\n        }\r\n    }\r\n\r\n    handleAnimationClass = (item) => {\r\n        const { rowControls } = this.props;\r\n\r\n        let allWidth = 0;\r\n        rowControls.forEach((ctrl) => {\r\n            allWidth += ctrl.width ? ctrl.width : this.DEFAULT_BTN_CTRL_WIDTH;\r\n        });\r\n\r\n        return { transform: `translateX(${allWidth}px)` };\r\n    };\r\n\r\n    render() {\r\n        const {\r\n            columns,\r\n            data,\r\n            page,\r\n            rowPerPage,\r\n            total,\r\n            handlePageChange = DEFAULT_FUNC(\"handlePageChange\"),\r\n            handleRowClick = DEFAULT_FUNC(\"handleRowClick\"),\r\n            //isDelete = false,\r\n            handlerBeforeShowControl = DEFAULT_FUNC(\r\n                \"handlerBeforeShowControl\",\r\n                true\r\n            ),\r\n            headerCssClass,\r\n            noDataMessage,\r\n            rowControls,\r\n            conditionHideEdit,\r\n            tableOnPanel = false,\r\n            tableSearchOSS = false,\r\n            hasSortable = true,\r\n        } = this.props;\r\n\r\n        const { rowSlideId } = this.state;\r\n        this.countRow = 0;\r\n        let lstColumns, rows, pagination, lstRowCtrls;\r\n\r\n        if (\r\n            rowControls &&\r\n            typeof rowControls !== \"string\" &&\r\n            rowControls.length &&\r\n            rowControls.length > 0\r\n        ) {\r\n            lstRowCtrls = rowControls;\r\n        }\r\n\r\n        let noDataMsg;\r\n        if (!noDataMessage) {\r\n            noDataMsg = `ไม่พบรายการ`;\r\n        } else {\r\n            noDataMsg = noDataMessage;\r\n        }\r\n\r\n        if (data != null) {\r\n            lstColumns = columns.map((item, i) => (\r\n                <div\r\n                    className={\r\n                        hasSortable\r\n                            ? \"table_header\"\r\n                            : \"table_header_not_sortable\"\r\n                    }\r\n                    onClick={() => this.handleSort(i)}\r\n                    style={{ width: item.width }}\r\n                    key={item.data + i}\r\n                >\r\n                    <div\r\n                        className=\"table_header_title\"\r\n                        style={{ display: \"inline\" }}\r\n                        dangerouslySetInnerHTML={{ __html: item.title }}\r\n                    >\r\n                        {/* {item.title} */}\r\n                    </div>\r\n                    {item.sort && (\r\n                        <div style={{ display: \"inline\" }}>\r\n                            <img\r\n                                src={this.displaySort(i)}\r\n                                className=\"table-sort\"\r\n                                alt=\"\"\r\n                            />\r\n                        </div>\r\n                    )}\r\n                </div>\r\n            ));\r\n\r\n            if (data.length > 0) {\r\n                rows = data.map((item, index) => {\r\n                    return (\r\n                        <div\r\n                            className=\"row_frame\"\r\n                            key={\"c\" + index}\r\n                            ref={(r) => {\r\n                                this.getPosition(r);\r\n                            }}\r\n                        >\r\n                            <div\r\n                                className={\r\n                                    rowSlideId === \"c\" + index\r\n                                        ? \"table_tool fadeIn\"\r\n                                        : \"table_tool\"\r\n                                }\r\n                            >\r\n                                {lstRowCtrls\r\n                                    ? lstRowCtrls.map((ctrlOption) => {\r\n                                          const displayControl = ctrlOption.displayConditionFn\r\n                                              ? ctrlOption.displayConditionFn(\r\n                                                    item\r\n                                                )\r\n                                              : true;\r\n\r\n                                          if (displayControl)\r\n                                              return (\r\n                                                  <div\r\n                                                      key={\r\n                                                          \"ctrl-\" +\r\n                                                          ctrlOption.key\r\n                                                      }\r\n                                                      className={`table_btn ${\r\n                                                          ctrlOption.colorClass\r\n                                                              ? ctrlOption.colorClass\r\n                                                              : \"\"\r\n                                                      }`}\r\n                                                      onClick={() =>\r\n                                                          handleRowClick(\r\n                                                              item,\r\n                                                              ctrlOption.key\r\n                                                          )\r\n                                                      }\r\n                                                      style={{\r\n                                                          width:\r\n                                                              ctrlOption.width ||\r\n                                                              this\r\n                                                                  .DEFAULT_BTN_CTRL_WIDTH,\r\n                                                      }}\r\n                                                  >\r\n                                                      {ctrlOption.icon || null}\r\n                                                      {ctrlOption.text}\r\n                                                  </div>\r\n                                              );\r\n                                          else return null;\r\n                                      })\r\n                                    : null}\r\n                            </div>\r\n                            <div\r\n                                className={\r\n                                    rowSlideId === \"c\" + index\r\n                                        ? \"table_row table_row_active \"\r\n                                        : \"table_row\"\r\n                                }\r\n                                style={\r\n                                    rowSlideId === \"c\" + index\r\n                                        ? this.handleAnimationClass(item)\r\n                                        : {}\r\n                                }\r\n                                onClick={() => {\r\n                                    if (handlerBeforeShowControl(item))\r\n                                        this.slideRow(\"c\" + index);\r\n                                }}\r\n                            >\r\n                                {columns.map((citem, i) => {\r\n                                    const key =\r\n                                        \"r\" +\r\n                                        citem.data +\r\n                                        item[citem.data] +\r\n                                        index +\r\n                                        i;\r\n\r\n                                    if (\r\n                                        citem.type ===\r\n                                        ColumnConstants.NumberColumn\r\n                                    )\r\n                                        return (\r\n                                            <NumberColumn\r\n                                                value={item[citem.data]}\r\n                                                digit={citem.digit}\r\n                                                width={citem.width}\r\n                                                aligh={citem.align}\r\n                                                key={key}\r\n                                            />\r\n                                        );\r\n                                    else if (\r\n                                        citem.type ===\r\n                                        ColumnConstants.ImageColumn\r\n                                    )\r\n                                        return (\r\n                                            <ImageColumn\r\n                                                value=\"https://static1.seekingalpha.com/uploads/2012/3/5/saupload_icon_check_AA000NED.png\"\r\n                                                width={citem.width}\r\n                                                align={citem.align}\r\n                                                key={key}\r\n                                            />\r\n                                        );\r\n                                    else if (\r\n                                        citem.type ===\r\n                                        ColumnConstants.ButtonColumn\r\n                                    )\r\n                                        return (\r\n                                            <ButtonColumn\r\n                                                conditionHideEdit={\r\n                                                    conditionHideEdit\r\n                                                }\r\n                                                value={item}\r\n                                                onClickRow={handleRowClick}\r\n                                                align={citem.align}\r\n                                                key={key}\r\n                                            />\r\n                                        );\r\n                                    else if (\r\n                                        citem.type ===\r\n                                        ColumnConstants.ButtonPopupColumn\r\n                                    )\r\n                                        return (\r\n                                            <ButtonPopupColumn\r\n                                                conditionHideEdit={\r\n                                                    conditionHideEdit\r\n                                                }\r\n                                                width={citem.width}\r\n                                                data={item}\r\n                                                value={item}\r\n                                                onClickRow={handleRowClick}\r\n                                                align={citem.align}\r\n                                                key={key}\r\n                                            />\r\n                                        );\r\n                                    else if (\r\n                                        citem.type ===\r\n                                        ColumnConstants.ButtonView\r\n                                    )\r\n                                        return (\r\n                                            <ButtonViewColumn\r\n                                                value={item}\r\n                                                onClickRow={handleRowClick}\r\n                                                align={citem.align}\r\n                                                key={key}\r\n                                            />\r\n                                        );\r\n                                    else\r\n                                        return (\r\n                                            <TextColumn\r\n                                                value={item[citem.data]}\r\n                                                width={citem.width}\r\n                                                align={citem.align}\r\n                                                key={key}\r\n                                            />\r\n                                        );\r\n                                })}\r\n                            </div>\r\n                        </div>\r\n                    );\r\n                });\r\n                pagination = (\r\n                    <Pagination\r\n                        margin={1}\r\n                        page={page}\r\n                        count={Math.ceil(total / rowPerPage)}\r\n                        onPageChange={handlePageChange}\r\n                        total={total}\r\n                        rowPerPage={rowPerPage}\r\n                    />\r\n                );\r\n            } else {\r\n                rows = <div className=\"table_row no_data\">{noDataMsg}</div>;\r\n            }\r\n        }\r\n\r\n        return (\r\n            <Fragment>\r\n                {tableSearchOSS ? (\r\n                    <div\r\n                        className={\r\n                            tableSearchOSS ? \"table_frame_panel\" : \"table_frame\"\r\n                        }\r\n                    >\r\n                        <div\r\n                            className={tableOnPanel ? \"table_panel\" : \"table\"}\r\n                            style={{ height: \"100%\", overflow: \"unset\" }}\r\n                        >\r\n                            <div className={`theader ${headerCssClass}`}>\r\n                                {lstColumns}\r\n                            </div>\r\n                            <Scrollbar\r\n                                // autoHeight\r\n                                autoHeightMin={10}\r\n                                // autoHeightMax={window.innerHeight}\r\n                                autoHeightMax={\"100%\"}\r\n                                autoHide={false}\r\n                                // height={\"100%\"}\r\n                                style={{ height: 'calc(100% - 70px)' }}\r\n                            >\r\n                                {rows}\r\n                            </Scrollbar>\r\n                        </div>\r\n                    </div>\r\n                ) : (\r\n                    <div\r\n                        className={\r\n                            tableSearchOSS ? \"table_frame_panel\" : \"table_frame\"\r\n                        }\r\n                    >\r\n                        <Scrollbar\r\n                            // autoHeight\r\n                            autoHeightMin={10}\r\n                            // autoHeightMax={window.innerHeight}\r\n                            autoHeightMax={\"100%\"}\r\n                            autoHide={false}\r\n                            height={\"100%\"}\r\n                            // style={{ height: window.innerHeight - 250 }}\r\n                        >\r\n                            <div\r\n                                className={\r\n                                    tableOnPanel ? \"table_panel\" : \"table\"\r\n                                }\r\n                            >\r\n                                <div className={`theader ${headerCssClass}`}>\r\n                                    {lstColumns}\r\n                                </div>\r\n                                {rows}\r\n                            </div>\r\n                        </Scrollbar>\r\n                    </div>\r\n                )}\r\n                {pagination}\r\n            </Fragment>\r\n        );\r\n    }\r\n}\r\n\r\nDataTable.propTypes = {\r\n    columns: PropTypes.array.isRequired,\r\n    data: PropTypes.array,\r\n    page: PropTypes.number.isRequired,\r\n    //rowPerPage: PropTypes.number.isRequired,\r\n    total: PropTypes.number.isRequired,\r\n\r\n    // sortColumn: PropTypes.string.isRequired,\r\n    // sortType: PropTypes.string.isRequired,\r\n\r\n    handlePageChange: PropTypes.func.isRequired,\r\n    // handleSort: PropTypes.func.isRequired,\r\n    handlerBeforeShowControl: PropTypes.func.isRequired,\r\n    // handleRowPerPage: PropTypes.func.isRequired\r\n};\r\n\r\nexport default DataTable;\r\n","export const TextColumn = 'text';\r\nexport const NumberColumn = 'number';\r\nexport const ImageColumn = 'image';\r\nexport const ButtonColumn = 'button';\r\nexport const ButtonPopupColumn = 'buttonPopup';\r\nexport const ButtonView = 'buttonView';\r\n","import { withStyles } from '@material-ui/core/styles';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport DataTable from '../../../../../../Controls/DataTable/DataTable';\r\nimport React, { Fragment } from 'react';\r\n\r\nconst ImportOSSHistoryView = ({ classes, dataTable, page, rowPerPage, total, onBeforeShowControl, onChangePage }) => {\r\n  return (\r\n    <Fragment>\r\n      <Grid container className={classes.root}>\r\n        {/* <Grid container justify=\"center\" style={{ height: `${matHeight}px` }}> */}\r\n        <div className={classes.rootTable}>\r\n          <div className={classes.headerTable}>\r\n            <p className={classes.headerText}>ประวัติการนำเข้า</p>\r\n          </div>\r\n          {/* <Grid container justify='center'> */}\r\n          <DataTable\r\n            headerCssClass='table-header-style'\r\n            columns={[\r\n              { title: 'วันที่นำเข้า', data: 'createdDate', width: '33%', align: 'left', sort: false },\r\n              { title: 'นำเข้าโดย', width: '33%', data: 'createdBy', align: 'left', sort: false },\r\n              { title: 'สถานะ', width: '33%', data: 'statusName', align: 'center', sort: false },\r\n            ]}\r\n            data={dataTable}\r\n            page={page}\r\n            rowPerPage={rowPerPage}\r\n            total={total}\r\n            noDataMessage={`No Data`}\r\n            handlerBeforeShowControl={onBeforeShowControl}\r\n            handlePageChange={onChangePage}\r\n            tableOnPanel={true}\r\n            hasSortable={false}\r\n          />\r\n          {/* </Grid> */}\r\n        </div>\r\n      </Grid>\r\n    </Fragment>\r\n  );\r\n};\r\n\r\nexport default withStyles((theme) => ({\r\n  root: {\r\n    height: '100%',\r\n    maxHeight: 'calc(100% - 260px)',\r\n    width: '100%',\r\n    marginTop: '10px',\r\n  },\r\n  rootTable: {\r\n    // boxShadow: '0px 1px 5px 0px rgba(0,0,0,0.2), 0px 2px 2px 0px rgba(0,0,0,0.14), 0px 3px 1px -2px rgba(0,0,0,0.12);',\r\n    // marginTop: '25px',\r\n    display: 'flex',\r\n    flexDirection: 'column',\r\n    gap: '15px',\r\n    width: '100%',\r\n  },\r\n  headerTable: {\r\n    backgroundColor: '#38A153',\r\n    height: '45px',\r\n    display: 'flex',\r\n    justifyContent: 'center',\r\n    alignItems: 'center',\r\n  },\r\n  headerText: {\r\n    fontSize: '16px',\r\n    textAlign: 'center',\r\n    color: '#FFFFFF',\r\n  },\r\n}))(ImportOSSHistoryView);\r\n","import React, { Component, Fragment, useRef } from 'react';\r\nimport ImportOSSView from './ImportOSSView';\r\nimport Loading from '../../../../../../Controls/Containers/Loading';\r\nimport WithLoading from '../../../../../../HOC/WithLoading';\r\nimport { Field, getFormValues, reduxForm, SubmissionError } from 'redux-form';\r\nimport { compose } from 'redux';\r\nimport { connect } from 'react-redux';\r\nimport ImportOSSHistoryView from './importOSSHistoryView';\r\nimport { fetchGet_, fetchPostFile_ } from '../../../../../../Utilities/ServiceUtils';\r\nimport WithAlertMessage from '../../../../../../HOC/WithAlertMessage';\r\nimport AlertMessageSuper from '../../../../../../Controls/Containers/AlertMessageSuper';\r\nimport { ALERT_MESSAGE } from '../../../../../../Constants/Constants';\r\nimport { isEmptyObj } from '../../../../../../Utilities/Utils';\r\nimport * as DateTimeUtil from '../../../../../../Utilities/DateTimeUtil';\r\n\r\nexport class ImportOSS extends Component {\r\n  constructor() {\r\n    super();\r\n    this.state = {\r\n      fileName: '',\r\n      hasFile: false,\r\n      page: 1,\r\n      rowPerPage: 10,\r\n      dataTable: [],\r\n    };\r\n    this.inputUploadRef = React.createRef();\r\n    this.refUploadForm = React.createRef();\r\n    this.currentFile = React.createRef();\r\n    this.interval = null;\r\n  }\r\n\r\n  componentDidMount = () => {\r\n    this.onGetDataTable();\r\n    this.interval = setInterval(() => {\r\n      this.onGetDataTable();\r\n    }, 60000);\r\n  };\r\n\r\n  componentWillUnmount = () => {\r\n    if (this.interval) {\r\n      clearInterval(this.interval);\r\n    }\r\n  };\r\n\r\n  onGetDataTable = async () => {\r\n    const res = await fetchGet_(process.env.REACT_APP_CAH_HISTORY_IMPORT_OSS);\r\n    if (!res.ok) {\r\n      throw res.status;\r\n    } else {\r\n      const data = await res.json();\r\n      this.setState({\r\n        dataTable: data.map((item) => ({\r\n          ...item,\r\n          createdDate: item.createdDate ? DateTimeUtil.convertDateTimeToDisplayDate(item.createdDate) : '-',\r\n          updatedDate: item.updatedDate ? DateTimeUtil.convertDateTimeToDisplayDate(item.updatedDate) : '-',\r\n        })),\r\n      });\r\n      this.createDataTable();\r\n    }\r\n  };\r\n\r\n  handleBackMenu = () => {\r\n    const { onClickBack } = this.props;\r\n    onClickBack && onClickBack();\r\n  };\r\n\r\n  handleSubmitForm = (e) => {\r\n    const { showLoading, hideLoading } = this.props;\r\n    this.validateForm(e);\r\n    this.onUpload(this.currentFile.current, showLoading, hideLoading);\r\n  };\r\n\r\n  validateForm = (value) => {\r\n    const errors = {};\r\n    if (!value.importOSS) {\r\n      errors.importOSS = 'กรุณา Import OSS File';\r\n    }\r\n    if (!isEmptyObj(errors)) {\r\n      throw new SubmissionError(errors);\r\n    }\r\n  };\r\n\r\n  onUpload = async (value, showLoading, hideLoading) => {\r\n    const { showAlert, change, authenRdc } = this.props;\r\n    const formData = new FormData();\r\n    formData.append('file', value);\r\n    formData.append('userID', authenRdc.profile.userID);\r\n    showLoading();\r\n    try {\r\n      const res = await fetchPostFile_(process.env.REACT_APP_CAH_IMPORT_OSS, formData);\r\n      if (!res.ok) {\r\n        hideLoading();\r\n        throw res.status;\r\n      } else {\r\n        hideLoading();\r\n        showAlert({ altMsg: 'บันทึกรายการนำเข้าเรียบร้อย ระบบกำลังดำเนินการนำเข้าข้อมูล กรุณาตรวจสอบสถานะในตารางประวัติการนำเข้า' });\r\n        this.currentFile.current = null;\r\n        change('importOSS', '');\r\n        this.onGetDataTable();\r\n      }\r\n    } catch (err) {\r\n      showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR });\r\n    }\r\n  };\r\n\r\n  handleOpenUpload = () => {\r\n    if (this.inputUploadRef.current) {\r\n      this.inputUploadRef.current._values = '';\r\n      this.inputUploadRef.current.click();\r\n    }\r\n  };\r\n\r\n  onChangeUploadFile = (e) => {\r\n    const { change, showAlert, showLoading, hideLoading } = this.props;\r\n    showLoading();\r\n    this.currentFile.current = null;\r\n    const filePath = e.target.value.toLowerCase();\r\n    const isCsvFile = filePath.indexOf('.csv');\r\n    if (isCsvFile !== -1) {\r\n      this.currentFile.current = e.target.files[0];\r\n      change('importOSS', e.target.files[0].name);\r\n      hideLoading();\r\n    } else {\r\n      hideLoading();\r\n      showAlert({ altMsg: 'เฉพาะ .csv เท่านั้น' });\r\n      change('importOSS', '');\r\n      this.currentFile.current = null;\r\n    }\r\n  };\r\n\r\n  onClearFile = () => {\r\n    const { reset } = this.props;\r\n    this.currentFile.current = null;\r\n    reset();\r\n  };\r\n\r\n  handleChangePage = (page) => {\r\n    this.setState({\r\n      page: page,\r\n    });\r\n  };\r\n\r\n  handleBeforeShowControl = (data) => {\r\n    return false;\r\n  };\r\n\r\n  createDataTable = () => {\r\n    const { page, dataTable } = this.state;\r\n    const specSize = parseInt(1 * ((window.innerHeight - 354) / 48)) > 0 ? parseInt((1 * (window.innerHeight - 354)) / 48) : 1;\r\n    const finalListIntablePage = parseInt(page * specSize);\r\n    const lenTableData = finalListIntablePage % specSize === 0 ? finalListIntablePage : finalListIntablePage - (finalListIntablePage % specSize);\r\n    const tableData = dataTable.slice((page - 1) * specSize, lenTableData);\r\n    const matHeight = tableData.length * 48 + 135;\r\n\r\n    return {\r\n      specSize,\r\n      finalListIntablePage,\r\n      lenTableData,\r\n      tableData,\r\n      matHeight,\r\n    };\r\n  };\r\n\r\n  render() {\r\n    const { title, isShowLoading, handleSubmit } = this.props;\r\n    const { fileName, hasFile, page } = this.state;\r\n    const dataTable = this.createDataTable();\r\n\r\n    return (\r\n      <Fragment>\r\n        <Loading isShowLoading={isShowLoading} />\r\n        <ImportOSSView\r\n          title={title}\r\n          onClickBack={this.handleBackMenu}\r\n          onChange={this.onChangeUploadFile}\r\n          fileName={fileName}\r\n          hasValue={hasFile}\r\n          onClearUpload={this.onClearFile}\r\n          handleSubmitForm={this.handleSubmitForm}\r\n          handleSubmit={handleSubmit}\r\n          inputUploadRef={this.inputUploadRef}\r\n          refUploadForm={this.refUploadForm}\r\n          onClickUpload={this.handleOpenUpload}\r\n        />\r\n        <ImportOSSHistoryView\r\n          page={page}\r\n          rowPerPage={dataTable.specSize}\r\n          dataTable={dataTable.tableData}\r\n          total={dataTable.tableData.length}\r\n          onBeforeShowControl={this.handleBeforeShowControl}\r\n          onChangePage={this.handleChangePage}\r\n        />\r\n        <AlertMessageSuper {...this.props} />\r\n      </Fragment>\r\n    );\r\n  }\r\n}\r\n\r\nconst reduxFormParameter = {\r\n  form: 'importOss',\r\n};\r\n\r\nconst mapStateToProps = (state) => ({\r\n  _values: getFormValues('importOss')(state),\r\n  authenRdc: state.authen,\r\n});\r\n\r\nexport default compose(\r\n  connect(\r\n    mapStateToProps,\r\n    null\r\n  ),\r\n  reduxForm(reduxFormParameter),\r\n  WithLoading,\r\n  WithAlertMessage\r\n)(ImportOSS);\r\n","import { withStyles } from '@material-ui/core/styles';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport DataTable from '../../../../../../Controls/DataTable/DataTable';\r\nimport React, { Fragment } from 'react';\r\n\r\nconst ImportSTRHistoryView = ({ classes, dataTable, page, rowPerPage, total, onBeforeShowControl, onChangePage }) => {\r\n  return (\r\n    <Fragment>\r\n      <Grid container className={classes.root}>\r\n        {/* <Grid container justify=\"center\" style={{ height: `${matHeight}px` }}> */}\r\n        <div className={classes.rootTable}>\r\n          <div className={classes.headerTable}>\r\n            <p className={classes.headerText}>ประวัติการนำเข้า</p>\r\n          </div>\r\n          {/* <Grid container justify='center'> */}\r\n          <DataTable\r\n            headerCssClass='table-header-style'\r\n            columns={[\r\n              { title: 'วันที่นำเข้า', data: 'createdDate', width: '33%', align: 'left', sort: false },\r\n              { title: 'นำเข้าโดย', width: '33%', data: 'createdBy', align: 'left', sort: false },\r\n              { title: 'สถานะ', width: '33%', data: 'statusName', align: 'center', sort: false },\r\n            ]}\r\n            data={dataTable}\r\n            page={page}\r\n            rowPerPage={rowPerPage}\r\n            total={total}\r\n            noDataMessage={`No Data`}\r\n            handlerBeforeShowControl={onBeforeShowControl}\r\n            handlePageChange={onChangePage}\r\n            tableOnPanel={true}\r\n            hasSortable={false}\r\n          />\r\n          {/* </Grid> */}\r\n        </div>\r\n      </Grid>\r\n    </Fragment>\r\n  );\r\n};\r\n\r\nexport default withStyles((theme) => ({\r\n  root: {\r\n    height: '100%',\r\n    maxHeight: 'calc(100% - 260px)',\r\n    width: '100%',\r\n    marginTop: '10px',\r\n  },\r\n  rootTable: {\r\n    // boxShadow: '0px 1px 5px 0px rgba(0,0,0,0.2), 0px 2px 2px 0px rgba(0,0,0,0.14), 0px 3px 1px -2px rgba(0,0,0,0.12);',\r\n    // marginTop: '25px',\r\n    display: 'flex',\r\n    flexDirection: 'column',\r\n    gap: '15px',\r\n    width: '100%',\r\n  },\r\n  headerTable: {\r\n    backgroundColor: '#38A153',\r\n    height: '45px',\r\n    display: 'flex',\r\n    justifyContent: 'center',\r\n    alignItems: 'center',\r\n  },\r\n  headerText: {\r\n    fontSize: '16px',\r\n    textAlign: 'center',\r\n    color: '#FFFFFF',\r\n  },\r\n}))(ImportSTRHistoryView);\r\n","import React, { Fragment } from 'react';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport AppBarHeaderView from '../../../../../../Presentationals/Web/Panel/AppBarHeaderView';\r\nimport { withStyles } from '@material-ui/core';\r\nimport Button from '../../../../../../Controls/Containers/Button';\r\nimport ClearIcon from '@material-ui/icons/Clear';\r\nimport { BTN } from '../../../../../../Constants/Constants';\r\nimport { Field } from 'redux-form';\r\nimport CloudUpload from '@material-ui/icons/CloudUpload';\r\nimport TextField from '../../../../../../Controls/Containers/TextFieldRedux';\r\n\r\nconst CustomClearIcon = withStyles((theme) => ({\r\n  root: {\r\n    width: 15,\r\n    cursor: 'default',\r\n  },\r\n}))(ClearIcon);\r\n\r\nconst ImportSTRView = ({\r\n  classes,\r\n  title,\r\n  children,\r\n  onClickBack,\r\n  hasValue,\r\n  fileName,\r\n  onChange,\r\n  onClearUpload,\r\n  handleSubmit,\r\n  handleSubmitForm,\r\n  onClickUpload,\r\n  inputUploadRef,\r\n  refUploadForm,\r\n}) => {\r\n  return (\r\n    <Grid container className={classes.root}>\r\n      <AppBarHeaderView\r\n        // title={page}\r\n        title={title}\r\n        onClickBack={onClickBack}\r\n      />\r\n      <Grid item xs={12} className={`${classes.body} ${classes.rootForm}`}>\r\n        <form encType='multipart/form-data' method='post' ref={refUploadForm}>\r\n          <input id='inFile' type='file' name='file' ref={inputUploadRef} onChange={onChange} hidden />\r\n        </form>\r\n        <form onSubmit={handleSubmit(handleSubmitForm)}>\r\n          <Field\r\n            name='importSTR'\r\n            label='เลือกไฟล์ CSV จากระบบทะเบียนราษฎร์'\r\n            component={TextField}\r\n            icon={<CloudUpload />}\r\n            onClick={onClickUpload}\r\n            required\r\n          />\r\n          <div className={classes.btnGroup}>\r\n            <Button variant='contained' label={BTN.TH.CANCEL} onClick={onClearUpload} />\r\n            <Button type='submit' label={BTN.TH.SAVE} />\r\n          </div>\r\n        </form>\r\n        <div className={classes.stepLine} />\r\n      </Grid>\r\n    </Grid>\r\n  );\r\n};\r\n\r\nexport default withStyles((theme) => ({\r\n  root: {\r\n    // height: '100%',\r\n  },\r\n  rootForm: {\r\n    padding: '15px',\r\n    display: 'flex',\r\n    flexDirection: 'column',\r\n    gap: '10px',\r\n  },\r\n  body: {\r\n    height: 'calc(100% - 45px)',\r\n  },\r\n  btnGroup: {\r\n    display: 'flex',\r\n    justifyContent: 'center',\r\n    gap: '10px',\r\n  },\r\n  stepLine: {\r\n    border: '1px solid rgba(0, 0, 0, 0.38)',\r\n  },\r\n}))(ImportSTRView);\r\n","import React, { Component, Fragment, useRef } from 'react';\r\nimport Loading from '../../../../../../Controls/Containers/Loading';\r\nimport WithLoading from '../../../../../../HOC/WithLoading';\r\nimport { Field, getFormValues, reduxForm, SubmissionError } from 'redux-form';\r\nimport { compose } from 'redux';\r\nimport { connect } from 'react-redux';\r\nimport { fetchGet_, fetchPostFile_ } from '../../../../../../Utilities/ServiceUtils';\r\nimport WithAlertMessage from '../../../../../../HOC/WithAlertMessage';\r\nimport AlertMessageSuper from '../../../../../../Controls/Containers/AlertMessageSuper';\r\nimport { ALERT_MESSAGE } from '../../../../../../Constants/Constants';\r\nimport { isEmptyObj } from '../../../../../../Utilities/Utils';\r\nimport * as DateTimeUtil from '../../../../../../Utilities/DateTimeUtil';\r\nimport ImportSTRHistoryView from './importSTRHistoryView';\r\nimport ImportSTRView from './ImportSTRView';\r\n\r\nexport class ImportSTR extends Component {\r\n  constructor() {\r\n    super();\r\n    this.state = {\r\n      fileName: '',\r\n      hasFile: false,\r\n      page: 1,\r\n      rowPerPage: 10,\r\n      dataTable: [],\r\n    };\r\n    this.inputUploadRef = React.createRef();\r\n    this.refUploadForm = React.createRef();\r\n    this.currentFile = React.createRef();\r\n    this.interval = null;\r\n  }\r\n\r\n  componentDidMount = () => {\r\n    this.onGetDataTable();\r\n    this.interval = setInterval(() => {\r\n      this.onGetDataTable();\r\n    }, 60000);\r\n  };\r\n\r\n  componentWillUnmount = () => {\r\n    if (this.interval) {\r\n      clearInterval(this.interval);\r\n    }\r\n  };\r\n\r\n  onGetDataTable = async () => {\r\n    const res = await fetchGet_(process.env.REACT_APP_STR_HISTORY);\r\n    if (!res.ok) {\r\n      throw res.status;\r\n    } else {\r\n      const data = await res.json();\r\n      this.setState({\r\n        dataTable: data.map((item) => ({\r\n          ...item,\r\n          createdDate: item.createdDate ? DateTimeUtil.convertDateTimeToDisplayDate(item.createdDate) : '-',\r\n          updatedDate: item.updatedDate ? DateTimeUtil.convertDateTimeToDisplayDate(item.updatedDate) : '-',\r\n        })),\r\n      });\r\n      this.createDataTable();\r\n    }\r\n  };\r\n\r\n  handleBackMenu = () => {\r\n    const { onClickBack } = this.props;\r\n    onClickBack && onClickBack();\r\n  };\r\n\r\n  handleSubmitForm = (e) => {\r\n    const { showLoading, hideLoading } = this.props;\r\n    this.validateForm(e);\r\n    this.onUpload(this.currentFile.current, showLoading, hideLoading);\r\n  };\r\n\r\n  validateForm = (value) => {\r\n    const errors = {};\r\n    if (!value.importSTR) {\r\n      errors.importSTR = 'กรุณา Import ไฟล์จากทะเบียนราษฎร์';\r\n    }\r\n    if (!isEmptyObj(errors)) {\r\n      throw new SubmissionError(errors);\r\n    }\r\n  };\r\n\r\n  onUpload = async (value, showLoading, hideLoading) => {\r\n    const { showAlert, change, authenRdc } = this.props;\r\n    const formData = new FormData();\r\n    formData.append('file', value);\r\n    formData.append('userID', authenRdc.profile.userID);\r\n    showLoading();\r\n    try {\r\n      const res = await fetchPostFile_(process.env.REACT_APP_STR_IMPORT, formData);\r\n      if (!res.ok) {\r\n        hideLoading();\r\n        throw res.status;\r\n      } else {\r\n        hideLoading();\r\n        showAlert({ altMsg: 'บันทึกรายการนำเข้าเรียบร้อย ระบบกำลังดำเนินการนำเข้าข้อมูล กรุณาตรวจสอบสถานะในตารางประวัติการนำเข้า' });\r\n        this.currentFile.current = null;\r\n        change('importSTR', '');\r\n        this.onGetDataTable();\r\n      }\r\n    } catch (err) {\r\n      showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR });\r\n    }\r\n  };\r\n\r\n  handleOpenUpload = () => {\r\n    if (this.inputUploadRef.current) {\r\n      this.inputUploadRef.current._values = '';\r\n      this.inputUploadRef.current.click();\r\n    }\r\n  };\r\n\r\n  onChangeUploadFile = (e) => {\r\n    const { change, showAlert, showLoading, hideLoading } = this.props;\r\n    showLoading();\r\n    this.currentFile.current = null;\r\n    const filePath = e.target.value.toLowerCase();\r\n    const isCsvFile = filePath.indexOf('.csv');\r\n    if (isCsvFile !== -1) {\r\n      this.currentFile.current = e.target.files[0];\r\n      change('importSTR', e.target.files[0].name);\r\n      hideLoading();\r\n    } else {\r\n      hideLoading();\r\n      showAlert({ altMsg: 'เฉพาะ .csv เท่านั้น' });\r\n      change('importSTR', '');\r\n      this.currentFile.current = null;\r\n    }\r\n  };\r\n\r\n  onClearFile = () => {\r\n    const { reset } = this.props;\r\n    this.currentFile.current = null;\r\n    reset();\r\n  };\r\n\r\n  handleChangePage = (page) => {\r\n    this.setState({\r\n      page: page,\r\n    });\r\n  };\r\n\r\n  handleBeforeShowControl = (data) => {\r\n    return false;\r\n  };\r\n\r\n  createDataTable = () => {\r\n    const { page, dataTable } = this.state;\r\n    const specSize = parseInt(1 * ((window.innerHeight - 354) / 48)) > 0 ? parseInt((1 * (window.innerHeight - 354)) / 48) : 1;\r\n    const finalListIntablePage = parseInt(page * specSize);\r\n    const lenTableData = finalListIntablePage % specSize === 0 ? finalListIntablePage : finalListIntablePage - (finalListIntablePage % specSize);\r\n    const tableData = dataTable.slice((page - 1) * specSize, lenTableData);\r\n    const matHeight = tableData.length * 48 + 135;\r\n\r\n    return {\r\n      specSize,\r\n      finalListIntablePage,\r\n      lenTableData,\r\n      tableData,\r\n      matHeight,\r\n    };\r\n  };\r\n\r\n  render() {\r\n    const { title, isShowLoading, handleSubmit } = this.props;\r\n    const { fileName, hasFile, page } = this.state;\r\n    const dataTable = this.createDataTable();\r\n\r\n    return (\r\n      <Fragment>\r\n        <Loading isShowLoading={isShowLoading} />\r\n        <ImportSTRView\r\n          title={title}\r\n          onClickBack={this.handleBackMenu}\r\n          onChange={this.onChangeUploadFile}\r\n          fileName={fileName}\r\n          hasValue={hasFile}\r\n          onClearUpload={this.onClearFile}\r\n          handleSubmitForm={this.handleSubmitForm}\r\n          handleSubmit={handleSubmit}\r\n          inputUploadRef={this.inputUploadRef}\r\n          refUploadForm={this.refUploadForm}\r\n          onClickUpload={this.handleOpenUpload}\r\n        />\r\n        <ImportSTRHistoryView\r\n          page={page}\r\n          rowPerPage={dataTable.specSize}\r\n          dataTable={dataTable.tableData}\r\n          total={dataTable.tableData.length}\r\n          onBeforeShowControl={this.handleBeforeShowControl}\r\n          onChangePage={this.handleChangePage}\r\n        />\r\n        <AlertMessageSuper {...this.props} />\r\n      </Fragment>\r\n    );\r\n  }\r\n}\r\n\r\nconst reduxFormParameter = {\r\n  form: 'importSTR',\r\n};\r\n\r\nconst mapStateToProps = (state) => ({\r\n  _values: getFormValues('importSTR')(state),\r\n  authenRdc: state.authen,\r\n});\r\n\r\nexport default compose(\r\n  connect(\r\n    mapStateToProps,\r\n    null\r\n  ),\r\n  reduxForm(reduxFormParameter),\r\n  WithLoading,\r\n  WithAlertMessage\r\n)(ImportSTR);\r\n","import Grid from '@material-ui/core/Grid';\r\nimport React, { Fragment } from 'react';\r\nimport AppBarHeaderView from '../../../../../../Presentationals/Web/Panel/AppBarHeaderView';\r\nimport { withStyles } from '@material-ui/core';\r\n\r\nconst SearchOSSView = ({ classes, children, title, onClickBack }) => {\r\n  return (\r\n    <Grid container className={classes.root}>\r\n      <AppBarHeaderView\r\n        // title={page}\r\n        title={title}\r\n        onClickBack={onClickBack}\r\n      />\r\n      <Grid item xs={12} className={classes.body}>\r\n        {children}\r\n      </Grid>\r\n    </Grid>\r\n  );\r\n};\r\n\r\nexport default withStyles((theme) => ({\r\n  root: {},\r\n  body: {\r\n    padding: '10px',\r\n  },\r\n}))(SearchOSSView);\r\n","import { withStyles } from '@material-ui/core';\r\nimport React, { Fragment } from 'react';\r\nimport { Field } from 'redux-form';\r\nimport SelectFieldRedux from '../../../../../../Controls/Containers/SelectFieldRedux';\r\nimport ReduxFormDatePickerThai from '../../../../../../Controls/Containers/Picker/ReduxFormDatePickerThai';\r\nimport TextFieldRedux from '../../../../../../Controls/Containers/TextFieldRedux';\r\nimport { BTN } from '../../../../../../Constants/Constants';\r\nimport Button from '../../../../../../Controls/Containers/Button';\r\nimport Grid from '@material-ui/core/Grid';\r\n\r\nconst Form = ({ classes, lutDistrict, onCancel, onSubmit, handleSubmit, onChangeHandleStartDate, onChangeHandleEndDate, minDate, maxDate }) => {\r\n  return (\r\n    <Fragment>\r\n      <form onSubmit={handleSubmit(onSubmit)}>\r\n        <Field\r\n          name='startDate'\r\n          label={'ค้นหาช่วงวันที่'}\r\n          component={ReduxFormDatePickerThai}\r\n          maxDate={maxDate}\r\n          onChange={onChangeHandleStartDate}\r\n          placeholder='กรุณาเลือกช่วงวันที่'\r\n          required\r\n        />\r\n        <Field\r\n          name='endDate'\r\n          label={'ถึงวันที่'}\r\n          component={ReduxFormDatePickerThai}\r\n          minDate={minDate}\r\n          maxDate={maxDate}\r\n          onChange={onChangeHandleEndDate}\r\n          placeholder='กรุณาเลือกถึงวันที่'\r\n          required\r\n        />\r\n        <Field name='districtID' label={'เขต'} component={SelectFieldRedux} data={lutDistrict} keyData={{ value: 'value', label: 'name' }} />\r\n        <Field name='permitNo' label={'เลขที่ใบอนุญาต'} component={TextFieldRedux} placeholder='กรุณากรอกเลขที่ใบอนุญาต' maxLength={30} />\r\n        <Grid container justify='center' spacing={24} className={classes.footer}>\r\n          <Grid item>\r\n            <Button label={BTN.TH.CANCEL} onClick={onCancel} />\r\n          </Grid>\r\n          <Grid item>\r\n            <Button type='submit' label={BTN.TH.SEARCH} />\r\n          </Grid>\r\n        </Grid>\r\n      </form>\r\n    </Fragment>\r\n  );\r\n};\r\n\r\nconst SearchOSSForm = ({\r\n  classes,\r\n  lutDistrict,\r\n  onSubmit,\r\n  onCancel,\r\n  handleSubmit,\r\n  onChangeHandleStartDate,\r\n  onChangeHandleEndDate,\r\n  minDate,\r\n  maxDate,\r\n}) => {\r\n  return (\r\n    <Fragment>\r\n      <Form\r\n        classes={classes}\r\n        lutDistrict={lutDistrict}\r\n        onSubmit={onSubmit}\r\n        onCancel={onCancel}\r\n        handleSubmit={handleSubmit}\r\n        onChangeHandleStartDate={onChangeHandleStartDate}\r\n        onChangeHandleEndDate={onChangeHandleEndDate}\r\n        minDate={minDate}\r\n        maxDate={maxDate}\r\n      />\r\n    </Fragment>\r\n  );\r\n};\r\n\r\nexport default withStyles((theme) => ({\r\n  footer: {\r\n    marginTop: '10px',\r\n    marginBottom: '10px',\r\n  },\r\n}))(SearchOSSForm);\r\n","import React, { Component } from 'react';\r\nimport { compose } from 'redux';\r\nimport { reduxForm } from 'redux-form';\r\nimport SearchOSSFormView from './SearchOSSFormView';\r\n\r\nexport class SearchOSSForm extends Component {\r\n  constructor() {\r\n    super();\r\n  }\r\n\r\n  render() {\r\n    const { onSubmit, onCancel, handleSubmit, lutDistrict, onChangeHandleStartDate, onChangeHandleEndDate, minDate, maxDate } = this.props;\r\n    return (\r\n      <SearchOSSFormView\r\n        onSubmit={onSubmit}\r\n        onCancel={onCancel}\r\n        handleSubmit={handleSubmit}\r\n        lutDistrict={lutDistrict}\r\n        onChangeHandleStartDate={onChangeHandleStartDate}\r\n        onChangeHandleEndDate={onChangeHandleEndDate}\r\n        minDate={minDate}\r\n        maxDate={maxDate}\r\n      />\r\n    );\r\n  }\r\n}\r\n\r\nconst reduxFormParameter = {\r\n  form: 'searchOSS',\r\n};\r\n\r\nexport default compose(reduxForm(reduxFormParameter))(SearchOSSForm);\r\n","import * as actionTypes from '../../../Constants/ActionTypes';\r\n\r\nexport const getDataSearchOSSTable = (summary, dataTable, filterResult) => ({\r\n  type: actionTypes.GET_DATA_SEARCH_OSS_TABLE,\r\n  summary: summary,\r\n  dataTable: dataTable,\r\n});\r\n\r\nexport const getFilterResult = (filterResult) => ({\r\n  type: actionTypes.GET_FILTER_RESULT_SEARCH_OSS,\r\n  filterResult: filterResult,\r\n});\r\n","import React, { Component, Fragment } from 'react';\r\nimport SearchOSSView from './SearchOSSView';\r\nimport SearchOSSForm from './SearchOSSForm';\r\nimport { compose } from 'recompose';\r\nimport { bindActionCreators } from 'redux';\r\nimport { connect } from 'react-redux';\r\nimport * as MapAction from '../../../../../../Actions/Web/Maps/MapAction';\r\nimport * as MenuAction from '../../../../../../Actions/Web/MenuAction';\r\nimport * as SearchOSSAction from '../../../../../../Actions/Web/Panel/SearchOSSAction';\r\nimport { isEmptyObj } from '../../../../../../Utilities/Utils';\r\nimport { reduxForm, SubmissionError } from 'redux-form';\r\nimport { fetchGet_, fetchPost_ } from '../../../../../../Utilities/ServiceUtils';\r\nimport * as DateTimeUtil from '../../../../../../Utilities/DateTimeUtil';\r\nimport moment from 'moment';\r\nimport WithAlertMessage from '../../../../../../HOC/WithAlertMessage';\r\nimport AlertMessageSuper from '../../../../../../Controls/Containers/AlertMessageSuper';\r\nimport { ALERT_MESSAGE } from '../../../../../../Constants/Constants';\r\n\r\nimport WithLoading from '../../../../../../HOC/WithLoading';\r\nimport Loading from '../../../../../../Controls/Containers/Loading';\r\n\r\nimport * as MapFunctions from '../../../../../../Map/MapFunctions';\r\n\r\nexport class SearchOSS extends Component {\r\n  constructor() {\r\n    super();\r\n    this.state = {\r\n      lutDistrict: [],\r\n      minDate: null,\r\n      maxDate: new Date(),\r\n    };\r\n  }\r\n\r\n  componentDidMount() {\r\n    this.onGetLutDistrict();\r\n  }\r\n\r\n  componentWillUnmount() {\r\n    const { mapAction, menuAction } = this.props;\r\n    mapAction.bindEvtOnShowDataTableOss(false);\r\n    menuAction.openMapTool();\r\n    mapAction.bindMapCommand(MapFunctions.clearAllGraphic);\r\n  }\r\n\r\n  onGetLutDistrict = async () => {\r\n    const { showAlert } = this.props;\r\n    try {\r\n      const PROVINCE_CODE = '10';\r\n      const res = await fetchGet_(`${process.env.REACT_APP_LU_DISTRICT}?provinceid=${PROVINCE_CODE}`);\r\n      if (!res.ok) {\r\n        throw res.status;\r\n      } else {\r\n        const data = await res.json();\r\n        this.setState({\r\n          lutDistrict: data.result,\r\n        });\r\n      }\r\n    } catch (err) {\r\n      showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR });\r\n    }\r\n  };\r\n\r\n  onClickSubmit = (value) => {\r\n    this.validateFormSearch(value);\r\n    this.onGetDataTable(value);\r\n    // console.log('clickSubmit');\r\n  };\r\n\r\n  validateFormSearch = (value) => {\r\n    const errors = {};\r\n    if (!value.startDate) {\r\n      errors.startDate = 'กรุณาระบุข้อมูล';\r\n    }\r\n    if (!value.endDate) {\r\n      errors.endDate = 'กรุณาระบุข้อมูล';\r\n    }\r\n    if (!isEmptyObj(errors)) {\r\n      throw new SubmissionError(errors);\r\n    } else {\r\n      return;\r\n    }\r\n  };\r\n\r\n  formatStringPermitNo = (value) => {\r\n    const result = value\r\n      .split('-')\r\n      .filter((part) => /^\\d+$/.test(part))\r\n      .join('');\r\n    const format1 = result.slice(0, 4);\r\n    const format2 = result.slice(4, 8);\r\n    const format3 = result.slice(8, 10);\r\n    const format4 = result.slice(10);\r\n    return `${format1}-${format2}-${format3}-${format4}`;\r\n  };\r\n\r\n  onGetDataTable = async (value) => {\r\n    const { mapAction, menuAction, searchOSSAction, showAlert, showLoading, hideLoading } = this.props;\r\n\r\n    showLoading();\r\n    const param = {\r\n      startDate: value.startDate ? moment(value.startDate).format('YYYY-MM-DD') : null,\r\n      endDate: value.endDate ? moment(value.endDate).format('YYYY-MM-DD') : null,\r\n      districtId: value.districtID ? value.districtID : null,\r\n      permitNo: value.permitNo ? this.formatStringPermitNo(value.permitNo) : null,\r\n    };\r\n\r\n    fetchPost_(`${process.env.REACT_APP_CAH_SEARCH_OSS}`, param)\r\n      .then((res) => {\r\n        if (!res.ok) {\r\n          throw res.status;\r\n        }\r\n        return res.json();\r\n      })\r\n      .then(async (data) => {\r\n        await menuAction.closeMapTool();\r\n        await menuAction.closeMenuPanel();\r\n        await searchOSSAction.getDataSearchOSSTable(\r\n          data.summary,\r\n          data.data.map((item) => ({\r\n            ...item,\r\n            issuedDate: item.issuedDate ? DateTimeUtil.convertDateTimeToDisplayDate(item.issuedDate, 'd MMM yyyy') : '-',\r\n            issuedExpireDate: item.issuedExpireDate ? DateTimeUtil.convertDateTimeToDisplayDate(item.issuedExpireDate, 'd MMM yyyy') : '-',\r\n            latitude: item.latitude ? item.latitude : '-',\r\n            longitude: item.longitude ? item.longitude : '-',\r\n          }))\r\n        );\r\n        await searchOSSAction.getFilterResult({\r\n          ...param,\r\n          districtIdName: param.districtId ? this.state.lutDistrict.find((item) => item.value === param.districtId).name : 'ไม่ระบุ',\r\n          permitNoDisplay: param.permitNo ? param.permitNo : 'ไม่ระบุ',\r\n        });\r\n\r\n        await mapAction.bindEvtOnShowDataTableOss(true);\r\n\r\n        hideLoading();\r\n      })\r\n      .catch((ex) => {\r\n        hideLoading();\r\n        console.log('ex save onGetDataTable', ex);\r\n      });\r\n  };\r\n\r\n  onChangeHandleStartDate = (event) => {\r\n    this.setState({ minDate: event });\r\n  };\r\n\r\n  onChangeHandleEndDate = (event) => {\r\n    this.setState({ maxDate: event });\r\n  };\r\n\r\n  onClickCancel = () => {\r\n    const { reset } = this.props;\r\n    reset();\r\n  };\r\n\r\n  render() {\r\n    const { lutDistrict, minDate, maxDate } = this.state;\r\n    const { title, onClickBack, handleSubmit, isShowLoading } = this.props;\r\n    return (\r\n      <Fragment>\r\n        <SearchOSSView title={title} onClickBack={onClickBack}>\r\n          <SearchOSSForm\r\n            onSubmit={this.onClickSubmit}\r\n            onCancel={this.onClickCancel}\r\n            handleSubmit={handleSubmit}\r\n            lutDistrict={lutDistrict}\r\n            onChangeHandleStartDate={this.onChangeHandleStartDate}\r\n            onChangeHandleEndDate={this.onChangeHandleEndDate}\r\n            minDate={minDate}\r\n            maxDate={maxDate}\r\n          />\r\n        </SearchOSSView>\r\n        <AlertMessageSuper {...this.props} />\r\n        <Loading isShowLoading={isShowLoading} />\r\n      </Fragment>\r\n    );\r\n  }\r\n}\r\n\r\nconst reduxFormParameter = {\r\n  form: 'searchOSS',\r\n};\r\n\r\nconst mapDispatchToProps = (dispatch) => ({\r\n  mapAction: bindActionCreators(MapAction, dispatch),\r\n  menuAction: bindActionCreators(MenuAction, dispatch),\r\n  searchOSSAction: bindActionCreators(SearchOSSAction, dispatch),\r\n});\r\n\r\nexport default compose(\r\n  connect(\r\n    null,\r\n    mapDispatchToProps\r\n  ),\r\n  reduxForm(reduxFormParameter),\r\n  WithAlertMessage,\r\n  WithLoading\r\n)(SearchOSS);\r\n","import Grid from '@material-ui/core/Grid';\r\nimport React, { Fragment } from 'react';\r\nimport AppBarHeaderView from '../../../../../../Presentationals/Web/Panel/AppBarHeaderView';\r\nimport { withStyles } from '@material-ui/core';\r\n\r\nconst MarkPointSTRView = ({ classes, children, title, onClickBack }) => {\r\n  return (\r\n    <Grid container className={classes.root}>\r\n      <AppBarHeaderView\r\n        // title={page}\r\n        title={title}\r\n        onClickBack={onClickBack}\r\n      />\r\n      <Grid item xs={12} className={classes.body}>\r\n        {children}\r\n      </Grid>\r\n    </Grid>\r\n  );\r\n};\r\n\r\nexport default withStyles((theme) => ({\r\n  root: {},\r\n  body: {\r\n    // padding: '10px',\r\n    height: 'calc(100vh - 200px)',\r\n  },\r\n}))(MarkPointSTRView);\r\n","import React, { Fragment } from 'react';\r\nimport { withStyles } from '@material-ui/core';\r\nimport { Field } from 'redux-form';\r\nimport TextFieldRedux from '../../../../../../../Controls/Containers/TextFieldRedux';\r\nimport Button from '../../../../../../../Controls/Containers/Button';\r\nimport { BTN } from '../../../../../../../Constants/Constants';\r\n\r\nconst MarkPointSTRFormView = ({ classes, handleSubmit, onSubmitFormSearch }) => {\r\n  return (\r\n    <div className={classes.container}>\r\n      <form onSubmit={handleSubmit(onSubmitFormSearch)}>\r\n        <Field name='permitNo' label='เลขที่ใบอนุญาต' component={TextFieldRedux} placeholder='กรุณากรอกเลขที่ใบอนุญาต' maxLength={30} required />\r\n        <div className={classes.button}>\r\n          <Button type='submit' label={BTN.TH.SEARCH} />\r\n        </div>\r\n      </form>\r\n    </div>\r\n  );\r\n};\r\n\r\nexport default withStyles((theme) => ({\r\n  button: {\r\n    display: 'flex',\r\n    justifyContent: 'end',\r\n  },\r\n  container: {\r\n    padding: '10px'\r\n  }\r\n}))(MarkPointSTRFormView);\r\n","import React, { Component, Fragment } from 'react';\r\nimport MarkPointSTRFormView from './MarkPointSTRFormView';\r\n\r\nexport class MarkPointSTRForm extends Component {\r\n  constructor() {\r\n    super();\r\n  }\r\n\r\n  render() {\r\n    const { handleSubmit, onSubmitFormSearch } = this.props;\r\n    return (\r\n      <Fragment>\r\n        <MarkPointSTRFormView handleSubmit={handleSubmit} onSubmitFormSearch={onSubmitFormSearch} />\r\n      </Fragment>\r\n    );\r\n  }\r\n}\r\n\r\nexport default MarkPointSTRForm;\r\n","import { withStyles } from \"@material-ui/core\";\r\nimport React, { Fragment } from \"react\";\r\nimport { Field, FieldArray } from \"redux-form\";\r\nimport Grid from \"@material-ui/core/Grid\";\r\nimport TextFieldRedux from \"../../../../../../../Controls/Containers/TextFieldRedux\";\r\nimport FormHelperText from \"@material-ui/core/FormHelperText\";\r\nimport {\r\n    normalizeHouseNo,\r\n    normalizeNumber,\r\n} from \"../../../../../../../Utilities/Validate\";\r\nimport EditIcon from \"@material-ui/icons/Edit\";\r\nimport IconButton from \"@material-ui/core/IconButton\";\r\nimport CheckIcon from \"@material-ui/icons/Check\";\r\nimport AddIcon from \"@material-ui/icons/Add\";\r\nimport ClearIcon from \"@material-ui/icons/Clear\";\r\nimport DeleteIcon from \"@material-ui/icons/Delete\";\r\nimport Divider from \"@material-ui/core/Divider\";\r\nimport { Scrollbars } from \"react-custom-scrollbars\";\r\n\r\nconst renderHouseNumber = ({\r\n    classes,\r\n    fields,\r\n    meta: { error },\r\n    onHouseIdTextFieldBlur,\r\n    onClickMarkPointHouse,\r\n    onSubmitHouse,\r\n    handleSubmit,\r\n    houseList,\r\n    onClearEventDraw,\r\n    onChangeHouseNo,\r\n    onChangeHouseCode,\r\n    onChangeRemark,\r\n    onClickDelete,\r\n}) => {\r\n    const isNotDraw = houseList.every((house) => !house.isDraw);\r\n    return (\r\n        <div className={classes.container}>\r\n            {error && (\r\n                <FormHelperText className={classes.error}>\r\n                    {error}\r\n                </FormHelperText>\r\n            )}\r\n            {fields.map((house, index) => {\r\n                return (\r\n                    <form key={`house${index}`}>\r\n                        <div className={classes.rootForm}>\r\n                            <Grid\r\n                                container\r\n                                wrap=\"nowrap\"\r\n                                className={classes.containnerRow}\r\n                            >\r\n                                <Grid xs={4} item className={classes.labelText}>\r\n                                    <Field\r\n                                        name={`${house}.houseNo`}\r\n                                        component={TextFieldRedux}\r\n                                        normalize={normalizeHouseNo}\r\n                                        className={classes.textFieldHouseNumber}\r\n                                        label=\"เลขที่บ้าน\"\r\n                                        required\r\n                                        disabled={\r\n                                            !fields.get(index).isDraw ||\r\n                                            isNotDraw\r\n                                        }\r\n                                        onBlur={() =>\r\n                                            onChangeHouseNo(\r\n                                                fields.get(index).houseNo,\r\n                                                fields.get(index)\r\n                                            )\r\n                                        }\r\n                                    />\r\n                                </Grid>\r\n                                <Grid\r\n                                    xs={8}\r\n                                    item\r\n                                    className={classes.labelHouseId}\r\n                                >\r\n                                    <Field\r\n                                        name={`${house}.houseCode`}\r\n                                        component={TextFieldRedux}\r\n                                        normalize={normalizeNumber}\r\n                                        // onBlur={(evt) => onHouseIdTextFieldBlur(evt, `${house}.houseId`)}\r\n                                        className={classes.textFieldHouseNumber}\r\n                                        // required\r\n                                        label=\"รหัสประจำบ้าน\"\r\n                                        maxLength={30}\r\n                                        disabled={\r\n                                            !fields.get(index).isDraw ||\r\n                                            isNotDraw\r\n                                        }\r\n                                        onBlur={() =>\r\n                                            onChangeHouseCode(\r\n                                                fields.get(index).houseCode,\r\n                                                fields.get(index)\r\n                                            )\r\n                                        }\r\n                                    />\r\n                                </Grid>\r\n                            </Grid>\r\n                            <Grid\r\n                                container\r\n                                wrap=\"nowrap\"\r\n                                className={classes.rootForm}\r\n                                alignItems=\"center\"\r\n                            >\r\n                                <Grid xs={8} item>\r\n                                    <Field\r\n                                        name={`${house}.remark`}\r\n                                        component={TextFieldRedux}\r\n                                        className={classes.textFieldHouseNumber}\r\n                                        label=\"หมายเหตุ\"\r\n                                        disabled={\r\n                                            !fields.get(index).isDraw ||\r\n                                            isNotDraw\r\n                                        }\r\n                                        onBlur={() =>\r\n                                            onChangeRemark(\r\n                                                fields.get(index).remark,\r\n                                                fields.get(index)\r\n                                            )\r\n                                        }\r\n                                    />\r\n                                </Grid>\r\n                                {!fields.get(index).isDraw || isNotDraw ? (\r\n                                    <div>\r\n                                        <div className={classes.buttonGroup}>\r\n                                            {houseList[index] &&\r\n                                            houseList[index].hasObjectID ? (\r\n                                                <IconButton\r\n                                                    className={\r\n                                                        classes.buttonEdit\r\n                                                    }\r\n                                                    onClick={() =>\r\n                                                        onClickMarkPointHouse(\r\n                                                            fields.get(index)\r\n                                                        )\r\n                                                    }\r\n                                                >\r\n                                                    <EditIcon />\r\n                                                </IconButton>\r\n                                            ) : (\r\n                                                <IconButton\r\n                                                    className={\r\n                                                        classes.buttonAdd\r\n                                                    }\r\n                                                    onClick={() =>\r\n                                                        onClickMarkPointHouse(\r\n                                                            fields.get(index)\r\n                                                        )\r\n                                                    }\r\n                                                >\r\n                                                    <AddIcon />\r\n                                                </IconButton>\r\n                                            )}\r\n                                            <IconButton\r\n                                                className={classes.buttonClose}\r\n                                                onClick={() =>\r\n                                                    onClickDelete(\r\n                                                        fields.get(index)\r\n                                                    )\r\n                                                }\r\n                                            >\r\n                                                <DeleteIcon />\r\n                                            </IconButton>\r\n                                        </div>\r\n                                    </div>\r\n                                ) : (\r\n                                    <div className={classes.buttonGroup}>\r\n                                        <IconButton\r\n                                            className={classes.button}\r\n                                            onClick={() =>\r\n                                                onSubmitHouse(fields.get(index))\r\n                                            }\r\n                                        >\r\n                                            <CheckIcon />\r\n                                        </IconButton>\r\n                                        <IconButton\r\n                                            className={classes.buttonClose}\r\n                                            onClick={() =>\r\n                                                onClearEventDraw(\r\n                                                    fields.get(index)\r\n                                                )\r\n                                            }\r\n                                        >\r\n                                            <ClearIcon />\r\n                                        </IconButton>\r\n                                    </div>\r\n                                )}\r\n                            </Grid>\r\n                        </div>\r\n                        <Divider />\r\n                    </form>\r\n                );\r\n            })}\r\n        </div>\r\n    );\r\n};\r\n\r\nconst MarkPointSTRResultView = ({\r\n    classes,\r\n    isShowHouseList,\r\n    onClickMarkPointHouse,\r\n    handleSubmit,\r\n    onSubmitFormHouseList,\r\n    onSubmitHouse,\r\n    houseList,\r\n    onClearEventDraw,\r\n    onChangeHouseNo,\r\n    onChangeHouseCode,\r\n    onChangeRemark,\r\n    onClickDelete,\r\n}) => {\r\n    return (\r\n        <Fragment>\r\n            <div className={classes.root}>\r\n                {isShowHouseList ? (\r\n                    <div className={classes.rootHouseList}>\r\n                        <div className={classes.sectionHouseList}>\r\n                            <span>ผลลัพธ์</span>\r\n                        </div>\r\n                        {houseList.length > 0 ? (\r\n                            <Scrollbars\r\n                                style={{ height: \"90%\" }}\r\n                                autoHide={true}\r\n                            >\r\n                                <FieldArray\r\n                                    name=\"houseList\"\r\n                                    component={renderHouseNumber}\r\n                                    classes={classes}\r\n                                    onClickMarkPointHouse={\r\n                                        onClickMarkPointHouse\r\n                                    }\r\n                                    onSubmitHouse={onSubmitHouse}\r\n                                    handleSubmit={handleSubmit}\r\n                                    houseList={houseList}\r\n                                    onClearEventDraw={onClearEventDraw}\r\n                                    onChangeHouseNo={onChangeHouseNo}\r\n                                    onChangeHouseCode={onChangeHouseCode}\r\n                                    onChangeRemark={onChangeRemark}\r\n                                    onClickDelete={onClickDelete}\r\n                                />\r\n                            </Scrollbars>\r\n                        ) : (\r\n                            <div className={classes.alertResultText}>\r\n                                <span>ไม่พบข้อมูล กรุณาตรวจสอบเลขที่ใบอนุญาต หรือ เพิ่มข้อมูลตำแหน่งเลขที่บ้านทีละจุด</span>\r\n                            </div>\r\n                        )}\r\n                    </div>\r\n                ) : null}\r\n            </div>\r\n        </Fragment>\r\n    );\r\n};\r\n\r\nexport default withStyles((theme) => ({\r\n    labelText: {\r\n        // display: 'flex',\r\n        alignItems: \"center\",\r\n    },\r\n    containnerRow: {\r\n        height: \"60px !important\",\r\n        width: \"100%\",\r\n        marginBottom: \"15px\",\r\n        gap: \"5px\",\r\n    },\r\n    textFieldHouseNumber: {\r\n        minHeight: \"50px\",\r\n    },\r\n    labelHouseId: {\r\n        // display: 'flex',\r\n        alignItems: \"center\",\r\n        // paddingLeft: '15px',\r\n    },\r\n    error: {\r\n        color: \"red\",\r\n        marginTop: theme.spacing.unit / 2,\r\n        marginBottom: theme.spacing.unit / 2,\r\n        marginLeft: 15,\r\n    },\r\n    containnerRowTopic: {\r\n        width: \"100%\",\r\n        marginTop: \"15px\",\r\n        gap: \"5px\",\r\n    },\r\n    asterisk: {\r\n        color: \"red\",\r\n    },\r\n    sectionHouseList: {\r\n        height: \"35px\",\r\n        width: \"100%\",\r\n        backgroundColor: \"#38A153\",\r\n        color: \"#FFFFFF\",\r\n        display: \"flex\",\r\n        alignItems: \"center\",\r\n        justifyContent: \"center\",\r\n    },\r\n    rootHouseList: {\r\n        // marginTop: '15px',\r\n        height: \"calc(100% - 50px)\",\r\n    },\r\n    buttonGroup: {\r\n        display: \"flex\",\r\n        justifyContent: \"center\",\r\n        gap: \"10px\",\r\n    },\r\n    rootForm: {\r\n        marginTop: \"10px\",\r\n    },\r\n    buttonEdit: {\r\n        marginTop: \"13px\",\r\n        marginLeft: \"10px\",\r\n        height: \"35px\",\r\n        width: \"35px\",\r\n        backgroundColor: \"#e8d83d\",\r\n        color: \"#FFFFFF\",\r\n    },\r\n    buttonAdd: {\r\n        marginTop: \"13px\",\r\n        marginLeft: \"10px\",\r\n        height: \"35px\",\r\n        width: \"35px\",\r\n        backgroundColor: \"#5cb844\",\r\n        color: \"#FFFFFF\",\r\n    },\r\n    button: {\r\n        marginTop: \"13px\",\r\n        marginLeft: \"10px\",\r\n        height: \"35px\",\r\n        width: \"35px\",\r\n    },\r\n    buttonClose: {\r\n        marginTop: \"13px\",\r\n        marginLeft: \"10px\",\r\n        height: \"35px\",\r\n        width: \"35px\",\r\n        backgroundColor: \"#db2323\",\r\n        color: \"#FFFFFF\",\r\n    },\r\n    root: {\r\n        height: \"100%\",\r\n    },\r\n    container: {\r\n        padding: \"0px 10px 15px 10px\",\r\n    },\r\n    alertResultText: {\r\n        textAlign: 'center',\r\n        padding: '16px'\r\n    }\r\n}))(MarkPointSTRResultView);\r\n","import React, { Component } from 'react';\r\nimport MarkPointSTRResultView from './MarkPointSTRResultView';\r\n\r\nexport class MarkPointSTRResult extends Component {\r\n  constructor() {\r\n    super();\r\n  }\r\n\r\n  render() {\r\n    const {\r\n      isShowHouseList,\r\n      onClickMarkPointHouse,\r\n      handleSubmit,\r\n      onSubmitHouse,\r\n      houseList,\r\n      onClearEventDraw,\r\n      onChangeHouseNo,\r\n      onChangeHouseCode,\r\n      onChangeRemark,\r\n      onClickDelete,\r\n    } = this.props;\r\n    return (\r\n      <MarkPointSTRResultView\r\n        isShowHouseList={isShowHouseList}\r\n        onClickMarkPointHouse={onClickMarkPointHouse}\r\n        handleSubmit={handleSubmit}\r\n        onSubmitHouse={onSubmitHouse}\r\n        houseList={houseList}\r\n        onClearEventDraw={onClearEventDraw}\r\n        onChangeHouseNo={onChangeHouseNo}\r\n        onChangeHouseCode={onChangeHouseCode}\r\n        onChangeRemark={onChangeRemark}\r\n        onClickDelete={onClickDelete}\r\n      />\r\n    );\r\n  }\r\n}\r\n\r\nexport default MarkPointSTRResult;\r\n","import * as actionTypes from '../../../Constants/ActionTypes';\r\n\r\nexport const getDataHouseList = (houseList) => ({\r\n  type: actionTypes.GET_DATA_HOUSE_LIST_STR,\r\n  houseList: houseList,\r\n});\r\n","import React, { Component } from \"react\";\r\nimport MarkPointSTRView from \"./MarkPointSTRView\";\r\nimport MarkPointSTRForm from \"./MarkPointSTRForm/MarkPointSTRForm\";\r\nimport { compose } from \"recompose\";\r\nimport { reduxForm, SubmissionError } from \"redux-form\";\r\nimport { isEmptyObj } from \"../../../../../../Utilities/Utils\";\r\nimport MarkPointSTRResult from \"./MarkPointSTRResult/MarkPointSTRResult\";\r\nimport { bindActionCreators } from \"redux\";\r\nimport * as MarkPointSTRAction from \"../../../../../../Actions/Web/Panel/MarkPointSTRAction\";\r\nimport { connect } from \"react-redux\";\r\nimport * as MapAction from \"../../../../../../Actions/Web/Maps/MapAction\";\r\nimport * as MapFunctions from \"../../../../../../Map/MapFunctions\";\r\nimport * as MenuAction from \"../../../../../../Actions/Web/MenuAction\";\r\nimport WithAlertMessage from \"../../../../../../HOC/WithAlertMessage\";\r\nimport {\r\n    fetchGet_,\r\n    fetchPost_,\r\n} from \"../../../../../../Utilities/ServiceUtils\";\r\nimport WithLoading from \"../../../../../../HOC/WithLoading\";\r\nimport AlertMessageSuper from \"../../../../../../Controls/Containers/AlertMessageSuper\";\r\nimport * as MapUtils from \"../../../../../../Utilities/MapUtils\";\r\n\r\nexport class MarkPointSTR extends Component {\r\n    constructor() {\r\n        super();\r\n        this.state = {\r\n            isShowHouseList: false,\r\n            houseList: [],\r\n            graphic: null,\r\n            currentHouse: null,\r\n            currentPermitNo: null,\r\n            objectPolygon: null, //ขอบเขตอาคาร point จากการคลิกล่าสุด\r\n            currentObjectPolygon: null, //ขอบเขตอาคาร point จากข้อมูลที่ query จาก lat, long\r\n            // geometry: null,\r\n        };\r\n    }\r\n\r\n    componentDidMount = () => {\r\n        // this.onGetDataHouseList();\r\n    };\r\n\r\n    componentWillUnmount = async () => {\r\n        const { mapAction } = this.props;\r\n        const { graphic } = this.state;\r\n        if (graphic) {\r\n            await mapAction.bindMapCommand(\r\n                MapFunctions.clearGraphicMarkPointSTR,\r\n                { graphic: graphic }\r\n            );\r\n        }\r\n        await mapAction.bindMapCommand(MapFunctions.setTOCVisibleLayer, {\r\n            layerID: \"ตำแหน่งออกเลขที่บ้าน\",\r\n            isVisible: false,\r\n        });\r\n        await mapAction.bindMapCommand(MapFunctions.setTOCVisibleLayer, {\r\n            layerID: \"ขอบเขตอาคารสร้างโดยทีม สวพ\",\r\n            isVisible: false,\r\n        });\r\n        await mapAction.bindMapCommand(MapFunctions.clearEvtDrawMapSTR);\r\n    };\r\n\r\n    manageClickMap = async (isActive, value) => {\r\n        const { mapAction, showAlert } = this.props;\r\n        const { graphic } = this.state;\r\n        if (isActive) {\r\n            // menuAction.activeFunction(ACTIVE_FUNCTION.ADD_GP_FORM);\r\n            setTimeout(() => {\r\n                // set timeout เพื่อแก้ปัญหา willunmount ของ maptool clear event draw\r\n                mapAction.bindMapCommand(MapFunctions.drawMarkPointSTR, {\r\n                    callback: this.callBackDrawGraphic,\r\n                    graphic: graphic,\r\n                    showAlert: showAlert,\r\n                });\r\n            }, 50);\r\n            this.managePanelForMobile(true, \"ClickMap\");\r\n        }\r\n    };\r\n\r\n    callBackDrawGraphic = async (evt, graphic) => {\r\n        if (evt) {\r\n            const { mapAction, menuAction } = this.props;\r\n            const { currentHouse } = this.state;\r\n            this.setState({\r\n                graphic: graphic,\r\n            });\r\n            await mapAction.bindClearMapCommand();\r\n            this.managePanelForMobile(false, \"ClickMap\");\r\n\r\n            await mapAction.bindMapCommand(\r\n                MapFunctions.getDistrictAndSubDistrictFormPoint,\r\n                {\r\n                    // save sub-district code\r\n                    geometry: evt.geometry,\r\n                    callbackFn: this.callbackGetDistrictAndSubDistrict,\r\n                }\r\n            );\r\n            await mapAction.bindMapCommand(\r\n                MapFunctions.getPolygonMarkPointSTR,\r\n                {\r\n                    geometry: evt.geometry,\r\n                    callbackFn: this.callbackGetPolygonMarkPointSTR,\r\n                }\r\n            );\r\n            if (currentHouse.latitude && currentHouse.longitude) {\r\n                await mapAction.bindMapCommand(\r\n                    MapFunctions.getPolygonMarkPointSTROld,\r\n                    {\r\n                        geometry: {\r\n                            latitude: currentHouse.latitude,\r\n                            longitude: currentHouse.longitude,\r\n                        },\r\n                        callbackFn: this.callbackGetPolygonMarkPointSTROld,\r\n                    }\r\n                );\r\n            }\r\n        }\r\n    };\r\n\r\n    callbackGetDistrictAndSubDistrict = (value, geometry) => {\r\n        const { change } = this.props;\r\n        const { houseList, currentHouse } = this.state;\r\n        const markCurrentHouse = {\r\n            ...currentHouse,\r\n            districtID: value.DISTRICT_ID,\r\n            subDistrictID: value.SUBDISTRICT_ID,\r\n            provinceID: value.PROVINCE_ID,\r\n            geometry: geometry,\r\n        };\r\n        const updateHouseList = houseList.map((item) =>\r\n            item.ID === markCurrentHouse.ID &&\r\n            item.objectID === markCurrentHouse.objectID\r\n                ? markCurrentHouse\r\n                : item\r\n        );\r\n        this.setState({\r\n            currentHouse: markCurrentHouse,\r\n            isOpenForm: true,\r\n            geometry: geometry,\r\n            houseList: updateHouseList,\r\n        });\r\n        change(\"houseList\", updateHouseList);\r\n    };\r\n\r\n    callbackGetPolygonMarkPointSTR = (result, geometry) => {\r\n        this.setState({\r\n            objectPolygon: result,\r\n        });\r\n    };\r\n\r\n    callbackGetPolygonMarkPointSTROld = (result, geometry) => {\r\n        const { currentHouse, houseList } = this.state;\r\n        const { change } = this.props;\r\n        const updateCurrentHouse = {\r\n            ...currentHouse,\r\n            OBJECTID: result ? result.OBJECTID : null,\r\n        };\r\n        const updateHouseList = houseList.map((item) =>\r\n            item.ID === updateCurrentHouse.ID &&\r\n            item.objectID === updateCurrentHouse.objectID\r\n                ? updateCurrentHouse\r\n                : item\r\n        );\r\n        this.setState({\r\n            currentHouse: updateCurrentHouse,\r\n            houseList: updateHouseList,\r\n            currentObjectPolygon: result ? result : null,\r\n        });\r\n        change(\"houseList\", updateHouseList);\r\n    };\r\n\r\n    managePanelForMobile = async (isDraw, func) => {\r\n        const { menuAction, width } = this.props;\r\n        if (width === \"sm\" || width === \"xs\") {\r\n            switch (func) {\r\n                case \"ClickMap\":\r\n                    if (isDraw) {\r\n                        await menuAction.closeMenuPanel();\r\n                        await menuAction.openMenuMap();\r\n                    } else {\r\n                        await menuAction.openMenuPanel();\r\n                        await menuAction.closeMenuMap();\r\n                    }\r\n                    break;\r\n                default:\r\n                    break;\r\n            }\r\n        }\r\n    };\r\n\r\n    handleClickDrawGraphic = async (value) => {\r\n        const { change, mapAction } = this.props;\r\n        const { houseList } = this.state;\r\n        // const rerollHouseList = houseList.map((item) => ({ ...item, isDraw: false }));\r\n        const currentHouse = { ...value, isDraw: true };\r\n        // console.log('rerollHouseList', rerollHouseList)\r\n        // const updateHouseList = rerollHouseList.map((item) => (item.ID === currentHouse.ID && item.objectID === currentHouse.objectID ? currentHouse : item));\r\n\r\n        const updateHouseList = houseList.map((item) => {\r\n            if (\r\n                item.ID === currentHouse.ID &&\r\n                item.objectID === currentHouse.objectID\r\n            ) {\r\n                return currentHouse;\r\n            } else {\r\n                return { ...item, isDraw: false };\r\n            }\r\n        });\r\n\r\n        if (value.longitude && value.latitude) {\r\n            mapAction.bindMapCommand(MapFunctions.addOldGraphicMarkPointSTR, {\r\n                geometry: {\r\n                    latitude: value.latitude,\r\n                    longitude: value.longitude,\r\n                },\r\n                callback: this.onAddOldMarkPointSTR,\r\n            });\r\n        } else {\r\n            this.manageClickMap(true, currentHouse);\r\n        }\r\n        this.setState({\r\n            currentHouse: currentHouse,\r\n            houseList: updateHouseList,\r\n        });\r\n        change(\"houseList\", updateHouseList);\r\n        this.managePanelForMobile(true);\r\n    };\r\n\r\n    handleClickDelete = async (value) => {\r\n        const { showAlert } = this.props;\r\n        showAlert({\r\n            altMsg: \"ยืนยันการลบ\",\r\n            altType: 2,\r\n            callbackConfirm: () => this.onConfirmDelete(value),\r\n        });\r\n    };\r\n\r\n    onConfirmDelete = async (value) => {\r\n        const { mapAction, change, showAlert } = this.props;\r\n        const { houseList } = this.state;\r\n        if (!value.ID) {\r\n            await mapAction.bindMapCommand(\r\n                MapFunctions.applyEditMarkPointSTRSingle,\r\n                {\r\n                    objectID: value.objectID,\r\n                    mode: \"delete\",\r\n                    callback: this.onApplyDeleteSuccess,\r\n                }\r\n            );\r\n            await mapAction.bindMapCommand(MapFunctions.setTOCVisibleLayer, {\r\n                layerID: \"ตำแหน่งออกเลขที่บ้าน\",\r\n                isVisible: false,\r\n            });\r\n        } else {\r\n            const res = await fetchGet_(\r\n                `${process.env.REACT_APP_STR_DELETE}=${value.ID}`\r\n            );\r\n            if (!res.ok) {\r\n                throw res.status;\r\n            } else {\r\n                const data = await res.json();\r\n                if (data.message === \"SUCCESS\") {\r\n                    if (value.objectID) {\r\n                        await mapAction.bindMapCommand(\r\n                            MapFunctions.applyEditMarkPointSTRSingle,\r\n                            {\r\n                                objectID: value.objectID,\r\n                                mode: \"delete\",\r\n                                callback: this.onApplyDeleteSuccess,\r\n                            }\r\n                        );\r\n                        await mapAction.bindMapCommand(\r\n                            MapFunctions.setTOCVisibleLayer,\r\n                            {\r\n                                layerID: \"ตำแหน่งออกเลขที่บ้าน\",\r\n                                isVisible: false,\r\n                            }\r\n                        );\r\n                    } else {\r\n                        const updateHouseList = houseList.filter(\r\n                            (item) => item.ID !== value.ID\r\n                        );\r\n                        const arr = updateHouseList.map((item) => ({\r\n                            ...item,\r\n                        }));\r\n\r\n                        this.setState({\r\n                            houseList: arr,\r\n                        });\r\n                        change(\"houseList\", arr);\r\n                        showAlert({ altMsg: \"ลบข้อมูลสำเร็จ\" });\r\n                    }\r\n                }\r\n            }\r\n        }\r\n    };\r\n\r\n    onApplyDeleteSuccess = async (value) => {\r\n        const { change, mapAction, showAlert } = this.props;\r\n        const { houseList } = this.state;\r\n        const updateHouseList = houseList.filter(\r\n            (item) => item.objectID !== value.objectId\r\n        );\r\n        const arr = updateHouseList.map((item) => ({ ...item }));\r\n        this.setState({\r\n            houseList: arr,\r\n        });\r\n        change(\"houseList\", arr);\r\n        await mapAction.bindMapCommand(MapFunctions.setTOCVisibleLayer, {\r\n            layerID: \"ตำแหน่งออกเลขที่บ้าน\",\r\n        });\r\n        showAlert({ altMsg: \"ลบข้อมูลสำเร็จ\" });\r\n    };\r\n\r\n    onChangeHouseNo = (value, currentHouse) => {\r\n        const updateCurrentHouseNo = { ...currentHouse, houseNo: value };\r\n        this.setState({\r\n            currentHouse: updateCurrentHouseNo,\r\n        });\r\n    };\r\n\r\n    onChangeHouseCode = (value, currentHouse) => {\r\n        const updateCurrentHouseCode = { ...currentHouse, houseCode: value };\r\n        this.setState({\r\n            currentHouse: updateCurrentHouseCode,\r\n        });\r\n    };\r\n\r\n    onChangeRemark = (value, currentHouse) => {\r\n        const updateCurrentRemark = { ...currentHouse, remark: value };\r\n        this.setState({\r\n            currentHouse: updateCurrentRemark,\r\n        });\r\n    };\r\n\r\n    onAddOldMarkPointSTR = (value) => {\r\n        const { currentHouse } = this.state;\r\n        this.setState({\r\n            graphic: value,\r\n        });\r\n        this.manageClickMap(true, currentHouse);\r\n    };\r\n\r\n    onClearEventDraw = async (value) => {\r\n        const { mapAction, change } = this.props;\r\n        const { graphic, houseList } = this.state;\r\n        const valueID = value.HID;\r\n        // const currentHouse = { ...value, isDraw: false };\r\n        // const updateHouseList = this.state.houseList.map((item) => (item.HID === currentHouse.HID ? currentHouse : item));\r\n        const currentHouse = houseList.filter(\r\n            (item) => item.HID === valueID\r\n        )[0];\r\n        const updateHouseList = houseList.map((item) => ({\r\n            ...item,\r\n            isDraw: item.HID === valueID ? false : item.isDraw,\r\n        }));\r\n        this.setState({\r\n            currentHouse: currentHouse,\r\n            houseList: updateHouseList,\r\n        });\r\n        change(\"houseList\", updateHouseList);\r\n        await mapAction.bindMapCommand(MapFunctions.clearEvtDrawMapSTR);\r\n        if (graphic) {\r\n            await mapAction.bindMapCommand(\r\n                MapFunctions.clearGraphicMarkPointSTR,\r\n                { graphic: graphic }\r\n            );\r\n        }\r\n    };\r\n\r\n    formatStringPermitNo = (value) => {\r\n        // const pattern = /[.\\/]/;\r\n        // if(pattern.test(value)) {\r\n        //   return value\r\n        // }\r\n\r\n        // const result = value\r\n        //   .split('-')\r\n        //   .filter((part) => /^\\d+$/.test(part))\r\n        //   .join('');\r\n        // const format1 = result.slice(0, 4);\r\n        // const format2 = result.slice(4, 8);\r\n        // const format3 = result.slice(8, 10);\r\n        // const format4 = result.slice(10);\r\n        // return `${format1}-${format2}-${format3}-${format4}`;\r\n        return value;\r\n    };\r\n\r\n    onSubmitFormSearch = async (value) => {\r\n        const { showLoading, hideLoading, change, mapAction } = this.props;\r\n        // this.validateFormSearch(value);\r\n        showLoading();\r\n        const param = {\r\n            permitNo: this.formatStringPermitNo(value.permitNo),\r\n        };\r\n        fetchPost_(`${process.env.REACT_APP_STR_SEARCH_PERMIT}`, param)\r\n            .then((res) => {\r\n                if (!res.ok) {\r\n                    throw res.status;\r\n                }\r\n                return res.json();\r\n            })\r\n            .then((data) => {\r\n                hideLoading();\r\n                const formatHouseList = data.data.map((item) => {\r\n                    return {\r\n                        ...item,\r\n                        houseNo: item.houseNum,\r\n                        houseCode: item.HID,\r\n                        remark: item.remark,\r\n                        isDraw: false,\r\n                        createDate: item.createdDate,\r\n                        updateDate: item.updatedDate,\r\n                        hasObjectID: item.objectID ? true : false,\r\n                    };\r\n                });\r\n                this.setState({\r\n                    houseList: formatHouseList,\r\n                    isShowHouseList: true,\r\n                });\r\n                change(\"houseList\", formatHouseList);\r\n                MarkPointSTRAction.getDataHouseList(formatHouseList);\r\n                if (data.longitude && data.latitude) {\r\n                    mapAction.bindMapCommand(\r\n                        MapFunctions.panToPointMarkPointSTR,\r\n                        { longitude: data.longitude, latitude: data.latitude }\r\n                    );\r\n                }\r\n                mapAction.bindMapCommand(MapFunctions.setTOCVisibleLayer, {\r\n                    layerID: \"ตำแหน่งออกเลขที่บ้าน\",\r\n                });\r\n                mapAction.bindMapCommand(MapFunctions.setTOCVisibleLayer, {\r\n                    layerID: \"ขอบเขตอาคารสร้างโดยทีม สวพ\",\r\n                });\r\n            })\r\n            .catch((err) => {\r\n                console.log(err);\r\n                hideLoading();\r\n            });\r\n        this.setState({\r\n            currentPermitNo: value,\r\n        });\r\n    };\r\n\r\n    validateFormSearch = (value) => {\r\n        const { change } = this.props;\r\n        const errors = {};\r\n        if (!value.permitNo) {\r\n            errors.permitNo = \"กรุณากรอกเลขที่ใบอนุญาต\";\r\n        }\r\n        // if (value.permitNo.length < 19) {\r\n        //     errors.permitNo = \"กรุณากรอกเลขที่ใบอนุญาตให้ครบ 19 หลัก\";\r\n        //     this.setState({ isShowHouseList: false });\r\n        //     change(\"houseList\", []);\r\n        // }\r\n        if (!isEmptyObj(errors)) {\r\n            throw new SubmissionError(errors);\r\n        }\r\n    };\r\n\r\n    validateHouseSubmit = (value) => {\r\n        const { showAlert } = this.props;\r\n        const errors = {};\r\n        if (!value.houseNo) {\r\n            errors.houseNo = \"กรุณากรอกเลขที่บ้าน\";\r\n        }\r\n        // if (!value.houseCode) {\r\n        //   errors.houseCode = 'กรุณากรอกรหัสประจำบ้านบ้าน';\r\n        // }\r\n        if (!isEmptyObj(errors)) {\r\n            showAlert({\r\n                altMsg: `${errors.houseNo}`,\r\n            });\r\n        }\r\n    };\r\n\r\n    onSubmitHouse = async (value) => {\r\n        const { showAlert, mapAction } = this.props;\r\n        const { currentPermitNo, objectPolygon } = this.state;\r\n\r\n        const params = {\r\n            ID: value.ID,\r\n            permitNo: currentPermitNo.permitNo,\r\n            houseNum: value.houseNo,\r\n            HID: value.houseCode,\r\n        };\r\n        const duplicateResult = await fetchPost_(\r\n            process.env.REACT_APP_STR_CHECK_DUPLICATE,\r\n            params\r\n        );\r\n        if (duplicateResult.ok) {\r\n            const jsonResult = await duplicateResult.json();\r\n            const messageResult = jsonResult.message;\r\n\r\n            if (messageResult === \"DUPLICATE\") {\r\n                const { showAlert } = this.props;\r\n                showAlert({\r\n                    altMsg:\r\n                        \"ไม่สามารถบันทึกได้ ข้อมูลเลขที่ใบอนุญาตและเลขที่บ้านซ้ำกับที่พบในระบบ กรุณาตรวจสอบอีกครั้ง\",\r\n                });\r\n            } \r\n            else {\r\n                this.validateHouseSubmit(value);\r\n\r\n                let latlong = null;\r\n                if (value.geometry) {\r\n                    latlong = await MapUtils.convertLatLong(\r\n                        value.geometry.x,\r\n                        value.geometry.y\r\n                    );\r\n                }\r\n\r\n                const param = {\r\n                    ID: value.ID,\r\n                    permitNo: currentPermitNo.permitNo,\r\n                    houseNum: value.houseNo,\r\n                    HID: value.houseCode,\r\n                    district: value.districtID,\r\n                    subDistrict: value.subDistrictID,\r\n                    latitudeUsed: value.geometry ? latlong[1] : value.latitude,\r\n                    longitudeUsed: value.geometry\r\n                        ? latlong[0]\r\n                        : value.longitude,\r\n                    plgObjectID: objectPolygon ? objectPolygon.OBJECTID : null,\r\n                };\r\n                if (isEmptyObj(objectPolygon)) {\r\n                    await mapAction.bindMapCommand(\r\n                        MapFunctions.applyEditMarkPointSTRSingle,\r\n                        {\r\n                            ...value,\r\n                            updateDate: new Date().getTime(),\r\n                            permitNo: currentPermitNo.permitNo,\r\n                            mode: \"multiple\",\r\n                            callback: this.onApplyEditSuccess,\r\n                        }\r\n                    );\r\n                    await this.onSaveToDataBase(param);\r\n                    await mapAction.bindMapCommand(\r\n                        MapFunctions.setTOCVisibleLayer,\r\n                        {\r\n                            layerID: \"ตำแหน่งออกเลขที่บ้าน\",\r\n                            isVisible: false,\r\n                        }\r\n                    );\r\n                    await mapAction.bindMapCommand(\r\n                        MapFunctions.clearEvtDrawMapSTR\r\n                    );\r\n                } else {\r\n                    if (\r\n                        objectPolygon.BL_HID === null &&\r\n                        objectPolygon.BL_HOUSENUM === null\r\n                    ) {\r\n                        await this.onClickInsertData(value, \"replace\");\r\n                    } else {\r\n                        showAlert({\r\n                            altMsg:\r\n                                \"ต้องการจะเขียนทับทั้งหมดหรือเพิ่มข้อมูลต่อไป\",\r\n                            altType: 3,\r\n                            callbackConfirm: () =>\r\n                                this.onClickInsertData(value, \"insert\"),\r\n                            callbackClose: () =>\r\n                                this.onClickInsertData(value, \"replace\"),\r\n                        });\r\n                    }\r\n                }\r\n            }\r\n        }\r\n    };\r\n\r\n    onClickInsertData = async (value, key) => {\r\n        const {\r\n            objectPolygon,\r\n            currentPermitNo,\r\n            currentObjectPolygon,\r\n        } = this.state;\r\n        const { mapAction } = this.props;\r\n        let latlong = null;\r\n        if (value.geometry) {\r\n            latlong = await MapUtils.convertLatLong(\r\n                value.geometry.x,\r\n                value.geometry.y\r\n            );\r\n        }\r\n\r\n        // const param = {\r\n        //   ...objectPolygon,\r\n        //   REMARK: key === 'insert' ? (value.remark ? `${objectPolygon.REMARK},${value.remark}` : objectPolygon.REMARK) : value.remark,\r\n        //   BL_HOUSENUM:\r\n        //     key === 'insert'\r\n        //       ? objectPolygon.BL_HOUSENUM !== value.houseNo\r\n        //         ? `${objectPolygon.BL_HOUSENUM},${value.houseNo}`\r\n        //         : objectPolygon.BL_HOUSENUM\r\n        //       : value.houseNo,\r\n        //   BL_HID:\r\n        //     key === 'insert'\r\n        //       ? objectPolygon.BL_HID !== value.houseCode.split('-').join('')\r\n        //         ? `${objectPolygon.BL_HID},${value.houseCode.split('-').join('')}`\r\n        //         : objectPolygon.BL_HID\r\n        //       : value.houseCode.split('-').join(''),\r\n        // };\r\n        const param = { ...objectPolygon };\r\n\r\n        if (key === \"insert\") {\r\n            param.REMARK = value.remark\r\n                ? `${objectPolygon.REMARK},${value.remark}`\r\n                : objectPolygon.REMARK;\r\n            param.BL_HOUSENUM =\r\n                objectPolygon.BL_HOUSENUM !== value.houseNo\r\n                    ? `${objectPolygon.BL_HOUSENUM},${value.houseNo}`\r\n                    : objectPolygon.BL_HOUSENUM;\r\n            if (value.houseCode) {\r\n                param.BL_HID =\r\n                    objectPolygon.BL_HID !== value.houseCode.split(\"-\").join(\"\")\r\n                        ? `${objectPolygon.BL_HID},${value.houseCode\r\n                              .split(\"-\")\r\n                              .join(\"\")}`\r\n                        : objectPolygon.BL_HID;\r\n            }\r\n        } else {\r\n            param.REMARK = value.remark;\r\n            // param.BL_HOUSENUM = objectPolygon.BL_HOUSENUM\r\n            if (value.houseCode) {\r\n                param.BL_HID = value.houseCode.split(\"-\").join(\"\");\r\n            }\r\n        }\r\n\r\n        await mapAction.bindMapCommand(\r\n            MapFunctions.applyEditMarkPointSTRPolygon,\r\n            {\r\n                param: param,\r\n            }\r\n        );\r\n        await mapAction.bindMapCommand(\r\n            MapFunctions.applyEditMarkPointSTRSingle,\r\n            {\r\n                ...value,\r\n                updateDate: new Date().getTime(),\r\n                permitNo: currentPermitNo.permitNo,\r\n                mode: \"multiple\",\r\n                BL_ID: objectPolygon ? objectPolygon.BL_ID : null,\r\n                latitudeUsed: value.geometry ? latlong[1] : value.latitude,\r\n                longitudeUsed: value.geometry ? latlong[0] : value.longitude,\r\n                callback: this.onApplyEditSuccess,\r\n            }\r\n        );\r\n        await mapAction.bindMapCommand(MapFunctions.setTOCVisibleLayer, {\r\n            layerID: \"ตำแหน่งออกเลขที่บ้าน\",\r\n            isVisible: false,\r\n        });\r\n        await mapAction.bindMapCommand(MapFunctions.clearEvtDrawMapSTR);\r\n        const paramSaveData = {\r\n            ID: value.ID,\r\n            permitNo: currentPermitNo.permitNo,\r\n            houseNum: value.houseNo,\r\n            HID: value.houseCode,\r\n            district: value.districtID,\r\n            subDistrict: value.subDistrictID,\r\n            latitudeUsed: value.geometry ? latlong[1] : value.latitude,\r\n            longitudeUsed: value.geometry ? latlong[0] : value.longitude,\r\n            plgObjectID: objectPolygon ? objectPolygon.OBJECTID : null,\r\n        };\r\n        await this.onSaveToDataBase(paramSaveData);\r\n        if (!isEmptyObj(currentObjectPolygon)) {\r\n            console.log(currentObjectPolygon);\r\n            if (\r\n                key === \"insert\" &&\r\n                currentObjectPolygon.BL_HOUSENUM !== value.houseNo\r\n            ) {\r\n                this.onApplyEditDeleteDataPolygon(value);\r\n            }\r\n        }\r\n    };\r\n\r\n    onSaveToDataBase = async (value) => {\r\n        const res = await fetchPost_(\r\n            process.env.REACT_APP_STR_INSERT_UPDATE_DATA,\r\n            value\r\n        );\r\n        if (!res.ok) {\r\n            throw res.status;\r\n        }\r\n    };\r\n\r\n    onApplyEditDeleteDataPolygon = async (value) => {\r\n        const { mapAction } = this.props;\r\n        const { currentObjectPolygon } = this.state;\r\n        const filterHIDPolygon = currentObjectPolygon.BL_HID\r\n            ? currentObjectPolygon.BL_HID.split(\",\").filter(\r\n                  (item) => item !== value.houseCode\r\n              )\r\n            : [];\r\n        const filterHouseNumPolygon = currentObjectPolygon.BL_HOUSENUM\r\n            ? currentObjectPolygon.BL_HOUSENUM.split(\",\").filter(\r\n                  (item) => item !== value.houseNo\r\n              )\r\n            : [];\r\n        const param = {\r\n            ...currentObjectPolygon,\r\n            BL_HID:\r\n                filterHIDPolygon.length > 0 ? filterHIDPolygon.join(\",\") : null,\r\n            BL_HOUSENUM:\r\n                filterHouseNumPolygon.length > 0\r\n                    ? filterHouseNumPolygon.join(\",\")\r\n                    : null,\r\n        };\r\n        await mapAction.bindMapCommand(\r\n            MapFunctions.applyEditMarkPointSTRPolygonDelete,\r\n            {\r\n                param: param,\r\n            }\r\n        );\r\n    };\r\n\r\n    onApplyEditSuccess = async (value, currentHouse) => {\r\n        const { change, mapAction, showAlert } = this.props;\r\n        const { houseList, graphic } = this.state;\r\n        const updateValueCurrentHouse = {\r\n            ...currentHouse,\r\n            objectID: value[0].objectId,\r\n            isDraw: false,\r\n            hasObjectID: value[0].objectId ? true : false,\r\n            latitude: currentHouse.latitudeUsed,\r\n            longitude: currentHouse.longitudeUsed,\r\n        };\r\n        const updateHouseList = houseList.map((item) =>\r\n            item.ID === updateValueCurrentHouse.ID &&\r\n            item.objectID === updateValueCurrentHouse.objectID\r\n                ? updateValueCurrentHouse\r\n                : item\r\n        );\r\n\r\n        const clonedArray = updateHouseList.map((obj) => ({ ...obj }));\r\n        this.setState({\r\n            houseList: clonedArray,\r\n        });\r\n        if (graphic) {\r\n            await mapAction.bindMapCommand(\r\n                MapFunctions.clearGraphicMarkPointSTR,\r\n                {\r\n                    graphic: graphic,\r\n                }\r\n            );\r\n        }\r\n        await mapAction.bindMapCommand(MapFunctions.setTOCVisibleLayer, {\r\n            layerID: \"ตำแหน่งออกเลขที่บ้าน\",\r\n        });\r\n        showAlert({ altMsg: \"บันทึกข้อมูลสำเร็จ\" });\r\n        change(\"houseList\", clonedArray);\r\n    };\r\n\r\n    render() {\r\n        const { isShowHouseList, houseList } = this.state;\r\n        const { title, onClickBack, handleSubmit, isShowLoading } = this.props;\r\n        return (\r\n            <MarkPointSTRView title={title} onClickBack={onClickBack}>\r\n                <MarkPointSTRForm\r\n                    handleSubmit={handleSubmit}\r\n                    onSubmitFormSearch={this.onSubmitFormSearch}\r\n                />\r\n                <MarkPointSTRResult\r\n                    isShowHouseList={isShowHouseList}\r\n                    onClickMarkPointHouse={this.handleClickDrawGraphic}\r\n                    handleSubmit={handleSubmit}\r\n                    onSubmitHouse={this.onSubmitHouse}\r\n                    houseList={houseList}\r\n                    onClearEventDraw={this.onClearEventDraw}\r\n                    onChangeHouseNo={this.onChangeHouseNo}\r\n                    onChangeHouseCode={this.onChangeHouseCode}\r\n                    onChangeRemark={this.onChangeRemark}\r\n                    onClickDelete={this.handleClickDelete}\r\n                />\r\n                <AlertMessageSuper {...this.props} />\r\n            </MarkPointSTRView>\r\n        );\r\n    }\r\n}\r\n\r\nconst reducFormParameter = {\r\n    form: \"markPointSTR\",\r\n    // enableReinitialize: true,\r\n    // rerenderOnEveryChange: true\r\n};\r\n\r\nconst mapStateToProps = (state) => ({\r\n    MarkPointSTRReducer: state.markPointSTRReducer,\r\n});\r\n\r\nconst mapDispatchToProps = (dispatch) => ({\r\n    MarkPointSTRAction: bindActionCreators(MarkPointSTRAction, dispatch),\r\n    mapAction: bindActionCreators(MapAction, dispatch),\r\n    menuAction: bindActionCreators(MenuAction, dispatch),\r\n});\r\n\r\nexport default compose(\r\n    connect(\r\n        mapStateToProps,\r\n        mapDispatchToProps\r\n    ),\r\n    reduxForm(reducFormParameter),\r\n    WithAlertMessage,\r\n    WithLoading\r\n)(MarkPointSTR);\r\n","import { withStyles } from '@material-ui/core';\r\nimport React, { Fragment } from 'react';\r\nimport AppBarHeaderView from '../../../../../../Presentationals/Web/Panel/AppBarHeaderView';\r\nimport Grid from '@material-ui/core/Grid';\r\n\r\nconst MarkPointSTRSingleView = ({ children, classes, title, onClickBack }) => {\r\n  return (\r\n    <Grid container className={classes.root}>\r\n      <AppBarHeaderView\r\n        // title={page}\r\n        title={title}\r\n        onClickBack={onClickBack}\r\n      />\r\n      <Grid item xs={12} className={classes.body}>\r\n        {children}\r\n      </Grid>\r\n    </Grid>\r\n  );\r\n};\r\n\r\nexport default withStyles((theme) => ({\r\n  root: {},\r\n  body: {},\r\n}))(MarkPointSTRSingleView);\r\n","import { withStyles } from '@material-ui/core';\r\nimport React, { Fragment } from 'react';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport Tooltip from '../../../../../../../Controls/Containers/Tooltip';\r\nimport classnames from 'classnames';\r\nimport { Field } from 'redux-form';\r\nimport TextFieldRedux from '../../../../../../../Controls/Containers/TextFieldRedux';\r\nimport { BTN } from '../../../../../../../Constants/Constants';\r\nimport Button from '../../../../../../../Controls/Containers/Button';\r\n\r\nconst MarkPointSTRSingleFormView = ({\r\n  classes,\r\n  onDraw,\r\n  isActiveDraw,\r\n  onEdit,\r\n  isActiveEdit,\r\n  handleSubmit,\r\n  onSubmit,\r\n  onClickCancel,\r\n  onBlurPermitNo,\r\n}) => {\r\n  return (\r\n    <Fragment>\r\n      <div className={classes.root}>\r\n        <div className={classes.rootTitle}>\r\n          <div>ข้อมูลการออกเลขรหัสบ้านหรือเลขที่บ้าน</div>\r\n          <Grid container justify='flex-end' className={classes.rootBtnDraft}>\r\n            <Tooltip title='วาดตำแหน่งใหม่' placement='bottom'>\r\n              <div\r\n                onClick={onDraw}\r\n                className={classnames(\r\n                  classes.btnManageGraphic,\r\n                  { [classes.btnAreaNormal]: !isActiveDraw },\r\n                  { [classes.btnAreaSelected]: isActiveDraw }\r\n                )}\r\n              />\r\n            </Tooltip>\r\n            <Tooltip title='แก้ไขตำแหน่ง' placement='bottom'>\r\n              <div\r\n                onClick={onEdit}\r\n                className={classnames(\r\n                  classes.btnManageGraphic,\r\n                  { [classes.btnEditNormal]: !isActiveEdit },\r\n                  { [classes.btnEditSelected]: isActiveEdit }\r\n                )}\r\n              />\r\n            </Tooltip>\r\n          </Grid>\r\n        </div>\r\n        <div className={classes.rootForm}>\r\n          <form onSubmit={handleSubmit(onSubmit)}>\r\n            <Field\r\n              name='permitNo'\r\n              label='เลขที่ใบอนุญาต'\r\n              placeholder='กรุณากรอกเลขที่ใบอนุญาต'\r\n              component={TextFieldRedux}\r\n              onBlur={(e) => onBlurPermitNo(e.target.value)}\r\n            />\r\n            <Field name='houseNo' label='เลขที่บ้าน' placeholder='กรุณากรอกเลขที่บ้าน' component={TextFieldRedux} required />\r\n            <Field name='houseCode' label='รหัสประจำบ้าน' placeholder='กรุณากรอกรหัสประจำบ้าน' component={TextFieldRedux} maxLength={11} />\r\n            <Field name='remark' label='หมายเหตุ' placeholder='กรุณากรอกหมายเหตุ' component={TextFieldRedux} />\r\n            <Grid container justify='center' spacing={24} className={classes.footer}>\r\n              <Grid item>\r\n                <Button label={BTN.TH.CANCEL} onClick={onClickCancel} />\r\n              </Grid>\r\n              <Grid item>\r\n                <Button type='submit' label={BTN.TH.SAVE} />\r\n              </Grid>\r\n            </Grid>\r\n          </form>\r\n        </div>\r\n      </div>\r\n    </Fragment>\r\n  );\r\n};\r\n\r\nexport default withStyles((theme) => ({\r\n  root: {\r\n    padding: '10px',\r\n  },\r\n  rootTitle: {\r\n    color: theme.mainTheme.color1,\r\n    textAlign: 'center',\r\n    fontSize: theme.textSize.title,\r\n  },\r\n  rootBtnDraft: {\r\n    height: '50px',\r\n    width: '100%',\r\n    marginTop: '15px',\r\n  },\r\n  btnManageGraphic: {\r\n    width: '40px',\r\n    minHeight: '40px',\r\n    margin: '5px',\r\n    display: 'block',\r\n    padding: 0,\r\n    backgroundSize: '40px 40px',\r\n    backgroundRepeat: 'no-repeat',\r\n    backgroundPosition: 'center',\r\n  },\r\n  btnAreaNormal: {\r\n    backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_add_normal@2x.png)`,\r\n    '&:Hover': {\r\n      backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_add_selected@2x.png)`,\r\n    },\r\n    cursor: 'pointer',\r\n  },\r\n  btnAreaSelected: {\r\n    backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_add_selected@2x.png)`,\r\n    cursor: 'pointer',\r\n  },\r\n  btnEditNormal: {\r\n    backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_edit_normal@2x.png)`,\r\n    '&:Hover': {\r\n      backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_edit_selected@2x.png)`,\r\n    },\r\n    cursor: 'pointer',\r\n  },\r\n  btnEditSelected: {\r\n    backgroundImage: `url(${process.env.PUBLIC_URL}/img/maptools/map_drawing_03_edit_selected@2x.png)`,\r\n    cursor: 'pointer',\r\n  },\r\n}))(MarkPointSTRSingleFormView);\r\n","import React, { Component, Fragment } from 'react';\r\nimport MarkPointSTRSingleFormView from './MarkPointSTRSingleFormView';\r\n\r\nclass MarkPointSTRSingleForm extends Component {\r\n  constructor() {\r\n    super();\r\n  }\r\n\r\n  render() {\r\n    const { onDraw, onEdit, isActiveDraw, isActiveEdit, handleSubmit, onSubmit, onClickCancel, onBlurPermitNo } = this.props;\r\n    return (\r\n      <Fragment>\r\n        <MarkPointSTRSingleFormView\r\n          onDraw={onDraw}\r\n          onEdit={onEdit}\r\n          isActiveDraw={isActiveDraw}\r\n          isActiveEdit={isActiveEdit}\r\n          handleSubmit={handleSubmit}\r\n          onSubmit={onSubmit}\r\n          onClickCancel={onClickCancel}\r\n          onBlurPermitNo={onBlurPermitNo}\r\n        />\r\n      </Fragment>\r\n    );\r\n  }\r\n}\r\n\r\nexport default MarkPointSTRSingleForm;\r\n","import React, { Component, Fragment } from \"react\";\r\nimport MarkPointSTRSingleView from \"./MarkPointSTRSingleView\";\r\nimport * as MapAction from \"../../../../../../Actions/Web/Maps/MapAction\";\r\nimport * as PanelContentAction from \"../../../../../../Actions/Web/Panel/PanelContentAction\";\r\nimport * as HouseNumberAction from \"../../../../../../Actions/Web/Panel/HouseNumberAction\";\r\nimport * as MenuAction from \"../../../../../../Actions/Web/MenuAction\";\r\nimport {\r\n    MENU_HOUSENUMBER,\r\n    ALERT_MESSAGE,\r\n    ACTIVE_FUNCTION,\r\n} from \"../../../../../../Constants/Constants\";\r\nimport * as MapFunctions from \"../../../../../../Map/MapFunctions\";\r\nimport { isDirty, SubmissionError } from \"redux-form\";\r\nimport { bindActionCreators } from \"redux\";\r\nimport MenuListModeView from \"../../../../../../Presentationals/Web/Panel/Menu/MenuContent/HouseNumber/MenuListModeView\";\r\nimport { compose } from \"recompose\";\r\nimport { connect } from \"react-redux\";\r\nimport MarkPointSTRSingleForm from \"./MarkPointSTRSingleForm/MarkPointSTRSingleForm\";\r\nimport { reduxForm } from \"redux-form\";\r\nimport { isEmptyObj } from \"../../../../../../Utilities/Utils\";\r\nimport { fetchPost_ } from \"../../../../../../Utilities/ServiceUtils\";\r\nimport WithAlertMessage from \"../../../../../../HOC/WithAlertMessage\";\r\nimport AlertMessageSuper from \"../../../../../../Controls/Containers/AlertMessageSuper\";\r\nimport WithLoading from \"../../../../../../HOC/WithLoading\";\r\nimport * as MapUtils from \"../../../../../../Utilities/MapUtils\";\r\n\r\nconst LIST_MENU = Object.keys(MENU_HOUSENUMBER).map((key) => ({\r\n    id: MENU_HOUSENUMBER[key].id,\r\n    name: MENU_HOUSENUMBER[key].name,\r\n    isActive: false,\r\n}));\r\n\r\nclass MarkPointSTRSingle extends Component {\r\n    constructor() {\r\n        super();\r\n        this.state = {\r\n            listMenu: LIST_MENU,\r\n            isOpenForm: false,\r\n            dirty: false,\r\n            subDistrictID: null,\r\n            districtID: null,\r\n            provinceID: null,\r\n            isNotBKK: false,\r\n            // isActiveDraw: false,\r\n            // isActiveEdit: false,\r\n            graphic: null,\r\n            districtIdForHouseId: null,\r\n            geometry: null,\r\n            objectPolygon: null, //ขอบเขตอาคาร point จากการคลิกล่าสุด\r\n        };\r\n    }\r\n\r\n    componentDidMount = () => {\r\n        const { mapAction } = this.props;\r\n        mapAction.bindMapCommand(MapFunctions.setTOCVisibleLayer, {\r\n            layerID: \"ตำแหน่งออกเลขที่บ้าน\",\r\n        });\r\n    };\r\n\r\n    componentWillUnmount = async () => {\r\n        const { mapAction } = this.props;\r\n        const { graphic } = this.state;\r\n\r\n        if (graphic) {\r\n            await mapAction.bindMapCommand(MapFunctions.clearAllGraphic);\r\n        }\r\n        await mapAction.bindMapCommand(MapFunctions.setTOCVisibleLayer, {\r\n            layerID: \"ตำแหน่งออกเลขที่บ้าน\",\r\n            isVisible: false,\r\n        });\r\n    };\r\n\r\n    manageModeDisplay = (id) => {\r\n        const { listMenu } = this.state;\r\n\r\n        const tmpListMode = listMenu.map((itm, ind) => {\r\n            if (itm.id === id) {\r\n                return { ...itm, isActive: !itm.isActive };\r\n            } else {\r\n                return { ...itm, isActive: false };\r\n            }\r\n        });\r\n\r\n        this.setState({\r\n            listMenu: tmpListMode,\r\n        });\r\n    };\r\n\r\n    manageClickMap = async (isActive) => {\r\n        const { mapAction, showAlert } = this.props;\r\n\r\n        if (isActive) {\r\n            setTimeout(() => {\r\n                // set timeout เพื่อแก้ปัญหา willunmount ของ maptool clear event draw\r\n                mapAction.bindMapCommand(MapFunctions.drawMarkPointSTR, {\r\n                    callback: this.callBackDrawGraphic,\r\n                    showAlert: showAlert,\r\n                });\r\n            }, 50);\r\n            this.managePanelForMobile(true, \"ClickMap\");\r\n        }\r\n    };\r\n\r\n    callBackDrawGraphic = async (evt, graphicValue) => {\r\n        const { mapAction } = this.props;\r\n        const { graphic } = this.state;\r\n        await mapAction.bindMapCommand(MapFunctions.clearGraphicMarkPointSTR, {\r\n            graphic,\r\n        });\r\n\r\n        this.setState({\r\n            isOpenForm: true,\r\n            graphic: graphicValue,\r\n            geometry: evt,\r\n        });\r\n\r\n        if (evt) {\r\n            const { mapAction } = this.props;\r\n            await mapAction.bindClearMapCommand();\r\n            this.managePanelForMobile(false, \"ClickMap\");\r\n\r\n            // menuAction.activeFunction(null);\r\n            await mapAction.bindMapCommand(\r\n                MapFunctions.getDistrictAndSubDistrictFormPoint,\r\n                {\r\n                    // save sub-district code\r\n                    geometry: evt.geometry,\r\n                    callbackFn: this.callbackGetDistrictAndSubDistrict,\r\n                }\r\n            );\r\n            await mapAction.bindMapCommand(\r\n                MapFunctions.getPolygonMarkPointSTR,\r\n                {\r\n                    geometry: evt.geometry,\r\n                    callbackFn: this.callbackGetPolygonMarkPointSTR,\r\n                }\r\n            );\r\n        }\r\n    };\r\n\r\n    callbackGetPolygonMarkPointSTR = async (result, geometry) => {\r\n        this.setState({\r\n            objectPolygon: result,\r\n        });\r\n    };\r\n\r\n    managePanelForMobile = async (isDraw, func) => {\r\n        const { menuAction, width } = this.props;\r\n        if (width === \"sm\" || width === \"xs\") {\r\n            switch (func) {\r\n                case \"ClickMap\":\r\n                    if (isDraw) {\r\n                        await menuAction.closeMenuPanel();\r\n                        await menuAction.openMenuMap();\r\n                    } else {\r\n                        await menuAction.openMenuPanel();\r\n                        await menuAction.closeMenuMap();\r\n                    }\r\n                    break;\r\n                default:\r\n                    break;\r\n            }\r\n        }\r\n    };\r\n\r\n    manageCurrentLocation = () => {\r\n        const { mapAction } = this.props;\r\n\r\n        mapAction.bindMapCommand(\r\n            MapFunctions.currentLocationConstructionLicense,\r\n            {\r\n                callback: this.callBackDrawGraphic,\r\n            }\r\n        );\r\n    };\r\n\r\n    handleMenuItemClick = (itm) => async (evt) => {\r\n        const { menuRdc, menuAction, mapAction } = this.props;\r\n\r\n        this.manageModeDisplay(itm.id);\r\n        if (menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM) {\r\n            await menuAction.activeFunction(null);\r\n            await mapAction.bindMapCommand(\r\n                MapFunctions.clearGraphicConstructionLicense\r\n            );\r\n        }\r\n\r\n        switch (itm.id) {\r\n            case MENU_HOUSENUMBER.clickMap.id:\r\n                const isActive =\r\n                    menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM;\r\n                this.manageClickMap(!isActive);\r\n                // this.manageClickMap(!itm.isActive)\r\n                break;\r\n            case MENU_HOUSENUMBER.currentLocation.id:\r\n                this.manageCurrentLocation();\r\n                break;\r\n            default:\r\n                break;\r\n        }\r\n    };\r\n\r\n    handleClickDrawGraphic = async () => {\r\n        this.managePanelForMobile(true);\r\n        this.manageClickMap(true);\r\n    };\r\n\r\n    handleClickEditGraphic = async () => {\r\n        const { graphic } = this.state;\r\n        const { mapAction, showAlert, menuAction, menuRdc } = this.props;\r\n        if (graphic) {\r\n            if (menuRdc.ActiveFunction === ACTIVE_FUNCTION.EDIT_GP_FORM) {\r\n                menuAction.activeFunction(null);\r\n                mapAction.bindMapCommand(MapFunctions.clearEditConstruct);\r\n            } else {\r\n                menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM &&\r\n                    mapAction.bindMapCommand(MapFunctions.deActivateConstruct);\r\n                menuAction.activeFunction(ACTIVE_FUNCTION.EDIT_GP_FORM);\r\n                this.managePanelForMobile(true);\r\n                mapAction.bindMapCommand(\r\n                    MapFunctions.editGraphicConstructionLicense,\r\n                    {\r\n                        graphic,\r\n                        callback: this.callbackEditGrphic,\r\n                        showAlert,\r\n                        callbackEditFail: this.editOutOfBKK,\r\n                    }\r\n                );\r\n            }\r\n        } else {\r\n            showAlert({ altMsg: ALERT_MESSAGE.POPUP.REQUEST_PIN_MAP });\r\n        }\r\n    };\r\n\r\n    callbackEditGrphic = async (geometry, graphicValue) => {\r\n        const { mapAction, menuAction } = this.props;\r\n        const { graphic } = this.state;\r\n        await mapAction.bindMapCommand(MapFunctions.clearGraphicMarkPointSTR, {\r\n            graphic,\r\n        });\r\n        this.setState({ graphic: graphicValue });\r\n        geometry &&\r\n            mapAction.bindMapCommand(\r\n                MapFunctions.getDistrictAndSubDistrictFormPoint,\r\n                {\r\n                    // save sub-district code\r\n                    geometry: geometry,\r\n                    callbackFn: this.callbackGetDistrictAndSubDistrict,\r\n                }\r\n            );\r\n        geometry &&\r\n            mapAction.bindMapCommand(MapFunctions.getPolygonMarkPointSTR, {\r\n                geometry: geometry,\r\n                callbackFn: this.callbackGetPolygonMarkPointSTR,\r\n            });\r\n        \r\n        menuAction.activeFunction(null);\r\n        mapAction.bindMapCommand(MapFunctions.clearEditConstruct);\r\n    };\r\n\r\n    callbackGetDistrictAndSubDistrict = (value, geometry) => {\r\n        this.setState({\r\n            districtID: value.DISTRICT_ID,\r\n            provinceID: value.PROVINCE_ID,\r\n            subDistrictID: value.SUBDISTRICT_ID,\r\n        });\r\n    };\r\n\r\n    formatStringPermitNo = (value) => {\r\n        // const pattern = /[.\\/]/;\r\n        // if(pattern.test(value)) {\r\n        //   return value\r\n        // }\r\n\r\n        // const result = value\r\n        //   .split('-')\r\n        //   .filter((part) => /^\\d+$/.test(part))\r\n        //   .join('');\r\n        // const format1 = result.slice(0, 4);\r\n        // const format2 = result.slice(4, 8);\r\n        // const format3 = result.slice(8, 10);\r\n        // const format4 = result.slice(10);\r\n        // return `${format1}-${format2}-${format3}-${format4}`;\r\n        return value;\r\n    };\r\n\r\n    onBlurPermitNo = async (value) => {\r\n        const { showLoading, hideLoading, showAlert, change } = this.props;\r\n        if (value) {\r\n            const param = {\r\n                permitNo: this.formatStringPermitNo(value),\r\n            };\r\n            showLoading();\r\n            const res = await fetchPost_(\r\n                `${process.env.REACT_APP_STR_SEARCH_PERMIT}`,\r\n                param\r\n            );\r\n            if (!res.ok) {\r\n                throw res.status;\r\n            } else {\r\n                hideLoading();\r\n                const data = await res.json();\r\n                if (data.summary.all > 1) {\r\n                    showAlert({\r\n                        altMsg:\r\n                            \"ไม่สามารถนำข้อมูลมาแสดงได้เนื่องจากมีข้อมูลมากกว่า 1\",\r\n                    });\r\n                } else {\r\n                    if (data.data.length) {\r\n                        const initialValue = {\r\n                            houseNo: data.data[0].houseNum,\r\n                            houseCode: data.data[0].HID,\r\n                            remark: data.data[0].remark,\r\n                        };\r\n                        change(\"houseNo\", initialValue.houseNo);\r\n                        change(\"houseCode\", initialValue.houseCode);\r\n                        change(\"remark\", initialValue.remark);\r\n                    }\r\n                }\r\n            }\r\n        }\r\n    };\r\n\r\n    onSubmit = async (value) => {\r\n        const params = {\r\n            permitNo: value.permitNo,\r\n            houseNo: value.houseNo,\r\n            HID: value.houseCode,\r\n        };\r\n        const duplicateResult = await fetchPost_(process.env.REACT_APP_STR_CHECK_DUPLICATE,params);\r\n        if (duplicateResult.ok) {\r\n            const jsonResult = await duplicateResult.json();\r\n            const messageResult = jsonResult.message;\r\n\r\n            if (messageResult === \"DUPLICATE\") {\r\n                const { showAlert } = this.props;\r\n                showAlert({\r\n                    altMsg:\r\n                        \"ไม่สามารถบันทึกได้ ข้อมูลเลขที่ใบอนุญาตและเลขที่บ้านซ้ำกับที่พบในระบบ กรุณาตรวจสอบอีกครั้ง\",\r\n                });\r\n            } else {\r\n                const {\r\n                    geometry,\r\n                    districtID,\r\n                    provinceID,\r\n                    subDistrictID,\r\n                    objectPolygon,\r\n                } = this.state;\r\n                const { mapAction, showAlert } = this.props;\r\n\r\n                this.validateForm(value);\r\n\r\n                const latlong = await MapUtils.convertLatLong(\r\n                    geometry.geometry.x,\r\n                    geometry.geometry.y\r\n                );\r\n\r\n                if (!isEmptyObj(objectPolygon)) {\r\n                    if (\r\n                        objectPolygon.BL_HID === null &&\r\n                        objectPolygon.BL_HOUSENUM === null\r\n                    ) {\r\n                        await this.onClickInsertData(value, \"replace\");\r\n                    } else {\r\n                        showAlert({\r\n                            altMsg:\r\n                                \"ต้องการจะเขียนทับทั้งหมดหรือเพิ่มข้อมูลต่อไป\",\r\n                            altType: 3,\r\n                            callbackConfirm: () =>\r\n                                this.onClickInsertData(value, \"insert\"),\r\n                            callbackClose: () =>\r\n                                this.onClickInsertData(value, \"replace\"),\r\n                        });\r\n                    }\r\n                } else {\r\n                    await mapAction.bindMapCommand(\r\n                        MapFunctions.applyEditMarkPointSTRSingle,\r\n                        {\r\n                            ...value,\r\n                            ...geometry,\r\n                            districtID,\r\n                            provinceID,\r\n                            subDistrictID,\r\n                            createDate: new Date().getTime(),\r\n                            updateDate: new Date().getTime(),\r\n                            mode: \"single\",\r\n                            BL_ID: objectPolygon ? objectPolygon.BL_ID : null,\r\n                            latitude: latlong[1],\r\n                            longitude: latlong[0],\r\n                            callback: this.onApplyEditSuccess,\r\n                        }\r\n                    );\r\n                    await mapAction.bindMapCommand(\r\n                        MapFunctions.setTOCVisibleLayer,\r\n                        { layerID: \"ตำแหน่งออกเลขที่บ้าน\", isVisible: false }\r\n                    );\r\n\r\n                    const param = {\r\n                        ID: value.ID ? value.ID : null,\r\n                        permitNo: value.permitNo,\r\n                        houseNum: value.houseNo,\r\n                        HID: value.houseCode,\r\n                        district: districtID,\r\n                        subDistrict: subDistrictID,\r\n                        province: provinceID,\r\n                        latitudeUsed: latlong[1],\r\n                        longitudeUsed: latlong[0],\r\n                        plgObjectID: objectPolygon\r\n                            ? objectPolygon.OBJECTID\r\n                            : null,\r\n                    };\r\n                    await this.onSaveToDataBase(param);\r\n                }\r\n            }\r\n        }\r\n    };\r\n\r\n    onClickInsertData = async (value, key) => {\r\n        const {\r\n            geometry,\r\n            districtID,\r\n            provinceID,\r\n            subDistrictID,\r\n            objectPolygon,\r\n        } = this.state;\r\n        const { mapAction } = this.props;\r\n        const latlong = await MapUtils.convertLatLong(\r\n            geometry.geometry.x,\r\n            geometry.geometry.y\r\n        );\r\n        const stringHouseCode = value.houseCode\r\n            ? `${value.houseCode.split(\"-\").join(\"\")}`\r\n            : \",\";\r\n\r\n        const param = {\r\n            ...objectPolygon,\r\n            BL_REMARK:\r\n                key === \"insert\"\r\n                    ? value.remark\r\n                        ? `${objectPolygon.BL_REMARK},${value.remark}`\r\n                        : objectPolygon.BL_REMARK\r\n                    : value.remark,\r\n            BL_HOUSENUM:\r\n                key === \"insert\"\r\n                    ? `${objectPolygon.BL_HOUSENUM},${value.houseNo}`\r\n                    : value.houseNo,\r\n            BL_HID:\r\n                key === \"insert\"\r\n                    ? `${objectPolygon.BL_HID},${stringHouseCode}`\r\n                    : `${stringHouseCode}`,\r\n        };\r\n        await mapAction.bindMapCommand(\r\n            MapFunctions.applyEditMarkPointSTRPolygon,\r\n            {\r\n                param: param,\r\n            }\r\n        );\r\n        await mapAction.bindMapCommand(\r\n            MapFunctions.applyEditMarkPointSTRSingle,\r\n            {\r\n                ...value,\r\n                districtID,\r\n                provinceID,\r\n                subDistrictID,\r\n                ...geometry,\r\n                createDate: new Date().getTime(),\r\n                updateDate: new Date().getTime(),\r\n                permitNo: value.permitNo,\r\n                mode: \"single\",\r\n                BL_ID: objectPolygon ? objectPolygon.BL_ID : null,\r\n                latitude: latlong[1],\r\n                longitude: latlong[0],\r\n                callback: this.onApplyEditSuccess,\r\n            }\r\n        );\r\n        await mapAction.bindMapCommand(MapFunctions.setTOCVisibleLayer, {\r\n            layerID: \"ตำแหน่งออกเลขที่บ้าน\",\r\n            isVisible: false,\r\n        });\r\n        await mapAction.bindMapCommand(MapFunctions.clearEvtDrawMapSTR);\r\n        const paramToSaveDB = {\r\n            ID: value.ID ? value.ID : null,\r\n            permitNo: value.permitNo,\r\n            houseNum: value.houseNo,\r\n            HID: value.houseCode,\r\n            district: districtID,\r\n            subDistrict: subDistrictID,\r\n            province: provinceID,\r\n            latitudeUsed: latlong[1],\r\n            longitudeUsed: latlong[0],\r\n            plgObjectID: objectPolygon ? objectPolygon.OBJECTID : null,\r\n        };\r\n\r\n        await this.onSaveToDataBase(paramToSaveDB);\r\n    };\r\n\r\n    onSaveToDataBase = async (value) => {\r\n        const res = await fetchPost_(\r\n            process.env.REACT_APP_STR_INSERT_UPDATE_DATA,\r\n            value\r\n        );\r\n        if (!res.ok) {\r\n            throw res.status;\r\n        }\r\n    };\r\n\r\n    onApplyEditSuccess = async (res) => {\r\n        const { reset, mapAction, showAlert } = this.props;\r\n        const { graphic } = this.state;\r\n        showAlert({ altMsg: \"บันทึกข้อมูลสำเร็จ\" });\r\n        reset();\r\n        await mapAction.bindMapCommand(MapFunctions.setTOCVisibleLayer, {\r\n            layerID: \"ตำแหน่งออกเลขที่บ้าน\",\r\n        });\r\n        await mapAction.bindMapCommand(MapFunctions.clearGraphicMarkPointSTR, {\r\n            graphic,\r\n        });\r\n    };\r\n\r\n    validateForm = (value) => {\r\n        const errors = {};\r\n\r\n        if (!value.houseNo) {\r\n            errors.houseNo = \"กรุณากรอกเลขที่บ้าน\";\r\n        }\r\n        // if (!value.houseCode) {\r\n        //   errors.houseCode = 'กรุณากรอกรหัสประจำบ้าน';\r\n        // }\r\n        if (!isEmptyObj(errors)) {\r\n            throw new SubmissionError(errors);\r\n        }\r\n    };\r\n\r\n    onClickCancel = () => {\r\n        const { reset } = this.props;\r\n        reset();\r\n    };\r\n\r\n    renderChildren = () => {\r\n        const { isOpenForm, listMenu } = this.state;\r\n        const { menuRdc, handleSubmit } = this.props;\r\n\r\n        if (isOpenForm) {\r\n            return (\r\n                <MarkPointSTRSingleForm\r\n                    onDraw={this.handleClickDrawGraphic}\r\n                    onEdit={this.handleClickEditGraphic}\r\n                    isActiveDraw={\r\n                        menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM\r\n                    }\r\n                    isActiveEdit={\r\n                        menuRdc.ActiveFunction === ACTIVE_FUNCTION.EDIT_GP_FORM\r\n                    }\r\n                    handleSubmit={handleSubmit}\r\n                    onSubmit={this.onSubmit}\r\n                    onClickCancel={this.onClickCancel}\r\n                    onBlurPermitNo={this.onBlurPermitNo}\r\n                />\r\n            );\r\n        } else {\r\n            return (\r\n                <MenuListModeView\r\n                    listMode={listMenu}\r\n                    onMenuItemClick={this.handleMenuItemClick}\r\n                    callBackDrawGraphic={this.callBackDrawGraphic}\r\n                    isActiveDraw={\r\n                        menuRdc.ActiveFunction === ACTIVE_FUNCTION.ADD_GP_FORM\r\n                    }\r\n                />\r\n            );\r\n        }\r\n    };\r\n\r\n    render() {\r\n        const { title, onClickBack } = this.props;\r\n        return (\r\n            <Fragment>\r\n                <MarkPointSTRSingleView title={title} onClickBack={onClickBack}>\r\n                    {this.renderChildren()}\r\n                </MarkPointSTRSingleView>\r\n                <AlertMessageSuper {...this.props} />\r\n            </Fragment>\r\n        );\r\n    }\r\n}\r\n\r\nconst reduxFormParameter = {\r\n    form: \"markPointSTRSingle\",\r\n};\r\n\r\nconst mapStateToProps = (state) => ({\r\n    dirtyOne: isDirty(\"StepOne\")(state),\r\n    menuRdc: state.menu,\r\n});\r\n\r\nconst mapDispatchToProp = (dispatch) => ({\r\n    mapAction: bindActionCreators(MapAction, dispatch),\r\n    panelContentAction: bindActionCreators(PanelContentAction, dispatch),\r\n    houseNumberAction: bindActionCreators(HouseNumberAction, dispatch),\r\n    menuAction: bindActionCreators(MenuAction, dispatch),\r\n});\r\n\r\nexport default compose(\r\n    connect(\r\n        mapStateToProps,\r\n        mapDispatchToProp\r\n    ),\r\n    reduxForm(reduxFormParameter),\r\n    WithLoading,\r\n    WithAlertMessage\r\n)(MarkPointSTRSingle);\r\n","import React from 'react';\r\nimport { withStyles } from '@material-ui/core';\r\nimport { Fragment } from 'react';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { Field } from 'redux-form';\r\nimport ReduxFormDatePickerThai from '../../../../../../Controls/Containers/Picker/ReduxFormDatePickerThai';\r\nimport Button from '../../../../../../Controls/Containers/Button';\r\nimport { BTN } from '../../../../../../Constants/Constants';\r\nimport AppBarHeaderView from '../../../../../../Presentationals/Web/Panel/AppBarHeaderView';\r\nimport SelectFieldRedux from '../../../../../../Controls/Containers/SelectFieldRedux';\r\n\r\nconst ExportSTRView = ({ classes, title, onClickBack, handleSubmit, onSubmit, lutDistrict, onClickExport, lutMonth, lutYear }) => {\r\n  return (\r\n    <Fragment>\r\n      <Grid container className={classes.root}>\r\n        <AppBarHeaderView title={title} onClickBack={onClickBack} />\r\n        <Grid item xs={12} className={`${classes.body} ${classes.rootForm}`}>\r\n          <form onSubmit={handleSubmit(onSubmit)}>\r\n            <Field name='districtID' label={'เขต'} component={SelectFieldRedux} data={lutDistrict} keyData={{ value: 'value', label: 'name' }} />\r\n            <Field name='month' label={'เดือน'} component={SelectFieldRedux} data={lutMonth} keyData={{ value: 'value', label: 'name' }} required />\r\n            <Field name='year' label={'ปี'} component={SelectFieldRedux} data={lutYear} keyData={{ value: 'value', label: 'name' }} required />\r\n            <div className={classes.btnGroup}>\r\n              <Button variant='contained' label={BTN.TH.CANCEL} />\r\n              <Button type='submit' label={BTN.TH.EXPORT_EXCEL} onClick={() => onClickExport('EXCEL')} />\r\n              <Button type='submit' label={BTN.TH.EXPORT_PDF} onClick={() => onClickExport('PDF')} />\r\n            </div>\r\n          </form>\r\n        </Grid>\r\n      </Grid>\r\n    </Fragment>\r\n  );\r\n};\r\n\r\nexport default withStyles((theme) => ({\r\n  root: {\r\n    // height: '100%',\r\n  },\r\n  rootForm: {\r\n    padding: '15px',\r\n    display: 'flex',\r\n    flexDirection: 'column',\r\n    gap: '10px',\r\n  },\r\n  body: {\r\n    height: 'calc(100% - 45px)',\r\n  },\r\n  btnGroup: {\r\n    display: 'flex',\r\n    justifyContent: 'center',\r\n    gap: '10px',\r\n  },\r\n  stepLine: {\r\n    border: '1px solid rgba(0, 0, 0, 0.38)',\r\n  },\r\n}))(ExportSTRView);\r\n","import Excel from 'exceljs/dist/es5/exceljs.browser';\r\nimport * as DateTimeUtil from '../../../../../../../Utilities/DateTimeUtil';\r\n\r\nconst ExportSTRReportExcel = (datasource = [], filterResult) => {\r\n  const startRowHeader = 6; //เป็น 9 ใน excel มีชื่อเรืองใช้่ row 1,2 ไปแล้ว\r\n  const workbook = new Excel.Workbook();\r\n  const worksheet = workbook.addWorksheet('sheet', {\r\n    //จำเป็นต้องตั้งค่าส่วนนี้\r\n    pageSetup: {\r\n      paperSize: 9, //follow documentation the 9 value is A4\r\n      orientation: 'portrait',\r\n    },\r\n  });\r\n  workbook.creator = 'PMR-WEB';\r\n  workbook.lastModifiedBy = 'PMR-WEB';\r\n\r\n  const setCellBorder = (colKey) => {\r\n    worksheet.getCell(colKey).border = {\r\n      top: { style: 'thin' },\r\n      left: { style: 'thin' },\r\n      bottom: { style: 'thin' },\r\n      right: { style: 'thin' },\r\n    };\r\n  };\r\n\r\n  const setContentBorder = (colKey) => {\r\n    worksheet.getCell(colKey).border = {\r\n      left: { style: 'thin' },\r\n      right: { style: 'thin' },\r\n    };\r\n  };\r\n\r\n  const setLastContentBorder = (colKey) => {\r\n    worksheet.getCell(colKey).border = {\r\n      left: { style: 'thin' },\r\n      bottom: { style: 'thin' },\r\n      right: { style: 'thin' },\r\n    };\r\n  };\r\n\r\n  const setContentColor = (colKey) => {\r\n    worksheet.getCell(colKey).fill = {\r\n      type: 'pattern',\r\n      pattern: 'solid',\r\n      fgColor: {\r\n        argb: '00D0EFDA',\r\n      },\r\n    };\r\n  };\r\n\r\n  const loadTopic = () => {\r\n    const today = DateTimeUtil.convertDateTimeToDisplayDate(new Date(), 'd MMM yyyy');\r\n    worksheet.mergeCells('A1:I1');\r\n    worksheet.getCell('A1').value = `สรุปข้อมูลและสถานะ ณ วันที่ ${today}`;\r\n    worksheet.getCell('A1').alignment = { horizontal: 'center' };\r\n\r\n    // worksheet.mergeCells('A2:B2');\r\n    worksheet.getCell('A2').value = `เงื่อนไขการค้นหา`;\r\n    // worksheet.getCell('A2').alignment = { horizontal: 'center' };\r\n    // worksheet.mergeCells('A3:B3');\r\n    worksheet.getCell('B2').value = `เขต: ${filterResult.DistrictName}`;\r\n    worksheet.getCell('B3').value = `เดือน: ${filterResult.MonthName}`;\r\n    worksheet.getCell('B4').value = `ปี: ${filterResult.YearName}`;\r\n    // worksheet.getCell('B3').alignment = { horizontal: 'center' };\r\n\r\n    // worksheet.mergeCells('A4:B4');\r\n    // worksheet.getCell('B4').alignment = { horizontal: 'center' };\r\n\r\n    // worksheet.mergeCells('A5:H5');\r\n    // worksheet.getCell('A5').value = `ผลลัพธ์การค้นหารวม: ${summary.all} พบค่าพิกัด: ${summary.countCoordinate} ไม่พบพิกัด: ${\r\n    //   summary.countNoCoordinate\r\n    // }`;\r\n    // worksheet.getCell('A5').alignment = { horizontal: 'center' };\r\n    // worksheet.getCell('A5').value = 'จำนวนรายการทั้งหมด';\r\n    // worksheet.getCell('B5').value = summary.all;\r\n\r\n    // worksheet.getCell('A6').value = 'จำนวนรายการที่มีค่าพิกัด';\r\n    // worksheet.getCell('B6').value = summary.countCoordinate;\r\n\r\n    // worksheet.getCell('A7').value = 'จำนวนรายการที่ไม่มีค่าพิกัด';\r\n    // worksheet.getCell('B7').value = summary.countNoCoordinate;\r\n  };\r\n\r\n  const loadHeader = () => {\r\n    //ใน Excel จะอยู่แถวแรก A1,B1,C1,D1,E1,F1,G1,H1,I1\r\n    const arrHeader = [\r\n      {\r\n        name: 'หน่วยงาน',\r\n        key: 'organizationName',\r\n        width: 30,\r\n      },\r\n      {\r\n        name: 'ข้อมูลการให้อนุญาตก่อสร้างอาคารจากระบบ BMA OSS',\r\n        key: 'importOSSAll',\r\n        width: 30,\r\n      },\r\n      {\r\n        name: 'ข้อมูลครบถ้วน',\r\n        key: 'importOSSCompletely',\r\n        width: 20,\r\n      },\r\n      {\r\n        name: 'ข้อมูลไม่ครบถ้วน',\r\n        key: 'importOSSInCompletely',\r\n        width: 20,\r\n      },\r\n      {\r\n        name: 'จำนวนรายการบ้านในระบบทะเบียนราษฎร์',\r\n        key: 'importSTRAll',\r\n        width: 20,\r\n      },\r\n      {\r\n        name: 'จำนวนข้อมูลการออกเลขที่บ้านและ เลขรหัสประจำบ้าน ที่บันทึกในระบบของ สวพ.',\r\n        key: 'dataSTRPoint',\r\n        width: 30,\r\n      },\r\n      {\r\n        name: 'จำนวนข้อมูลการออกเลขที่บ้านและ เลขรหัสประจำบ้าน ที่ยังไม่ได้บันทึกในระบบของ สวพ.',\r\n        key: 'dataSTRNoPoint',\r\n        width: 30,\r\n      },\r\n      {\r\n        name: 'จำนวนข้อมูลเลขที่บ้านและเลขรหัสประจำบ้าน ที่บันทึกในระบบของสวพ.',\r\n        key: 'dataSTRPoint',\r\n        width: 30,\r\n      },\r\n      {\r\n        name: 'จำนวนอาคารในแผนที่ที่มีเลขที่บ้านและรหัสประจำบ้าน',\r\n        key: 'dataOSSPolygon',\r\n        width: 30,\r\n      },\r\n    ];\r\n    worksheet.columns = arrHeader.map((itm) => ({ key: itm.key, width: itm.width }));\r\n    worksheet.getRow(startRowHeader).values = arrHeader.map((itm) => itm.name);\r\n    //กำหนด style ให้ cell Header\r\n    [\r\n      `A${startRowHeader}`,\r\n      `B${startRowHeader}`,\r\n      `C${startRowHeader}`,\r\n      `D${startRowHeader}`,\r\n      `E${startRowHeader}`,\r\n      `F${startRowHeader}`,\r\n      `G${startRowHeader}`,\r\n      `H${startRowHeader}`,\r\n      `I${startRowHeader}`,\r\n    ].forEach((colKey) => {\r\n      setCellBorder(colKey);\r\n      worksheet.getCell(colKey).alignment = { vertical: 'middle', horizontal: 'center', wrapText: true };\r\n      worksheet.getCell(colKey).fill = {\r\n        type: 'pattern',\r\n        pattern: 'solid',\r\n        fgColor: {\r\n          argb: '005E9A50',\r\n        },\r\n      };\r\n    });\r\n    //กำหนด format\r\n\r\n    // worksheet.getColumn('D').numFmt = '#,##0.00';\r\n    // worksheet.getColumn('E').numFmt = '#,##0.00';\r\n    // worksheet.getColumn('F').numFmt = '#,##0.00';\r\n    // worksheet.getColumn('G').numFmt = '#,##0.00';\r\n    // worksheet.getColumn('H').numFmt = '#,##0.00';\r\n  };\r\n  // const makeSubHeader = (colKey, mergeRang, name) => {//colKey ยกตัวอย่างเช่น 'A1' 'B1' เป็นต้น | mergeRang ต้องกำหนดแบบ 'A1:F1'\r\n  //     worksheet.mergeCells(mergeRang);\r\n  //     worksheet.getCell(colKey).value = name;\r\n  //     worksheet.getCell(colKey).alignment = { horizontal:'center'};\r\n  //     setCellBorder(colKey);\r\n  //     worksheet.getCell(colKey).fill = {\r\n  //         type: 'pattern',\r\n  //         pattern:'solid',\r\n  //         fgColor:{\r\n  //             argb:'00DAEEF3'\r\n  //         }\r\n  //     }\r\n  // }\r\n\r\n  const setCellFontColor = (colKey, argb, isBold) => {\r\n    worksheet.getCell(colKey).font = {\r\n      bold: isBold,\r\n      color: { argb: argb },\r\n    };\r\n  };\r\n\r\n  const makeRowITM = (rowNumber, rowITM, isSummaryRow = false) => {\r\n    worksheet.addRow({\r\n      organizationName: rowITM.organizationName,\r\n      importOSSAll: rowITM.importOSSAll,\r\n      importOSSCompletely: rowITM.importOSSCompletely,\r\n      importOSSInCompletely: rowITM.importOSSInCompletely,\r\n      importSTRAll: rowITM.importSTRAll,\r\n      dataSTRPoint: rowITM.dataSTRPoint,\r\n      dataSTRNoPoint: rowITM.dataSTRNoPoint,\r\n      dataSTRPoint: rowITM.dataSTRPoint,\r\n      dataOSSPolygon: rowITM.dataOSSPolygon,\r\n    });\r\n\r\n    const arrColKey = [\r\n      `A${rowNumber}`,\r\n      `B${rowNumber}`,\r\n      `C${rowNumber}`,\r\n      `D${rowNumber}`,\r\n      `E${rowNumber}`,\r\n      `F${rowNumber}`,\r\n      `G${rowNumber}`,\r\n      `H${rowNumber}`,\r\n      `I${rowNumber}`,\r\n    ];\r\n\r\n    arrColKey.forEach((colKey) => {\r\n      // setCellBorder(colKey);\r\n      setContentBorder(colKey);\r\n      if (rowITM.isOddRow) {\r\n        setContentColor(colKey);\r\n      }\r\n      if (isSummaryRow) {\r\n        //\r\n        setCellFontColor(colKey, '00FF0000', true);\r\n      }\r\n      if (rowITM.lastRow) {\r\n        setLastContentBorder(colKey);\r\n      }\r\n    });\r\n  };\r\n\r\n  const makeRowContent = () => {\r\n    try {\r\n      let rowSubHeaderNumber = startRowHeader; //สำหรับรันเลขตำแหน่งเริ่มต้นของ group\r\n      let rowNO = 1;\r\n      let rowNumber = rowSubHeaderNumber + 1;\r\n      datasource.forEach((rowITM) => {\r\n        makeRowITM(rowNumber, {\r\n          no: rowNO++,\r\n          ...rowITM,\r\n        });\r\n        rowNumber++;\r\n      });\r\n    } catch (err) {\r\n      console.log('Error Generate Row Excel file DistrictReportExcel.js: ', err);\r\n      throw new Error(err);\r\n    }\r\n  };\r\n\r\n  const processColumns = () => {\r\n    loadTopic();\r\n    loadHeader();\r\n    makeRowContent();\r\n  };\r\n\r\n  //Main Program\r\n  processColumns();\r\n  workbook.xlsx.writeBuffer().then(function(xls64data) {\r\n    const blob = new Blob([xls64data], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });\r\n    const url = window.URL.createObjectURL(blob);\r\n    const anchor = document.createElement('a');\r\n    document.body.appendChild(anchor); //for firefox ref: https://stackoverflow.com/questions/41805095/excel-export-not-working-on-firefox-but-working-fine-in-google-crome/41806544\r\n    anchor.href = url;\r\n    anchor.download = 'Export_ข้อมูล_STR.xlsx';\r\n    var isIE = /*@cc_on!@*/ false || !!document.documentMode;\r\n    var isEdge = !isIE && !!window.StyleMedia;\r\n    if (isEdge) {\r\n      anchor.click();\r\n      anchor.change();\r\n    } else {\r\n      anchor.click();\r\n    }\r\n    anchor.change();\r\n    anchor.click();\r\n    window.URL.revokeObjectURL(url);\r\n  });\r\n};\r\n\r\nexport default ExportSTRReportExcel;\r\n","// import {numberWithCommas} from '../../../../../../../../Utilities/Utils'\r\nimport pdfMake from 'pdfmake/build/pdfmake';\r\nimport pdfFonts from 'pdfmake/build/vfs_fonts';\r\nimport { FOOTER_REPORT } from '../../../../../../../Constants/Constants';\r\nimport * as DateTimeUtil from '../../../../../../../Utilities/DateTimeUtil';\r\n\r\npdfMake.vfs = pdfFonts.pdfMake.vfs;\r\npdfMake.fonts = {\r\n  THSarabun: {\r\n    normal: 'THSarabun.ttf',\r\n    bold: 'THSarabun-Bold.ttf',\r\n    italics: 'THSarabun-Italic.ttf',\r\n    bolditalics: 'THSarabun-BoldItalic.ttf',\r\n  },\r\n  Roboto: {\r\n    normal: 'Roboto-Regular.ttf',\r\n    bold: 'Roboto-Medium.ttf',\r\n    italics: 'Roboto-Italic.ttf',\r\n    bolditalics: 'Roboto-MediumItalic.ttf',\r\n  },\r\n};\r\n\r\nconst configPage = {\r\n  pageSize: 'A4',\r\n  pageOrientation: 'landscape', //portrait\r\n  info: {\r\n    title: 'รายงานสรุปผลการแจ้ง ผมร.1 รายเขต',\r\n    subject: 'รายงานสรุปผลการแจ้ง ผมร.1 รายเขต',\r\n    keywords: 'รายงานสรุปผลการแจ้ง ผมร.1 รายเขต',\r\n  },\r\n  pageMargins: [5, 40, 10, 40], // [left, top, right, bottom] or [horizontal, vertical]\r\n};\r\n\r\nconst fontStyle = {\r\n  fontHeading: {\r\n    fontSize: 18,\r\n  },\r\n  fontTitle: {\r\n    fontSize: 16,\r\n  },\r\n  fontSubheading: {\r\n    fontSize: 14,\r\n  },\r\n  fontBody: {\r\n    fontSize: 12,\r\n  },\r\n};\r\n\r\nconst tableStyle = {\r\n  rowNumber: {\r\n    alignment: 'right',\r\n  },\r\n  rowHeaderColor: {\r\n    fillColor: '#5E9A50',\r\n  },\r\n  rowSubHeaderColor: {\r\n    fillColor: '#DAEEF3',\r\n  },\r\n  rowFooterColor: {\r\n    fillColor: '#5E9A50',\r\n  },\r\n  rowOtherColor1: {\r\n    fillColor: '#D0EFDA',\r\n  },\r\n  rowOtherColor2: {\r\n    fillColor: '#E5F6E8',\r\n  },\r\n};\r\n\r\nconst generateTableHeader = (datasource = []) => {\r\n  // makeTableContent(datasource)\r\n  return [\r\n    {\r\n      margin: [0, 15, 0, 0], //[left, top, right, bottom]\r\n      columns: [\r\n        { width: '*', text: '' },\r\n        {\r\n          width: 'auto',\r\n          table: {\r\n            // headers are automatically repeated if the table spans over multiple pages\r\n            // you can declare how many rows should be treated as headers\r\n            headerRows: 1,\r\n            widths: [65, 90, 65, 65, 65, 90, 90, 90, 90],\r\n            body: [\r\n              [\r\n                {\r\n                  text: 'หน่วยงาน',\r\n                  style: ['fontTitle', 'alignmentCenter', 'rowHeaderColor'],\r\n                  bold: true,\r\n                },\r\n                {\r\n                  text: 'ข้อมูลการให้อนุญาต ก่อสร้างอาคารจาก ระบบ BMA OSS',\r\n                  style: ['fontTitle', 'alignmentCenter', 'rowHeaderColor'],\r\n                  bold: true,\r\n                },\r\n                {\r\n                  text: `ข้อมูลครบ ถ้วน`,\r\n                  style: ['fontTitle', 'alignmentCenter', 'rowHeaderColor'],\r\n                  bold: true,\r\n                },\r\n                {\r\n                  text: `ข้อมูลไม่ครบ ถ้วน`,\r\n                  style: ['fontTitle', 'alignmentCenter', 'rowHeaderColor'],\r\n                  bold: true,\r\n                },\r\n                {\r\n                  text: `จำนวนราย การบ้านใน ระบบทะเบียน ราษฎร์`,\r\n                  style: ['fontTitle', 'alignmentCenter', 'rowHeaderColor'],\r\n                  bold: true,\r\n                },\r\n                {\r\n                  text: 'จำนวนข้อมูลการ ออกเลขที่บ้านและ เลขรหัสประจำบ้าน ที่บันทึกใน ระบบของ สวพ.',\r\n                  style: ['fontTitle', 'alignmentCenter', 'rowHeaderColor'],\r\n                  bold: true,\r\n                },\r\n                {\r\n                  text: 'จำนวนข้อมูลการ ออกเลขที่บ้านและ เลขรหัสประจำบ้าน ที่ยังไม่ได้บันทึกใน ระบบของ สวพ.',\r\n                  style: ['fontTitle', 'alignmentCenter', 'rowHeaderColor'],\r\n                  bold: true,\r\n                },\r\n                {\r\n                  text: 'จำนวนข้อมูลเลข ที่บ้านและเลขรหัส ประจำบ้านที่บันทึก ในระบบของสวพ.',\r\n                  style: ['fontTitle', 'alignmentCenter', 'rowHeaderColor'],\r\n                  bold: true,\r\n                },\r\n                {\r\n                  text: 'จำนวนอาคารใน แผนที่ที่มีเลขที่บ้าน และรหัสประจำบ้าน',\r\n                  style: ['fontTitle', 'alignmentCenter', 'rowHeaderColor'],\r\n                  bold: true,\r\n                },\r\n              ],\r\n\r\n              ...makeTableContent(datasource),\r\n            ],\r\n          },\r\n        },\r\n        { width: '*', text: '' },\r\n      ],\r\n    },\r\n  ];\r\n};\r\n\r\n// const makeRowSubheader = (txt) => {\r\n//     return [\r\n//         {\r\n//             text: txt,\r\n//             colSpan: 8,\r\n//             style: ['fontTitle', 'rowSubHeaderColor', 'alignmentCenter']\r\n//         }\r\n//     ]\r\n// }\r\n\r\nconst makeRowITM = (rowITM) => {\r\n  // const FIXED_NUMBER = 2; //กำหนดจำนวนทศนิยม\r\n\r\n  return [\r\n    {\r\n      text: rowITM.organizationName, //สำนักงานเขต\r\n      style: ['fontTitle', 'alignmentRight'],\r\n    },\r\n    {\r\n      text: rowITM.importOSSAll, //ข้อมูลการให้อนุญาตก่อสร้างอาคารจากระบบ BMA OSS\r\n      style: ['fontTitle', 'alignmentRight'],\r\n    },\r\n    {\r\n      text: rowITM.importOSSCompletely, //ข้อมูลครบถ้วน\r\n      style: ['fontTitle', 'alignmentRight'],\r\n    },\r\n    {\r\n      text: rowITM.importOSSInCompletely, //ข้อมูลไม่ครบถ้วน\r\n      style: ['fontTitle', 'alignmentRight'],\r\n    },\r\n    {\r\n      text: rowITM.importSTRAll, //จำนวนรายการบ้านในระบบทะเบียนราษฎร์\r\n      style: ['fontTitle', 'alignmentRight'],\r\n    },\r\n    {\r\n      text: rowITM.dataSTRPoint, //จำนวนข้อมูลการออกเลขที่บ้านและ เลขรหัสประจำบ้าน ที่บันทึกในระบบของ สวพ.\r\n      style: ['fontTitle', 'alignmentRight'],\r\n    },\r\n    {\r\n      text: rowITM.dataSTRNoPoint, //จำนวนข้อมูลการออกเลขที่บ้านและ เลขรหัสประจำบ้าน ที่ยังไม่ได้บันทึกในระบบของ สวพ.\r\n      style: ['fontTitle', 'alignmentRight'],\r\n    },\r\n    {\r\n      text: rowITM.dataSTRPoint, //จำนวนข้อมูลเลขที่บ้านและเลขรหัสประจำบ้าน ที่บันทึกในระบบของสวพ.\r\n      style: ['fontTitle', 'alignmentRight'],\r\n    },\r\n    {\r\n      text: rowITM.dataOSSPolygon, //จำนวนอาคารในแผนที่ที่มีเลขที่บ้านและรหัสประจำบ้าน\r\n      style: ['fontTitle', 'alignmentRight'],\r\n    },\r\n  ];\r\n};\r\n\r\nconst makeTableContent = (datasource = []) => {\r\n  // let rowNo = 1;\r\n  const listRow = [];\r\n  datasource.forEach((groupITM) => {\r\n    //content\r\n    listRow.push(\r\n      makeRowITM({\r\n        ...groupITM,\r\n      })\r\n    );\r\n  });\r\n  return listRow;\r\n};\r\n\r\nconst ExportSTRReportPDF = (datasource = [], filterResult) => {\r\n  const today = DateTimeUtil.convertDateTimeToDisplayDate(new Date(), 'd MMM yyyy');\r\n  const docDefinition = {\r\n    ...configPage,\r\n    footer: {\r\n      columns: [\r\n        {\r\n          text: FOOTER_REPORT,\r\n          alignment: 'right',\r\n          margin: [0, 0, 35, 0],\r\n          fontSize: 10,\r\n        },\r\n      ],\r\n    },\r\n    content: [\r\n      {\r\n        text: `สรุปข้อมูลและสถานะ ณ วันที่ ${today}`,\r\n        style: ['fontTitle', 'header', 'alignmentCenter'],\r\n        width: '*',\r\n        noWrap: true,\r\n      },\r\n      {\r\n        text: `เงื่อนไขการค้นหา เขต: ${filterResult.DistrictName}`,\r\n        style: ['fontTitle', 'header'],\r\n        margin: [20, 10, 0, 0], //[left, top, right, bottom]\r\n        width: '*',\r\n        noWrap: true,\r\n      },\r\n      {\r\n        text: `เดือน: ${filterResult.MonthName}`,\r\n        style: ['fontTitle', 'header'],\r\n        margin: [100, 0, 0, 0],\r\n        width: '*',\r\n      },\r\n      {\r\n        text: `ปี: ${filterResult.YearName}`,\r\n        style: ['fontTitle', 'header'],\r\n        margin: [100, 0, 0, 0],\r\n        width: '*',\r\n      },\r\n      ...generateTableHeader(datasource),\r\n    ],\r\n    styles: {\r\n      ...fontStyle,\r\n      ...tableStyle,\r\n      header: {\r\n        bold: true,\r\n      },\r\n      alignmentCenter: {\r\n        alignment: 'center',\r\n      },\r\n      alignmentRight: {\r\n        alignment: 'right',\r\n      },\r\n      alignmentLeft: {\r\n        alignment: 'left',\r\n      },\r\n    },\r\n    defaultStyle: {\r\n      font: 'THSarabun',\r\n      columnGap: 10,\r\n    },\r\n  };\r\n  // pdfMake.createPdf(docDefinition).open()\r\n  pdfMake.createPdf(docDefinition).download('Export_ข้อมูล_STR.pdf');\r\n};\r\n\r\nexport default ExportSTRReportPDF;\r\n","import React, { Component } from 'react';\r\nimport ExportSTRView from './ExportSTRView';\r\nimport { compose } from 'redux';\r\nimport { reduxForm, SubmissionError } from 'redux-form';\r\nimport { fetchGet_, fetchPost_ } from '../../../../../../Utilities/ServiceUtils';\r\nimport { isEmptyObj } from '../../../../../../Utilities/Utils';\r\nimport moment from 'moment';\r\nimport ExportSTRReportExcel from '../Report/ExportSTRReport/ExportSTRReportExcel';\r\nimport ExportSTRReportPDF from '../Report/ExportSTRReport/ExportSTRReportPDF';\r\n\r\nclass ExportSTR extends Component {\r\n  constructor() {\r\n    super();\r\n    this.state = {\r\n      minDate: null,\r\n      maxDate: new Date(),\r\n      dataMinDate: null,\r\n      dataMaxDate: new Date(),\r\n      lutDistrict: [],\r\n      lutMonth: [\r\n        { value: 1, name: 'มกราคม' },\r\n        { value: 2, name: 'กุมภาพันธ์' },\r\n        { value: 3, name: 'มีนาคม' },\r\n        { value: 4, name: 'เมษายน' },\r\n        { value: 5, name: 'พฤษภาคม' },\r\n        { value: 6, name: 'มิถุนายน' },\r\n        { value: 7, name: 'กรกฎาคม' },\r\n        { value: 8, name: 'สิงหาคม' },\r\n        { value: 9, name: 'กันยายน' },\r\n        { value: 10, name: 'ตุลาคม' },\r\n        { value: 11, name: 'พฤศจิกายน' },\r\n        { value: 12, name: 'ธันวาคม' },\r\n      ],\r\n      lutYear: [],\r\n      mode: null,\r\n    };\r\n  }\r\n\r\n  componentDidMount = () => {\r\n    this.onGetLutOrganization();\r\n    const currentYear = new Date().getFullYear() + 543;\r\n    const thaiYears = Array.from({ length: 10 }, (_, i) => ({\r\n      value: new Date().getFullYear() - i,\r\n      name: `${currentYear - i}`,\r\n    }));\r\n    this.setState({ lutYear: thaiYears });\r\n  };\r\n\r\n  onGetLutOrganization = async () => {\r\n    const PROVINCE_CODE = '10';\r\n    const res = await fetchGet_(`${process.env.REACT_APP_LU_DISTRICT}?provinceid=${PROVINCE_CODE}`);\r\n    if (!res.ok) {\r\n      throw res.status;\r\n    } else {\r\n      const data = await res.json();\r\n      this.setState({ lutDistrict: data.result });\r\n    }\r\n  };\r\n\r\n  handleBackMenu = () => {\r\n    const { onClickBack } = this.props;\r\n    onClickBack && onClickBack();\r\n  };\r\n\r\n  onSubmit = async (value) => {\r\n    const { mode, lutDistrict, lutMonth, lutYear } = this.state;\r\n    this.validateForm(value);\r\n    const param = {\r\n      DistrictID: value.districtID ? value.districtID : null,\r\n      Month: value.month ? value.month : null,\r\n      Year: value.year ? value.year : null,\r\n    };\r\n    fetchPost_(`${process.env.REACT_APP_STR_EXPORT}`, param)\r\n      .then((res) => {\r\n        if (!res.ok) {\r\n          throw res.status;\r\n        } else {\r\n          return res.json();\r\n        }\r\n      })\r\n      .then((data) => {\r\n        const formatData = {\r\n          filterResult: {\r\n            ...param,\r\n            DistrictName: param.DistrictID ? lutDistrict.find((item) => item.value === param.DistrictID).name : 'ไม่ระบุ',\r\n            MonthName: param.Month ? lutMonth.find((item) => item.value === param.Month).name : 'ไม่ระบุ',\r\n            YearName: param.Year ? lutYear.find((item) => item.value === param.Year).name : 'ไม่ระบุ',\r\n          },\r\n          data: data.data,\r\n        };\r\n        this.onExportFunction(mode, formatData);\r\n      })\r\n      .catch((error) => {\r\n        console.log('export str:: ', error);\r\n      });\r\n  };\r\n\r\n  onExportFunction(mode, data) {\r\n    if (mode === 'EXCEL') {\r\n      this.executeReport(data, ExportSTRReportExcel);\r\n    } else {\r\n      this.executeReport(data, ExportSTRReportPDF);\r\n    }\r\n  }\r\n\r\n  executeReport = (value, reportFunction) => {\r\n    reportFunction(value.data, value.filterResult);\r\n  };\r\n\r\n  onClickExport = (mode) => {\r\n    this.setState({ mode });\r\n  };\r\n\r\n  validateForm = (value) => {\r\n    const errors = {};\r\n    if (!value.month) {\r\n      errors.month = 'กรุณาเลือกเดือน';\r\n    }\r\n    if (!value.year) {\r\n      errors.year = 'กรุณาเลือกปี';\r\n    }\r\n    if (!isEmptyObj(errors)) {\r\n      throw new SubmissionError(errors);\r\n    } else {\r\n    }\r\n  };\r\n\r\n  render() {\r\n    const { title, handleSubmit } = this.props;\r\n    const { lutDistrict, lutMonth, lutYear } = this.state;\r\n    return (\r\n      <ExportSTRView\r\n        title={title}\r\n        onClickBack={this.handleBackMenu}\r\n        handleSubmit={handleSubmit}\r\n        onSubmit={this.onSubmit}\r\n        lutDistrict={lutDistrict}\r\n        onClickExport={this.onClickExport}\r\n        lutMonth={lutMonth}\r\n        lutYear={lutYear}\r\n      />\r\n    );\r\n  }\r\n}\r\n\r\nconst reduxFormParameter = {\r\n  form: 'exportSTRForm',\r\n};\r\n\r\nexport default compose(reduxForm(reduxFormParameter))(ExportSTR);\r\n","import React, { Fragment } from 'react';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport AppBarHeaderView from '../../../../../../Presentationals/Web/Panel/AppBarHeaderView';\r\nimport { withStyles } from '@material-ui/core';\r\nimport Button from '../../../../../../Controls/Containers/Button';\r\nimport ClearIcon from '@material-ui/icons/Clear';\r\nimport { BTN } from '../../../../../../Constants/Constants';\r\nimport { Field } from 'redux-form';\r\nimport CloudUpload from '@material-ui/icons/CloudUpload';\r\nimport TextField from '../../../../../../Controls/Containers/TextFieldRedux';\r\n\r\nconst CustomClearIcon = withStyles((theme) => ({\r\n  root: {\r\n    width: 15,\r\n    cursor: 'default',\r\n  },\r\n}))(ClearIcon);\r\n\r\nconst ImportSTRByOfficerView = ({\r\n  classes,\r\n  title,\r\n  children,\r\n  onClickBack,\r\n  hasValue,\r\n  fileName,\r\n  onChange,\r\n  onClearUpload,\r\n  handleSubmit,\r\n  handleSubmitForm,\r\n  onClickUpload,\r\n  inputUploadRef,\r\n  refUploadForm,\r\n}) => {\r\n  return (\r\n    <Grid container className={classes.root}>\r\n      <AppBarHeaderView\r\n        // title={page}\r\n        title={title}\r\n        onClickBack={onClickBack}\r\n      />\r\n      <Grid item xs={12} className={`${classes.body} ${classes.rootForm}`}>\r\n        <form encType='multipart/form-data' method='post' ref={refUploadForm}>\r\n          <input id='inFile' type='file' name='file' ref={inputUploadRef} onChange={onChange} hidden />\r\n        </form>\r\n        <form onSubmit={handleSubmit(handleSubmitForm)}>\r\n          <Field\r\n            name='importSTR'\r\n            label='เลือกไฟล์ CSV,Excel จากระบบทะเบียนราษฎร์'\r\n            component={TextField}\r\n            icon={<CloudUpload />}\r\n            onClick={onClickUpload}\r\n            required\r\n          />\r\n          <div className={classes.btnGroup}>\r\n            <Button variant='contained' label={BTN.TH.CANCEL} onClick={onClearUpload} />\r\n            <Button type='submit' label={BTN.TH.SAVE} />\r\n          </div>\r\n        </form>\r\n      </Grid>\r\n    </Grid>\r\n  );\r\n};\r\n\r\nexport default withStyles((theme) => ({\r\n  root: {\r\n    // height: '100%',\r\n  },\r\n  rootForm: {\r\n    padding: '15px',\r\n    display: 'flex',\r\n    flexDirection: 'column',\r\n    gap: '10px',\r\n  },\r\n  body: {\r\n    height: 'calc(100% - 45px)',\r\n  },\r\n  btnGroup: {\r\n    display: 'flex',\r\n    justifyContent: 'center',\r\n    gap: '10px',\r\n  },\r\n  stepLine: {\r\n    border: '1px solid rgba(0, 0, 0, 0.38)',\r\n  },\r\n}))(ImportSTRByOfficerView);\r\n","import React, { Component, Fragment, } from 'react';\r\nimport { compose } from 'redux';\r\nimport { connect } from 'react-redux';\r\nimport { getFormValues, reduxForm, SubmissionError } from 'redux-form';\r\n\r\nimport Loading from '../../../../../../Controls/Containers/Loading';\r\nimport AlertMessageSuper from '../../../../../../Controls/Containers/AlertMessageSuper';\r\n\r\nimport { fetchPostFile_ } from '../../../../../../Utilities/ServiceUtils';\r\nimport { isEmptyObj } from '../../../../../../Utilities/Utils';\r\n\r\nimport { ALERT_MESSAGE } from '../../../../../../Constants/Constants';\r\n\r\nimport WithAlertMessage from '../../../../../../HOC/WithAlertMessage';\r\nimport WithLoading from '../../../../../../HOC/WithLoading';\r\n\r\nimport ImportSTRByOfficerView from './ImportSTRByOfficerView';\r\n\r\nexport class ImportSTRByOfficer extends Component {\r\n  constructor() {\r\n    super();\r\n    this.state = {\r\n      fileName: '',\r\n      hasFile: false,\r\n      page: 1,\r\n      rowPerPage: 10,\r\n      dataTable: [],\r\n    };\r\n    this.inputUploadRef = React.createRef();\r\n    this.refUploadForm = React.createRef();\r\n    this.currentFile = React.createRef();\r\n    this.interval = null;\r\n  }\r\n\r\n  componentDidMount = () => {};\r\n\r\n  componentWillUnmount = () => {\r\n    if (this.interval) {\r\n      clearInterval(this.interval);\r\n    }\r\n  };\r\n\r\n  handleBackMenu = () => {\r\n    const { onClickBack } = this.props;\r\n    onClickBack && onClickBack();\r\n  };\r\n\r\n  handleSubmitForm = (e) => {\r\n    const { showLoading, hideLoading } = this.props;\r\n    this.validateForm(e);\r\n    this.onUpload(this.currentFile.current, showLoading, hideLoading);\r\n  };\r\n\r\n  validateForm = (value) => {\r\n    const errors = {};\r\n    if (!value.importSTR) {\r\n      errors.importSTR = 'กรุณา Import ไฟล์จากทะเบียนราษฎร์';\r\n    }\r\n    if (!isEmptyObj(errors)) {\r\n      throw new SubmissionError(errors);\r\n    }\r\n  };\r\n\r\n  onUpload = async (value, showLoading, hideLoading) => {\r\n    const { showAlert, change, authenRdc } = this.props;\r\n    const formData = new FormData();\r\n    formData.append('file', value);\r\n    formData.append('userID', authenRdc.profile.userID);\r\n    showLoading();\r\n    try {\r\n      const res = await fetchPostFile_(process.env.REACT_APP_STR_IMPORT_ORIGIN_FILE, formData);\r\n      if (!res.ok) {\r\n        hideLoading();\r\n        showAlert({ altMsg: 'บันทึกไฟล์ไม่สำเร็จ' });\r\n      } else {\r\n        hideLoading();\r\n        showAlert({ altMsg: 'บันทึกไฟล์สำเร็จ' });\r\n        this.currentFile.current = null;\r\n        change('importSTR', '');\r\n      }\r\n    } catch (err) {\r\n      showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR });\r\n    }\r\n  };\r\n\r\n  handleOpenUpload = () => {\r\n    if (this.inputUploadRef.current) {\r\n      this.inputUploadRef.current._values = '';\r\n      this.inputUploadRef.current.click();\r\n    }\r\n  };\r\n\r\n  onChangeUploadFile = (e) => {\r\n    const { change, showAlert, showLoading, hideLoading } = this.props;\r\n    showLoading();\r\n    this.currentFile.current = null;\r\n    const filePath = e.target.value.toLowerCase();\r\n    const isCanUploadFile = filePath.indexOf('.csv') || filePath.indexOf('.xlsx') || filePath.indexOf('.xls');\r\n    if (isCanUploadFile !== -1) {\r\n      this.currentFile.current = e.target.files[0];\r\n      change('importSTR', e.target.files[0].name);\r\n      hideLoading();\r\n    } else {\r\n      hideLoading();\r\n      showAlert({ altMsg: 'เฉพาะ .csv หรือ .xlsx เท่านั้น' });\r\n      change('importSTR', '');\r\n      this.currentFile.current = null;\r\n    }\r\n  };\r\n\r\n  onClearFile = () => {\r\n    const { reset } = this.props;\r\n    this.currentFile.current = null;\r\n    reset();\r\n  };\r\n\r\n  handleChangePage = (page) => {\r\n    this.setState({\r\n      page: page,\r\n    });\r\n  };\r\n\r\n  handleBeforeShowControl = (data) => {\r\n    return false;\r\n  };\r\n\r\n  render() {\r\n    const { title, isShowLoading, handleSubmit } = this.props;\r\n    const { fileName, hasFile, page } = this.state;\r\n    \r\n    return (\r\n      <Fragment>\r\n        <Loading isShowLoading={isShowLoading} />\r\n        <ImportSTRByOfficerView\r\n          title={title}\r\n          onClickBack={this.handleBackMenu}\r\n          onChange={this.onChangeUploadFile}\r\n          fileName={fileName}\r\n          hasValue={hasFile}\r\n          onClearUpload={this.onClearFile}\r\n          handleSubmitForm={this.handleSubmitForm}\r\n          handleSubmit={handleSubmit}\r\n          inputUploadRef={this.inputUploadRef}\r\n          refUploadForm={this.refUploadForm}\r\n          onClickUpload={this.handleOpenUpload}\r\n        />\r\n        <AlertMessageSuper {...this.props} />\r\n      </Fragment>\r\n    );\r\n  }\r\n}\r\n\r\nconst reduxFormParameter = {\r\n  form: 'importSTR',\r\n};\r\n\r\nconst mapStateToProps = (state) => ({\r\n  _values: getFormValues('importSTR')(state),\r\n  authenRdc: state.authen,\r\n});\r\n\r\nexport default compose(\r\n  connect(\r\n    mapStateToProps,\r\n    null\r\n  ),\r\n  reduxForm(reduxFormParameter),\r\n  WithLoading,\r\n  WithAlertMessage\r\n)(ImportSTRByOfficer);\r\n","import React, { useState, useEffect } from 'react';\r\nimport { compose } from 'recompose';\r\n\r\nimport { CONFIG_MENU } from '../../../Constants/MenuConstants';\r\nimport { checkPermission } from '../../../Utilities/AuthenUtil';\r\nimport { fetchGet_ } from '../../../Utilities/ServiceUtils';\r\nimport * as Mapfunction from '../../../Map/MapFunctions';\r\nimport WithPanelContentReducer from '../../../HOC/ConnectReducer/WithPanelContentReducer'; //เป็นตัวกลางในการเชื่อมต่อ Reducer PanelContentReducer กับ Function Component เพราะ Function ไม่สามารถ Connect Reduc ได้\r\nimport WithAskTheCityPlanReducer from '../../../HOC/ConnectReducer/WithAskTheCityPlanReducer';\r\nimport PanelLayoutView from '../../../Presentationals/Web/Panel/PanelLayoutView';\r\n\r\nimport RouteConfig from '../../../Config/AppRoute/RouteConfig';\r\n\r\n//menu\r\nimport Menu from './Menu/Menu';\r\nimport SubmitPmr from './Menu/MenuContent/PMR1/SubmitPmr/SubmitPmr';\r\nimport QueryBuilderTool from './Menu/MenuContent/QueryBuilder/QueryBuilderTool';\r\nimport EditPmr from './Menu/MenuContent/PMR1/EditPmr';\r\nimport Evaluation from './Menu/MenuContent/Report/Evaluation/Evaluation';\r\nimport StatisticUser from './Menu/MenuContent/Report/StatisticUser/StatisticUser';\r\nimport DistrictReport from './Menu/MenuContent/Report/DistrictReport/DistrictReport';\r\nimport AreaReport from './Menu/MenuContent/Report/AreaReport/AreaReport';\r\nimport SatisfactionForm from './Menu/MenuContent/SatisfactionForm/SatisfactionForm';\r\nimport AskTheCityPlan from './Menu/MenuContent/AskTheCityPlan/AskTheCityPlan';\r\nimport SearchLandInfo from './Menu/MenuContent/SearchLandInfo/SearchLandInfo';\r\nimport StatisticCheckComprehensive from './Menu/MenuContent/Report/StatisticCheckComprehensive/StatisticCheckComprehensive';\r\nimport AddConstructionLicense from './Menu/MenuContent/ConstructionLicense/Add/AddConstructionLicense';\r\nimport SearchConstruct from './Menu/MenuContent/ConstructionLicense/Search/SearchConstruct';\r\nimport HouseNumber from './Menu/MenuContent/HouseNumber/HouseNumber';\r\nimport SearchHouseNumber from './Menu/MenuContent/SearchHouseNumber/SearchHouseNumber';\r\nimport ConstructionLicenseReport from './Menu/MenuContent/Report/ConstructionLicense/ConstructionLicenseReport';\r\nimport HouseNumberReport from './Menu/MenuContent/Report/HouseNumber/HouseNumberReport';\r\nimport MinisterialRegulationReport from './Menu/MenuContent/Report/MinisterialRegulation/MinisterialRegulationReport';\r\nimport ImportShapeFile from './Menu/MenuContent/ImportShapeFile/ImportShapeFile';\r\nimport ExportShapeFile from './Menu/MenuContent/ExportShapeFile/ExportShapeFile';\r\nimport AddDraftPoint from './Menu/MenuContent/DraftPoint/Add/AddDraftPoint';\r\nimport SearchDraftPoint from './Menu/MenuContent/DraftPoint/Search/SearchDraftPoint';\r\nimport AddDraftBuilding from './Menu/MenuContent/DraftBuilding/Add/AddDraftBuilding';\r\nimport SearchDraftBuilding from './Menu/MenuContent/DraftBuilding/Search/SearchDraftBuilding';\r\nimport SurveyReport from './Menu/MenuContent/Report/Survey/SueveyReport';\r\nimport LandMark from './Menu/MenuContent/LandMark/Add/LandMark';\r\nimport LandMarkSearch from './Menu/MenuContent/LandMark/Search/LandMarkSearch';\r\nimport AddDraftLine from './Menu/MenuContent/DraftLine/Add/AddDraftLine';\r\nimport SearchDraftLine from './Menu/MenuContent/DraftLine/Search/SearchDraftLine';\r\nimport SearchHouseNo from './Menu/MenuContent/SearchHouseNo/SearchHouseNo';\r\nimport AskWithShortcut from './Menu/MenuContent/AskTheCityPlan/AskWithShortcut';\r\n\r\nimport ImportOSS from './Menu/MenuContent/ImportOSS/ImportOSS';\r\nimport ImportSTR from './Menu/MenuContent/ImportSTR/ImportSTR';\r\nimport SearchOSS from './Menu/MenuContent/SearchOSS/SearchOSS';\r\nimport MarkPointSTR from './Menu/MenuContent/MarkPointSTR/MarkPointSTR';\r\nimport MarkPointSTRSingle from './Menu/MenuContent/MarkPointSTRSingle/MarkPointSTRSingle';\r\nimport ExportSTR from './Menu/MenuContent/ExportSTR/ExportSTR';\r\nimport ImportSTRByOfficer from './Menu/MenuContent/ImportSTRByOfficer/ImportSTRByOfficer'\r\n\r\nconst PanelLayout = ({ panelContentReducer, menuReducer, AskTheCityPlanReducer, authenReducer, newTOCReducer, history, isLoadMapComplete }) => {\r\n  const [statis, setsSatis] = useState();\r\n  const [listVisibleLayer, setListVisibleLayer] = useState([]);\r\n  const isShowStatis = checkPermission(authenReducer.state.profile.functions[authenReducer.state.system], CONFIG_MENU.FCN06.ID);\r\n\r\n  useEffect(() => {\r\n    if (isShowStatis) {\r\n      getStatistics();\r\n    }\r\n  }, []);\r\n\r\n  useEffect(() => {\r\n    // จะเข้าเมื่อ current page มีการเปลื่ยนแปลง\r\n    if (!panelContentReducer.state.currentPage && listVisibleLayer && listVisibleLayer.length > 0) {\r\n      // เมื่อกลับ menu หลักจะเคลียร์ layer\r\n      manageVisibleLayer({ layer: listVisibleLayer, isVisible: false });\r\n    }\r\n  }, [panelContentReducer.state.currentPage]);\r\n\r\n  const getStatistics = () => {\r\n    fetchGet_(`${process.env.REACT_APP_GET_STATISTICS}?Type=${authenReducer.state.system ? authenReducer.state.system : 'CMP'}`)\r\n      .then((res) => {\r\n        if (!res.ok) {\r\n          throw res.status;\r\n        }\r\n        return res.json();\r\n      })\r\n      .then((data) => {\r\n        setsSatis(data.num);\r\n      })\r\n      .catch((ex) => {\r\n        console.log('ex getProfile PMR', ex);\r\n      });\r\n  };\r\n  const handleClosePanel = (evt) => {\r\n    if (menuReducer.state.Panel) {\r\n      menuReducer.action.closeMenuPanel();\r\n    } else {\r\n      menuReducer.action.openMenuPanel();\r\n    }\r\n  };\r\n\r\n  const handleMenuItemClick = async (value) => {\r\n    // value.LayerID = [15]\r\n    panelContentReducer.action.setCurrentPage(value);\r\n    manageVisibleLayer({ layer: value.Layer, isVisible: true });\r\n  };\r\n\r\n  const manageVisibleLayer = async ({ layer, isVisible }) => {\r\n    const { mapAction } = AskTheCityPlanReducer;\r\n    if (layer) {\r\n      // layerIDs = layer.map(layerID => layerID.toString())\r\n      const layerIDs = layer.map((itm) => itm.layerName);\r\n      if (isVisible) {\r\n        // เปิด layer ของ menu ที่จะทำงาน\r\n        // ปิด layer เก่าที่เปิดอยู่ (กรณีที่โดดข้ามไปอีกเมนูโดยไม่กลับหน้าหลัก ทำเผื่อไว้)\r\n        listVisibleLayer &&\r\n          listVisibleLayer > 0 &&\r\n          (await mapAction.bindMapCommand(Mapfunction.setMultiVisibleLayers, {\r\n            layerIDs: listVisibleLayer,\r\n            isVisible: false,\r\n          }));\r\n        // ทำการเปิด layer ที่จะทำงาน\r\n        await mapAction.bindMapCommand(Mapfunction.setMultiVisibleLayers, {\r\n          layerIDs: layerIDs,\r\n          isVisible: true,\r\n        });\r\n        await mapAction.bindClearMapCommand();\r\n        newTOCReducer.action.setListChecked(layerIDs); // check list toc\r\n        setListVisibleLayer(layer);\r\n      } else {\r\n        // ปิด layer เมื่อปิด menu\r\n        await mapAction.bindMapCommand(Mapfunction.setMultiVisibleLayers, {\r\n          layerIDs: layerIDs,\r\n          isVisible: false,\r\n        });\r\n        newTOCReducer.action.setListUnChecked(layerIDs);\r\n        mapAction.bindClearMapCommand();\r\n        setListVisibleLayer([]);\r\n      }\r\n    }\r\n  };\r\n\r\n  const goToMainMenu = () => {\r\n    // setIsShowStatis(true)\r\n    panelContentReducer.action.setCurrentPage();\r\n  };\r\n\r\n  const handleBackAskTheCityPlan = () => {\r\n    const { mapAction } = AskTheCityPlanReducer;\r\n    mapAction.bindMapCommand(Mapfunction.setDefultMap);\r\n    goToMainMenu();\r\n  };\r\n\r\n  const handleBackSearchLandInfo = () => {\r\n    const { mapAction } = AskTheCityPlanReducer;\r\n    mapAction.bindMapCommand(Mapfunction.clearGraphicSearchLandInfo);\r\n    goToMainMenu();\r\n  };\r\n\r\n  const handleBackSearhContruct = () => {\r\n    goToMainMenu();\r\n  };\r\n  const handleBackSearchHouse = () => {\r\n    const { mapAction } = AskTheCityPlanReducer;\r\n    mapAction.bindMapCommand(Mapfunction.cleardrawSpatialSearchTR900, {\r\n      isClearSearchHouseLayer: true,\r\n    });\r\n    goToMainMenu();\r\n  };\r\n\r\n  const getCurrentPage = () => {\r\n    const systemProfile = authenReducer.state && authenReducer.state.system ? authenReducer.state.system : null;\r\n    const currentPageData = panelContentReducer.state.currentPage;\r\n    const functionID = currentPageData ? currentPageData.ID : null;\r\n\r\n    const path = window.location.pathname;\r\n    const isMobileViewPath = path.toLowerCase().indexOf('mobilecurrent') > -1;\r\n    const mobileShortcut = menuReducer.state.MobileView && menuReducer.state.Shortcut;\r\n\r\n    if (isMobileViewPath && !mobileShortcut) {\r\n      window.location.href = window.ROOT_SYSTEM_URL + RouteConfig.CMPMobile;\r\n      return;\r\n    }\r\n\r\n    if (mobileShortcut) {\r\n      return (\r\n        <AskWithShortcut title={'สอบถามผังเมืองรวม กรุงเทพมหานคร'} onBackClick={handleBackAskTheCityPlan} isLoadMapComplete={isLoadMapComplete} />\r\n      );\r\n    }\r\n\r\n    //ใช้ตั้งค่า title ของเมนูที่มาจาก ผมร แล้วไปหน้า view\r\n    if (currentPageData) {\r\n      currentPageData.MenuName = currentPageData.MenuName ? currentPageData.MenuName : currentPageData.NAME;\r\n    }\r\n    switch (functionID) {\r\n      case CONFIG_MENU.MAP01.ID:\r\n        //ค้นหาตามเงื่อนไข\r\n        return <QueryBuilderTool title={currentPageData.MenuName} onBackClick={goToMainMenu} />;\r\n      case CONFIG_MENU.FCN01.ID:\r\n        // ค้นหาข้อมูลที่ดิน\r\n        return <SearchLandInfo title={currentPageData.MenuName} onBackClick={handleBackSearchLandInfo} />;\r\n      case CONFIG_MENU.FCN02.ID:\r\n        // สอบถามผังเมืองรวม\r\n        return <AskTheCityPlan title={currentPageData.MenuName} onBackClick={handleBackAskTheCityPlan} />;\r\n      case CONFIG_MENU.FCN03.ID:\r\n        // ประเมินความพึงพอใจ (รวมทั้ง 3 ระบบ)\r\n        return <SatisfactionForm system={systemProfile} title={currentPageData.MenuName} onBackClick={goToMainMenu} />;\r\n      case CONFIG_MENU.FCN04.ID:\r\n        // รายงานผลการประเมิน (รวมทั้ง 3 ระบบ)\r\n        return <Evaluation system={systemProfile} title={currentPageData.MenuName} onBackClick={goToMainMenu} />;\r\n      case CONFIG_MENU.FCN05.ID:\r\n        // รายงานสถิติผู้เข้าใช้งาน (รวมทั้ง 3 ระบบ)\r\n        return <StatisticUser system={systemProfile} title={currentPageData.MenuName} onBackClick={goToMainMenu} />;\r\n      case CONFIG_MENU.FCN07.ID:\r\n        // สถิติการรับบริการตรวจสอบผังเมือง\r\n        return <StatisticCheckComprehensive title={currentPageData.MenuName} onBackClick={goToMainMenu} />;\r\n      case CONFIG_MENU.FCN12.ID:\r\n        // ยื่นแบบ ผมร.1\r\n        return <SubmitPmr title={currentPageData.MenuName} onBackClick={goToMainMenu} />;\r\n      case CONFIG_MENU.FCN13.ID:\r\n        // แก้ไข/Export แบบ ผมร.๑ ตนเอง\r\n        return <EditPmr title={currentPageData.MenuName} functionID={CONFIG_MENU.FCN13.ID} />;\r\n      case CONFIG_MENU.FCN14.ID:\r\n        // ค้นหา/แก้ไข/Export แบบ ผมร.๑ ทั้งหมด\r\n        return <EditPmr title={currentPageData.MenuName} functionID={CONFIG_MENU.FCN14.ID} />;\r\n      case CONFIG_MENU.FCN15.ID:\r\n        //ค้นหาผมร.๑\r\n        return <EditPmr title={currentPageData.MenuName} functionID={CONFIG_MENU.FCN15.ID} />;\r\n      case CONFIG_MENU.FCN17.ID:\r\n        // รายงานสรุปผลการแจ้ง ผมร.1 รายเขต\r\n        return <DistrictReport title={currentPageData.MenuName} onBackClick={goToMainMenu} />;\r\n      case CONFIG_MENU.FCN18.ID:\r\n        // รายงานสรุปผลการแจ้ง ผมร.1 รายบริเวณ\r\n        return <AreaReport title={currentPageData.MenuName} onBackClick={goToMainMenu} />;\r\n      case CONFIG_MENU.FCN21.ID:\r\n        // ยื่นแบบ อ.1\r\n        return <AddConstructionLicense title={currentPageData.MenuName} onClickBack={goToMainMenu} />;\r\n      case CONFIG_MENU.FCN22.ID:\r\n        // แก้ไขแบบ อ.1\r\n        return <SearchConstruct title={currentPageData.MenuName} onClickBack={handleBackSearhContruct} />;\r\n      case CONFIG_MENU.FCN24.ID:\r\n        // ยื่นแบบ ทร.900\r\n        return <HouseNumber title={currentPageData.MenuName} onClickBack={goToMainMenu} />;\r\n      case CONFIG_MENU.FCN25.ID:\r\n        // แก้ไขแบบ ทร.900\r\n        return <SearchHouseNumber title={currentPageData.MenuName} onClickBack={handleBackSearchHouse} />;\r\n      case CONFIG_MENU.FCN26.ID:\r\n        // รายงานผลการกำหนดการออกเลขรหัสบ้าน\r\n        return <HouseNumberReport title={currentPageData.MenuName} onClickBack={goToMainMenu} />;\r\n      case CONFIG_MENU.FCN27.ID:\r\n        // รายงานผลการกำหนดตำแหน่งขออนุญาตก่อสร้าง\r\n        return <ConstructionLicenseReport title={currentPageData.MenuName} onClickBack={goToMainMenu} />;\r\n      case CONFIG_MENU.FCN28.ID:\r\n        // รายงานผลการใช้ประโยชน์ที่ดินตามกฎกระทรวง\r\n        return <MinisterialRegulationReport title={currentPageData.MenuName} onClickBack={goToMainMenu} />;\r\n      case CONFIG_MENU.FCN29.ID:\r\n        //ค้นหา อ.1\r\n        return <SearchConstruct title={currentPageData.MenuName} onClickBack={handleBackSearhContruct} isOnlySearch={true} />;\r\n      case CONFIG_MENU.FCN30.ID:\r\n        //ค้นหา ทร.900\r\n        return <SearchHouseNumber title={currentPageData.MenuName} onClickBack={handleBackSearchHouse} isOnlySearch={true} />;\r\n      case CONFIG_MENU.FCN41.ID:\r\n        // เพิ่ม (draft point)\r\n        return <AddDraftPoint title={currentPageData.MenuName} onClickBack={goToMainMenu} />;\r\n      case CONFIG_MENU.FCN42.ID:\r\n        //ค้นหาและแก้ไข (draft point)\r\n        return <SearchDraftPoint title={currentPageData.MenuName} onClickBack={goToMainMenu} />;\r\n      case CONFIG_MENU.FCN44.ID:\r\n        //เพิ่ม (draft line)\r\n        return <AddDraftLine title={currentPageData.MenuName} onClickBack={goToMainMenu} />;\r\n      case CONFIG_MENU.FCN45.ID:\r\n        //ค้นหาและแก้ไข (draft line)\r\n        return <SearchDraftLine title={currentPageData.MenuName} onClickBack={goToMainMenu} />;\r\n      case CONFIG_MENU.FCN47.ID:\r\n        //เพิ่ม (draft BLDG)\r\n        return <AddDraftBuilding title={currentPageData.MenuName} onClickBack={goToMainMenu} />;\r\n      case CONFIG_MENU.FCN48.ID:\r\n        // ค้นหาและแก้ไข (draft BLDG)\r\n        return <SearchDraftBuilding title={currentPageData.MenuName} onClickBack={goToMainMenu} />;\r\n      case CONFIG_MENU.FCN50.ID:\r\n        // เพิ่ม (landmark)\r\n        return <LandMark title={currentPageData.MenuName} onClickBack={goToMainMenu} />;\r\n      case CONFIG_MENU.FCN51.ID:\r\n        //ค้นหาและแก้ไข (landmark)\r\n        return <LandMarkSearch title={currentPageData.MenuName} onClickBack={goToMainMenu} />;\r\n      case CONFIG_MENU.FCN52.ID:\r\n        // import shape file\r\n        return <ImportShapeFile title={currentPageData.MenuName} onBackClick={goToMainMenu} />;\r\n      case CONFIG_MENU.FCN53.ID:\r\n        // export shape file\r\n        return <ExportShapeFile title={currentPageData.MenuName} onBackClick={goToMainMenu} />;\r\n      case CONFIG_MENU.FCN54.ID:\r\n        //รายงานการสำรวจ\r\n        return <SurveyReport title={currentPageData.MenuName} onClickBack={goToMainMenu} />;\r\n\r\n      case CONFIG_MENU.FCN62.ID:\r\n        //ค้นหาเลขที่บ้าน\r\n        return <SearchHouseNo title={currentPageData.MenuName} onClickBack={handleBackSearchLandInfo} />;\r\n      case CONFIG_MENU.FCN63.ID:\r\n        //Import ข้อมูลจาก OSS\r\n        return <ImportOSS title={currentPageData.MenuName} onClickBack={goToMainMenu} />;\r\n      case CONFIG_MENU.FCN65.ID:\r\n        //Import รายการบ้านจาก STR\r\n        return <ImportSTR title={currentPageData.MenuName} onClickBack={goToMainMenu} />;\r\n      case CONFIG_MENU.FCN64.ID:\r\n        return <SearchOSS title={currentPageData.MenuName} onClickBack={goToMainMenu} />;\r\n      case CONFIG_MENU.FCN66.ID:\r\n        return <MarkPointSTR title={currentPageData.MenuName} onClickBack={goToMainMenu} />;\r\n      case CONFIG_MENU.FCN67.ID:\r\n        return <MarkPointSTRSingle title={currentPageData.MenuName} onClickBack={goToMainMenu} />;\r\n      case CONFIG_MENU.FCN68.ID:\r\n        return <ExportSTR title={currentPageData.MenuName} onClickBack={goToMainMenu} />;\r\n      case CONFIG_MENU.FCN69.ID:\r\n        return <ImportSTRByOfficer title={currentPageData.MenuName} onClickBack={goToMainMenu} />;\r\n      default:\r\n        return <Menu onMenuItemClick={handleMenuItemClick} history={history} />;\r\n    }\r\n  };\r\n\r\n  return (\r\n    <PanelLayoutView\r\n      open={menuReducer.state.Panel}\r\n      onClose={handleClosePanel}\r\n      statis={statis}\r\n      isShowStatis={!panelContentReducer.state.currentPage && isShowStatis}\r\n      shortcut={menuReducer.state.Shortcut}\r\n    >\r\n      {getCurrentPage()}\r\n    </PanelLayoutView>\r\n  );\r\n};\r\n\r\nexport default compose(\r\n  WithPanelContentReducer,\r\n  WithAskTheCityPlanReducer\r\n)(PanelLayout);\r\n","import React, { Component, Fragment } from \"react\";\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Downshift from 'downshift';\r\nimport TextField from '@material-ui/core/TextField';\r\nimport Paper from '@material-ui/core/Paper';\r\nimport MenuItem from '@material-ui/core/MenuItem';\r\nimport InputAdornment from '@material-ui/core/InputAdornment'\r\nimport SearchIcon from '@material-ui/icons/Search'\r\nimport ClearIcon from '@material-ui/icons/Clear'\r\nimport { fetchGet } from '../../Utilities/ServiceUtils';\r\n// import { unionBy,intersectionWith,isEqual,intersectionBy,intersection,groupBy,flatten } from 'lodash'\r\n\r\nconst CustomClearIcon = withStyles(theme => ({\r\n\troot: {\r\n\t\twidth: 15,\r\n\t\tcursor: \"default\"\r\n\t}\r\n}))(ClearIcon);\r\n\r\nconst styles = theme => ({\r\n\troot: {\r\n\t\twidth: '100%',\r\n\t},\r\n\trootTextSearch: {\r\n\t\twidth: '100%',\r\n\t\t[`& fieldset`]: {\r\n\t\t\tbackgroundColor: 'white',\r\n\t\t},\r\n\t\t[`& input`]: {\r\n\t\t\theight: '45px',\r\n\t\t\tpadding: '0px 15px 0px 15px',\r\n\t\t\tzIndex: 1\r\n\t\t},\r\n\t\t[`& label`]: {\r\n\t\t\ttop: '-5px'\r\n\t\t},\r\n\t\t[`& input:-webkit-autofill`]: {\r\n\t\t\tWebkitBoxShadow: 'inset 0 0 0px 9999px white',\r\n\t\t}\r\n\t},\r\n\tcontainer: {\r\n\t\tflexGrow: 1,\r\n\t\tposition: 'relative',\r\n\t},\r\n\tpaper: {\r\n\t\tposition: 'absolute',\r\n\t\tzIndex: 1,\r\n\t\tmarginTop: theme.spacing.unit,\r\n\t\tleft: 2,\r\n\t\tright: 2,\r\n\t\ttop: 34\r\n\t},\r\n\tchip: {\r\n\t\tmargin: `${theme.spacing.unit / 2}px ${theme.spacing.unit / 4}px`,\r\n\t},\r\n\tinputRoot: {\r\n\t\tflexWrap: 'wrap',\r\n\t},\r\n\tinputInput: {\r\n\t\twidth: 'auto',\r\n\t\tflexGrow: 1,\r\n\t\twidth: '64%'\r\n\t},\r\n\tdivider: {\r\n\t\theight: theme.spacing.unit * 2,\r\n\t},\r\n\tadornment: {\r\n\t\tzIndex: 2\r\n\t}\r\n});\r\n\r\nexport class TextFieldLocator extends Component {\r\n\tconstructor(props) {\r\n\t\tsuper(props);\r\n\t\tthis.state = {\r\n\t\t\tinputValue: \"\",\r\n\t\t\tresult: [],\r\n\t\t\tdownShiftIsOpen: false,\r\n\t\t\ttotalResult: []\r\n\t\t};\r\n\t\tthis.refInput = null;\r\n\t}\r\n\r\n\thandleTextChange = (evt) => {\r\n\t\tconst { onTextChange } = this.props;\r\n\t\tif (onTextChange) {\r\n\t\t\tonTextChange(evt.target.value)\r\n\t\t}\r\n\t}\r\n\r\n\trenderInput = (inputProps) => {\r\n\t\tconst { InputProps, classes, isShowClearIcon, ref, ...other } = inputProps;\r\n\r\n\t\treturn (\r\n\t\t\t<TextField\r\n\t\t\t\tclassName={classes.rootTextSearch}\r\n\t\t\t\tvariant=\"outlined\"\r\n\t\t\t\tInputProps={{\r\n\t\t\t\t\tinputRef: ref,\r\n\t\t\t\t\tclasses: {\r\n\t\t\t\t\t\troot: classes.inputRoot,\r\n\t\t\t\t\t\tinput: classes.inputInput,\r\n\t\t\t\t\t},\r\n\t\t\t\t\tstartAdornment: (\r\n\t\t\t\t\t\t<InputAdornment position=\"start\" className={classes.adornment}>\r\n\t\t\t\t\t\t\t<SearchIcon />\r\n\t\t\t\t\t\t</InputAdornment>\r\n\t\t\t\t\t),\r\n\t\t\t\t\tendAdornment: (\r\n\t\t\t\t\t\t<Fragment>\r\n\t\t\t\t\t\t\t{isShowClearIcon && (\r\n\t\t\t\t\t\t\t\t<InputAdornment position=\"end\" className={classes.adornment}>\r\n\t\t\t\t\t\t\t\t\t<CustomClearIcon onClick={this.onClearText} />\r\n\t\t\t\t\t\t\t\t</InputAdornment>\r\n\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t</Fragment>\r\n\t\t\t\t\t),\r\n\t\t\t\t\t...InputProps,\r\n\t\t\t\t}}\r\n\t\t\t\t{...other}\r\n\t\t\t\tfullWidth={false}\r\n\t\t\t/>\r\n\t\t);\r\n\t}\r\n\r\n\tonClearText = () => {\r\n\t\tconst { onTextChange } = this.props;\r\n\r\n\t\tif (onTextChange) {\r\n\t\t\tonTextChange(\"\")\r\n\t\t}\r\n\r\n\t\tthis.setState({\r\n\t\t\tinputValue: \"\",\r\n\t\t\tresult: [],\r\n\t\t})\r\n\t}\r\n\r\n\trenderSuggestion = ({ suggestion, index, itemProps, highlightedIndex, selectedItem }) => {\r\n\t\tconst isHighlighted = highlightedIndex === index;\r\n\t\tconst isSelected = (selectedItem || '').indexOf(suggestion.name) > -1;\r\n\t\treturn (\r\n\t\t\t<MenuItem\r\n\t\t\t\t{...itemProps}\r\n\t\t\t\tkey={suggestion.ID}\r\n\t\t\t\tselected={isHighlighted}\r\n\t\t\t\tvalue={suggestion.ID}\r\n\t\t\t\tcomponent=\"div\"\r\n\t\t\t\tstyle={{\r\n\t\t\t\t\tfontWeight: isSelected ? 500 : 400,\r\n\t\t\t\t}}\r\n\t\t\t>\r\n\t\t\t\t\r\n\t\t\t\t{`${suggestion.name}`}<label style={{color:'#9c9c9c',paddingLeft:'5px'}}>{`${suggestion.additionText?suggestion.additionText:\"\"}`}</label>\r\n\t\t\t</MenuItem>\r\n\t\t);\r\n\t}\r\n\r\n\tgetSuggestions = (value) => {\r\n\t\tconst inputValue = value.trim();\r\n\t\tconst inputLength = inputValue.length;\r\n\r\n\t\tif (inputLength >= 5) {\r\n\t\t\tfetchGet(`${process.env.REACT_APP_LU_SEARCH_LOCATOR}?search=${inputValue}`).then(res => {\r\n\t\t\t\tif (!res.ok) {\r\n\t\t\t\t\t//throw res.status;\r\n\t\t\t\t}\r\n\t\t\t\treturn res.json();\r\n\t\t\t})\r\n\t\t\t\t.then(result => {\r\n\t\t\t\t\tif (result) {\r\n\t\t\t\t\t// \tconst groupParam = groupBy(result.searchLocator,'type')\r\n\t\t\t\t\t// \tlet unionParam = []\r\n\t\t\t\t\t// \tif(groupParam){\r\n\t\t\t\t\t// \t\tfor(let item in groupParam ){\r\n\t\t\t\t\t// \t\t\tconsole.log(groupParam[item]);\r\n\t\t\t\t\t// \t\t\tconsole.log(item);\r\n\t\t\t\t\t// \t\t\tif(item === \"ST_POINT\"){\r\n\t\t\t\t\t// \t\t\t\tunionParam.push(groupParam[item])\t\t\t\r\n\t\t\t\t\t// \t\t\t}else{\r\n\t\t\t\t\t// \t\t\t\tunionParam.push(unionBy(groupParam[item],'name'))\t\t\t\t\t\t\t\r\n\t\t\t\t\t// \t\t\t}\r\n\t\t\t\t\t// \t\t}\r\n\t\t\t\t\t// \t}\r\n\r\n\t\t\t\t\t// console.log(flatten(unionParam));\r\n\t\t\t\t\t\tthis.setState({ totalResult: result.searchLocator, result: result.searchLocator })\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tthis.setState({ result: [] })\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t\t.catch(ex => {\r\n\t\t\t\t\tconsole.log('ex', ex)\r\n\t\t\t\t\tthis.setState({ result: [] })\r\n\t\t\t\t});\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.setState({ result: [] })\r\n\t\t}\r\n\t}\r\n\r\n\tonChange = (evt) => {\r\n\t\tconst { onChange } = this.props;\r\n\t\tlet totalResult = this.state.totalResult;\r\n\t\tonChange(evt, totalResult);\r\n\t\tthis.refInput.blur();\r\n\t\tthis.setState({ downShiftIsOpen: false }) //เมื่อ click ที่ผลลัพท์ให้กล่องที่แสดงผลลัพธ์หายไป\r\n\t}\r\n\r\n\r\n\thandleOnFocus = () => {\r\n\t\tthis.setState({ downShiftIsOpen: true })\r\n\t}\r\n\r\n\thandleOnBlur = () => {\r\n\t\tthis.setState({ downShiftIsOpen: false })\r\n\t}\r\n\r\n\tonRefInput = node => {\r\n\t\tthis.refInput = node;\r\n\t}\r\n\r\n\trender() {\r\n\t\tconst { classes } = this.props;\r\n\r\n\t\treturn (\r\n\t\t\t<div className={classes.root}>\r\n\t\t\t\t<Downshift id=\"downshift-simple\"\r\n\t\t\t\t\tdefaultHighlightedIndex={0}\r\n\t\t\t\t\tonSelect={this.onChange}\r\n\t\t\t\t\tisOpen={this.state.downShiftIsOpen}\r\n\t\t\t\t\tonStateChange={({ inputValue,...other }) => {\r\n\t\t\t\t\t\tif (inputValue) {\r\n\t\t\t\t\t\t\tif(other.selectedItem){\r\n\t\t\t\t\t\t\t\tthis.getSuggestions(other.selectedItem.name);\r\n\t\t\t\t\t\t\t\treturn inputValue && this.setState({ inputValue: other.selectedItem.name })\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tthis.getSuggestions(inputValue);\r\n\t\t\t\t\t\t\t\treturn inputValue && this.setState({ inputValue: inputValue })\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\treturn inputValue && this.setState({ inputValue: inputValue, result: [] })\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}}\r\n\t\t\t\t\tselectedItem={this.state.inputValue}\r\n\t\t\t\t>\r\n\t\t\t\t\t{({\r\n\t\t\t\t\t\tgetInputProps,\r\n\t\t\t\t\t\tgetItemProps,\r\n\t\t\t\t\t\tgetMenuProps,\r\n\t\t\t\t\t\thighlightedIndex,\r\n\t\t\t\t\t\tinputValue,\r\n\t\t\t\t\t\tisOpen,\r\n\t\t\t\t\t\tselectedItem,\r\n\t\t\t\t\t\treset\r\n\t\t\t\t\t}) => (\r\n\t\t\t\t\t\t\t<div className={classes.container}>\r\n\t\t\t\t\t\t\t\t{this.renderInput({\r\n\t\t\t\t\t\t\t\t\tfullWidth: true,\r\n\t\t\t\t\t\t\t\t\tclasses,\r\n\t\t\t\t\t\t\t\t\tInputProps: getInputProps({\r\n\t\t\t\t\t\t\t\t\t\tplaceholder: 'ค้นหา',\r\n\t\t\t\t\t\t\t\t\t\tonFocus: (evt) => this.handleOnFocus(),\r\n\t\t\t\t\t\t\t\t\t\tonBlur: () => this.handleOnBlur(),\r\n\t\t\t\t\t\t\t\t\t\tonChange: this.handleTextChange,\r\n\t\t\t\t\t\t\t\t\t}),\r\n\t\t\t\t\t\t\t\t\tisShowClearIcon: this.state.inputValue != \"\" ? true : false,\r\n\t\t\t\t\t\t\t\t\tref: this.onRefInput\r\n\t\t\t\t\t\t\t\t})}\r\n\t\t\t\t\t\t\t\t<div {...getMenuProps()}>\r\n\t\t\t\t\t\t\t\t\t{isOpen ? (\r\n\t\t\t\t\t\t\t\t\t\t<Paper className={classes.paper} square>\r\n\t\t\t\t\t\t\t\t\t\t\t{this.state.result.map((suggestion, index) =>\r\n\t\t\t\t\t\t\t\t\t\t\t\tthis.renderSuggestion({\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsuggestion,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tindex,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\titemProps: getItemProps({ item: {name:suggestion.name,type:suggestion.type,tmp:suggestion } }),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\thighlightedIndex,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tselectedItem\r\n\t\t\t\t\t\t\t\t\t\t\t\t}),\r\n\t\t\t\t\t\t\t\t\t\t\t)}\r\n\t\t\t\t\t\t\t\t\t\t</Paper>\r\n\t\t\t\t\t\t\t\t\t) : null}\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t)}\r\n\t\t\t\t</Downshift>\r\n\t\t\t</div>\r\n\t\t);\r\n\t}\r\n\r\n}\r\n\r\nexport default withStyles(styles)(TextFieldLocator);\r\n","import React, { Fragment } from \"react\";\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\nimport AppBar from \"@material-ui/core/AppBar\";\r\nimport SearchIcon from \"@material-ui/icons/Search\";\r\nimport Map from \"@material-ui/icons/Map\";\r\nimport Menu from \"@material-ui/icons/Menu\";\r\nimport Hidden from \"@material-ui/core/Hidden\";\r\nimport { Grid } from \"@material-ui/core\";\r\nimport classnames from \"classnames\";\r\n\r\nimport { LIST_MENU_LAYOUT_MAP, HEADER } from \"../../Constants/Constants\";\r\nimport PanelLayout from \"../../Containers/Web/Panel/PanelLayout\";\r\nimport TextFieldLocator from \"../../Controls/Containers/TextFieldLocator\";\r\nimport MenuUser from \"../../Containers/Web/MenuUser\";\r\n\r\nconst styles = (theme) => ({\r\n    root: {\r\n        width: \"100%\",\r\n        height: \"100%\",\r\n    },\r\n    appBar: {\r\n        position: \"absolute\",\r\n        zIndex: 1,\r\n        height: \"70px\",\r\n        backgroundColor: theme.mainTheme.color1,\r\n    },\r\n    divTitle: {\r\n        position: \"absolute\",\r\n        zIndex: 4,\r\n        display: \"flex\",\r\n        flexDirection: \"column\",\r\n        alignItems: \"flex-start\",\r\n        top: \"10px\",\r\n        left: \"70px\",\r\n        maxWidth: \"auto\",\r\n        [theme.breakpoints.down(\"xs\")]: {\r\n            maxWidth: \"calc(100% - 120px)\",\r\n        },\r\n    },\r\n    title: {\r\n        color: theme.mainTheme.color2,\r\n        fontSize: \"17px\",\r\n        lineHeight: \"25px\",\r\n        maxWidth: \"auto\",\r\n        [theme.breakpoints.down(\"xs\")]: {\r\n            fontSize: theme.textSize.normal,\r\n            // maxWidth: '275px',\r\n            maxWidth: \"100%\",\r\n            textOverflow: \"ellipsis\",\r\n            whiteSpace: \"nowrap\",\r\n            overflow: \"hidden\",\r\n        },\r\n    },\r\n    subTitle: {\r\n        color: theme.mainTheme.color2,\r\n        fontSize: theme.textSize.subtitleHeader,\r\n        maxWidth: \"auto\",\r\n        [theme.breakpoints.down(\"xs\")]: {\r\n            fontSize: theme.textSize.mini,\r\n            // maxWidth: '275px',\r\n            maxWidth: \"100%\",\r\n            textOverflow: \"ellipsis\",\r\n            whiteSpace: \"nowrap\",\r\n            overflow: \"hidden\",\r\n        },\r\n    },\r\n    content: {\r\n        flexGrow: 1,\r\n        position: \"absolute\",\r\n        marginTop: \"70px\",\r\n        height: \"calc( 100% - 70px )\",\r\n        width: \"100%\",\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            height: \"calc( 100% - 124px )\",\r\n        },\r\n    },\r\n    bottom: {\r\n        display: \"none\",\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            width: \"100%\",\r\n            height: \"53px\",\r\n            position: \"absolute\",\r\n            bottom: \"0px\",\r\n            display: \"flex\",\r\n            flexDirection: \"row\",\r\n            backgroundColor: theme.mainTheme.color3,\r\n            zIndex: theme.zIndex.drawer + 999,\r\n        },\r\n    },\r\n    listMenuBottom: {\r\n        width: \"33.33%\",\r\n        height: \"100%\",\r\n        display: \"flex\",\r\n        flexDirection: \"column\",\r\n        justifyContent: \"center\",\r\n        alignItems: \"center\",\r\n        cursor: \"pointer\",\r\n        color: \"white\",\r\n        fontSize: theme.textSize.subtitle,\r\n        paddingTop: \"2px\",\r\n        \"&:hover\": {\r\n            backgroundColor: \"#787878\",\r\n        },\r\n        [theme.breakpoints.down(\"xs\")]: {\r\n            fontSize: theme.textSize.mini,\r\n        },\r\n    },\r\n    listMenuBottomActive: {\r\n        backgroundColor: \"#787878\",\r\n    },\r\n    imgHeader: {\r\n        zIndex: 1,\r\n        position: \"absolute\",\r\n        height: \"80px\",\r\n        pointerEvents: \"none\",\r\n    },\r\n    searchLocator: {\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            display: \"none\",\r\n        },\r\n    },\r\n    headerHeight: {\r\n        height: \"70px\",\r\n    },\r\n    txtGroupName: {\r\n        marginRight: \"10px\",\r\n        fontWeight: \"bold\",\r\n    },\r\n    divSearch: {\r\n        display: \"none\",\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            width: \"100%\",\r\n            backgroundColor: \"white\",\r\n            padding: \"0\",\r\n            position: \"absolute\",\r\n            zIndex: 2,\r\n            display: \"flex\",\r\n            justifyContent: \"center\",\r\n        },\r\n    },\r\n    hide: {\r\n        display: \"none\",\r\n    },\r\n    containerLeft: {\r\n        minWidth: \"580px\",\r\n        [theme.breakpoints.down(\"xs\")]: {\r\n            minWidth: \"auto\",\r\n        },\r\n    },\r\n    containerRight: {\r\n        width: \"calc(100% - 580px)\",\r\n        height: \"70px\",\r\n        [theme.breakpoints.down(\"xs\")]: {\r\n            width: \"49px\",\r\n        },\r\n    },\r\n    containerLocator: {\r\n        maxWidth: \"600px\",\r\n        margin: \"0px 10px\",\r\n    },\r\n    containerProfile: {\r\n        textOverflow: \"ellipsis\",\r\n        whiteSpace: \"nowrap\",\r\n        overflow: \"hidden\",\r\n    },\r\n    textProfile: {\r\n        maxWidth: \"330px\",\r\n        overflow: \"hidden\",\r\n        textOverflow: \"ellipsis\",\r\n        fontSize: \"15px\",\r\n    },\r\n});\r\n\r\nconst LayoutMapView = ({\r\n    classes,\r\n    children,\r\n    history,\r\n    system,\r\n    profile,\r\n    listMenuActive,\r\n    onMenuClick,\r\n    onLocatorChange,\r\n    onTextLocatorChange,\r\n    isLoadMapComplete,\r\n}) => {\r\n    return (\r\n        <div className={classes.root}>\r\n            <AppBar className={classes.appBar}>\r\n                <Grid container justify=\"space-between\">\r\n                    <Grid item className={classes.containerLeft}>\r\n                        <div\r\n                            className={classes.divTitle}\r\n                            style={\r\n                                listMenuActive.Shortcut\r\n                                    ? { height: \"100%\" }\r\n                                    : { height: \"inherit\" }\r\n                            }>\r\n                            <span className={classes.title}>\r\n                                {HEADER[system] &&\r\n                                    HEADER[system].TITLE &&\r\n                                    HEADER[system].TITLE}\r\n                            </span>\r\n                            <span className={classes.subTitle}>\r\n                                {HEADER[system] &&\r\n                                    HEADER[system].SUB_TITLE &&\r\n                                    HEADER[system].SUB_TITLE}\r\n                            </span>\r\n                        </div>\r\n\r\n                        <input\r\n                            type=\"image\"\r\n                            alt=\"img\"\r\n                            src={`${\r\n                                process.env.PUBLIC_URL\r\n                            }/img/layout/header_panel.png`}\r\n                            className={classes.imgHeader}\r\n                        />\r\n                    </Grid>\r\n\r\n                    <Grid\r\n                        container\r\n                        alignItems=\"center\"\r\n                        className={classes.containerRight}>\r\n                        <Grid\r\n                            item\r\n                            xs={6}\r\n                            container\r\n                            justify=\"flex-end\"\r\n                            className={classes.searchLocator}>\r\n                            <Grid\r\n                                item\r\n                                xs={12}\r\n                                className={classes.containerLocator}>\r\n                                <TextFieldLocator\r\n                                    onChange={onLocatorChange}\r\n                                    onTextChange={onTextLocatorChange}\r\n                                    type={2}\r\n                                />\r\n                            </Grid>\r\n                        </Grid>\r\n\r\n                        <Grid item sm={12} md={6}>\r\n                            <Grid\r\n                                container\r\n                                justify=\"flex-end\"\r\n                                alignItems=\"center\"\r\n                                wrap=\"nowrap\"\r\n                                className={`${classes.headerHeight} ${\r\n                                    classes.containerProfile\r\n                                }`}>\r\n                                {profile &&\r\n                                profile.userID && ( // เช็คสำหรับเว็บ CMP กรณีประชาชนเข้าใช้ระบบจะไม่แสดงปุ่ม logout\r\n                                        <Fragment>\r\n                                            <Hidden smDown key=\"webUser\">\r\n                                                <div\r\n                                                    className={\r\n                                                        classes.textProfile\r\n                                                    }>\r\n                                                    <span\r\n                                                        className={\r\n                                                            classes.txtGroupName\r\n                                                        }>{`${\r\n                                                        profile.firstName\r\n                                                            ? profile.firstName\r\n                                                            : \"\"\r\n                                                    } ${\r\n                                                        profile.lastName\r\n                                                            ? profile.lastName\r\n                                                            : \"\"\r\n                                                    } `}</span>\r\n                                                </div>\r\n                                                <div\r\n                                                    className={\r\n                                                        classes.textProfile\r\n                                                    }>\r\n                                                    <span>{`${\r\n                                                        profile &&\r\n                                                        profile.groupName\r\n                                                            ? profile.groupName\r\n                                                            : \"\"\r\n                                                    }`}</span>\r\n                                                </div>\r\n                                            </Hidden>\r\n                                            <MenuUser history={history} />\r\n                                        </Fragment>\r\n                                    )}\r\n                            </Grid>\r\n                        </Grid>\r\n                    </Grid>\r\n                </Grid>\r\n            </AppBar>\r\n\r\n            {/* ########################## BODY ##########################*/}\r\n            <main className={classes.content}>\r\n                <div\r\n                    className={classnames(classes.divSearch, {\r\n                        [classes.hide]: !listMenuActive.Search,\r\n                    })}>\r\n                    <TextFieldLocator\r\n                        onChange={onLocatorChange}\r\n                        onTextChange={onTextLocatorChange}\r\n                    />\r\n                </div>\r\n                {children}\r\n            </main>\r\n\r\n            <PanelLayout\r\n                history={history}\r\n                isLoadMapComplete={isLoadMapComplete}\r\n            />\r\n\r\n            {/* ########################## BOTTOM ##########################*/}\r\n            {/* {!listMenuActive.Shortcut && ( */}\r\n            <>\r\n                <div className={classes.bottom}>\r\n                    {/*menu search */}\r\n                    <div\r\n                        className={`${\r\n                            classes.listMenuBottom\r\n                        } ${listMenuActive.Search &&\r\n                            classes.listMenuBottomActive}`}\r\n                        onClick={() =>\r\n                            onMenuClick(LIST_MENU_LAYOUT_MAP.SEARCH)\r\n                        }>\r\n                        <SearchIcon />\r\n                        {LIST_MENU_LAYOUT_MAP.SEARCH}\r\n                    </div>\r\n                    {/*menu map */}\r\n                    <div\r\n                        className={`${\r\n                            classes.listMenuBottom\r\n                        } ${listMenuActive.Map &&\r\n                            classes.listMenuBottomActive}`}\r\n                        onClick={() => onMenuClick(LIST_MENU_LAYOUT_MAP.MAP)}>\r\n                        <Map />\r\n                        {LIST_MENU_LAYOUT_MAP.MAP}\r\n                    </div>\r\n                    {/*menu layer */}\r\n                    <div\r\n                        className={`${\r\n                            classes.listMenuBottom\r\n                        } ${listMenuActive.Panel &&\r\n                            classes.listMenuBottomActive}`}\r\n                        onClick={() => onMenuClick(LIST_MENU_LAYOUT_MAP.MENU)}>\r\n                        <Menu />\r\n                        {LIST_MENU_LAYOUT_MAP.MENU}\r\n                    </div>\r\n                </div>\r\n            </>\r\n            {/* )} */}\r\n        </div>\r\n    );\r\n};\r\n\r\nexport default withStyles(styles, { withTheme: true })(LayoutMapView);\r\n","import React, { Fragment } from 'react';\r\nimport { withStyles } from '@material-ui/core';\r\nimport DataTable from '../../../../../../../Controls/DataTable/DataTable';\r\nimport Button from '../../../../../../../Controls/Containers/Button';\r\nimport VisibilityIcon from '@material-ui/icons/Visibility';\r\nimport SearchIcon from '@material-ui/icons/Search';\r\nimport KeyboardArrowUpIcon from '@material-ui/icons/KeyboardArrowUp';\r\nimport KeyboardArrowDownIcon from '@material-ui/icons/KeyboardArrowDown';\r\nimport CloseIcon from '@material-ui/icons/Close';\r\nimport { BTN } from '../../../../../../../Constants/Constants';\r\nimport IconButton from '@material-ui/core/IconButton';\r\n\r\nconst SearchOSSTableView = ({\r\n  classes,\r\n  page,\r\n  rowPerPage,\r\n  dataSummary,\r\n  dataTable,\r\n  filterResult,\r\n  formatImportedStartDate,\r\n  formatImportedEndDate,\r\n  total,\r\n  handleBeforeShowControl,\r\n  onChangePage,\r\n  isExpand,\r\n  onClickToggle,\r\n  onRowClick,\r\n  onExportFunction,\r\n  onClickClosePanel,\r\n}) => {\r\n  return (\r\n    <Fragment>\r\n      <div className={isExpand ? classes.rootExpand : classes.root}>\r\n        <div className={classes.sectionHeader}>\r\n          <div className={classes.headerTitle}>สรุปข้อมูลจาก OSS ที่นำเข้า</div>\r\n\r\n          <IconButton onClick={onClickToggle} className={classes.iconButtonRoot}>\r\n            {isExpand ? <KeyboardArrowDownIcon className={classes.iconButton} /> : <KeyboardArrowUpIcon className={classes.iconButton} />}\r\n          </IconButton>\r\n          <IconButton onClick={onClickClosePanel} className={classes.iconButtonRoot}>\r\n            <CloseIcon className={classes.closeButton} />\r\n          </IconButton>\r\n        </div>\r\n        <div className={classes.rootContent}>\r\n          <div className={classes.contentHeader}>\r\n            {isExpand ? (\r\n              <div className={classes.summaryDetail}>\r\n                <div className={classes.summaryDetailContent}>\r\n                  {/* <div className={classes.summaryDetailContentHeader}>\r\n                    <span>สรุปข้อมูล</span>\r\n                  </div> */}\r\n                  <div className={classes.summaryFilterResultSection}>\r\n                    <div className={classes.summaryFilterResultTitle}>\r\n                      <span>เงื่อนไขการค้นหา</span>\r\n                      <div className={classes.summaryFilterResultContent}>\r\n                        <span>จำนวนรายการทั้งหมด:</span>\r\n                        <span>จำนวนรายการที่มีค่าพิกัด:</span>\r\n                        <span>จำนวนรายการที่ไม่มีค่าพิกัด:</span>\r\n                      </div>\r\n                    </div>\r\n                    <div className={classes.summaryFilterResultContent}>\r\n                      <span>{`วันที่นำเข้าไฟล์: ${formatImportedStartDate} - ${formatImportedEndDate}`}</span>\r\n                      <span>{`เขต: ${filterResult.districtIdName}`}</span>\r\n                      <span>{`เลขที่ใบอนุญาต: ${filterResult.permitNoDisplay}`}</span>\r\n                      <span>{`${dataSummary.all}`}</span>\r\n                      <span>{`${dataSummary.countCoordinate}`}</span>\r\n                      <span>{`${dataSummary.countNoCoordinate}`}</span>\r\n                    </div>\r\n                    {/* <span>{`จำนวนรายการที่ขึ้นรูป: `}</span> */}\r\n                  </div>\r\n                </div>\r\n              </div>\r\n            ) : null}\r\n            <div className={classes.buttonGroup}>\r\n              {/* <Button className={classes.button} label={isExpand ? 'ย่อ' : 'ขยาย'} onClick={onClickToggle} /> */}\r\n              <Button className={classes.button} label={BTN.EN.EXPORT_PDF} onClick={() => onExportFunction('pdf')} />\r\n              <Button className={classes.button} label={BTN.EN.EXPORT_EXCEL} onClick={() => onExportFunction('excel')} />\r\n              {/* <Button className={classes.button} label='ปิด' onClick={onClickClosePanel} /> */}\r\n            </div>\r\n            {/* <div className={classes.summaryFilterResultContent}>\r\n                      <span>{`ช่วงวันที่นำเข้าไฟล์: ${formatImportedStartDate} - ${formatImportedEndDate}`}</span>\r\n                      <span>{`เขต: ${filterResult.districtIdName}`}</span>\r\n                      <span>{`เลขที่ใบอนุญาต: ${filterResult.permitNoDisplay}`}</span>\r\n                      <span>{`${dataSummary.all}`}</span>\r\n                      <span>{`${dataSummary.countCoordinate}`}</span>\r\n                      <span>{`${dataSummary.countNoCoordinate}`}</span>\r\n                    </div> */}\r\n          </div>\r\n          <div className={classes.dataTable}>\r\n            <DataTable\r\n              headerCssClass='table-header-style'\r\n              columns={[\r\n                { title: 'เขต', width: '9.5%', data: 'placementDistrict', align: 'left', sort: false },\r\n                { title: 'เลขที่ใบอนุญาต', data: 'permitNo', width: '11.5%', align: 'left', sort: false },\r\n                { title: 'วันที่ขออนุญาต', width: '9.5%', data: 'issuedDate', align: 'center', sort: false },\r\n                { title: 'วันที่หมดอายุ', width: '9.5%', data: 'issuedExpireDate', align: 'center', sort: false },\r\n                { title: 'ประเภทการใช้งาน', width: '9.5%', data: 'actionType', align: 'left', sort: false },\r\n                { title: 'Latitude', width: '9.5%', data: 'latitude', align: 'right', sort: false },\r\n                { title: 'Longitude', width: '9.5%', data: 'longitude', align: 'right', sort: false },\r\n                { title: 'จำนวนที่ขอ', width: '8.5%', data: 'amount', align: 'right', sort: false },\r\n                { title: 'จำนวนที่ขึ้นรูป', width: '8.5%', data: 'countPolygon', align: 'right', sort: false },\r\n                { title: 'จำนวนที่เชื่อมโยงกับบ้านเลขที่', width: '9.5%', data: 'location', align: 'right', sort: false },\r\n                { title: '', width: '5%', type: 'buttonView', align: 'center', sort: false, data: 'actions' },\r\n              ]}\r\n              rowControls={[\r\n                {\r\n                  key: 'majorTopic-edit',\r\n                  width: 50,\r\n                  colorClass: 'btn-assign-rfid',\r\n                  icon: <SearchIcon />,\r\n                },\r\n              ]}\r\n              data={dataTable}\r\n              page={page}\r\n              rowPerPage={rowPerPage}\r\n              total={total}\r\n              noDataMessage={`No Data`}\r\n              handlerBeforeShowControl={handleBeforeShowControl}\r\n              handlePageChange={onChangePage}\r\n              handleRowClick={onRowClick}\r\n              tableSearchOSS={true}\r\n              hasSortable={false}\r\n            />\r\n          </div>\r\n        </div>\r\n      </div>\r\n    </Fragment>\r\n  );\r\n};\r\n\r\nexport default withStyles((theme) => ({\r\n  root: {\r\n    width: '100%',\r\n    height: '45%',\r\n    backgroundColor: '#FFFFFF',\r\n    position: 'absolute',\r\n    bottom: '0',\r\n    transition: 'height 1s',\r\n    zIndex: 999,\r\n    boxShadow: '2px 0px 22px -5px rgba(0, 0, 0, 1)',\r\n  },\r\n  rootExpand: {\r\n    width: '100%',\r\n    height: '95%',\r\n    backgroundColor: '#FFFFFF',\r\n    position: 'absolute',\r\n    bottom: '0',\r\n    transition: 'height 1s',\r\n    zIndex: 999,\r\n    boxShadow: '2px 0px 22px -5px rgba(0, 0, 0, 1)',\r\n  },\r\n  sectionHeader: {\r\n    height: '35px',\r\n    width: '100%',\r\n    backgroundColor: '#38A153',\r\n    paddingRight: '10px',\r\n    paddingLeft: '10px',\r\n    display: 'flex',\r\n    alignItems: 'center',\r\n    justifyContent: 'end',\r\n    gap: '10px',\r\n  },\r\n  rootContent: {\r\n    display: 'flex',\r\n    gap: '10px',\r\n    flexDirection: 'column',\r\n    width: '100%',\r\n    height: '100%',\r\n    padding: '10px',\r\n  },\r\n  buttonGroup: {\r\n    display: 'flex',\r\n    gap: '10px',\r\n    // padding: '10px 10px 0px 10px',\r\n    alignItems: 'flex-start',\r\n  },\r\n  summaryDetail: {\r\n    // height: '200px',\r\n    height: '166px',\r\n    // padding: '10px',\r\n    width: '100%',\r\n  },\r\n  summaryDetailContent: {\r\n    width: '100%',\r\n    height: '100%',\r\n    // backgroundColor: '#38A153',\r\n    padding: '10px',\r\n    border: '1px solid #e9e9e9',\r\n    borderRadius: '10px',\r\n  },\r\n  summaryDetailContentHeader: {\r\n    textAlign: 'center',\r\n    // color: '#FFFFFF',\r\n  },\r\n  summaryDetailContentText: {\r\n    display: 'flex',\r\n    justifyContent: 'space-around',\r\n    // color: '#FFFFFF',\r\n  },\r\n  summaryFilterResultSection: {\r\n    display: 'flex',\r\n    // justifyContent: 'space-around',\r\n    gap: '20px',\r\n  },\r\n  summaryFilterResultTitle: {\r\n    display: 'flex',\r\n    flexDirection: 'column',\r\n    justifyContent: 'space-between',\r\n  },\r\n  summaryFilterResultContent: {\r\n    display: 'flex',\r\n    flexDirection: 'column',\r\n  },\r\n  dataTable: {\r\n    height: '100%',\r\n    // padding: '0 10px',\r\n  },\r\n  contentHeader: {\r\n    display: 'flex',\r\n    width: '100%',\r\n    justifyContent: 'end',\r\n    gap: '10px',\r\n  },\r\n  button: {\r\n    textWrap: 'nowrap',\r\n  },\r\n  iconButton: {\r\n    fill: '#FFFFFF',\r\n  },\r\n  closeButton: {\r\n    fontSize: '24px',\r\n    fill: '#FFFFFF',\r\n  },\r\n  iconButtonRoot: {\r\n    padding: '4px',\r\n  },\r\n  headerTitle: {\r\n    color: '#FFFFFF',\r\n    width: '100%',\r\n  },\r\n}))(SearchOSSTableView);\r\n","// import {numberWithCommas} from '../../../../../../../../Utilities/Utils'\r\nimport pdfMake from 'pdfmake/build/pdfmake';\r\nimport pdfFonts from 'pdfmake/build/vfs_fonts';\r\nimport { FOOTER_REPORT } from '../../../../../../../Constants/Constants';\r\nimport * as DateTimeUtil from '../../../../../../../Utilities/DateTimeUtil';\r\n\r\npdfMake.vfs = pdfFonts.pdfMake.vfs;\r\npdfMake.fonts = {\r\n  THSarabun: {\r\n    normal: 'THSarabun.ttf',\r\n    bold: 'THSarabun-Bold.ttf',\r\n    italics: 'THSarabun-Italic.ttf',\r\n    bolditalics: 'THSarabun-BoldItalic.ttf',\r\n  },\r\n  Roboto: {\r\n    normal: 'Roboto-Regular.ttf',\r\n    bold: 'Roboto-Medium.ttf',\r\n    italics: 'Roboto-Italic.ttf',\r\n    bolditalics: 'Roboto-MediumItalic.ttf',\r\n  },\r\n};\r\n\r\nconst configPage = {\r\n  pageSize: 'A4',\r\n  pageOrientation: 'landscape', //portrait\r\n  info: {\r\n    title: 'รายงานสรุปผลการแจ้ง ผมร.1 รายเขต',\r\n    subject: 'รายงานสรุปผลการแจ้ง ผมร.1 รายเขต',\r\n    keywords: 'รายงานสรุปผลการแจ้ง ผมร.1 รายเขต',\r\n  },\r\n  pageMargins: [5, 40, 10, 40], // [left, top, right, bottom] or [horizontal, vertical]\r\n};\r\n\r\nconst fontStyle = {\r\n  fontHeading: {\r\n    fontSize: 18,\r\n  },\r\n  fontTitle: {\r\n    fontSize: 16,\r\n  },\r\n  fontSubheading: {\r\n    fontSize: 14,\r\n  },\r\n  fontBody: {\r\n    fontSize: 12,\r\n  },\r\n};\r\n\r\nconst tableStyle = {\r\n  rowNumber: {\r\n    alignment: 'right',\r\n  },\r\n  rowHeaderColor: {\r\n    fillColor: '#5E9A50',\r\n  },\r\n  rowSubHeaderColor: {\r\n    fillColor: '#DAEEF3',\r\n  },\r\n  rowFooterColor: {\r\n    fillColor: '#5E9A50',\r\n  },\r\n  rowOtherColor1: {\r\n    fillColor: '#D0EFDA',\r\n  },\r\n  rowOtherColor2: {\r\n    fillColor: '#E5F6E8',\r\n  },\r\n};\r\n\r\nconst generateTableHeader = (datasource = []) => {\r\n  // makeTableContent(datasource)\r\n  return [\r\n    {\r\n      margin: [0, 15, 0, 0], //[left, top, right, bottom]\r\n      columns: [\r\n        { width: '*', text: '' },\r\n        {\r\n          width: 'auto',\r\n          table: {\r\n            // headers are automatically repeated if the table spans over multiple pages\r\n            // you can declare how many rows should be treated as headers\r\n            headerRows: 1,\r\n            widths: [70, 110, 70, 70, 70, 70, 70, 55, 55, 70],\r\n            body: [\r\n              [\r\n                {\r\n                  text: 'เขต',\r\n                  style: ['fontTitle', 'alignmentCenter', 'rowHeaderColor'],\r\n                  bold: true,\r\n                },\r\n                {\r\n                  text: `เลขที่ใบอนุญาต`,\r\n                  style: ['fontTitle', 'alignmentCenter', 'rowHeaderColor'],\r\n                  bold: true,\r\n                },\r\n                {\r\n                  text: `วันที่ขออนุญาต`,\r\n                  style: ['fontTitle', 'alignmentCenter', 'rowHeaderColor'],\r\n                  bold: true,\r\n                },\r\n                {\r\n                  text: `วันที่หมดอายุ`,\r\n                  style: ['fontTitle', 'alignmentCenter', 'rowHeaderColor'],\r\n                  bold: true,\r\n                },\r\n                {\r\n                  text: 'ประเภทการ ใช้งาน',\r\n                  style: ['fontTitle', 'alignmentCenter', 'rowHeaderColor'],\r\n                  bold: true,\r\n                },\r\n                {\r\n                  text: 'Latitude',\r\n                  style: ['fontTitle', 'alignmentCenter', 'rowHeaderColor'],\r\n                  bold: true,\r\n                },\r\n                {\r\n                  text: 'longitude',\r\n                  style: ['fontTitle', 'alignmentCenter', 'rowHeaderColor'],\r\n                  bold: true,\r\n                },\r\n                {\r\n                  text: 'จำนวนที่ขอ',\r\n                  style: ['fontTitle', 'alignmentCenter', 'rowHeaderColor'],\r\n                  bold: true,\r\n                },\r\n                {\r\n                  text: 'จำนวนที่ ขึ้นรูป',\r\n                  style: ['fontTitle', 'alignmentCenter', 'rowHeaderColor'],\r\n                  bold: true,\r\n                },\r\n                {\r\n                  text: 'จำนวนที่ เชื่อมโยงกับบ้านเลขที่',\r\n                  style: ['fontTitle', 'alignmentCenter', 'rowHeaderColor'],\r\n                  bold: true,\r\n                },\r\n              ],\r\n\r\n              ...makeTableContent(datasource),\r\n            ],\r\n          },\r\n        },\r\n        { width: '*', text: '' },\r\n      ],\r\n    },\r\n  ];\r\n};\r\n\r\n// const makeRowSubheader = (txt) => {\r\n//     return [\r\n//         {\r\n//             text: txt,\r\n//             colSpan: 8,\r\n//             style: ['fontTitle', 'rowSubHeaderColor', 'alignmentCenter']\r\n//         }\r\n//     ]\r\n// }\r\n\r\nconst makeRowITM = (rowITM) => {\r\n  // const FIXED_NUMBER = 2; //กำหนดจำนวนทศนิยม\r\n\r\n  return [\r\n    {\r\n      text: rowITM.placementDistrict, //เขต\r\n      style: ['fontTitle'],\r\n    },\r\n    {\r\n      text: rowITM.permitNo, //เลขที่ใบอนุญาต\r\n      style: ['fontTitle'],\r\n    },\r\n    {\r\n      text: rowITM.issuedDate, //วันที่ขออนุญาต\r\n      style: ['fontTitle', 'alginmentCenter'],\r\n    },\r\n    {\r\n      text: rowITM.issuedExpireDate, //วันที่หมดอายุ\r\n      style: ['fontTitle', 'alginmentCenter'],\r\n    },\r\n    {\r\n      text: rowITM.actionType, //ประเภทการใช้งาน\r\n      style: ['fontTitle'],\r\n    },\r\n    {\r\n      text: rowITM.longitude, //longitude\r\n      style: ['fontTitle', 'alignmentRight'],\r\n    },\r\n    {\r\n      text: rowITM.latitude, //Latitude\r\n      style: ['fontTitle', 'alignmentRight'],\r\n    },\r\n    {\r\n      text: rowITM.amount, //จำนวนที่ขอ\r\n      style: ['fontTitle', 'alignmentRight'],\r\n    },\r\n    {\r\n      text: rowITM.countPolygon, //จำนวนที่ขึ้นรูป\r\n      style: ['fontTitle', 'alignmentRight'],\r\n    },\r\n    {\r\n      text: rowITM.location, //จำนวนที่เชื่อมโยงกับบ้านเลขที่\r\n      style: ['fontTitle'],\r\n    },\r\n  ];\r\n};\r\n\r\nconst makeTableContent = (datasource = []) => {\r\n  // let rowNo = 1;\r\n  const listRow = [];\r\n  datasource.forEach((groupITM) => {\r\n    //content\r\n    listRow.push(\r\n      makeRowITM({\r\n        ...groupITM,\r\n      })\r\n    );\r\n  });\r\n  return listRow;\r\n};\r\n\r\nconst SearchOSSReportPDF = (datasource = [], summary, filterResult) => {\r\n  const formatImportedStartDate = filterResult.startDate\r\n    ? DateTimeUtil.convertDateTimeToDisplayDate(filterResult.startDate, 'd MMM yyyy')\r\n    : 'ไม่ระบุ';\r\n  const formatImportedEndDate = filterResult.endDate ? DateTimeUtil.convertDateTimeToDisplayDate(filterResult.endDate, 'd MMM yyyy') : 'ไม่ระบุ';\r\n  const today = DateTimeUtil.convertDateTimeToDisplayDate(new Date(), 'd MMM yyyy');\r\n  const docDefinition = {\r\n    ...configPage,\r\n    footer: {\r\n      columns: [\r\n        {\r\n          text: FOOTER_REPORT,\r\n          alignment: 'right',\r\n          margin: [0, 0, 35, 0],\r\n          fontSize: 10,\r\n        },\r\n      ],\r\n    },\r\n    content: [\r\n      {\r\n        text: `สรุปข้อมูลจาก OSS ที่นำเข้าและสถานะ ณ วันที่ ${today}`,\r\n        style: ['fontTitle', 'header', 'alignmentCenter'],\r\n        width: '*',\r\n        noWrap: true,\r\n      },\r\n      {\r\n        text: `เงื่อนไขการค้นหา ช่วงวันที่นำเข้าไฟล์: ${formatImportedStartDate} - ${formatImportedEndDate}`,\r\n        style: ['fontTitle', 'header'],\r\n        margin: [20, 10, 0, 0], //[left, top, right, bottom]\r\n        width: '*',\r\n        noWrap: true,\r\n      },\r\n      {\r\n        text: `เขต: ${filterResult.districtIdName}`,\r\n        style: ['fontTitle', 'header'],\r\n        margin: [100, 0, 0, 0],\r\n        width: '*',\r\n      },\r\n      {\r\n        text: `เลขที่ใบอนุญาต: ${filterResult.permitNoDisplay}`,\r\n        style: ['fontTitle', 'header'],\r\n        margin: [100, 0, 0, 0],\r\n        width: '*',\r\n      },\r\n      {\r\n        text: `จำนวนรายการทั้งหมด: ${summary.all}`,\r\n        style: ['fontTitle', 'header'],\r\n        margin: [20, 0, 0, 0], //[left, top, right, bottom]\r\n        width: '*',\r\n        noWrap: true,\r\n      },\r\n      {\r\n        text: `จำนวนรายการที่มีค่าพิกัด: ${summary.countCoordinate}`,\r\n        style: ['fontTitle', 'header'],\r\n        margin: [20, 0, 0, 0], //[left, top, right, bottom]\r\n        width: '*',\r\n        noWrap: true,\r\n      },\r\n      {\r\n        text: `จำนวนรายการที่ไม่มีค่าพิกัด: ${summary.countNoCoordinate}`,\r\n        style: ['fontTitle', 'header'],\r\n        margin: [20, 0, 0, 0], //[left, top, right, bottom]\r\n        width: '*',\r\n        noWrap: true,\r\n      },\r\n      ...generateTableHeader(datasource),\r\n    ],\r\n    styles: {\r\n      ...fontStyle,\r\n      ...tableStyle,\r\n      header: {\r\n        bold: true,\r\n      },\r\n      alignmentCenter: {\r\n        alignment: 'center',\r\n      },\r\n      alignmentRight: {\r\n        alignment: 'right',\r\n      },\r\n      alignmentLeft: {\r\n        alignment: 'left',\r\n      },\r\n    },\r\n    defaultStyle: {\r\n      font: 'THSarabun',\r\n      columnGap: 10,\r\n    },\r\n  };\r\n  // pdfMake.createPdf(docDefinition).open()\r\n  pdfMake.createPdf(docDefinition).download('ค้นหาและดูข้อมูลจาก OSS.pdf');\r\n};\r\n\r\nexport default SearchOSSReportPDF;\r\n","import Excel from 'exceljs/dist/es5/exceljs.browser';\r\nimport * as DateTimeUtil from '../../../../../../../Utilities/DateTimeUtil';\r\n\r\nconst DistrictReportExcel = (datasource = [], summary, filterResult) => {\r\n  const formatImportedStartDate = filterResult.startDate\r\n    ? DateTimeUtil.convertDateTimeToDisplayDate(filterResult.startDate, 'd MMM yyyy')\r\n    : 'ไม่ระบุ';\r\n  const formatImportedEndDate = filterResult.endDate ? DateTimeUtil.convertDateTimeToDisplayDate(filterResult.endDate, 'd MMM yyyy') : 'ไม่ระบุ';\r\n  const startRowHeader = 9; //เป็น 9 ใน excel มีชื่อเรืองใช้่ row 1,2 ไปแล้ว\r\n  const workbook = new Excel.Workbook();\r\n  const worksheet = workbook.addWorksheet('sheet', {\r\n    //จำเป็นต้องตั้งค่าส่วนนี้\r\n    pageSetup: {\r\n      paperSize: 9, //follow documentation the 9 value is A4\r\n      orientation: 'portrait',\r\n    },\r\n  });\r\n  workbook.creator = 'PMR-WEB';\r\n  workbook.lastModifiedBy = 'PMR-WEB';\r\n\r\n  const setCellBorder = (colKey) => {\r\n    worksheet.getCell(colKey).border = {\r\n      top: { style: 'thin' },\r\n      left: { style: 'thin' },\r\n      bottom: { style: 'thin' },\r\n      right: { style: 'thin' },\r\n    };\r\n  };\r\n\r\n  const setContentBorder = (colKey) => {\r\n    worksheet.getCell(colKey).border = {\r\n      left: { style: 'thin' },\r\n      right: { style: 'thin' },\r\n    };\r\n  };\r\n\r\n  const setLastContentBorder = (colKey) => {\r\n    worksheet.getCell(colKey).border = {\r\n      left: { style: 'thin' },\r\n      bottom: { style: 'thin' },\r\n      right: { style: 'thin' },\r\n    };\r\n  };\r\n\r\n  const setContentColor = (colKey) => {\r\n    worksheet.getCell(colKey).fill = {\r\n      type: 'pattern',\r\n      pattern: 'solid',\r\n      fgColor: {\r\n        argb: '00D0EFDA',\r\n      },\r\n    };\r\n  };\r\n\r\n  const loadTopic = () => {\r\n    const today = DateTimeUtil.convertDateTimeToDisplayDate(new Date(), 'd MMM yyyy');\r\n    worksheet.mergeCells('A1:I1');\r\n    worksheet.getCell('A1').value = `สรุปข้อมูลจาก OSS ที่นำเข้าและสถานะ ณ วันที่ ${today}`;\r\n    worksheet.getCell('A1').alignment = { horizontal: 'center' };\r\n\r\n    // worksheet.mergeCells('A2:B2');\r\n    worksheet.getCell('A2').value = `เงื่อนไขการค้นหา`;\r\n    // worksheet.getCell('A2').alignment = { horizontal: 'center' };\r\n    worksheet.getCell('B2').value = `ช่วงวันที่นำเข้าไฟล์: ${formatImportedStartDate} - ${formatImportedEndDate}`;\r\n\r\n    // worksheet.mergeCells('A3:B3');\r\n    worksheet.getCell('B3').value = `เขต: ${filterResult.districtIdName}`;\r\n    // worksheet.getCell('B3').alignment = { horizontal: 'center' };\r\n\r\n    // worksheet.mergeCells('A4:B4');\r\n    worksheet.getCell('B4').value = `เลขที่ใบอนุญาต: ${filterResult.permitNoDisplay}`;\r\n    // worksheet.getCell('B4').alignment = { horizontal: 'center' };\r\n\r\n    // worksheet.mergeCells('A5:H5');\r\n    // worksheet.getCell('A5').value = `ผลลัพธ์การค้นหารวม: ${summary.all} พบค่าพิกัด: ${summary.countCoordinate} ไม่พบพิกัด: ${\r\n    //   summary.countNoCoordinate\r\n    // }`;\r\n    // worksheet.getCell('A5').alignment = { horizontal: 'center' };\r\n    worksheet.getCell('A5').value = 'จำนวนรายการทั้งหมด';\r\n    worksheet.getCell('B5').value = summary.all;\r\n\r\n    worksheet.getCell('A6').value = 'จำนวนรายการที่มีค่าพิกัด';\r\n    worksheet.getCell('B6').value = summary.countCoordinate;\r\n\r\n    worksheet.getCell('A7').value = 'จำนวนรายการที่ไม่มีค่าพิกัด';\r\n    worksheet.getCell('B7').value = summary.countNoCoordinate;\r\n  };\r\n\r\n  const loadHeader = () => {\r\n    //ใน Excel จะอยู่แถวแรก A1,B1,C1,D1,E1,F1,G1,H1,I1\r\n    const arrHeader = [\r\n      {\r\n        name: 'เขต',\r\n        key: 'placementDistrict',\r\n        width: 20,\r\n      },\r\n      {\r\n        name: 'เลขที่ใบอนุญาต',\r\n        key: 'permitNo',\r\n        width: 40,\r\n      },\r\n      {\r\n        name: 'วันที่ขออนุญาต',\r\n        key: 'issuedDate',\r\n        width: 20,\r\n      },\r\n      {\r\n        name: 'วันที่หมดอายุ',\r\n        key: 'issuedExpireDate',\r\n        width: 20,\r\n      },\r\n      {\r\n        name: 'ประเภทการใช้งาน',\r\n        key: 'actionType',\r\n        width: 20,\r\n      },\r\n      {\r\n        name: 'Latitude',\r\n        key: 'latitude',\r\n        width: 20,\r\n      },\r\n      {\r\n        name: 'Longitude',\r\n        key: 'longitude',\r\n        width: 20,\r\n      },\r\n      {\r\n        name: 'จำนวนที่ขอ',\r\n        key: 'amount',\r\n        width: 20,\r\n      },\r\n      {\r\n        name: 'จำนวนที่ขึ้นรูป',\r\n        key: 'countPolygon',\r\n        width: 20,\r\n      },\r\n      {\r\n        name: 'จำนวนที่เชื่อมโยงกับบ้านเลขที่',\r\n        key: 'location', //ใช้ไปก่อนรอ key จาก api\r\n        width: 20,\r\n      },\r\n    ];\r\n    worksheet.columns = arrHeader.map((itm) => ({ key: itm.key, width: itm.width }));\r\n    worksheet.getRow(startRowHeader).values = arrHeader.map((itm) => itm.name);\r\n    //กำหนด style ให้ cell Header\r\n    [\r\n      `A${startRowHeader}`,\r\n      `B${startRowHeader}`,\r\n      `C${startRowHeader}`,\r\n      `D${startRowHeader}`,\r\n      `E${startRowHeader}`,\r\n      `F${startRowHeader}`,\r\n      `G${startRowHeader}`,\r\n      `H${startRowHeader}`,\r\n      `I${startRowHeader}`,\r\n      `J${startRowHeader}`,\r\n    ].forEach((colKey) => {\r\n      setCellBorder(colKey);\r\n      worksheet.getCell(colKey).alignment = { vertical: 'middle', horizontal: 'center', wrapText: true };\r\n      worksheet.getCell(colKey).fill = {\r\n        type: 'pattern',\r\n        pattern: 'solid',\r\n        fgColor: {\r\n          argb: '005E9A50',\r\n        },\r\n      };\r\n    });\r\n    //กำหนด format\r\n\r\n    // worksheet.getColumn('D').numFmt = '#,##0.00';\r\n    // worksheet.getColumn('E').numFmt = '#,##0.00';\r\n    // worksheet.getColumn('F').numFmt = '#,##0.00';\r\n    // worksheet.getColumn('G').numFmt = '#,##0.00';\r\n    // worksheet.getColumn('H').numFmt = '#,##0.00';\r\n  };\r\n  // const makeSubHeader = (colKey, mergeRang, name) => {//colKey ยกตัวอย่างเช่น 'A1' 'B1' เป็นต้น | mergeRang ต้องกำหนดแบบ 'A1:F1'\r\n  //     worksheet.mergeCells(mergeRang);\r\n  //     worksheet.getCell(colKey).value = name;\r\n  //     worksheet.getCell(colKey).alignment = { horizontal:'center'};\r\n  //     setCellBorder(colKey);\r\n  //     worksheet.getCell(colKey).fill = {\r\n  //         type: 'pattern',\r\n  //         pattern:'solid',\r\n  //         fgColor:{\r\n  //             argb:'00DAEEF3'\r\n  //         }\r\n  //     }\r\n  // }\r\n\r\n  const setCellFontColor = (colKey, argb, isBold) => {\r\n    worksheet.getCell(colKey).font = {\r\n      bold: isBold,\r\n      color: { argb: argb },\r\n    };\r\n  };\r\n\r\n  const makeRowITM = (rowNumber, rowITM, isSummaryRow = false) => {\r\n    worksheet.addRow({\r\n      permitNo: rowITM.permitNo,\r\n      issuedDate: rowITM.issuedDate,\r\n      issuedExpireDate: rowITM.issuedExpireDate,\r\n      actionType: rowITM.actionType,\r\n      placementDistrict: rowITM.placementDistrict,\r\n      amount: rowITM.amount,\r\n      countPolygon: rowITM.countPolygon,\r\n      location: rowITM.location,\r\n      latitude: rowITM.latitude,\r\n      longitude: rowITM.longitude,\r\n    });\r\n\r\n    const arrColKey = [\r\n      `A${rowNumber}`,\r\n      `B${rowNumber}`,\r\n      `C${rowNumber}`,\r\n      `D${rowNumber}`,\r\n      `E${rowNumber}`,\r\n      `F${rowNumber}`,\r\n      `G${rowNumber}`,\r\n      `H${rowNumber}`,\r\n      `I${rowNumber}`,\r\n      `J${rowNumber}`,\r\n    ];\r\n\r\n    arrColKey.forEach((colKey) => {\r\n      // setCellBorder(colKey);\r\n      setContentBorder(colKey);\r\n      if (rowITM.isOddRow) {\r\n        setContentColor(colKey);\r\n      }\r\n      if (isSummaryRow) {\r\n        //\r\n        setCellFontColor(colKey, '00FF0000', true);\r\n      }\r\n      if (rowITM.lastRow) {\r\n        setLastContentBorder(colKey);\r\n      }\r\n    });\r\n  };\r\n\r\n  const makeRowContent = () => {\r\n    try {\r\n      let rowSubHeaderNumber = startRowHeader; //สำหรับรันเลขตำแหน่งเริ่มต้นของ group\r\n      let rowNO = 1;\r\n      let rowNumber = rowSubHeaderNumber + 1;\r\n      datasource.forEach((rowITM) => {\r\n        makeRowITM(rowNumber, {\r\n          no: rowNO++,\r\n          ...rowITM,\r\n        });\r\n        rowNumber++;\r\n      });\r\n    } catch (err) {\r\n      console.log('Error Generate Row Excel file DistrictReportExcel.js: ', err);\r\n      throw new Error(err);\r\n    }\r\n  };\r\n\r\n  const processColumns = () => {\r\n    loadTopic();\r\n    loadHeader();\r\n    makeRowContent();\r\n  };\r\n\r\n  //Main Program\r\n  processColumns();\r\n  workbook.xlsx.writeBuffer().then(function(xls64data) {\r\n    const blob = new Blob([xls64data], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });\r\n    const url = window.URL.createObjectURL(blob);\r\n    const anchor = document.createElement('a');\r\n    document.body.appendChild(anchor); //for firefox ref: https://stackoverflow.com/questions/41805095/excel-export-not-working-on-firefox-but-working-fine-in-google-crome/41806544\r\n    anchor.href = url;\r\n    anchor.download = 'ค้นหาและดูข้อมูลจาก_OSS.xlsx';\r\n    var isIE = /*@cc_on!@*/ false || !!document.documentMode;\r\n    var isEdge = !isIE && !!window.StyleMedia;\r\n    if (isEdge) {\r\n      anchor.click();\r\n      anchor.change();\r\n    } else {\r\n      anchor.click();\r\n    }\r\n    anchor.change();\r\n    anchor.click();\r\n    window.URL.revokeObjectURL(url);\r\n  });\r\n};\r\n\r\nexport default DistrictReportExcel;\r\n","import React, { Component, Fragment } from 'react';\r\nimport { compose } from 'recompose';\r\nimport { connect } from 'react-redux';\r\nimport EsriLoader from 'esri-loader';\r\n\r\nimport SearchOSSTableView from './SearchOSSTableView';\r\nimport SearchOSSReportPDF from '../../Report/SearchOSSReport/SearchOSSReportPDF';\r\nimport SearchOSSReportExcel from '../../Report/SearchOSSReport/SearchOSSReportExcel';\r\nimport * as DateTimeUtil from '../../../../../../../Utilities/DateTimeUtil';\r\n\r\n//map\r\nimport * as MapActions from '../../../../../../../Actions/Web/Maps/MapAction';\r\nimport * as MapFunctions from '../../../../../../../Map/MapFunctions';\r\nimport * as NewTOCAction from '../../../../../../../Actions/Web/Maps/NewTOCAction';\r\nimport * as MenuAction from '../../../../../../../Actions/Web/MenuAction';\r\nimport { bindActionCreators } from 'redux';\r\n\r\nimport AlertMessageSuper from '../../../../../../../Controls/Containers/AlertMessageSuper';\r\nimport WithAlertMessage from '../../../../../../../HOC/WithAlertMessage';\r\n\r\nexport class SearchOSSTable extends Component {\r\n  constructor() {\r\n    super();\r\n    this.state = {\r\n      page: 1,\r\n      rowPerPage: 10,\r\n      isExpand: false,\r\n    };\r\n  }\r\n\r\n  componentWillUnmount() {\r\n    this.closeTOCLayer();\r\n  }\r\n\r\n  onClickClosePanel = () => {\r\n    const { MapActions, MenuAction } = this.props;\r\n    MapActions.bindEvtOnShowDataTableOss(false);\r\n    MenuAction.openMenuPanel();\r\n  };\r\n\r\n  onClickToggle = () => {\r\n    this.setState({\r\n      isExpand: !this.state.isExpand,\r\n    });\r\n  };\r\n\r\n  onRowClick = async (event) => {\r\n    this.setState({\r\n      isExpand: false,\r\n    });\r\n\r\n    await this.gotoPoint(event.longitude, event.latitude);\r\n    await this.queryWithFeature(event);\r\n    await this.openTOCLayer();\r\n  };\r\n\r\n  gotoPoint = async (longitude, latitude) => {\r\n    const isHaveLatLong = longitude !== '-' && latitude !== '-'\r\n    if(isHaveLatLong) {\r\n      const { MapActions } = this.props;\r\n      await MapActions.bindMapCommand(MapFunctions.setZoomTo20)\r\n      await MapActions.bindMapCommand(MapFunctions.gotoLocation, {\r\n        projection: 0,\r\n        latitude: latitude,\r\n        longitude: longitude,\r\n        showAlert: () => {},\r\n        offset: 20\r\n      });\r\n    } else {\r\n      const { showAlert } = this.props;\r\n      showAlert({ altMsg: 'ไม่พบข้อมูลตำแหน่งบนแผนที่' })\r\n    }\r\n    \r\n  };\r\n\r\n  queryWithFeature = async (event) => {\r\n    // console.log('queryWithFeature');\r\n    const { MapActions } = this.props;\r\n    await MapActions.bindMapCommand(MapFunctions.buildingGPOSS, {\r\n      permitNo: event.permitNo,\r\n    });\r\n  };\r\n\r\n  openTOCLayer = async () => {\r\n    const { MapActions, NewTOCAction } = this.props;\r\n    await NewTOCAction.checkParentLayer('ขอบเขตอาคารสร้างโดยทีม สวพ');\r\n    await MapActions.bindMapCommand(MapFunctions.setTOCVisibleLayer, {\r\n      layerID: 'ขอบเขตอาคารสร้างโดยทีม สวพ',\r\n      isVisible: true,\r\n    });\r\n\r\n    await NewTOCAction.checkParentLayer('ตำแหน่งอนุญาตก่อสร้าง');\r\n    await MapActions.bindMapCommand(MapFunctions.setTOCVisibleLayer, {\r\n      layerID: 'ตำแหน่งอนุญาตก่อสร้าง',\r\n      isVisible: true,\r\n    });\r\n  };\r\n\r\n  closeTOCLayer = async () => {\r\n    const { MapActions, NewTOCAction } = this.props;\r\n    await NewTOCAction.checkParentLayer('ขอบเขตอาคารสร้างโดยทีม สวพ');\r\n    await MapActions.bindMapCommand(MapFunctions.setTOCVisibleLayer, {\r\n      layerID: 'ขอบเขตอาคารสร้างโดยทีม สวพ',\r\n      isVisible: false,\r\n    });\r\n\r\n    await NewTOCAction.checkParentLayer('ตำแหน่งอนุญาตก่อสร้าง');\r\n    await MapActions.bindMapCommand(MapFunctions.setTOCVisibleLayer, {\r\n      layerID: 'ตำแหน่งอนุญาตก่อสร้าง',\r\n      isVisible: false,\r\n    });\r\n  };\r\n\r\n  onExportFunction = (key) => {\r\n    const { searchOSSRdc } = this.props;\r\n    if (key === 'pdf') {\r\n      this.executeReport(searchOSSRdc, SearchOSSReportPDF);\r\n    } else {\r\n      this.executeReport(searchOSSRdc, SearchOSSReportExcel);\r\n    }\r\n  };\r\n\r\n  executeReport = (value, reportFunction) => {\r\n    reportFunction(value.dataTable, value.summary, value.filterResult);\r\n  };\r\n\r\n  handleChangePage = (page) => {\r\n    this.setState({\r\n      page: page,\r\n    });\r\n  };\r\n\r\n  handleBeforeShowControl = (data) => {\r\n    return false;\r\n  };\r\n\r\n  createDataTable = () => {\r\n    const { searchOSSRdc } = this.props;\r\n    const { page } = this.state;\r\n    const specSize = parseInt(1 * ((window.innerHeight - 354) / 48)) > 0 ? parseInt((1 * (window.innerHeight - 354)) / 48) : 1;\r\n    const finalListIntablePage = parseInt(page * specSize);\r\n    const lenTableData = finalListIntablePage % specSize === 0 ? finalListIntablePage : finalListIntablePage - (finalListIntablePage % specSize);\r\n    const tableData = searchOSSRdc.dataTable.slice((page - 1) * specSize, lenTableData);\r\n    const matHeight = tableData.length * 48 + 135;\r\n\r\n    return {\r\n      specSize,\r\n      finalListIntablePage,\r\n      lenTableData,\r\n      tableData,\r\n      matHeight,\r\n    };\r\n  };\r\n\r\n  render() {\r\n    const dataTable = this.createDataTable();\r\n    const { searchOSSRdc } = this.props;\r\n    const { page, isExpand } = this.state;\r\n    const formatImportedStartDate = searchOSSRdc.filterResult.startDate\r\n      ? DateTimeUtil.convertDateTimeToDisplayDate(searchOSSRdc.filterResult.startDate, 'd MMM yyyy')\r\n      : 'ไม่ระบุ';\r\n    const formatImportedEndDate = searchOSSRdc.filterResult.endDate\r\n      ? DateTimeUtil.convertDateTimeToDisplayDate(searchOSSRdc.filterResult.endDate, 'd MMM yyyy')\r\n      : 'ไม่ระบุ';\r\n\r\n    return (\r\n      <Fragment>\r\n        <SearchOSSTableView\r\n          page={page}\r\n          rowPerPage={dataTable.specSize}\r\n          dataSummary={searchOSSRdc.summary}\r\n          dataTable={dataTable.tableData}\r\n          filterResult={searchOSSRdc.filterResult}\r\n          formatImportedStartDate={formatImportedStartDate}\r\n          formatImportedEndDate={formatImportedEndDate}\r\n          total={searchOSSRdc.dataTable.length}\r\n          handleBeforeShowControl={this.handleBeforeShowControl}\r\n          onChangePage={this.handleChangePage}\r\n          isExpand={isExpand}\r\n          onClickToggle={this.onClickToggle}\r\n          onRowClick={this.onRowClick}\r\n          onExportFunction={this.onExportFunction}\r\n          onClickClosePanel={this.onClickClosePanel}\r\n        />\r\n        <AlertMessageSuper {...this.props} />\r\n      </Fragment>\r\n    );\r\n  }\r\n}\r\n\r\nconst mapStateToProps = (state) => ({\r\n  searchOSSRdc: state.searchOSSReducer,\r\n});\r\n\r\nconst mapDispatchToProps = (dispatch) => ({\r\n  NewTOCAction: bindActionCreators(NewTOCAction, dispatch),\r\n  MapActions: bindActionCreators(MapActions, dispatch),\r\n  MenuAction: bindActionCreators(MenuAction, dispatch),\r\n});\r\n\r\nexport default compose(\r\n  connect(\r\n    mapStateToProps,\r\n    mapDispatchToProps\r\n  ),\r\n  WithAlertMessage\r\n)(SearchOSSTable);\r\n","import React, { Fragment, Component } from 'react';\r\nimport { bindActionCreators } from 'redux';\r\nimport { connect } from 'react-redux';\r\nimport { concat, flatten } from 'lodash';\r\nimport uniqid from 'uniqid';\r\n\r\n//import actions\r\nimport * as MapAction from '../../Actions/Web/Maps/MapAction';\r\nimport * as MapFunctions from '../../Map/MapFunctions';\r\nimport * as MenuAction from '../../Actions/Web/MenuAction';\r\nimport * as SatisfactionAndStatisticAction from '../../Actions/Web/Panel/SatisfactionAndStatisticAction';\r\n\r\n//import service - utils\r\nimport * as LocatorUtil from \"../../Utilities/LocatorUtil\";\r\nimport { fetchPost_ } from \"../../Utilities/ServiceUtils\";\r\n\r\n//import constants\r\nimport { LIST_MENU_LAYOUT_MAP, PROFILE_GROUP_TYPE, SYSTEM } from '../../Constants/Constants';\r\n\r\n//import component\r\nimport Loading from '../../Controls/Containers/Loading';\r\nimport WithLoading from '../../HOC/WithLoading';\r\nimport Coordinate from './Coordinate/Coordinate';\r\nimport LayoutMapView from '../../Presentationals/Web/LayoutMapView';\r\nimport SearchOSSTable from './Panel/Menu/MenuContent/SearchOSS/SearchOSSTable/SearchOSSTable';\r\n\r\nclass LayoutMap extends Component {\r\n  componentDidMount() {\r\n    this.manageActionBySystem();\r\n  }\r\n\r\n  manageActionBySystem = () => {\r\n    // จัดการเมื่อเข้าเว็บมาครั้งแรกของแต่ละระบบ\r\n    const { satisfactionAndStatisticAction, authenRdc } = this.props;\r\n    satisfactionAndStatisticAction.saveSessionId(uniqid() + uniqid());\r\n\r\n    switch (authenRdc.system) {\r\n      case SYSTEM.PMR1:\r\n        this.saveStatisticPMR();\r\n        break;\r\n      case SYSTEM.CAH:\r\n        this.saveStatisticCAH();\r\n        break;\r\n      case SYSTEM.CMP:\r\n        break;\r\n      default:\r\n        break;\r\n    }\r\n  };\r\n\r\n  saveStatisticCAH = () => {\r\n    const { authenRdc } = this.props;\r\n    fetchPost_(process.env.REACT_APP_CAH_SAVE_STATISTIC, {\r\n      userid: authenRdc.profile.userID,\r\n    })\r\n      .then((res) => {\r\n        if (!res.ok) {\r\n          throw res.status;\r\n        }\r\n        return res.json();\r\n      })\r\n      .catch((ex) => {\r\n        console.log('ex save statistic', ex);\r\n      });\r\n  };\r\n\r\n  saveStatisticPMR = () => {\r\n    const { authenRdc } = this.props;\r\n    let params = null;\r\n    if (authenRdc.profile.groupID == PROFILE_GROUP_TYPE.OFFICER.id) {\r\n      //เจ้าหน้าที่\r\n      params = { userid: authenRdc.profile.userID };\r\n    } else if (authenRdc.profile.groupID == PROFILE_GROUP_TYPE.PEOPLE_WITH_PROFILE.id) {\r\n      //ประชาชน\r\n      params = { peoplecode: authenRdc.profile.userID };\r\n    }\r\n\r\n    fetchPost_(process.env.REACT_APP_PMR_SAVE_STATISTIC, params).catch((ex) => {\r\n      console.log('ex save statistic', ex);\r\n    });\r\n  };\r\n\r\n  handleMenuClick = (menu) => {\r\n    const { menuAction } = this.props;\r\n    if (LIST_MENU_LAYOUT_MAP.MENU === menu) {\r\n      //กดดูเมนู\r\n      menuAction.openMenuPanel();\r\n      menuAction.closeMenuMap();\r\n      menuAction.closeMenuSearch();\r\n    } else if (LIST_MENU_LAYOUT_MAP.SEARCH === menu) {\r\n      //กดดู Search\r\n      menuAction.closeMenuPanel();\r\n      menuAction.openMenuSearch();\r\n      menuAction.closeMenuMap();\r\n    } else {\r\n      //ไปหน้าแผนที่\r\n      menuAction.closeMenuPanel();\r\n      menuAction.closeMenuSearch();\r\n      menuAction.openMenuMap();\r\n    }\r\n  };\r\n\r\n  makeLocatorRingsExtent = (str) => {\r\n    let tmpString = str;\r\n    let listPoint = [];\r\n    tmpString = tmpString.replace('POLYGON (( ', '').replace('))', '');\r\n    const listPointString = tmpString.split(',');\r\n    listPoint = listPointString.map((item) => {\r\n      const listXY = item.trim().split(' ');\r\n      const x = parseFloat(listXY[0]);\r\n      const y = parseFloat(listXY[1]);\r\n      return [x, y];\r\n    });\r\n    return listPoint;\r\n  };\r\n\r\n  completeLocator = () => {\r\n    const { hideLoading, mapAction } = this.props;\r\n    hideLoading();\r\n    mapAction.bindClearMapCommand();\r\n  };\r\n\r\n  handleLocatorChange = async (evt, result) => {\r\n    const { mapAction, showLoading } = this.props;\r\n    showLoading();\r\n    let rings = [];\r\n    let drawRings = [];\r\n    let type = null;\r\n\r\n    const filterResult = await result.filter((item) => {\r\n      return item.ID === evt.tmp.ID;\r\n    });\r\n\r\n    if (filterResult.length > 1) {\r\n      new Promise(async (resolve, reject) => {\r\n        await filterResult.map(async (item, index) => {\r\n          rings[index] = await this.makeLocatorRingsExtent(item.envelope);\r\n          drawRings[index] = await LocatorUtil.makeLocatorRings(item.shape);\r\n\r\n          type = item.type;\r\n        });\r\n\r\n        await resolve();\r\n      }).then((resolve) => {\r\n        mapAction.bindMapCommand(MapFunctions.zoomLocator, {\r\n          rings: concat(rings),\r\n          drawRings: flatten(drawRings),\r\n          type: type,\r\n          callbackCompleteLocator: this.completeLocator,\r\n        });\r\n      });\r\n    } else {\r\n      filterResult.every((item) => {\r\n        mapAction.bindMapCommand(MapFunctions.zoomLocator, {\r\n          rings: concat(this.makeLocatorRingsExtent(item.envelope)),\r\n          drawRings: LocatorUtil.makeLocatorRings(item.shape),\r\n          type: item.type,\r\n          callbackCompleteLocator: this.completeLocator,\r\n        });\r\n\r\n        return true;\r\n      });\r\n    }\r\n  };\r\n\r\n  handleTextLocatorChange = (value) => {\r\n    if (value === '') {\r\n      this.props.mapAction.bindMapCommand(MapFunctions.clearGraphicLocator);\r\n    }\r\n  };\r\n\r\n  render() {\r\n    const { children, menuRdc, authenRdc, history, isShowLoading, mapRdc } = this.props;\r\n    \r\n    return (\r\n      <Fragment>\r\n        <Loading isShowLoading={isShowLoading} />\r\n        <LayoutMapView\r\n          listMenuActive={menuRdc}\r\n          history={history}\r\n          profile={authenRdc && authenRdc.profile}\r\n          system={authenRdc && authenRdc.system}\r\n          onMenuClick={this.handleMenuClick}\r\n          onLocatorChange={this.handleLocatorChange}\r\n          onTextLocatorChange={this.handleTextLocatorChange}\r\n        >\r\n          {children}\r\n          <Coordinate active={menuRdc.Panel} />\r\n          {mapRdc.onShowDataTableOSS.onShowDataTableOSS && <SearchOSSTable />}\r\n        </LayoutMapView>\r\n      </Fragment>\r\n    );\r\n  }\r\n}\r\n\r\nconst mapStateToProps = (state) => ({\r\n  menuRdc: state.menu,\r\n  authenRdc: state.authen,\r\n  satisfactionAndStatisticRdc: state.SatisfactionAndStatisticReducer,\r\n  mapRdc: state.map,\r\n});\r\n\r\nconst mapDispatchToProps = (dispatch) => ({\r\n  mapAction: bindActionCreators(MapAction, dispatch),\r\n  menuAction: bindActionCreators(MenuAction, dispatch),\r\n  satisfactionAndStatisticAction: bindActionCreators(SatisfactionAndStatisticAction, dispatch),\r\n});\r\n\r\nexport default connect(\r\n  mapStateToProps,\r\n  mapDispatchToProps\r\n)(WithLoading(LayoutMap));\r\n","import React, { Component, Fragment } from \"react\";\r\nimport EsriLoader from \"esri-loader\";\r\nimport { connect } from \"react-redux\";\r\nimport { bindActionCreators } from \"redux\";\r\nimport PropTypes from \"prop-types\";\r\nimport Icon from \"@material-ui/core/Icon\";\r\nimport \"./map.css\";\r\nimport { Scrollbars } from \"react-custom-scrollbars\";\r\nimport { withStyles } from \"@material-ui/core\";\r\n\r\nimport * as Constants from \"../Constants/Constants\";\r\nimport * as MapAction from \"../Actions/Web/Maps/MapAction\";\r\nimport * as MenuAction from \"../Actions/Web/MenuAction\";\r\nimport * as TocAction from \"../Actions/Web/Maps/TocAction\";\r\nimport * as MapFunctions from \"./MapFunctions\";\r\nimport RouteConfig from \"../Config/AppRoute/RouteConfig\";\r\nimport MapTools from \"../Containers/Web/Maps/MapTools/MapTools\";\r\nimport LayoutMap from \"../Containers/Web/LayoutMap\";\r\nimport Styles from \"./Styles\";\r\nimport Loading from \"../Controls/Containers/Loading\";\r\n\r\nclass MapManager extends Component {\r\n    constructor(props) {\r\n        super(props);\r\n        this.state = {\r\n            isLoadMapComplete: false,\r\n            isLoadMapToolsComplete: false,\r\n            pos: false,\r\n        };\r\n        this.map = null;\r\n        this.drawSubmitPmr = null;\r\n        this.drawMeasurement = null;\r\n        this.basemapToggle = null;\r\n        this.drawAskTheCityPlan = null;\r\n        this.activeTypeToolbar = \"\";\r\n        this.drawConstruction = null;\r\n        this.drawMap = null; // จะยุบทุกตัวมาใช้ตัวนี้ตัวเดียว\r\n    }\r\n\r\n    componentDidMount() {\r\n        this.createMap();\r\n    }\r\n\r\n    createMap = () => {\r\n        const { authenRdc } = this.props;\r\n        EsriLoader.loadModules(\r\n            [\r\n                \"dojo/i18n!esri/nls/jsapi\",\r\n                \"esri/config\",\r\n                \"esri/map\",\r\n                \"esri/symbols/SimpleLineSymbol\",\r\n                \"esri/symbols/SimpleFillSymbol\",\r\n                \"esri/layers/FeatureLayer\",\r\n                \"esri/Color\",\r\n                \"esri/layers/GraphicsLayer\",\r\n                \"esri/tasks/query\",\r\n                \"esri/graphic\",\r\n                \"esri/SpatialReference\",\r\n                \"esri/renderers/SimpleRenderer\",\r\n            ],\r\n            options\r\n        )\r\n            .then(\r\n                ([\r\n                    esriBundle,\r\n                    esriConfig,\r\n                    Map,\r\n                    SimpleLineSymbol,\r\n                    SimpleFillSymbol,\r\n                    FeatureLayer,\r\n                    Color,\r\n                    GraphicsLayer,\r\n                    Query,\r\n                    Graphic,\r\n                    SpatialReference,\r\n                    SimpleRenderer,\r\n                ]) => {\r\n                    //การวาด\r\n                    esriBundle.toolbars.draw.addPoint = \"คลิกเพื่อกำหนดตำแหน่ง\";\r\n                    esriBundle.toolbars.draw.start = \"คลิกเพื่อเริ่มวาด\";\r\n                    esriBundle.toolbars.draw.resume = \"คลิกเพื่อวาดต่อ\";\r\n                    esriBundle.toolbars.draw.complete =\r\n                        \"คลิกสองครั้งเมื่อสมบูรณ์\";\r\n\r\n                    if (window.GlobalConfig.USE_PROXY) {\r\n                        esriConfig.defaults.io.alwaysUseProxy =\r\n                            window.GlobalConfig.PROXY_ALWAYS_USE;\r\n                    }\r\n                    esriConfig.defaults.io.proxyUrl =\r\n                        window.GlobalConfig.PROXY_URL;\r\n\r\n                    const map = new Map(this.divMap, {\r\n                        center: [100.564, 13.6564],\r\n                        zoom: 11,\r\n                        basemap: \"topo\",\r\n                        logo: false,\r\n                        slider: false,\r\n                        showAttribution: false,\r\n                        showLabels: true,\r\n                        isKeyboardNavigation: false,\r\n                    });\r\n                    // map.disableKeyboardNavigation()\r\n                    window.map = map;\r\n                    this.map = map;\r\n\r\n                    if (\r\n                        authenRdc.profile.districtID &&\r\n                        authenRdc.profile.districtID !== null\r\n                    ) {\r\n                        let districtBMA = new FeatureLayer(\r\n                            window.BASEMAP_DISTRICT_URL,\r\n                            {\r\n                                id:\r\n                                    Constants.LISTFEATURELAYER\r\n                                        .FEATURELAYER_DISTRICT,\r\n                            }\r\n                        );\r\n                        let districtBufferBMA = new FeatureLayer(\r\n                            window.BASEMAP_DISTRICT_BUFFER_URL,\r\n                            {\r\n                                id:\r\n                                    Constants.LISTFEATURELAYER\r\n                                        .FEATURELAYER_DISTRICT_BUFFER,\r\n                            }\r\n                        );\r\n                        // let graphicLayerDistrict = new GraphicsLayer({ id: Constants.LISTFEATURELAYER.FEATURELAYER_DISTRICT })\r\n                        // let graphicLayerDistrictBuffer = new GraphicsLayer({ id: Constants.LISTFEATURELAYER.FEATURELAYER_DISTRICT_BUFFER })\r\n                        // map.addLayers([graphicLayerDistrict, graphicLayerDistrictBuffer]);\r\n                        // let selectQuery = new Query();\r\n                        // selectQuery.outFields = \"*\";\r\n                        // selectQuery.where = \"DISTRICT_ID = \" + authenRdc.profile.districtID + \"\";\r\n                        // selectQuery.outSpatialReference = new SpatialReference({ wkid: 102100 });\r\n                        // districtBMA.selectFeatures(selectQuery, FeatureLayer.SELECTION_NEW);\r\n                        // districtBufferBMA.selectFeatures(selectQuery, FeatureLayer.SELECTION_NEW);\r\n                        // districtBMA.on(\"selection-complete\", (evt) => {\r\n                        // \tlet districtPolygon = evt.features[0].geometry;\r\n                        // \tlet symbol = new SimpleFillSymbol(\r\n                        // \t\tSimpleFillSymbol.STYLE_SOLID,\r\n                        // \t\tnew SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color([255, 0, 0]), 3),\r\n                        // \t\tnew Color([0, 0, 255, 0]));\r\n                        // \tlet graphic = new Graphic(districtPolygon, symbol);\r\n                        // \tgraphicLayerDistrict.add(graphic)\r\n\r\n                        // });\r\n                        // districtBufferBMA.on(\"selection-complete\", (evt) => {\r\n                        // \tlet districtPolygon = evt.features[0].geometry;\r\n                        // \tlet symbol = new SimpleFillSymbol(\r\n                        // \t\tSimpleFillSymbol.STYLE_SOLID,\r\n                        // \t\tnew SimpleLineSymbol(SimpleLineSymbol.STYLE_DASHDOT, new Color([0, 0, 0]), 3),\r\n                        // \t\tnew Color([0, 0, 255, 0]));\r\n                        // \tlet graphic2 = new Graphic(districtPolygon, symbol);\r\n                        // \tgraphicLayerDistrictBuffer.add(graphic2)\r\n                        // \t//this.enableExtentCurrent = false;\r\n                        // \tmap.setExtent(graphic2.geometry.getExtent());\r\n                        // });\r\n\r\n                        var districtLine = new SimpleLineSymbol();\r\n                        districtLine.setWidth(2);\r\n                        districtLine.setColor(new Color([255, 0, 0, 1]));\r\n                        var districtFill = new SimpleFillSymbol();\r\n                        districtFill.setStyle(SimpleFillSymbol.STYLE_NULL);\r\n                        districtFill.setOutline(districtLine);\r\n                        var districtRenderer = new SimpleRenderer(districtFill);\r\n                        districtBMA.setRenderer(districtRenderer);\r\n\r\n                        districtBMA.setDefinitionExpression(\r\n                            \"DISTRICT_ID = \" + authenRdc.profile.districtID + \"\"\r\n                        );\r\n                        districtBufferBMA.setDefinitionExpression(\r\n                            \"DISTRICT_ID = \" + authenRdc.profile.districtID + \"\"\r\n                        );\r\n                        map.addLayers([districtBMA, districtBufferBMA]);\r\n                        let chkExtent = false;\r\n                        districtBufferBMA.on(\"update-end\", (evt) => {\r\n                            //console.log(evt)\r\n                            if (!chkExtent) {\r\n                                map.setExtent(\r\n                                    evt.target.graphics[0]._extent.expand(2)\r\n                                );\r\n                            }\r\n                            chkExtent = true;\r\n                        });\r\n                    }\r\n\r\n                    map.on(\"load\", this.onLoadMap);\r\n                    map.on(\"click\", this.onClickMap);\r\n                    map.on(\"mouse-move\", this.onMouseMove);\r\n\r\n                    // this.createGraphicLayer();\r\n                    this.createScalebar();\r\n                    this.createOverviewMap();\r\n                    this.createBaseMapGallery();\r\n                }\r\n            )\r\n            .catch((err) => {\r\n                console.error(err);\r\n            });\r\n    };\r\n\r\n    onLoadMap = () => {\r\n        EsriLoader.loadModules(\r\n            [\"esri/geometry/Extent\", \"esri/toolbars/draw\"],\r\n            options\r\n        ).then(([Extent, Draw]) => {\r\n            this.setState({ isLoadMapComplete: true });\r\n            // this.drawAskTheCityPlan = new Draw(this.map);\r\n            // this.drawSubmitPmr = new Draw(this.map);\r\n            // this.drawMeasurement = new Draw(this.map);\r\n            // this.drawConstruction = new Draw(this.map);\r\n            this.drawMap = new Draw(this.map); // เดี๋ยวจะยุบ draw ทุกตัวมาที่นี่ที่เดียว\r\n        });\r\n    };\r\n\r\n    onClickMap = (evt) => {\r\n        if (evt) {\r\n            const { mapRdc, MapAction } = this.props;\r\n            const params = {\r\n                map: this.map,\r\n                mapClickObject: evt,\r\n            };\r\n\r\n            if (mapRdc.onIdentifyClickMap) {\r\n                mapRdc.onIdentifyClickMap({\r\n                    map: params.map,\r\n                    event: evt,\r\n                });\r\n            }\r\n\r\n            if (mapRdc.onClickMapFunction != null) {\r\n                mapRdc.onClickMapFunction(params);\r\n            }\r\n\r\n            if (mapRdc.onClearSelectGraphic) {\r\n                MapAction.bindMapCommand(MapFunctions.clickClearGraphic, {\r\n                    objMap: params,\r\n                });\r\n            }\r\n\r\n            if (mapRdc.onDrawGraphic) {\r\n                MapAction.bindClearMapCommand();\r\n                MapAction.bindEvtDisableDrawGraphic();\r\n            }\r\n        }\r\n    };\r\n\r\n    onMouseMove = (evt) => {\r\n        if (evt) {\r\n            const { mapRdc } = this.props;\r\n            const params = {\r\n                mapMouseMoveObject: evt,\r\n            };\r\n\r\n            if (mapRdc.onMouseMoveMapFunction != null) {\r\n                mapRdc.onMouseMoveMapFunction(params);\r\n            }\r\n            if (mapRdc.onMouseMoveCoordinateFunction) {\r\n                mapRdc.onMouseMoveCoordinateFunction(params);\r\n            }\r\n        }\r\n    };\r\n\r\n    createGraphicLayer = () => {\r\n        // จะไม่ถูกเรียกใช้แล้ว\r\n        EsriLoader.loadModules([\"esri/layers/GraphicsLayer\"], options).then(\r\n            ([GraphicsLayer]) => {\r\n                //Dynamic Add Layer by Constants\r\n                Object.keys(Constants.LISTGRAPHICLAYER).forEach((key) => {\r\n                    const gpLayer = new GraphicsLayer({\r\n                        id: Constants.LISTGRAPHICLAYER[key],\r\n                    });\r\n                    this.map.addLayer(gpLayer);\r\n                });\r\n            }\r\n        );\r\n    };\r\n\r\n    createOverviewMap = () => {\r\n        EsriLoader.loadModules([\"esri/dijit/OverviewMap\"], options).then(\r\n            ([OverviewMap]) => {\r\n                let overviewMap = new OverviewMap({\r\n                    map: this.map,\r\n                    attachTo: \"top-right\",\r\n                    opacity: 0.4,\r\n                    //expandFactor: 1\r\n                });\r\n                overviewMap.startup();\r\n            }\r\n        );\r\n    };\r\n\r\n    createScalebar = () => {\r\n        EsriLoader.loadModules(\r\n            [\"esri/dijit/Scalebar\", \"dojo/i18n!esri/nls/jsapi\"],\r\n            options\r\n        ).then(([Scalebar]) => {\r\n            // let scalebar = new Scalebar({\r\n            // \tmap: this.map,\r\n            // \tscalebarUnit: \"dual\",\r\n            // \tattachTo: \"bottom-right\",\r\n            // });\r\n        });\r\n    };\r\n\r\n    getCurrentLocation = (bool) => (e) => {\r\n        const { MapAction } = this.props;\r\n\r\n        if (navigator.geolocation) {\r\n            // navigator.permissions\r\n            //     .query({ name: \"geolocation\" })\r\n            //     .then((result) => {\r\n            //         if (result.state !== \"granted\") {\r\n            //             const isMobile =\r\n            //                 window.location.pathname\r\n            //                     .toLowerCase()\r\n            //                     .indexOf(\"mobilecurrent\") > -1;\r\n\r\n            //             if (isMobile) {\r\n            //                 alert(\"กรุณาเปิดสิทธ์การเข้าถึง Location\");\r\n            //                 return (window.location.href =\r\n            //                     window.ROOT_SYSTEM_URL + RouteConfig.CMPMobile);\r\n            //             }\r\n            //         }\r\n            //     });\r\n            navigator.geolocation.getCurrentPosition(\r\n                (pos) => {\r\n                    if (pos.coords) {\r\n                        setTimeout(() => {\r\n                            this.setState({ ...this.state, pos: true });\r\n                        }, 1000); // หน่วงรอ set current ที่ map function\r\n                    }\r\n\r\n                    MapAction.bindMapCommand(\r\n                        MapFunctions.drawPinCurrentAndPan,\r\n                        {\r\n                            lat: pos.coords.latitude,\r\n                            long: pos.coords.longitude,\r\n                            // layer: Constants.LISTGRAPHICLAYER.GRAPHICLAYER_CURRENT_LOCATION,\r\n                            pan: bool,\r\n                        }\r\n                    );\r\n                    MapAction.bindClearMapCommand();\r\n                },\r\n                (error) => {\r\n                    const isMobile =\r\n                        window.location.pathname\r\n                            .toLowerCase()\r\n                            .indexOf(\"mobilecurrent\") > -1;\r\n                    if (error.message.indexOf(\"denied\") && isMobile) {\r\n                        return (window.location.href =\r\n                            window.ROOT_SYSTEM_URL + RouteConfig.CMPMobile);\r\n                    }\r\n\r\n                    // if (isMobile) {\r\n                    //     alert(\"กรุณาเปิดสิทธ์การเข้าถึง Location\");\r\n                    //     return (window.location.href =\r\n                    //         window.ROOT_SYSTEM_URL + RouteConfig.CMPMobile);\r\n                    // }\r\n                },\r\n                (option) => {}\r\n            );\r\n        } else {\r\n            console.log(\"current location is not support by this browser\");\r\n        }\r\n    };\r\n\r\n    createBaseMapGallery = () => {\r\n        EsriLoader.loadModules(\r\n            [\r\n                \"esri/dijit/Basemap\",\r\n                \"esri/dijit/BasemapLayer\",\r\n                \"esri/dijit/BasemapGallery\",\r\n            ],\r\n            options\r\n        ).then(([Basemap, BasemapLayer, BasemapGallery]) => {\r\n            const basemaps = [];\r\n            window.BASEMAPGALLERY.map((value, index) => {\r\n                // const basemapLayer = new BasemapLayer({\r\n                // \turl: value.url,\r\n                // \ttype: value.type\r\n                // });\r\n                // const basemap = new Basemap({\r\n                // \tid: `basemap_${index + 1}`,\r\n                // \tlayers: [basemapLayer],\r\n                // \ttitle: value.title,\r\n                // \tthumbnailUrl: value.thumbnailUrl\r\n                // });\r\n                // basemaps.push(basemap);\r\n                let basemapLayer = [];\r\n\r\n                value.url.forEach((stringUrl) => {\r\n                    basemapLayer.push(\r\n                        new BasemapLayer({\r\n                            url: stringUrl,\r\n                            type: value.type,\r\n                        })\r\n                    );\r\n                });\r\n\r\n                basemaps.push(\r\n                    new Basemap({\r\n                        id: `basemap_${index + 1}`,\r\n                        layers: basemapLayer,\r\n                        title: value.title,\r\n                        thumbnailUrl: value.thumbnailUrl,\r\n                    })\r\n                );\r\n\r\n                return true;\r\n            });\r\n            const basemapGallery = new BasemapGallery(\r\n                {\r\n                    showArcGISBasemaps: false,\r\n                    basemaps: basemaps,\r\n                    map: this.map,\r\n                },\r\n                this.basemapGallery\r\n            );\r\n            basemapGallery.startup();\r\n            Object.assign(this.map, {\r\n                basemapGallery,\r\n            });\r\n            basemapGallery.on(\"error\", (evt) => {\r\n                alert(\r\n                    \"ไม่สามารถเปลี่ยนเป็นแผนที่ \" +\r\n                        evt.target._selectedBasemap.title\r\n                );\r\n            });\r\n        });\r\n    };\r\n\r\n    mapProcess = () => {\r\n        const { mapRdc } = this.props;\r\n        if (mapRdc.mapFunction != null) {\r\n            mapRdc.mapFunction(\r\n                {\r\n                    map: this.map,\r\n                    drawSubmitPmr: this.drawSubmitPmr,\r\n                    drawMeasurement: this.drawMeasurement,\r\n                    drawAskTheCityPlan: this.drawAskTheCityPlan,\r\n                    drawConstruction: this.drawConstruction,\r\n                    drawMap: this.drawMap, // เดี๋ยวจะยุบ draw ทุกตัวมาที่นี่ที่เดียว\r\n                },\r\n                mapRdc.mapFunctionParams\r\n            );\r\n        }\r\n    };\r\n\r\n    onClickCloseBasemapGallery = () => {\r\n        const { MenuAction } = this.props;\r\n        MenuAction.closeFormBasemapGallery();\r\n    };\r\n\r\n    onClickCloseMeasurement = () => {\r\n        const { MenuAction } = this.props;\r\n        MenuAction.closeFormMeasurement();\r\n    };\r\n\r\n    drawGraphicPMR1Form = () => {\r\n        const { authenRdc, MapAction } = this.props;\r\n        if (\r\n            authenRdc.profile.pmr1Form &&\r\n            authenRdc.profile.pmr1Form.length > 0\r\n        ) {\r\n            // let point = authenRdc.profile.pmr1Form;\r\n            // point.map((val) => {\r\n            // \tif (val.shape !== null) {\r\n            // \t\tlet strPoint = val.shape.replace(\"POINT ( \", \"\").replace(\")\", \"\");\r\n            // \t\tlet arrPoint = strPoint.split(' ');\r\n            // \t\tMapAction.bindMapCommand(MapFunctions.drawGraphicPointPMR1Form, arrPoint);\r\n            // \t}\r\n            // })\r\n            MapAction.bindMapCommand(MapFunctions.drawGraphicPointPMR1, {\r\n                mapserviceUrl: window.GET_POINT_PMR,\r\n                creator: authenRdc.profile.userID,\r\n            });\r\n        }\r\n    };\r\n\r\n    callBackAddTocComplete = () => {\r\n        // จะเข้า function นี้ก็ต่อเมื่อวาด layer ของ toc เสร็จ\r\n        const { authenRdc } = this.props;\r\n        this.getCurrentLocation(false)();\r\n        // this.createGraphicLayer();\r\n        this.setState({\r\n            isLoadMapToolsComplete: true,\r\n        });\r\n        authenRdc.system === Constants.SYSTEM.PMR1 &&\r\n            this.drawGraphicPMR1Form(); //จะวาดก็ต่อเมื่อเข้าระบบ pmr เท่านั้น\r\n    };\r\n\r\n    render() {\r\n        this.mapProcess();\r\n        const { menuRdc, history, classes } = this.props;\r\n        const { isLoadMapComplete, isLoadMapToolsComplete, pos } = this.state;\r\n        const showHideBasemapGallery = menuRdc.BasemapGalleryVisible\r\n            ? \"block\"\r\n            : \"none\";\r\n\r\n        return (\r\n            <Fragment>\r\n                <LayoutMap\r\n                    history={history}\r\n                    isLoadMapComplete={isLoadMapComplete && pos}>\r\n                    <div\r\n                        ref={(ref) => (this.divMap = ref)}\r\n                        className={classes.divMap}>\r\n                        {isLoadMapComplete && (\r\n                            <MapTools\r\n                                callBackAddTocComplete={\r\n                                    this.callBackAddTocComplete\r\n                                }\r\n                                getCurrentLoc={this.getCurrentLocation(true)}\r\n                            />\r\n                        )}\r\n\r\n                        <div\r\n                            className={classes.divBasemapGallery}\r\n                            style={{ display: showHideBasemapGallery }}>\r\n                            <div className={classes.divBasemapGalleryHeader}>\r\n                                {Constants.RESOURCEWORDS.BASEMAP_GALLERY}\r\n                                <Icon\r\n                                    className=\"icon\"\r\n                                    onClick={this.onClickCloseBasemapGallery}>\r\n                                    close-circle\r\n                                </Icon>\r\n                            </div>\r\n                            <div style={{ height: \"calc(100% - 34px)\" }}>\r\n                                <Scrollbars>\r\n                                    <div\r\n                                        ref={(ref) =>\r\n                                            (this.basemapGallery = ref)\r\n                                        }\r\n                                        className={classes.divBasemapGallery}\r\n                                    />\r\n                                </Scrollbars>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                </LayoutMap>\r\n                <Loading isShowLoading={!isLoadMapToolsComplete} />\r\n            </Fragment>\r\n        );\r\n    }\r\n}\r\n\r\nconst mapStateToProps = (state) => ({\r\n    mapRdc: state.map,\r\n    menuRdc: state.menu,\r\n    authenRdc: state.authen,\r\n});\r\n\r\nMapManager.propTypes = {\r\n    mapRdc: PropTypes.object.isRequired,\r\n};\r\n\r\nconst mapDispatchToProps = (dispatch) => ({\r\n    MapAction: bindActionCreators(MapAction, dispatch),\r\n    MenuAction: bindActionCreators(MenuAction, dispatch),\r\n    TocAction: bindActionCreators(TocAction, dispatch),\r\n});\r\n\r\nconst MapManagerWithStyle = withStyles(Styles)(MapManager);\r\n\r\nexport default connect(\r\n    mapStateToProps,\r\n    mapDispatchToProps\r\n)(MapManagerWithStyle);\r\n\r\nconst options = {\r\n    url: window.MAP_OPTION,\r\n};\r\n","export default theme => ({\r\n    divMap: {\r\n        margin: '0',\r\n        padding: '0',\r\n        width: '100%',\r\n        height: '100%',\r\n        position: 'absolute',\r\n    },\r\n    divMeasurement: {\r\n        position: 'absolute',\r\n        right: '70px',\r\n        top: '50%',\r\n        zIndex: '999',\r\n        width: '300px',\r\n        backgroundColor: 'white',\r\n        border: '2px solid'\r\n    },\r\n\r\n    divSnapping: {\r\n        fontSize: 'smaller',\r\n        padding: '5px 5px'\r\n    },\r\n    divBasemapGallery: {\r\n        position: 'absolute',\r\n        right: '75px',\r\n        // top: '10px',\r\n        top: 'calc(50% - 240px)',\r\n        height: '510px',\r\n        zIndex: '999',\r\n        width: '262px',\r\n        backgroundColor: 'white',\r\n        boxShadow: \"2px 2px 8px #888888\",\r\n        borderColor: 'black',\r\n        borderStyle: \"solid\",\r\n        borderWidth: \"2px\",\r\n        [theme.breakpoints.down(\"sm\")]: {\r\n            // width: '96%',\r\n            // height: '400px',\r\n            // top: 'calc(50% - 200px)',\r\n            // zIndex: 2,\r\n            // left: \"2%\",\r\n            // right: \"2%\",\r\n            // margin: 0,\r\n            // padding: 0,\r\n            // // top: '20px',\r\n            // border: 0,\r\n            // borderTop: '1px solid'\r\n\r\n            width: '100%',\r\n            height: '100%',\r\n            right:'unset',\r\n            top:'unset',\r\n            zIndex: 2,\r\n        }\r\n    },\r\n    divBasemapGalleryHeader: {\r\n        padding: '5px',\r\n        backgroundColor: theme.mainTheme.color1,\r\n        color: 'white',\r\n        fontWeight: 'bold',\r\n    }\r\n})","import React, { PureComponent } from 'react';\r\nimport * as AuthenAction from '../../Actions/Authentications/AuthenAction';\r\nimport { connect } from 'react-redux';\r\nimport { bindActionCreators } from 'redux';\r\n\r\nconst WithAuthenReducer = Wrapcomponent => {\r\n    const authenReducer = class extends PureComponent {\r\n        render() {\r\n            const { authenRdc, authenAction } = this.props;\r\n            return <Wrapcomponent\r\n                authenAction={authenAction}\r\n                authenRdc={authenRdc}\r\n                {... this.props}\r\n            />\r\n        }\r\n    }\r\n    const mapStateToProp = state => {\r\n        return {\r\n            authenRdc: state.authen\r\n        }\r\n    }\r\n\r\n    const mapDispatchToProp = dispatch => {\r\n        return {\r\n            authenAction: bindActionCreators(AuthenAction, dispatch),\r\n        }\r\n    }\r\n    return connect(mapStateToProp, mapDispatchToProp)(authenReducer)\r\n}\r\n\r\nexport default WithAuthenReducer;","import React, { useEffect } from \"react\";\r\nimport { Route, Redirect } from \"react-router-dom\";\r\nimport { getTokenLocalStore, getTypeLocalStore, clearTokenLocalStore } from '../../Utilities/LocalStorageUtill';\r\nimport { TITLE_TAB_BROWSER } from '../../Constants/Constants';\r\nimport { checkGotoDefaultSystem } from '../../Utilities/AuthenUtil';\r\nimport RouteConfig from './RouteConfig';\r\nimport WithAuthenReducer from '../../HOC/ConnectReducer/WithAuthenReducer';\r\nimport Loading from '../../Controls/Containers/Loading';\r\n\r\nconst PrivateRouteCMS = ({\r\n    component: Component,\r\n    path,\r\n    authenRdc,\r\n    authenAction,\r\n    ...PrivateRouteProps\r\n}) => {\r\n    const token = getTokenLocalStore();\r\n    const url = new URL(window.location.href);\r\n    const paramType = url.searchParams.get(\"type\");\r\n    const localType = getTypeLocalStore();\r\n\r\n    useEffect(() => {\r\n        document.title = TITLE_TAB_BROWSER.CMS;\r\n    }, [])\r\n\r\n    if (paramType !== localType || !token) {\r\n        clearTokenLocalStore()\r\n        return <Route\r\n            {...PrivateRouteProps}\r\n            render={props => {\r\n                return <Component {...props} />\r\n            }}\r\n        />\r\n    } else if (authenRdc.isLogin && authenRdc.profile) {\r\n        const path = checkGotoDefaultSystem(authenRdc.profile.defaultSystemID, paramType)\r\n        return <Route\r\n            {...PrivateRouteProps}\r\n            render={(props) => path === RouteConfig.CMSLogin || path === RouteConfig.CMSLoginStaff ? <Component {...props} /> : <Redirect to={path} />}\r\n        />\r\n    } else if (token) {\r\n        if (paramType === \"o\") {\r\n            authenAction.getProfileBMA();\r\n        } else {\r\n            authenAction.getProfileUser();\r\n        }\r\n\r\n        return <Route\r\n            {...PrivateRouteProps}\r\n            render={() => <Loading />}\r\n        />\r\n    } else {\r\n        return <Route\r\n            {...PrivateRouteProps}\r\n            render={props => {\r\n                return <Component {...props} />\r\n            }}\r\n        />\r\n    }\r\n};\r\n\r\nexport default WithAuthenReducer(PrivateRouteCMS);","import * as actionTypes from '../../Constants/ActionTypes';\r\n\r\nexport const setMenuBreadcrumb = (listMenu) => {\r\n    return {\r\n        type: actionTypes.SET_MENU_BREADCRUMB,\r\n        listMenu\r\n    }\r\n}\r\n\r\nexport const clearMenuBreadCrumb = () =>{\r\n    return {\r\n        type:actionTypes.CLEAR_MENU_BREADCRUMB\r\n    }\r\n}\r\n","import React from 'react';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { withStyles } from '@material-ui/core/styles';\r\n\r\nconst UserView = ({\r\n    children,\r\n    classes\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root}>\r\n            {children}\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        width: '100%',\r\n        height: '100%',\r\n    }\r\n}))(UserView)\r\n","import { fetchGet_, fetchPost_ } from '../../../Utilities/ServiceUtils';\r\n\r\nexport const getAllUser = () => {\r\n    return fetchGet_(process.env.REACT_APP_UM_GET_ALL_USER)\r\n        .then(res => {\r\n            if (!res.ok) {\r\n                throw res.status;\r\n            }\r\n            return res.json();\r\n        })\r\n        .catch(ex => {\r\n            console.log('ex getAllUser', ex)\r\n        })\r\n}\r\n\r\nexport const getUserByID = userID => {\r\n    return fetchGet_(`${process.env.REACT_APP_UM_GET_USER_BY_ID}?userid=${userID}`)\r\n        .then(res => {\r\n            if (!res.ok) {\r\n                throw res.status;\r\n            }\r\n            return res.json();\r\n        })\r\n        .catch(ex => {\r\n            console.log('ex getUserByID', ex)\r\n        })\r\n}\r\n\r\n\r\nexport const getLuOrganization = () => {\r\n    return fetchGet_(process.env.REACT_APP_LU_ORGANIZATION)\r\n        .then(res => {\r\n            if (!res.ok) {\r\n                throw res.status;\r\n            }\r\n            return res.json();\r\n        })\r\n        .catch(ex => {\r\n            console.log('ex getLuOrganization', ex)\r\n        })\r\n}\r\n\r\nexport const getLuAllUserGroup = () => {\r\n    return fetchGet_(process.env.REACT_APP_LU_ALL_USERGROUP)\r\n        .then(res => {\r\n            if (!res.ok) {\r\n                throw res.status;\r\n            }\r\n            return res.json();\r\n        })\r\n        .catch(ex => {\r\n            console.log('ex getLuAllUserGroup', ex)\r\n        })\r\n}\r\n\r\n\r\nexport const callServiceAddUser = ({\r\n    username,\r\n    password,\r\n    firstname,\r\n    lastname,\r\n    identificationNo,\r\n    groupID,\r\n    email,\r\n    telephone,\r\n    activated,\r\n    orgID\r\n}) => {\r\n    return fetchPost_(process.env.REACT_APP_UM_ADD_USER, {\r\n        username,\r\n        password,\r\n        firstname,\r\n        lastname,\r\n        identificationNo,\r\n        groupID,\r\n        email,\r\n        telephone,\r\n        activated,\r\n        orgID\r\n    })\r\n        .then(res => {\r\n            if (!res.ok) {\r\n                throw res.status;\r\n            }\r\n            return res.json();\r\n        })\r\n        .catch(ex => {\r\n            console.log('ex callServiceAddUser', ex)\r\n        })\r\n}\r\n\r\nexport const callServiceUpdateUser = ({\r\n    userid,\r\n    username,\r\n    password, // ถ้าไม่แก้ไขให้ส่ง undefined\r\n    firstname,\r\n    lastname,\r\n    identificationNo,\r\n    groupID,\r\n    email,\r\n    telephone,\r\n    activated,\r\n    orgID\r\n}) => {\r\n    return fetchPost_(process.env.REACT_APP_UM_UPDATE_USER, {\r\n        userid,\r\n        username,\r\n        password,\r\n        firstname,\r\n        lastname,\r\n        identificationNo,\r\n        groupID,\r\n        email,\r\n        telephone,\r\n        activated,\r\n        orgID\r\n    })\r\n        .then(res => {\r\n            if (!res.ok) {\r\n                throw res.status;\r\n            }\r\n            return res.json();\r\n        })\r\n        .catch(ex => {\r\n            console.log('ex callServiceUpdateUser', ex)\r\n        })\r\n}\r\n\r\nexport const callServiceDeleteUserByID = userID => {\r\n    return fetchGet_(`${process.env.REACT_APP_UM_DELETE_USER}?userid=${userID}`)\r\n        .then(res => {\r\n            if (!res.ok) {\r\n                throw res.status;\r\n            }\r\n            return res.json();\r\n        })\r\n        .catch(ex => {\r\n            console.log('ex callServiceDeleteUserByID', ex)\r\n        })\r\n}\r\n\r\nexport const callServiceGetListSystemOfUser = userGroupID => {\r\n    return fetchGet_(`${process.env.REACT_APP_UM_GET_USERGROUP_BY_ID}?usergroupid=${userGroupID}`)\r\n        .then(res => {\r\n            if (!res.ok) {\r\n                throw res.status;\r\n            }\r\n            return res.json();\r\n        })\r\n        .catch(ex => {\r\n            console.log('ex getLuSystemOfUser', ex)\r\n        })\r\n}\r\n\r\nexport const callServiceGetLuSystem = () => {\r\n    return fetchGet_(`${process.env.REACT_APP_LU_SYSTEM}`)\r\n        .then(res => {\r\n            if(!res.ok) {\r\n                throw res.status;\r\n            }\r\n            return res.json();\r\n        })\r\n        .catch(ex => {\r\n            console.log('ex getLuSystem', ex)\r\n        })\r\n}","import React, { Fragment } from \"react\";\r\nimport PropTypes from \"prop-types\";\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\nimport SearchIcon from \"@material-ui/icons/Search\";\r\nimport InputAdornment from \"@material-ui/core/InputAdornment\";\r\nimport TextField from '@material-ui/core/TextField';\r\nimport ClearIcon from \"@material-ui/icons/Clear\";\r\nimport { MuiThemeProvider, createMuiTheme } from \"@material-ui/core\";\r\n\r\nconst CustomClearIcon = withStyles(theme => ({\r\n    root: {\r\n        width: 15,\r\n        cursor: \"default\"\r\n    }\r\n}))(ClearIcon);\r\n\r\nconst Styles = theme => ({\r\n    root: {\r\n        width: '70%',\r\n        backgroundColor: 'white',\r\n        [`& input`]: {\r\n            height: '45px',\r\n            padding: '0px 15px 0px 0px',\r\n        },\r\n        [`& label`]: {\r\n            top: '-5px'\r\n        },\r\n        [`& input:-webkit-autofill`]: {\r\n            WebkitBoxShadow: 'inset 0 0 0px 9999px white'\r\n        }\r\n    }\r\n})\r\n\r\nconst theme = createMuiTheme({\r\n    palette: {\r\n        primary: {\r\n            main: '#128C2C', //main color\r\n            dark: '#128C2C', //active color\r\n            contrastText: '#fff' //text color\r\n        },\r\n    },\r\n    typography: {\r\n        useNextVariants: true,\r\n    },\r\n})\r\n\r\nconst TextFieldSearchView = ({\r\n    classes,\r\n    className,\r\n    isMouseEnter,\r\n    value,\r\n    onChange,\r\n    onClearText,\r\n    onMouseEnter,\r\n    onMouseLeave\r\n}) => {\r\n    const isShowClearIcon = value !== \"\" && isMouseEnter;\r\n    return (\r\n        <MuiThemeProvider theme={theme}>\r\n            <TextField\r\n                className={`${classes.root} ${className}`}\r\n                id=\"demo2\"\r\n                placeholder=\"ค้นหา\"\r\n                color='primary'\r\n                variant=\"outlined\"\r\n                value={value}\r\n                onChange={onChange}\r\n                onMouseEnter={onMouseEnter}\r\n                onMouseLeave={onMouseLeave}\r\n                InputProps={{\r\n                    startAdornment: (\r\n                        <InputAdornment position=\"start\">\r\n                            <SearchIcon />\r\n                        </InputAdornment>\r\n                    ),\r\n                    endAdornment: (\r\n                        <Fragment>\r\n                            {isShowClearIcon && (\r\n                                <InputAdornment position=\"end\">\r\n                                    <CustomClearIcon onClick={onClearText} />\r\n                                </InputAdornment>\r\n                            )}\r\n                        </Fragment>\r\n                    )\r\n                }}\r\n            />\r\n        </MuiThemeProvider>\r\n    );\r\n};\r\n\r\nTextFieldSearchView.propTypes = {\r\n    isMouseEnter: PropTypes.bool,\r\n    value: PropTypes.string,\r\n    onChange: PropTypes.func.isRequired,\r\n    onClearText: PropTypes.func.isRequired,\r\n    onMouseEnter: PropTypes.func,\r\n    onMouseLeave: PropTypes.func\r\n};\r\n\r\nexport default withStyles(Styles)(TextFieldSearchView);\r\n","import React, { Component } from \"react\";\r\nimport PropTypes from \"prop-types\";\r\nimport TextFieldSearchView from \"../Presentationals/TextFieldSearchView\";\r\n\r\nexport class TextFieldSearch extends Component {\r\n    constructor(props) {\r\n        super(props);\r\n        this.state = {\r\n            value: \"\",\r\n            isMouseEnter: false\r\n        };\r\n    }\r\n\r\n    handleChange = e => {\r\n        const { onChange } = this.props;\r\n        this.setState({\r\n            value: e.target.value\r\n        });\r\n        if (onChange) {\r\n            onChange(e);\r\n        }\r\n    };\r\n\r\n    handleMouseEnter = () => {\r\n        this.setState({\r\n            isMouseEnter: true\r\n        });\r\n    };\r\n\r\n    handleMouseLeave = () => {\r\n        this.setState({\r\n            isMouseEnter: false\r\n        });\r\n    };\r\n\r\n    handleClearText = () => {\r\n        const { onChange } = this.props;\r\n        const fakeEvent = { target: { value: \"\" } };\r\n        this.setState({\r\n            value: \"\"\r\n        });\r\n        onChange(fakeEvent);\r\n    };\r\n\r\n    render() {\r\n        const { value, isMouseEnter } = this.state;\r\n        const { className } = this.props;\r\n\r\n        return (\r\n            <TextFieldSearchView\r\n                className={className}\r\n                isMouseEnter={isMouseEnter}\r\n                value={value}\r\n                onChange={this.handleChange}\r\n                onClearText={this.handleClearText}\r\n                onMouseEnter={this.handleMouseEnter}\r\n                onMouseLeave={this.handleMouseLeave}\r\n            />\r\n        );\r\n    }\r\n}\r\n\r\nTextFieldSearch.propTypes = {\r\n    onChange: PropTypes.func\r\n};\r\n\r\nexport default TextFieldSearch;\r\n","import React from 'react';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport DataTable from '../../../Controls/DataTable/DataTable';\r\nimport Delete from \"@material-ui/icons/Delete\";\r\nimport Edit from \"@material-ui/icons/Edit\";\r\nimport Add from '@material-ui/icons/Add';\r\nimport Button from '../../../Controls/Containers/Button';\r\nimport TextFieldSearch from '../../../Controls/Containers/TextFieldSearch';\r\n\r\nconst ListUserView = ({\r\n    classes,\r\n    matHeight,\r\n    userData,\r\n    countUserData,\r\n    page,\r\n    rowPerPage,\r\n    sortColomn,\r\n    sortType,\r\n\r\n    onChangePage,\r\n    onClickAddUser,\r\n    onSortDataTable,\r\n    onRowClick,\r\n    onChangeSearch,\r\n    onBeforeShowControl\r\n}) => {\r\n    return (\r\n        <Grid container justify=\"flex-start\" className={classes.root}>\r\n            {/* ############### HEADER ###############*/}\r\n            <Grid item xs={12} container justify=\"space-between\" alignItems=\"center\" className={classes.rootHeader}>\r\n                <Grid item xs={6}>\r\n                    <TextFieldSearch\r\n                        className={classes.rootTextFieldSearch}\r\n                        onChange={onChangeSearch}\r\n                    />\r\n                </Grid>\r\n                <Grid item>\r\n                    <Button label={<Add />} onClick={onClickAddUser} />\r\n                </Grid>\r\n            </Grid>\r\n\r\n            {/* ############### TABLE ###############*/}\r\n            <Grid item xs={12} container justify=\"center\" style={{ height: `${matHeight}px`, marginTop: '20px'}}>\r\n                <DataTable\r\n                    headerCssClass=\"table-header-style\"\r\n                    columns={[\r\n                        { title: \"User Name\", data: \"userName\", width: \"30%\", align: \"left\", sort: true },\r\n                        { title: \"ชื่อ นามสกุล\", data: \"fullName\", width: \"30%\", align: \"left\", sort: true },\r\n                        { title: \"User Group\", data: \"userGroupName\", width: \"30%\", align: \"left\", sort: true, type: 'buttonPopup' },\r\n                        { title: \"\", width: \"10%\", type: \"button\", align: \"center\", sort: false, data: 'actions' }\r\n                    ]}\r\n                    rowControls={[\r\n                        {\r\n                            key: \"majorTopic-edit\",\r\n                            width: 50,\r\n                            colorClass: \"btn-assign-rfid\",\r\n                            icon: (<Edit />)\r\n                        },\r\n                        {\r\n                            key: \"majorTopic-del\",\r\n                            width: 50,\r\n                            colorClass: \"btn-assign-rfid\",\r\n                            icon: (<Delete />)\r\n                        }\r\n                    ]}\r\n                    data={userData}\r\n                    page={page}\r\n                    rowPerPage={rowPerPage}\r\n                    total={countUserData}\r\n                    sortColumn={sortColomn}\r\n                    sortType={sortType}\r\n                    noDataMessage={`No Data`}\r\n\r\n                    handlerBeforeShowControl={onBeforeShowControl}\r\n                    handlePageChange={onChangePage}\r\n                    handleSort={onSortDataTable}\r\n                    handleRowClick={onRowClick}\r\n                />\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        width: '100%',\r\n        height: '100%',\r\n        padding: '10px',\r\n    },\r\n    rootTable: {\r\n        boxShadow: \"0px 1px 5px 0px rgba(0,0,0,0.2), 0px 2px 2px 0px rgba(0,0,0,0.14), 0px 3px 1px -2px rgba(0,0,0,0.12);\",\r\n        marginTop: '25px',\r\n    },\r\n    rootTextFieldSearch: {\r\n        width: '100%'\r\n    },\r\n    rootHeader: {\r\n        marginTop: '10px'\r\n    }\r\n}))(ListUserView)\r\n","import React,  { Fragment } from 'react'\r\n\r\nimport Modal from '@material-ui/core/Modal';\r\nimport Backdrop from '@material-ui/core/Backdrop';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Icon from '@material-ui/core/Icon';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { Scrollbars } from 'react-custom-scrollbars'\r\n\r\nconst ListSystemOfUserView = (props) => {\r\n\r\n    const {\r\n        open,\r\n        handleClose,\r\n        data,\r\n        onCloseClick,\r\n        classes,\r\n        userData\r\n    } = props;\r\n\r\n    return (\r\n        <Fragment>\r\n            <Modal\r\n                aria-labelledby=\"spring-modal-title\"\r\n                aria-describedby=\"spring-modal-description\"\r\n                className={classes.modal}\r\n                open={open}\r\n                onClose={handleClose}\r\n                closeAfterTransition\r\n                BackdropComponent={Backdrop}\r\n                BackdropProps={{\r\n                    timeout: 500,\r\n                }}\r\n            >\r\n                \r\n                <div className={classes.paper}>\r\n                    <Grid container className={classes.divClose} alignItems=\"center\">\r\n                        <Grid item xs={6}>\r\n                            <span className={classes.spanText}>ระบบที่สามารถใช้งานได้</span>\r\n                        </Grid>\r\n                        <Grid item xs={6} className={classes.iconClose}>\r\n                            <Icon onClick={onCloseClick} className={classes.btnClose}>close-circle</Icon>\r\n                        </Grid>\r\n                    </Grid>\r\n                    <Scrollbars \r\n                        autoHide={false} universal={true} style={{height : '90%'}}\r\n                    >\r\n                    <Grid container className={classes.userData}>\r\n                        <Grid item xs={3}>\r\n                            ชื่อ - นามสกุล \r\n                        </Grid>\r\n                        <Grid item xs={9}>\r\n                            : {userData.fullName}\r\n                        </Grid>\r\n                        <Grid item xs={3}>\r\n                            username \r\n                        </Grid>\r\n                        <Grid item xs={9}>\r\n                            : {userData.userName}\r\n                        </Grid>\r\n                        <Grid item xs={3}>\r\n                            user group \r\n                        </Grid>\r\n                        <Grid item xs={9}>\r\n                            : {userData.userGroupName}\r\n                        </Grid>\r\n                    </Grid>\r\n                    <Grid container  className={classes.userData}>\r\n                        <Grid item xs={12}>\r\n                            สามารถเข้าใช้งานในระบบต่อไปนี้\r\n                        </Grid>\r\n                    </Grid>\r\n                    {data.map(item => {\r\n                        return <p style={{paddingLeft: '8px'}}>- {item.name}</p>\r\n                    })}\r\n                    </Scrollbars>\r\n                </div>\r\n            </Modal>\r\n        </Fragment>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    modal: {\r\n        display: 'flex',\r\n        alignItems: 'center',\r\n        justifyContent: 'center',\r\n    },\r\n    paper: {\r\n        backgroundColor: theme.palette.background.paper,\r\n        border: '2px solid #000',\r\n        height: '40%',\r\n        width: '40%',\r\n        [theme.breakpoints.down('sm')]: {\r\n            width: '85%',\r\n            height: '60%'\r\n        }\r\n    },\r\n    divClose: {\r\n        backgroundColor: '#38A153',\r\n        width: '100%',\r\n        height: '10%'\r\n    },\r\n    spanText: {\r\n        paddingLeft: '8px',\r\n        color: \"#FFFFFF\"\r\n    },\r\n    iconClose: {\r\n        textAlign: 'end',\r\n    },\r\n    btnClose: {\r\n        position: 'relative',\r\n        top: '1px',\r\n        right: '5px',\r\n        cursor: 'pointer'\r\n    },\r\n    userData: {\r\n        paddingLeft: '8px',\r\n        paddingTop: '8px'\r\n    }\r\n}))(ListSystemOfUserView)","import React, { Fragment, useState, useEffect } from 'react'\r\n\r\nimport ListSystemOfUserView from '../../../Presentationals/UserManagements/User/ListSystemOfUserView'\r\nimport * as ApiUser from './ApiUser'\r\n\r\nconst ListSystemOfUser = (props) => {\r\n    const {\r\n        userData,\r\n        handleCloseModal\r\n    } = props;\r\n    \r\n    const [isOpen, setIsOpen] = useState(false);\r\n    const [listSystem, setListSystem] = useState([]);\r\n\r\n    useEffect(() => {\r\n        loadListUser();\r\n    }, [])\r\n\r\n    const loadListUser = () => {\r\n        ApiUser.callServiceGetListSystemOfUser(userData.userGroupID)\r\n            .then(data => {\r\n                if(data) {\r\n                    loadSystem(data.system)\r\n                }\r\n            })\r\n    }\r\n\r\n    const loadSystem = (system) => {\r\n        ApiUser.callServiceGetLuSystem()\r\n            .then(data => {\r\n                if(data) {\r\n                    mapSystemToDisplay(system, data.result);\r\n                }\r\n            })\r\n    }\r\n\r\n    const mapSystemToDisplay = async (system, allSystem) => {\r\n        const systemToDisplay = await allSystem.filter(item => {\r\n            return system.indexOf(item.value) !== -1\r\n        })\r\n\r\n        await setListSystem(systemToDisplay);\r\n        await setIsOpen(true)\r\n    }\r\n\r\n    const handleClose = () => {\r\n        setListSystem([])\r\n        setIsOpen(false)\r\n        handleCloseModal()\r\n    }\r\n\r\n    return (\r\n        <Fragment>\r\n            <ListSystemOfUserView \r\n                open = {isOpen}\r\n                data = {listSystem}\r\n                userData = {userData}\r\n                onCloseClick = {handleClose}\r\n            />\r\n        </Fragment>\r\n    )\r\n}\r\n\r\nexport default ListSystemOfUser","import React, { Component, Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { bindActionCreators } from 'redux';\r\nimport { BREADCRUMB_MENU_UM, ALERT_MESSAGE } from '../../../Constants/Constants';\r\nimport { compose } from 'recompose';\r\nimport { isFindString, sortObjASC, sortObjDESC } from '../../../Utilities/Utils';\r\nimport * as LayoutAction from '../../../Actions/UserManagements/LayoutAction';\r\nimport * as ApiUser from './ApiUser';\r\nimport ListUserView from '../../../Presentationals/UserManagements/User/ListUserView';\r\nimport ListSystemOfUser from './ListSystemOfUser'\r\nimport Loading from '../../../Controls/Containers/Loading';\r\nimport WithLoading from '../../../HOC/WithLoading';\r\nimport AlertMessageSuper from '../../../Controls/Containers/AlertMessageSuper';\r\nimport WithAlertMessage from '../../../HOC/WithAlertMessage';\r\n\r\nexport class ListUser extends Component {\r\n    constructor() {\r\n        super()\r\n        this.state = {\r\n            page: 1,\r\n            rpp: parseInt(1 * ((window.innerHeight - 354) / 48)),\r\n            search: \"\",\r\n            userData: [],\r\n            sortType: \"asc\",\r\n            sortColomn: \"ID\",\r\n            showListSystem: false,\r\n            userSystemData: null\r\n        }\r\n    }\r\n\r\n    componentDidMount = () => {\r\n        this.props.layoutAction.setMenuBreadcrumb(BREADCRUMB_MENU_UM.USER)\r\n        this.getListUser();\r\n    }\r\n\r\n    getListUser = () => {\r\n        const { showLoading, hideLoading } = this.props;\r\n        showLoading();\r\n        ApiUser.getAllUser()\r\n            .then(data => {\r\n                if (data && data.Result) {\r\n                    this.setState({\r\n                        userData: data.Result\r\n                    })\r\n                }\r\n            })\r\n            .finally(() => {\r\n                hideLoading();\r\n            })\r\n    }\r\n\r\n    handleChangeSearch = evt => {\r\n        this.setState({\r\n            search: evt.target.value,\r\n            page: 1\r\n        })\r\n    }\r\n\r\n    handleChangePage = (page) => {\r\n        this.setState({\r\n            page: page\r\n        })\r\n    }\r\n\r\n    handleSortDataTable = (column, sortType) => {\r\n        const { userData } = this.state;\r\n        const userDataSort = (sortType === \"asc\") ? sortObjASC(userData, column) : sortObjDESC(userData, column);\r\n\r\n        this.setState({\r\n            sortType: sortType,\r\n            sortColomn: column,\r\n            userData: userDataSort\r\n        })\r\n    }\r\n\r\n    handleRowClick = (userData, buttonType) => {\r\n        const { onEditUser, onDeleteUser, showAlert } = this.props;\r\n        switch (buttonType) {\r\n            case \"edit\":\r\n                onEditUser && onEditUser(userData.userID)\r\n                break;\r\n            case \"delete\":\r\n                onDeleteUser && onDeleteUser(userData.userID)\r\n                showAlert({\r\n                    altMsg: `${ALERT_MESSAGE.QUESTION.DELETE} ${userData.userName} ?`,\r\n                    altType: 2,\r\n                    callbackConfirm: () => {\r\n                        this.handleDeleteUser({ userID: userData.userID, userName: userData.userName })\r\n                    }\r\n                })\r\n                break;\r\n            case 'system':\r\n                this.handleListSystemOfUser(userData)\r\n                break;\r\n            default:\r\n                break;\r\n        }\r\n    }\r\n\r\n    handleListSystemOfUser = (userData) => {\r\n        this.setState({ \r\n            showListSystem: !this.state.showListSystem, \r\n            userSystemData: this.state.userSystemData? null:userData\r\n        })\r\n    }\r\n\r\n    handleDeleteUser = (dataUser) => {\r\n        const { showLoading, hideLoading, showAlert, hideAlert } = this.props;\r\n        showLoading();\r\n        ApiUser.callServiceDeleteUserByID(dataUser.userID)\r\n            .then(data => {\r\n                if (data && data.statusCode === 1) {\r\n                    showAlert({\r\n                        altMsg: `${ALERT_MESSAGE.POPUP.DELETE_SUCCESS}`,\r\n                        callbackClose: () => {\r\n                            hideAlert();\r\n                            this.getListUser()\r\n                        }\r\n                    })\r\n                } else {\r\n                    showAlert({ altMsg: ALERT_MESSAGE.POPUP.DELETE_FAIL })\r\n                }\r\n            })\r\n            .catch(() => {\r\n                showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR })\r\n            })\r\n            .finally(() => {\r\n                hideLoading();\r\n            })\r\n    }\r\n\r\n    handleBeforeShowControl = (data) => {\r\n        return false\r\n    }\r\n\r\n    createDataTable = () => {\r\n        const { page, userData, search } = this.state;\r\n        const searched = userData.filter(item => isFindString(item.userName, search) || isFindString(item.fullName, search) || isFindString(item.userGroupName, search));\r\n        const specSize = parseInt(1 * ((window.innerHeight - 354) / 48)) > 0 ?\r\n            parseInt(1 * (window.innerHeight - 354) / 48) : 1;\r\n        const finalListIntablePage = parseInt(page * specSize);\r\n        const lenTableData = (finalListIntablePage % specSize) === 0 ? finalListIntablePage : finalListIntablePage - (finalListIntablePage % specSize);\r\n        const tableData = searched.slice(((page - 1) * specSize), lenTableData)\r\n        const matHeight = (tableData.length * 48) + 135\r\n\r\n        return {\r\n            searched,\r\n            specSize,\r\n            finalListIntablePage,\r\n            lenTableData,\r\n            tableData,\r\n            matHeight,\r\n        }\r\n    }\r\n\r\n    render() {\r\n        const { page, sortColomn, sortType, showListSystem, userSystemData } = this.state;\r\n        const { onAddUser, isShowLoading } = this.props;\r\n        const dataTable = this.createDataTable();\r\n\r\n        return (\r\n            <Fragment>\r\n                <ListUserView\r\n                    page={page}\r\n                    sortColomn={sortColomn}\r\n                    userData={dataTable.tableData}\r\n                    countUserData={dataTable.searched.length}\r\n                    rowPerPage={dataTable.specSize}\r\n                    sortType={sortType}\r\n                    matHeight={dataTable.matHeight}\r\n\r\n                    onClickAddUser={onAddUser}\r\n                    onChangeSearch={this.handleChangeSearch}\r\n                    onChangePage={this.handleChangePage}\r\n                    onSortDataTable={this.handleSortDataTable}\r\n                    onRowClick={this.handleRowClick}\r\n                    onBeforeShowControl={this.handleBeforeShowControl}\r\n                />\r\n                {showListSystem && <ListSystemOfUser userData = { userSystemData } handleCloseModal={this.handleListSystemOfUser} />}\r\n                <Loading isShowLoading={isShowLoading} />\r\n                <AlertMessageSuper {...this.props} />\r\n            </Fragment>\r\n        )\r\n    }\r\n}\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    layoutAction: bindActionCreators(LayoutAction, dispatch)\r\n})\r\n\r\nexport default compose(\r\n    connect(null, mapDispatchToProps),\r\n    WithLoading,\r\n    WithAlertMessage\r\n)(ListUser)","import React from 'react';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport { Scrollbars } from 'react-custom-scrollbars';\r\nimport Grid from '@material-ui/core/Grid';\r\n\r\nconst AddUserView = ({\r\n    classes,\r\n    children\r\n}) => {\r\n    return (\r\n        <Grid container direction=\"column\"  className={classes.root} >\r\n            <Grid container className={classes.rootTitle}>\r\n                เพิ่มผู้ใช้งาน\r\n            </Grid>\r\n            <Grid container className={classes.rootBody}>\r\n                <Scrollbars autoHide>\r\n                    {children}\r\n                </Scrollbars>\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        width: '100%',\r\n        height: '100%'\r\n    },\r\n    rootPaper: {\r\n        padding: '20px',\r\n        width: 'calc(100% - 40px)',\r\n    },\r\n    rootTitle: {\r\n        fontSize: '25px'\r\n    },\r\n    rootBody: {\r\n        marginTop: '25px',\r\n        height: 'calc(100% - 90px)',\r\n        width:'100%',\r\n    },\r\n}))(AddUserView)\r\n","import React from 'react';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport { Field } from 'redux-form';\r\nimport TextFieldRedux from '../../../Controls/Containers/TextFieldRedux';\r\nimport SelectFieldRedux from '../../../Controls/Containers/SelectFieldRedux';\r\nimport Button from '../../../Controls/Containers/Button';\r\nimport {normalizeUsername} from '../../../Utilities/Validate';\r\n\r\nconst FormUserView = ({\r\n    classes,\r\n    action,\r\n    luUserGroup,\r\n    luOrganization,\r\n    luStatusUser,\r\n    handleSubmit,\r\n    onSubmit,\r\n    onCancel\r\n}) => {\r\n    return (\r\n        <Grid className={classes.root}>\r\n            <Grid container>\r\n                <Grid item xs={12} sm={6} className={classes.paddingColLeft}>\r\n                    <Field\r\n                        name=\"userName\"\r\n                        label=\"User Name\"\r\n                        component={TextFieldRedux}\r\n                        normalize={normalizeUsername}\r\n                        required\r\n                    />\r\n                </Grid>\r\n                <Grid item xs={12} sm={6} className={classes.paddingColRight}>\r\n                    <Field\r\n                        name=\"email\"\r\n                        label=\"Email\"\r\n                        component={TextFieldRedux}\r\n                        required\r\n                    />\r\n                </Grid>\r\n                <Grid item xs={12} sm={6} className={classes.paddingColLeft}>\r\n                    <Field\r\n                        name=\"password\"\r\n                        type=\"password\"\r\n                        label=\"Password\"\r\n                        component={TextFieldRedux}\r\n                        required={action === \"ADD\"}\r\n                    />\r\n                </Grid>\r\n                <Grid item xs={12} sm={6} className={classes.paddingColRight}>\r\n                    <Field\r\n                        name=\"confirmPassword\"\r\n                        label=\"Confirm Password\"\r\n                        type=\"password\"\r\n                        component={TextFieldRedux}\r\n                        required={action === \"ADD\"}\r\n                    />\r\n                </Grid>\r\n                <Grid item xs={12} sm={6} className={classes.paddingColLeft}>\r\n                    <Field\r\n                        name=\"firstName\"\r\n                        label=\"ชื่อ\"\r\n                        component={TextFieldRedux}\r\n                        required\r\n                    />\r\n                </Grid>\r\n                <Grid item xs={12} sm={6} className={classes.paddingColRight}>\r\n                    <Field\r\n                        name=\"lastName\"\r\n                        label=\"นามสกุล\"\r\n                        component={TextFieldRedux}\r\n                        // required\r\n                    />\r\n                </Grid>\r\n                <Grid item xs={12} sm={6} className={classes.paddingColLeft}>\r\n                    <Field\r\n                        name=\"groupID\"\r\n                        label=\"User Group\"\r\n                        component={SelectFieldRedux}\r\n                        keyData={{ value: \"groupID\", label: \"groupName\" }}\r\n                        data={luUserGroup}\r\n                        required\r\n                    />\r\n                </Grid>\r\n                <Grid item xs={12} sm={6} className={classes.paddingColRight}>\r\n                    <Field\r\n                        name=\"organizationID\"\r\n                        label=\"หน่วยงานสังกัด\"\r\n                        component={SelectFieldRedux}\r\n                        keyData={{ value: \"value\", label: \"name\" }}\r\n                        data={luOrganization}\r\n                    />\r\n                </Grid>\r\n                <Grid item xs={12} sm={6} className={classes.paddingColLeft}>\r\n                    <Field\r\n                        name=\"identificationNo\"\r\n                        label=\"เลขประจำตัวประชาชน\"\r\n                        component={TextFieldRedux}\r\n                        maxLength = {13}\r\n                    />\r\n                </Grid>\r\n                <Grid item xs={12} sm={6} className={classes.paddingColRight}>\r\n                    <Field\r\n                        name=\"telephone\"\r\n                        label=\"เบอร์โทรศัพท์\"\r\n                        component={TextFieldRedux}\r\n                    />\r\n                </Grid>\r\n                <Grid item xs={12} sm={6} className={classes.paddingColLeft}>\r\n                    <Field\r\n                        name=\"activated\"\r\n                        label=\"สถานะการใช้งาน\"\r\n                        component={SelectFieldRedux}\r\n                        keyData={{ value: \"value\", label: \"name\" }}\r\n                        data={luStatusUser}\r\n                        required\r\n                    />\r\n                </Grid>\r\n\r\n                <Grid spacing={24} justify=\"center\" container className={classes.footer}>\r\n                    <Grid item>\r\n                        <Button label=\"ยกเลิก\" onClick={onCancel} />\r\n                    </Grid>\r\n                    <Grid item>\r\n                        <Button type=\"submit\" label=\"บันทึก\" onClick={handleSubmit(onSubmit)} />\r\n                    </Grid>\r\n                </Grid>\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        width: 'calc(100% - 20px)',\r\n        padding: '0px 10px',\r\n    },\r\n    paddingColLeft: {\r\n        paddingRight: '10px',\r\n        [theme.breakpoints.down('xs')]: {\r\n            paddingRight: '0px',\r\n        },\r\n    },\r\n    paddingColRight: {\r\n        paddingLeft: '10px',\r\n        [theme.breakpoints.down('xs')]: {\r\n            paddingLeft: '0px',\r\n        },\r\n    },\r\n    footer:{\r\n        marginTop:'10px'\r\n    }\r\n}))(FormUserView)\r\n","import React, { Component, Fragment } from 'react';\r\nimport { reduxForm, isDirty } from 'redux-form';\r\nimport { connect } from 'react-redux';\r\nimport { compose } from 'recompose'\r\nimport PropTypes from 'prop-types'\r\nimport { STATUS_USER } from '../../../Constants/Constants';\r\nimport { userFormValidate } from '../../../Utilities/Validate';\r\nimport { ALERT_MESSAGE } from '../../../Constants/Constants';\r\nimport * as ApiUser from './ApiUser';\r\nimport FormUserView from '../../../Presentationals/UserManagements/User/FormUserView';\r\nimport AlertMessageSuper from '../../../Controls/Containers/AlertMessageSuper';\r\nimport WithAlertMessage from '../../../HOC/WithAlertMessage';\r\n\r\nclass FormUser extends Component {\r\n    constructor() {\r\n        super();\r\n        this.state = {\r\n            luUserGroup: [],\r\n            luOrganization: [],\r\n        }\r\n    }\r\n\r\n    componentDidMount() {\r\n        const { initial, initialize } = this.props;\r\n        this.getLookup();\r\n        initial && initialize(initial)\r\n    }\r\n\r\n    getLookup = async () => {\r\n        const luOrganizaition = ApiUser.getLuOrganization();\r\n        const luAllUserGroup = ApiUser.getLuAllUserGroup();\r\n        const allLup = await Promise.all([luOrganizaition, luAllUserGroup])\r\n\r\n        this.setState({\r\n            luOrganization: allLup[0] && allLup[0].result ? allLup[0].result : [],\r\n            luUserGroup: allLup[1] && allLup[1].result ? allLup[1].result : []\r\n        })\r\n    }\r\n\r\n    handleSubmit = values => {\r\n        const { callBackSubmitForm } = this.props;\r\n        callBackSubmitForm && callBackSubmitForm(values)\r\n    }\r\n\r\n    handleCancel = () => {\r\n        const { callBackCancelForm, isCheckDirty, showAlert, hideAlert, dirty } = this.props;\r\n\r\n        if (isCheckDirty && dirty) {\r\n            showAlert({\r\n                altMsg: ALERT_MESSAGE.QUESTION.CANCEL_FORM,\r\n                altType: 2,\r\n                callbackConfirm: () => {\r\n                    callBackCancelForm && callBackCancelForm()\r\n                    hideAlert();\r\n                }\r\n            })\r\n        } else {\r\n            callBackCancelForm && callBackCancelForm()\r\n        }\r\n    }\r\n\r\n    render() {\r\n        const { handleSubmit, action } = this.props;\r\n        const { luUserGroup, luOrganization } = this.state;\r\n\r\n        return (\r\n            <Fragment>\r\n                <FormUserView\r\n                    action={action}\r\n                    luUserGroup={luUserGroup}\r\n                    luOrganization={luOrganization}\r\n                    luStatusUser={STATUS_USER}\r\n\r\n                    handleSubmit={handleSubmit}\r\n                    onSubmit={this.handleSubmit}\r\n                    onCancel={this.handleCancel}\r\n                />\r\n                <AlertMessageSuper {...this.props} />\r\n            </Fragment>\r\n        )\r\n    }\r\n}\r\n\r\nFormUser.propTypes = {\r\n    callBackSubmitForm: PropTypes.func,\r\n    callBackCancelForm: PropTypes.func,\r\n    isCheckDirty: PropTypes.bool //ถ้าส่ง true มา form จะทำการ check dirty และขึ้นข้อความแจ้งเตือนให้\r\n}\r\n\r\nFormUser.defaultProps = {\r\n    isCheckDirty: true\r\n}\r\n\r\nconst reduxFormParameter = {\r\n    form: \"userForm\",\r\n    validate: userFormValidate\r\n};\r\n\r\nconst mapStateToProps = state => ({\r\n    dirty: isDirty('userForm')(state),\r\n})\r\n\r\nexport default compose(\r\n    reduxForm(reduxFormParameter),\r\n    connect(mapStateToProps, null),\r\n    WithAlertMessage\r\n)(FormUser)\r\n","import React, { Component, Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { bindActionCreators } from 'redux';\r\nimport { sha256 } from \"js-sha256\";\r\nimport { compose } from 'recompose';\r\nimport { BREADCRUMB_MENU_UM, KEY_ENCRYPT_PASSWORD, ALERT_MESSAGE } from '../../../Constants/Constants';\r\nimport * as LayoutAction from '../../../Actions/UserManagements/LayoutAction';\r\nimport * as ApiUser from './ApiUser';\r\nimport AddUserView from '../../../Presentationals/UserManagements/User/AddUserView';\r\nimport FormUser from './FormUser';\r\nimport AlertMessageSuper from '../../../Controls/Containers/AlertMessageSuper';\r\nimport WithAlertMessage from '../../../HOC/WithAlertMessage';\r\nimport Loading from '../../../Controls/Containers/Loading';\r\nimport WithLoading from '../../../HOC/WithLoading';\r\n\r\nclass AddUser extends Component {\r\n    componentDidMount() {\r\n        this.props.layoutAction.setMenuBreadcrumb(BREADCRUMB_MENU_UM.USER_ADD)\r\n    }\r\n\r\n    handleSubmitAddUser = values => {\r\n        const { showLoading, hideLoading, showAlert } = this.props;\r\n        showLoading();\r\n        ApiUser.callServiceAddUser({\r\n            username: values.userName,\r\n            password: sha256.hmac(KEY_ENCRYPT_PASSWORD, values.password),\r\n            firstname: values.firstName,\r\n            lastname: values.lastName,\r\n            identificationNo: values.identificationNo,\r\n            groupID: values.groupID,\r\n            email: values.email,\r\n            telephone: values.telephone,\r\n            activated: values.activated === \"1\", //bool\r\n            orgID: values.organizationID\r\n        })\r\n            .then(data => {\r\n                if (data && data.statusCode) {\r\n                    switch (data.statusCode) {\r\n                        case -1:\r\n                            showAlert({ altMsg: \"พบ username นี้ในระบบแล้ว\" })\r\n                            break;\r\n                        case 0:\r\n                            showAlert({ altMsg: \"เพิ่มผู้ใช้งานไมสำเร็จ กรุณาลองใหม่อีกครั้ง\" })\r\n                            break;\r\n                        case 1:\r\n                            showAlert({ altMsg: ALERT_MESSAGE.POPUP.SAVE_SUCCESS, callbackClose: this.props.onCancelAddUser })\r\n                            break;\r\n                        default:\r\n                            break;\r\n                    }\r\n                } else {\r\n                    showAlert({ altMsg: \"เพิ่มผู้ใช้งานไมสำเร็จ กรุณาลองใหม่อีกครั้ง\" })\r\n                }\r\n            })\r\n            .catch(() => {\r\n                showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR })\r\n            })\r\n            .finally(() => {\r\n                hideLoading();\r\n            })\r\n    }\r\n\r\n    render() {\r\n        const { onCancelAddUser, isShowLoading } = this.props;\r\n\r\n        return (\r\n            <Fragment>\r\n                <AddUserView>\r\n                    <FormUser\r\n                        action=\"ADD\"\r\n                        callBackSubmitForm={this.handleSubmitAddUser}\r\n                        callBackCancelForm={onCancelAddUser}\r\n                    />\r\n                </AddUserView>\r\n                <Loading isShowLoading={isShowLoading} />\r\n                <AlertMessageSuper {...this.props} />\r\n            </Fragment>\r\n        )\r\n    }\r\n}\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    layoutAction: bindActionCreators(LayoutAction, dispatch)\r\n})\r\n\r\nexport default compose(\r\n    connect(null, mapDispatchToProps),\r\n    WithAlertMessage,\r\n    WithLoading\r\n)(AddUser)","import React from 'react';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport { Scrollbars } from 'react-custom-scrollbars';\r\nimport Grid from '@material-ui/core/Grid';\r\n\r\nconst EditUserView = ({\r\n    classes,\r\n    children\r\n}) => {\r\n    return (\r\n        <Grid container direction=\"column\"  className={classes.root} >\r\n            <Grid container className={classes.rootTitle}>\r\n                แก้ไขผู้ใช้งาน\r\n            </Grid>\r\n            <Grid container className={classes.rootBody}>\r\n                <Scrollbars autoHide>\r\n                    {children}\r\n                </Scrollbars>\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        width: '100%',\r\n        height: '100%'\r\n    },\r\n    rootPaper: {\r\n        padding: '20px',\r\n        width: 'calc(100% - 40px)',\r\n    },\r\n    rootTitle: {\r\n        fontSize: '25px'\r\n    },\r\n    rootBody: {\r\n        marginTop: '25px',\r\n        height: 'calc(100% - 90px)',\r\n        width:'100%',\r\n    },\r\n}))(EditUserView)\r\n","import React, { Component, Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { bindActionCreators } from 'redux';\r\nimport { compose } from 'recompose';\r\nimport { sha256 } from \"js-sha256\";\r\nimport { BREADCRUMB_MENU_UM, ALERT_MESSAGE, KEY_ENCRYPT_PASSWORD } from '../../../Constants/Constants';\r\nimport * as LayoutAction from '../../../Actions/UserManagements/LayoutAction';\r\nimport * as ApiUser from './ApiUser';\r\nimport EditUserView from '../../../Presentationals/UserManagements/User/EditUserView';\r\nimport FormUser from './FormUser';\r\nimport Loading from '../../../Controls/Containers/Loading';\r\nimport WithLoading from '../../../HOC/WithLoading';\r\nimport WithAlertMessage from '../../../HOC/WithAlertMessage';\r\nimport AlertMessageSuper from '../../../Controls/Containers/AlertMessageSuper';\r\n\r\nclass EditUser extends Component {\r\n    constructor() {\r\n        super();\r\n        this.state = {\r\n            userData: null\r\n        }\r\n    }\r\n\r\n    componentDidMount() {\r\n        this.props.layoutAction.setMenuBreadcrumb(BREADCRUMB_MENU_UM.USER_EDIT)\r\n        this.getUserData();\r\n    }\r\n\r\n    getUserData = () => {\r\n        const { userID, showLoading, hideLoading } = this.props;\r\n        showLoading();\r\n        ApiUser.getUserByID(userID)\r\n            .then(data => {\r\n                if (data) {\r\n                    this.setState({\r\n                        userData: data\r\n                    })\r\n                }\r\n            })\r\n            .finally(() => {\r\n                hideLoading();\r\n            })\r\n    }\r\n\r\n    handleSubmitSaveUser = values => {\r\n        const { userID, showAlert, showLoading, hideLoading } = this.props;\r\n        showLoading();\r\n        ApiUser.callServiceUpdateUser({\r\n            userid: userID,\r\n            username: values.userName,\r\n            password: values.password ? sha256.hmac(KEY_ENCRYPT_PASSWORD, values.password) : undefined, // ถ้าไม่แก้ไขให้ส่ง undefined\r\n            firstname: values.firstName,\r\n            lastname: values.lastName,\r\n            identificationNo: values.identificationNo,\r\n            groupID: values.groupID,\r\n            email: values.email,\r\n            telephone: values.telephone,\r\n            activated: values.activated === \"1\", //bool\r\n            orgID: values.organizationID\r\n        })\r\n            .then(data => {\r\n                if (data && data.statusCode) {\r\n                    switch (data.statusCode) {\r\n                        case -1:\r\n                            showAlert({ altMsg: \"พบ username นี้ในระบบแล้ว\" })\r\n                            break;\r\n                        case 0:\r\n                            showAlert({ altMsg: \"อัพเดทข้อมูลผู้ใช้งานไมสำเร็จ กรุณาลองใหม่อีกครั้ง\" })\r\n                            break;\r\n                        case 1:\r\n                            showAlert({ altMsg: ALERT_MESSAGE.POPUP.SAVE_SUCCESS, callbackClose: this.props.onCancelEditUser })\r\n                            break;\r\n                        default:\r\n                            break;\r\n                    }\r\n                } else {\r\n                    showAlert({ altMsg: \"อัพเดทข้อมูลผู้ใช้งานไมสำเร็จ กรุณาลองใหม่อีกครั้ง\" })\r\n                }\r\n            })\r\n            .catch(() => {\r\n                showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR })\r\n            })\r\n            .finally(() => {\r\n                hideLoading();\r\n            })\r\n    }\r\n\r\n    render() {\r\n        const { userData } = this.state;\r\n        const { isShowLoading, onCancelEditUser } = this.props;\r\n\r\n        return (\r\n            <Fragment>\r\n                <EditUserView>\r\n                    {userData && <FormUser\r\n                        initial={userData}\r\n                        callBackSubmitForm={this.handleSubmitSaveUser}\r\n                        callBackCancelForm={onCancelEditUser}\r\n                    />}\r\n                </EditUserView>\r\n                <AlertMessageSuper {...this.props} />\r\n                <Loading isShowLoading={isShowLoading} />\r\n            </Fragment>\r\n        )\r\n    }\r\n}\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    layoutAction: bindActionCreators(LayoutAction, dispatch)\r\n})\r\n\r\nexport default compose(\r\n    WithLoading,\r\n    WithAlertMessage,\r\n    connect(null, mapDispatchToProps)\r\n)(EditUser)\r\n","import React, { Component } from 'react'\r\nimport { connect } from 'react-redux';\r\nimport { bindActionCreators } from 'redux';\r\n\r\nimport * as LayoutAction from '../../../Actions/UserManagements/LayoutAction';\r\nimport UserView from '../../../Presentationals/UserManagements/User/UserView';\r\n\r\nimport ListUser from './ListUser';\r\nimport AddUser from './AddUser';\r\nimport EditUser from './EditUser';\r\n\r\nconst PAGE = {\r\n    USER: \"USER\",\r\n    USER_ADD: \"USER_ADD\",\r\n    USER_EDIT: \"USER_EDIT\"\r\n}\r\n\r\nexport class User extends Component {\r\n    constructor() {\r\n        super();\r\n        this.state = {\r\n            page: PAGE.USER,\r\n            editUserID: null,\r\n            showListSystem: false\r\n        }\r\n    }\r\n\r\n\r\n    handleAddUser = () => {\r\n        this.handleChangePage(PAGE.USER_ADD)\r\n    }\r\n\r\n    handleCancelAddUser = () => {\r\n        this.handleChangePage(PAGE.USER)\r\n    }\r\n\r\n    handleEditUser = userID => {\r\n        this.setState({\r\n            page: PAGE.USER_EDIT,\r\n            editUserID: userID,\r\n        })\r\n    }\r\n\r\n    handleCancelEditUser = () => {\r\n        this.setState({\r\n            page: PAGE.USER,\r\n            editUserID: null,\r\n        })\r\n    }\r\n    \r\n    handleChangePage = page => {\r\n        this.setState({\r\n            page: page\r\n        })\r\n    }\r\n\r\n    renderPage = () => {\r\n        const { page, editUserID } = this.state;\r\n        switch (page) {\r\n            case PAGE.USER:\r\n                return <ListUser\r\n                    onAddUser={this.handleAddUser}\r\n                    onEditUser={this.handleEditUser}\r\n                />;\r\n            case PAGE.USER_ADD:\r\n                return <AddUser onCancelAddUser={this.handleCancelAddUser} />\r\n            case PAGE.USER_EDIT:\r\n                return <EditUser userID={editUserID} onCancelEditUser={this.handleCancelEditUser} />\r\n            default:\r\n                break;\r\n        }\r\n    }\r\n\r\n    render() {\r\n        // const { showListSystem, userID } = this.state;\r\n\r\n        return (\r\n            <UserView>\r\n                {this.renderPage()}\r\n            </UserView>\r\n        )\r\n    }\r\n}\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    layoutAction: bindActionCreators(LayoutAction, dispatch)\r\n})\r\n\r\nexport default connect(null, mapDispatchToProps)(User)\r\n","import React, { Fragment } from 'react';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Delete from \"@material-ui/icons/Delete\";\r\nimport Edit from \"@material-ui/icons/Edit\";\r\nimport Grid from '@material-ui/core/Grid';\r\n// import Add from '@material-ui/icons/Add';\r\n// import Button from '../../../Controls/Containers/Button';\r\n\r\n//import component\r\nimport DataTable from '../../../Controls/DataTable/DataTable';\r\n\r\nconst UserGroupTableView = (props) => {\r\n    const {\r\n        classes,\r\n        userGroupData,\r\n        // countMajorTopics,\r\n        page,\r\n        rowPerPage,\r\n        sortColomn,\r\n        sortType,\r\n    \r\n        onBeforeShowControl,\r\n        onChangePage,\r\n        onSortDataTable,\r\n        onRowClick,\r\n        total,\r\n        // matHeight,\r\n        // onClickDeleteItem,\r\n        // onClickEditItem\r\n    } = props;\r\n\r\n    return (\r\n        <Fragment>\r\n           <Grid container className={classes.root}>\r\n            {/* <Grid container justify=\"center\" style={{ height: `${matHeight}px` }}> */}\r\n            <Grid container justify=\"center\">\r\n                <DataTable\r\n                    headerCssClass=\"table-header-style\"\r\n                    columns={[\r\n                        { title: \"Group Name\", data: \"groupName\", width: \"90%\", align: \"left\", sort: true },\r\n                        { title: '', width: '10%', type: \"button\", align: \"center\", sort: false }\r\n                    ]}\r\n                    rowControls={[\r\n                        {\r\n                            key: \"majorTopic-edit\",\r\n                            width: 50,\r\n                            colorClass: \"btn-assign-rfid\",\r\n                            icon: (<Edit />)\r\n                        },\r\n                        {\r\n                            key: \"majorTopic-del\",\r\n                            width: 50,\r\n                            colorClass: \"btn-assign-rfid\",\r\n                            icon: (<Delete />)\r\n                        }\r\n                    ]}\r\n                    data={userGroupData}\r\n                    page={page}\r\n                    rowPerPage={rowPerPage}\r\n                    total={total}\r\n                    sortColumn={sortColomn}\r\n                    sortType={sortType}\r\n                    noDataMessage={`No Data`}\r\n\r\n                    handlerBeforeShowControl={onBeforeShowControl}\r\n                    handlePageChange={onChangePage}\r\n                    handleSort={onSortDataTable}\r\n                    handleRowClick={onRowClick}\r\n                />\r\n            </Grid>\r\n        </Grid>\r\n        </Fragment>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        height: '100%',\r\n        width: '100%',\r\n        marginTop: '10px'\r\n    },\r\n    rootTable: {\r\n        boxShadow: \"0px 1px 5px 0px rgba(0,0,0,0.2), 0px 2px 2px 0px rgba(0,0,0,0.14), 0px 3px 1px -2px rgba(0,0,0,0.12);\",\r\n        marginTop: '25px',\r\n    }\r\n}))(UserGroupTableView)","import React, {Fragment} from 'react'\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport Add from '@material-ui/icons/Add';\r\n\r\n//import component\r\nimport Button from '../../../Controls/Containers/Button'\r\nimport UserGroupTableView from './UserGroupTableView'\r\nimport TextFieldSearch from '../../../Controls/Containers/TextFieldSearch';\r\n\r\nconst UserGroupView = (props) => {\r\n    const { \r\n        classes,\r\n        // children,\r\n        onClickAddUserGroup,\r\n        userGroupData,\r\n        onClickDeleteItem,\r\n        onClickEditItem,\r\n        onBeforeShowControl,\r\n        onRowClick,\r\n        onChangePage,\r\n        onChangeSearch,\r\n        matHeight,\r\n        countUserGroupData,\r\n        page,\r\n        rowPerPage,\r\n        sortColomn,\r\n        sortType,\r\n        onSortDataTable\r\n    } = props;\r\n\r\n    return (\r\n        <Fragment>\r\n            <Grid container className={classes.root}>\r\n                <Grid container className={classes.containerSearchAndButton}>\r\n                    <Grid item xs={6}>\r\n                        <TextFieldSearch\r\n                            className={classes.rootTextFieldSearch}\r\n                            onChange={onChangeSearch}\r\n                        />\r\n                    </Grid>\r\n                    <Grid item sm={6} xs={6} className={classes.buttonAddUserGroup}>\r\n                        <Button label={<Add />} onClick={onClickAddUserGroup}/>\r\n                    </Grid>\r\n                </Grid>\r\n\r\n                <Grid container justify=\"center\" style={{ height: `${matHeight}px`, marginTop: '10px' }}>\r\n                    <UserGroupTableView \r\n                        userGroupData = { userGroupData }\r\n                        onClickEditItem = { onClickEditItem }\r\n                        onClickDeleteItem = { onClickDeleteItem }\r\n                        onBeforeShowControl = { onBeforeShowControl }\r\n                        onChangePage = { onChangePage }\r\n                        onRowClick = { onRowClick }\r\n                        page={page}\r\n                        rowPerPage={Number(rowPerPage)}\r\n                        total={Number(countUserGroupData)}\r\n                        sortColumn={sortColomn}\r\n                        sortType={sortType}\r\n                        onSortDataTable={onSortDataTable}\r\n                    />\r\n                </Grid>\r\n            </Grid>\r\n        </Fragment>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root:{\r\n        padding:'10px'\r\n    },\r\n    containerSearchAndButton: {\r\n        minHeight: '40px',\r\n        marginTop:'10px'\r\n    },\r\n    buttonAddUserGroup: {\r\n        textAlign: 'right'\r\n    },\r\n    containerTableUserGroup: {\r\n        width: '100%',\r\n        height: '100%'\r\n    },\r\n    rootTextFieldSearch: {\r\n        width: '100%'\r\n    },\r\n}))(UserGroupView)","import React from 'react';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport { Grid } from '@material-ui/core';\r\nimport { Field } from 'redux-form';\r\nimport Checkbox from '@material-ui/core/Checkbox';\r\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\r\n\r\n//import component\r\nimport TextField from '../../../Controls/Containers/TextFieldRedux'\r\nimport SelectField from '../../../Controls/Containers/SelectFieldRedux'\r\n\r\nconst SystemView = (props) => {\r\n\r\n    const {\r\n        classes,\r\n        onCheckboxChange,\r\n        systemData,\r\n        defaultSystemData=[],\r\n        onDefaultSystemChange,\r\n        disabledDefault,\r\n        topicName\r\n    } = props;\r\n   \r\n    const renderCheckbox = ({ input, label, disable }) => (\r\n        <FormControlLabel\r\n            control={\r\n                <Checkbox\r\n                    checked={input.value ? true : false}\r\n                    onChange={input.onChange}\r\n                    disabled = {disable}\r\n                />\r\n            }\r\n            label={label}\r\n        />\r\n    );\r\n\r\n    const renderSystems = (systems, systemSelect) => {\r\n        return systems.map((system, index) => {\r\n            return (\r\n                <Grid xs={12} sm={6} md={4} key={`${system.id}`} style={{paddingLeft: '10px'}} item>\r\n                    <Field \r\n                        key={`${system.id}`} \r\n                        name={`${system.value}`} \r\n                        component={renderCheckbox} \r\n                        label={system.name} \r\n                        onChange={() => onCheckboxChange(system)}\r\n                        disable={disabledDefault === system.value}\r\n                    />\r\n                </Grid>\r\n            )\r\n        })\r\n    }\r\n\r\n    return (\r\n        <Grid container >\r\n            <Grid container>\r\n                <div className={classes.topicView}>\r\n                    {topicName}\r\n                </div>\r\n            </Grid>\r\n            <Grid container>\r\n                <Grid item xs={12} md={6}>\r\n                    <Field \r\n                        name='groupName'\r\n                        component={TextField}\r\n                        label={'ชื่อกลุ่ม'}\r\n                        maxLength={100}\r\n                        required\r\n                    />\r\n                </Grid>\r\n            </Grid>\r\n            <Grid container>\r\n                <Grid item xs={12}>\r\n                    <div className={classes.labelTopicText}>\r\n                        กำหนดสิทธิ์\r\n                    </div>\r\n                </Grid>\r\n                {renderSystems(systemData)}\r\n            </Grid>\r\n            <Grid container>\r\n                <Grid item xs={12} md={6}>\r\n                    <Field \r\n                        name='defaultSystem'\r\n                        component={SelectField}\r\n                        label=\"ระบบเริ่มต้น\"\r\n                        data={defaultSystemData}\r\n                        onChange={onDefaultSystemChange}\r\n                        required\r\n                    />\r\n                </Grid>\r\n            </Grid>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    topicView: {\r\n        textAlign: 'left',\r\n        fontSize: '24px'\r\n    },\r\n    labelTopicText: {\r\n        textAlign: 'left',\r\n        fontSize: '20px'\r\n    }\r\n}))(SystemView)","import React, { useState, useEffect, Fragment } from 'react'\r\nimport { connect } from 'react-redux';\r\n// import { bindActionCreators } from 'redux';\r\nimport { reduxForm, getFormValues } from \"redux-form\";\r\nimport { compose } from \"recompose\";\r\n\r\n//impport service utils\r\nimport { fetchGet_ } from '../../../Utilities/ServiceUtils';\r\n\r\n//import component\r\nimport WithAlertMessage from '../../../HOC/WithAlertMessage';\r\nimport AlertMessageSuper from '../../../Controls/Containers/AlertMessageSuper';\r\nimport WithLoading from '../../../HOC/WithLoading'\r\nimport Loading from '../../../Controls/Containers/Loading'\r\nimport SystemView from '../../../Presentationals/UserManagements/UserGroup/SystemView'\r\n\r\n//import constants\r\nimport { ALERT_MESSAGE, RESOURCEWORDS } from '../../../Constants/Constants'\r\n\r\nlet systemArr = [];\r\nlet submitForm = null\r\n\r\nconst SystemComtrol = (props) => {\r\n    const { \r\n        showLoading,\r\n        hideLoading,\r\n        isShowLoading,\r\n        showAlert,\r\n        topicName,\r\n        submitFunction,\r\n        initialData,\r\n        // userGroupData\r\n    } = props;\r\n\r\n    const [system, setSystem] = useState([]);\r\n    const [defaultSystem, setDefaultSystem] = useState([]);\r\n    const [disabledDefaultSystem, setDisabledDefaultSystem] = useState([])\r\n    if(submitFunction) {\r\n        submitForm = submitFunction;\r\n    }\r\n    \r\n    useEffect(() => {\r\n        showLoading();\r\n        systemArr = [];\r\n        callServiceSystem();\r\n    }, [])\r\n\r\n    const callServiceSystem = async () => {\r\n        try {\r\n            const response = await fetchGet_(`${process.env.REACT_APP_LU_SYSTEM}`);\r\n            const objResult = await response.json();\r\n\r\n            await manageSystemFormat(objResult.result);\r\n        } catch(err) {\r\n            hideLoading();\r\n            showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR })\r\n            console.log('err:: call service system', err)\r\n        }\r\n    }\r\n\r\n    const manageSystemFormat = async (objResult) => {\r\n        const newSystemFormat = await objResult.map(item => {\r\n            item.id = item.value\r\n\r\n            delete item.ID\r\n            return item\r\n        })\r\n\r\n        await setSystem(newSystemFormat);\r\n        if(initialData) {\r\n            await mangeInitailDefaultSystem(newSystemFormat);\r\n        }\r\n        await hideLoading();\r\n    }\r\n\r\n    const handleCheckboxSystem = async (evt) => {\r\n        const findDupkicate = systemArr.indexOf(evt);\r\n        if(findDupkicate > -1) {\r\n            const newArr = systemArr.filter(item => {\r\n                return item !== evt\r\n            })\r\n\r\n            systemArr = newArr;\r\n            await setDefaultSystem(systemArr)\r\n        } else {\r\n            systemArr.push(evt)\r\n            await setDefaultSystem(systemArr)\r\n        }\r\n    }\r\n\r\n    const handleDefaultSystemChange = (evt) => {\r\n        setDisabledDefaultSystem(evt.target.value)\r\n    }\r\n\r\n    const mangeInitailDefaultSystem = async (obj) => {\r\n        const data = await obj.filter(item => {\r\n            return initialData[`${item.value}`]\r\n        })\r\n        const evt = { target: {value: initialData.defaultSystem} }\r\n        systemArr = data\r\n        await handleDefaultSystemChange(evt)\r\n        await setDefaultSystem(data);\r\n    }\r\n\r\n    return (\r\n        <Fragment>\r\n            <SystemView \r\n                systemData = { system }\r\n                onCheckboxChange = { handleCheckboxSystem }\r\n                defaultSystemData = { defaultSystem }\r\n                onDefaultSystemChange = { handleDefaultSystemChange }\r\n                disabledDefault = { disabledDefaultSystem }\r\n                topicName = { topicName }\r\n            />\r\n            <Loading isShowLoading = { isShowLoading } />\r\n            <AlertMessageSuper {...props} />\r\n        </Fragment>\r\n    )\r\n}\r\n\r\nconst systemControlValidate = (values, props) => {\r\n    const errors = {};\r\n    const { userGroupData, initialData } = props;\r\n\r\n    if(!values.groupName || values.groupName.length > 100) {\r\n        // errors.groupName = RESOURCEWORDS.ERROR_TEXT.NO_EMPTY;\r\n        errors.groupName = \"ระบุ 1 - 100 ตัวอักษร\";\r\n    } else {\r\n        const isSameName = userGroupData.filter(item => {\r\n            if(item.groupName){\r\n                return (item.groupName).toLowerCase() === (values.groupName).toLowerCase();\r\n            }\r\n        })\r\n\r\n        if((isSameName.length > 0) && (initialData) && (values.groupName !== initialData.groupName)) {\r\n            errors.groupName = RESOURCEWORDS.ERROR_TEXT.DUPLICATE_NAME\r\n        } else if((isSameName.length > 0) && !initialData) {\r\n            errors.groupName = RESOURCEWORDS.ERROR_TEXT.DUPLICATE_NAME\r\n        }\r\n    }\r\n\r\n    if(!values.defaultSystem) {\r\n        errors.defaultSystem = RESOURCEWORDS.ERROR_TEXT.NO_EMPTY\r\n    }\r\n\r\n    return errors\r\n}\r\n\r\nconst submit = (values) => {\r\n    if(submitForm !== null) {\r\n        submitForm(values);\r\n    }\r\n}  \r\n\r\nconst mapStateToProps = state => ({\r\n    _values: getFormValues('SystemComtrol')(state),\r\n    // authenRdc: state.authen,\r\n})\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    // layoutAction: bindActionCreators(LayoutAction, dispatch)\r\n})\r\n\r\nconst reduxFormParameter = {\r\n    form: 'SystemComtrol',\r\n    onSubmit: submit,\r\n    validate: systemControlValidate,\r\n    // enableReinitialize : true,\r\n    // initialValues: initialValues\r\n};\r\n\r\nexport default compose(\r\n    connect(mapStateToProps, mapDispatchToProps),\r\n    reduxForm(reduxFormParameter),\r\n    // withWidth(),\r\n    WithAlertMessage,\r\n    WithLoading\r\n)(SystemComtrol);","import React, { Fragment } from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport Table from '@material-ui/core/Table';\r\nimport TableBody from '@material-ui/core/TableBody';\r\nimport TableCell from '@material-ui/core/TableCell';\r\nimport TableHead from '@material-ui/core/TableHead';\r\nimport TableRow from '@material-ui/core/TableRow';\r\nimport Paper from '@material-ui/core/Paper';\r\nimport { Scrollbars } from 'react-custom-scrollbars';\r\nimport Done from '@material-ui/icons/Done'\r\nimport { Field } from 'redux-form';\r\nimport Checkbox from '@material-ui/core/Checkbox';\r\nimport { Grid } from '@material-ui/core';\r\nimport FormControlLabel from '@material-ui/core/FormControlLabel';\r\n\r\nconst CustomTableCell = withStyles(theme => ({\r\n    head: {\r\n        color: theme.palette.common.white,\r\n        width: '200px',\r\n        top: '0px',\r\n    },\r\n    body: {\r\n        fontSize: 14,\r\n        paddingRight: 0\r\n    },\r\n}))(TableCell);\r\n\r\nconst TableSummaryCompareView = ({\r\n    classes,\r\n    systemData=[],\r\n    dataToDisplay=[]\r\n}) => {\r\n\r\n    // console.log('dataToDisplay', dataToDisplay)\r\n    \r\n    if (dataToDisplay.length === 0) {\r\n        return <div className={classes.noData}>no data</div>\r\n    }\r\n\r\n    const renderCheckbox = ({ input, label, disable }) => (\r\n        <FormControlLabel\r\n            control={\r\n                <Checkbox\r\n                    checked={input.value ? true : false}\r\n                    onChange={input.onChange}\r\n                    disabled = {disable}\r\n                />\r\n            }\r\n            label={label}\r\n        />\r\n    );\r\n\r\n    const rederFunctions = (functionName, functionSelect) => {\r\n        return (\r\n            <Grid xs={12} key={`${functionName.id}`} item>\r\n                <Field \r\n                    key={`${functionName.id}`}\r\n                    name={`${functionName.id}`}\r\n                    component={renderCheckbox}\r\n                    label={functionName.name}\r\n                />\r\n            </Grid>\r\n        )\r\n    }\r\n\r\n    const renderTable = () => {\r\n        return (\r\n            <Paper className={classes.root}>\r\n                <div style={{backgroundColor: 'black', height: '2px', width: '100%'}} />\r\n                <Scrollbars>\r\n                <Table className={classes.table}>\r\n                    <TableHead className={classes.header}>\r\n                        <TableRow key=\"header\">\r\n                            <CustomTableCell key=\"header-empty\" className={`table-header-style ${classes.stickytRowCol}`} \r\n                                style={{\r\n                                    // padding: 5, \r\n                                    textAlign: 'center', \r\n                                    minWidth: '70px', \r\n                                    maxHeight: '72px',\r\n                                    boxSizing: 'border-box',\r\n                                    border: '1px solid #000000',\r\n                                    borderTop: 'none'\r\n                                }}\r\n                            />\r\n                            {systemData.map((itmLayer, index) => (\r\n                                <CustomTableCell\r\n                                    key={`header-${itmLayer.value}-${index}`}\r\n                                    className={`table-header-style ${classes.stickytRow}`}\r\n                                    style={{\r\n                                        padding: '2%',\r\n                                        textAlign: 'center', \r\n                                        minWidth: '70px', \r\n                                        maxHeight: '72px',\r\n                                        boxSizing: 'border-box',\r\n                                        border: '1px solid #000000',\r\n                                        borderTop: 'none'\r\n                                    }}\r\n                                >\r\n                                    {itmLayer.name}\r\n                                </CustomTableCell>\r\n                            ))}\r\n                        </TableRow>\r\n                    </TableHead>\r\n                    <TableBody className={classes.body}>\r\n                        {renderRowTable()}\r\n                    </TableBody>\r\n                </Table>\r\n                </Scrollbars>\r\n            </Paper>\r\n        )\r\n    }\r\n\r\n    const renderRowTable = () => {\r\n        return (\r\n            dataToDisplay.map((item, index) => {\r\n                return (\r\n                    <Fragment key={`root-${index}`} >\r\n                        <TableRow className={classes.row} key={item.id} \r\n                            style = {item.subFunction.length > 0 ? \r\n                                {borderTop: '2px solid #000000'}:\r\n                                {borderTop: '2px solid #000000', borderBottom: '2px solid #000000'}\r\n                            }\r\n                        >\r\n                            <CustomTableCell\r\n                                key={`body-${index}`}\r\n                                className={`${classes.stickyColumn}`}\r\n                                align=\"left\"\r\n                                style={window.innerWidth > 600 ? \r\n                                    { height: '51px', boxSizing: 'border-box', border: '1px solid #000000' }:\r\n                                    { height: '72px', boxSizing: 'border-box', border: '1px solid #000000' }\r\n                                }\r\n                            >\r\n                                {rederFunctions(item)}\r\n                            </CustomTableCell>\r\n                            {systemData.map((itemSystem, sysIndex) => {\r\n                                if (item.systemId.indexOf(itemSystem.value) !== -1) {\r\n                                    return (\r\n                                        <CustomTableCell\r\n                                            key={`body-${index}-${sysIndex}`}\r\n                                            align=\"center\"\r\n                                            style={{padding: 0, border: '1px solid #000000', color: '#128C2C'}}\r\n                                        >\r\n                                            <Done />\r\n                                        </CustomTableCell>\r\n                                    )\r\n                                } else {\r\n                                    return (\r\n                                        <CustomTableCell\r\n                                            key={`body-${index}-${sysIndex}`}\r\n                                            align=\"center\"\r\n                                            style={{backgroundColor:'#e0e0e0', border: '1px solid #000000'}}     \r\n                                        />\r\n                                    )\r\n                                }\r\n                            })}\r\n                        </TableRow>\r\n                        {item.subFunction.length > 0 && renderSubRowTable(item,index) }\r\n                    </Fragment>\r\n                )}\r\n            )\r\n        )\r\n    }\r\n\r\n    const renderSubRowTable = (item,index) => {\r\n        return (\r\n            item.subFunction.map((itemSub, indexSub) => {\r\n                return (\r\n                    <TableRow className={classes.row} key={`${itemSub.id}-${indexSub}`} >\r\n                        <CustomTableCell\r\n                            key={`body-${indexSub}`}\r\n                            className={`${classes.stickyColumn}`}\r\n                            align=\"left\"\r\n                            style={window.innerWidth > 600 ? \r\n                                { height: '51px', boxSizing: 'border-box', paddingLeft: '50px', border: '1px solid #000000' }:\r\n                                { height: '72px', boxSizing: 'border-box',  paddingLeft: '50px', border: '1px solid #000000' }\r\n                            }\r\n                        >\r\n                            {rederFunctions(itemSub)}\r\n                        </CustomTableCell>\r\n                        {\r\n                            systemData.map((itemSystem, sysIndex) => {\r\n                                if (itemSub.systemId.indexOf(itemSystem.value) !== -1) {\r\n                                    return (\r\n                                        <CustomTableCell\r\n                                            key={`action-column ${indexSub}-${sysIndex}`}\r\n                                            align=\"center\"\r\n                                            style={{padding: 0, border: '1px solid #000000', color: '#128C2C'}}\r\n                                        >\r\n                                            <Done />\r\n                                        </CustomTableCell>\r\n                                    )\r\n                                } else {\r\n                                    return (\r\n                                        <CustomTableCell\r\n                                            // key={`body-${index}-${sysIndex}`}\r\n                                            key={`action-column ${indexSub}-${sysIndex}`}\r\n                                            align=\"center\"\r\n                                            style={{backgroundColor:'#e0e0e0', border: '1px solid #000000'}}     \r\n                                        />\r\n                                    )\r\n                                }\r\n                            })\r\n                    }\r\n                    </TableRow>\r\n                )\r\n            })\r\n        )\r\n    }\r\n\r\n    return (\r\n        <Fragment>\r\n            <Grid container className={classes.topic_container}>\r\n                การทำงานของแต่ละระบบ\r\n            </Grid>\r\n            <Grid container className={classes.table_contianer}>\r\n                {(systemData.length > 0 && dataToDisplay.length > 0) && renderTable()}\r\n            </Grid>\r\n        </Fragment>\r\n    );\r\n}\r\n\r\nTableSummaryCompareView.propTypes = {\r\n    classes: PropTypes.object.isRequired,\r\n};\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        width: '100%',\r\n    },\r\n    table: {\r\n        width: '100%',\r\n    },\r\n    row: {\r\n        height: '51px !important'\r\n    },\r\n    noData: {\r\n        height: '100px',\r\n        display: 'flex',\r\n        alignItems: 'center',\r\n        fontSize: '18px'\r\n    },\r\n    stickyColumn: {\r\n        left: '0px',\r\n        position: \"sticky\",\r\n        backgroundColor: 'white',\r\n    },\r\n    stickytRow: {\r\n        position: \"sticky\",\r\n        zIndex: '1 !important'\r\n    },\r\n    stickytRowCol: {\r\n        left: '0px',\r\n        position: \"sticky\",\r\n        zIndex: '2 !important',\r\n    },\r\n    table_contianer: {\r\n        width: '100%',\r\n        height: '500px'\r\n    },\r\n    topic_container: {\r\n        fontSize: '20px'\r\n    }\r\n}))(TableSummaryCompareView);","import React, { useState, useEffect, Fragment } from 'react'\r\nimport { compose } from \"recompose\";\r\n\r\n//import component\r\nimport TableDisplayView from '../../../Presentationals/UserManagements/UserGroup/TableDisplayView'\r\nimport Loading from '../../../Controls/Containers/Loading'\r\nimport WithLoading from '../../../HOC/WithLoading'\r\nimport AlertMessageSuper from '../../../Controls/Containers/AlertMessageSuper'\r\nimport WithAlertMessage from '../../../HOC/WithAlertMessage'\r\n\r\n//import service utile\r\nimport { fetchGet_ } from '../../../Utilities/ServiceUtils'\r\n\r\n//import constants\r\nimport { ALERT_MESSAGE } from '../../../Constants/Constants'\r\n\r\nconst TableDisplay = (props) => {\r\n    const {\r\n        systemData,\r\n        functionData,\r\n        showLoading,\r\n        hideLoading,\r\n        isShowLoading,\r\n        showAlert\r\n    } = props;\r\n    \r\n    const [dataToDisplay, setDataToDisplay] = useState([]);\r\n\r\n    useEffect(() => {\r\n        callServiceGetAllDisplatTable();\r\n    }, [])\r\n\r\n    const callServiceGetAllDisplatTable = async () => {\r\n        showLoading();\r\n        try {\r\n            const response = await fetchGet_(`${process.env.REACT_APP_GET_ALL_FUNCTION_AND_SYSTEM}`)\r\n            const objResult = await response.json();\r\n\r\n            await manageDataForDispplay(objResult.result)\r\n        } catch(err) {\r\n            hideLoading();\r\n            showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR })\r\n            console.log('err callService getAllSystem and Function', err)\r\n        }\r\n    }\r\n\r\n    const manageDataForDispplay = async (objData) => {\r\n        const systemOfFunction = await objData.map((item) => {\r\n            item.name = item.functionName\r\n            item.id = item.functionID\r\n\r\n            item.systemId = item.system.map(itemSystem => {\r\n                return itemSystem.systemID\r\n            })\r\n\r\n            delete item.functionName\r\n            delete item.functionID\r\n            delete item.system\r\n            return item\r\n        })\r\n        await mergeDataToDisplay(systemOfFunction);\r\n        await hideLoading();\r\n    }\r\n\r\n    const mergeDataToDisplay = async (dataCompare) => {\r\n        const dataToDisplayNew = await functionData.map(itemFunction => {\r\n            const dataCompareFilter = dataCompare.filter(itemObjData => {\r\n                return itemObjData.id === itemFunction.id\r\n            })\r\n\r\n            if(itemFunction.subFunction.length > 0) {\r\n                itemFunction.subFunction.map(itemSubFunction => {\r\n                    const dataCompareSubFilter = dataCompare.filter(itemObjData => {\r\n                        return itemObjData.id === itemSubFunction.id\r\n                    })\r\n\r\n                    itemSubFunction.systemId = dataCompareSubFilter.length > 0 ? dataCompareSubFilter[0].systemId:null\r\n                    \r\n                    return itemSubFunction\r\n                })\r\n\r\n                itemFunction.systemId = dataCompareFilter.length > 0 ? dataCompareFilter[0].systemId:null;\r\n            } else {\r\n                itemFunction.systemId = dataCompareFilter.length > 0 ? dataCompareFilter[0].systemId:null;\r\n            }\r\n\r\n            return itemFunction\r\n        })\r\n\r\n        // test = await dataToDisplayNew;\r\n        await setDataToDisplay(dataToDisplayNew)\r\n    }\r\n\r\n    return (\r\n        <Fragment>\r\n            {(systemData.length > 0 && dataToDisplay.length > 0) &&\r\n            <TableDisplayView \r\n                systemData = { systemData }\r\n                dataToDisplay = { dataToDisplay }\r\n            />}\r\n            <AlertMessageSuper {...props} />\r\n            <Loading isShowLoading = { isShowLoading } />\r\n        </Fragment>\r\n    )\r\n}\r\n\r\nexport default compose(\r\n    WithAlertMessage,\r\n    WithLoading\r\n)(TableDisplay)\r\n","import React, { Fragment } from 'react'\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport { Grid } from '@material-ui/core';\r\n\r\n//import component\r\nimport Button from '../../../Controls/Containers/Button'\r\n\r\nconst UserGroupControlView = (props) => {\r\n\r\n    const {\r\n        classes,\r\n        children,\r\n        onClickSubmit,\r\n        onClickBack,\r\n    } = props;\r\n\r\n    return (\r\n        <Fragment>\r\n            {children}\r\n            <Grid container justify='center' spacing={24} className={classes.button}>\r\n                <Grid item>\r\n                    <Button \r\n                        label='ยกเลิก'\r\n                        onClick = { onClickBack }\r\n                    />\r\n                </Grid>\r\n                <Grid item>\r\n                    <Button \r\n                        label='บันทึก'\r\n                        onClick = { onClickSubmit }\r\n                    />\r\n                </Grid>\r\n            </Grid>\r\n        </Fragment>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    button: {\r\n        paddingTop: '10px'\r\n    }\r\n}))(UserGroupControlView)","import React, { useState, useEffect, Fragment } from 'react'\r\nimport { connect } from 'react-redux';\r\n// import { bindActionCreators } from 'redux';\r\nimport { reduxForm, getFormValues, submit, isDirty } from \"redux-form\";\r\nimport { compose } from \"recompose\";\r\nimport { Scrollbars } from 'react-custom-scrollbars'\r\n\r\n//import component\r\nimport SystemControl from './SystemControl';\r\nimport FunctionControl from './FunctionControl'\r\nimport UserGroupControlView from '../../../Presentationals/UserManagements/UserGroup/UserGroupControlView'\r\nimport WithAlertMessage from '../../../HOC/WithAlertMessage';\r\nimport AlertMessageSuper from '../../../Controls/Containers/AlertMessageSuper';\r\nimport WithLoading from '../../../HOC/WithLoading';\r\nimport Loading from '../../../Controls/Containers/Loading'\r\n\r\n//import service utils\r\nimport { fetchGet_, fetchPost_ } from '../../../Utilities/ServiceUtils'\r\n\r\n//import constants\r\nimport { ALERT_MESSAGE } from '../../../Constants/Constants'\r\n\r\n//constant topic name\r\nconst ADD = 'เพิ่มกลุ่มผู้ใช้งาน';\r\nconst EDIT = 'แก้ไขกลุ่มผู้ใช้งาน';\r\n\r\nconst UserGroupControl = (props) => {\r\n    const { \r\n        _values,\r\n        // showLoading,\r\n        // hideLoading,\r\n        showAlert,\r\n        isShowLoading,\r\n        // handleSubmit,\r\n        dispatch,\r\n        dirtyForm,\r\n        EditMode,\r\n        onClickBackMenu,\r\n        initialValues,\r\n        initialData,\r\n        userGroupData\r\n    } = props;\r\n\r\n    const [system, setSystem] = useState([]);\r\n    const [functions, setFunctions] = useState([]);\r\n\r\n    useEffect(() => {\r\n        // showLoading();\r\n        callServiceLuSystem();\r\n        callServiceLufunctions();\r\n        // hideLoading();\r\n    }, [])\r\n\r\n    const callServiceLuSystem = async () => {\r\n        try {\r\n            const response = await fetchGet_(`${process.env.REACT_APP_LU_SYSTEM}`);\r\n            const objResult = await response.json();\r\n\r\n            const newObj = await objResult.result.map(item => {\r\n                item.id = item.value\r\n\r\n                delete item.ID\r\n                return item\r\n            })\r\n\r\n            setSystem(newObj);\r\n            // setDefaultSystem(newObj)\r\n            // if(initialData) {\r\n            //     await mangeInitailDefaultSystem(newObj);\r\n            // }\r\n        } catch(err) {\r\n            console.log('call service usergroup/getLUTSystem', err)\r\n        }\r\n    }\r\n\r\n    const callServiceLufunctions = async () => {\r\n        try {\r\n            const response = await fetchGet_(`${process.env.REACT_APP_LU_FUNCTION}`);\r\n            const objResult = await response.json();\r\n\r\n            const newData = await objResult.result.map(item => {\r\n                item.id = item.functionID;\r\n                item.name = item.functionName;\r\n\r\n                if(item.subFunction.length > 0) {\r\n                    item.subFunction.map(itemSubFunction => {\r\n                        itemSubFunction.id = itemSubFunction.functionID;\r\n                        itemSubFunction.name = itemSubFunction.functionName;\r\n                        itemSubFunction.parent = item.id;\r\n\r\n                        delete itemSubFunction.functionID;\r\n                        delete itemSubFunction.functionName;\r\n\r\n                        return itemSubFunction\r\n                    })\r\n                } else {\r\n                    item.subFunction = []\r\n                }\r\n\r\n                delete item.functionID;\r\n                delete item.functionName;\r\n\r\n                return item\r\n            })\r\n            await setFunctions(newData)\r\n        } catch(err) {\r\n            console.log('call service usergroup/getLUTFunction', err);\r\n        }\r\n    }\r\n\r\n    \r\n\r\n    const handleSubmitForm = (values) => {\r\n        if(dirtyForm && EditMode) {\r\n            showAlert({\r\n                altMsg: ALERT_MESSAGE.QUESTION.SAVE_IN_EDIT_MODE,\r\n                altType: 2,\r\n                callbackConfirm: () => manageDataForSaveAddUserGroup(values)\r\n            })\r\n        } else {\r\n            manageDataForSaveAddUserGroup(values)\r\n        }\r\n    }\r\n\r\n    const manageDataForSaveAddUserGroup = async (valuesIncome) => {\r\n        let systemValues = ``;\r\n        await system.map(item => {\r\n            if(valuesIncome.hasOwnProperty(item.value) && (valuesIncome[`${item.value}`] === true)) {\r\n                systemValues = `${systemValues}${item.value}|`\r\n            }\r\n        })\r\n\r\n        let functionValues = ``;\r\n        await functions.map(item => {\r\n            if(_values.hasOwnProperty(item.id) && (_values[`${item.id}`] === true)){\r\n                functionValues = `${functionValues}${item.id}|`\r\n            } \r\n            if(item.subFunction.length > 0) {\r\n                item.subFunction.map(itemSub => {\r\n                    if(_values.hasOwnProperty(itemSub.id) && (_values[`${itemSub.id}`] === true)) {\r\n                        functionValues = `${functionValues}${itemSub.id}|`\r\n                    }\r\n                })\r\n            }\r\n            return true\r\n        })\r\n     \r\n        const params = {\r\n            groupname: valuesIncome.groupName,\r\n            defaultSystemID: valuesIncome.defaultSystem,\r\n            system: systemValues.slice(0, systemValues.length - 1),\r\n            function: functionValues.slice(0, functionValues.length - 1)\r\n        }\r\n\r\n        if(EditMode) {\r\n            await callServiceUpdateUserGroup({ groupid: initialData.groupId, ...params });\r\n        } else {\r\n            await callServiceAddUserGroup(params);\r\n        }\r\n    }\r\n\r\n    const callServiceAddUserGroup = async (params) => {\r\n        try {\r\n            const response = await fetchPost_(`${process.env.REACT_APP_UM_ADD_USERGROUP}`, params)\r\n            const objResult = await response.json();\r\n\r\n            if(objResult.statusCode === 1) {\r\n                showAlert( { altMsg: ALERT_MESSAGE.POPUP.SAVE_SUCCESS, callbackClose: onClickBackMenu } );\r\n            } else {\r\n                showAlert( { altMsg: ALERT_MESSAGE.POPUP.SAVE_FAIL } );\r\n            }\r\n        } catch(err) {\r\n            console.log('err callService user/addUserGroup', err)\r\n        }\r\n    }\r\n\r\n    const callServiceUpdateUserGroup = async (params) => {\r\n        try {\r\n            const response = await fetchPost_(`${process.env.REACT_APP_UM_UPDATE_USERGROUP}`, params)\r\n            const objResult = await response.json();\r\n\r\n            if(objResult.statusCode === 1) {\r\n                showAlert( { altMsg: ALERT_MESSAGE.POPUP.SAVE_SUCCESS, callbackClose: onClickBackMenu } );\r\n            } else {\r\n                showAlert( { altMsg: ALERT_MESSAGE.POPUP.SAVE_FAIL } );\r\n            }\r\n        } catch(err) {\r\n            console.log('err callService user/updateUserGroup', err)\r\n        }\r\n    }\r\n\r\n    return (\r\n        <Fragment>\r\n            {(system.length > 0 && functions.length > 0) &&\r\n            <Scrollbars \r\n                autoHide={false} universal={true} style={{height : '97%'}}\r\n            >\r\n                <UserGroupControlView\r\n                    onClickSubmit = { () => dispatch(submit('SystemComtrol')) }\r\n                    onClickBack = { onClickBackMenu }\r\n                >\r\n                    <Fragment>\r\n                        <SystemControl \r\n                            topicName = { initialData? EDIT: ADD }\r\n                            submitFunction = { handleSubmitForm }\r\n                            initialValues = { initialValues }\r\n                            initialData = { initialData }\r\n                            userGroupData = { userGroupData }\r\n                        />\r\n                        <FunctionControl \r\n                            systemData = { system }\r\n                            functionData = { functions }\r\n                        />\r\n                    </Fragment>\r\n                </UserGroupControlView>\r\n            </Scrollbars>\r\n            }\r\n            <Loading isShowLoading = { isShowLoading } />\r\n            <AlertMessageSuper {...props} />\r\n        </Fragment>\r\n    )\r\n}\r\n\r\nconst mapStateToProps = state => ({\r\n    _values: getFormValues('UserGroupControl')(state),\r\n    dirtyForm: isDirty('UserGroupControl')(state)\r\n    // authenRdc: state.authen,\r\n})\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    // layoutAction: bindActionCreators(LayoutAction, dispatch)\r\n})\r\n\r\nconst reduxFormParameter = {\r\n    form: 'UserGroupControl',\r\n    // validate: landMarkValidate,\r\n    // enableReinitialize : true,\r\n    // initialValues: initialValues\r\n};\r\n\r\nexport default compose(\r\n    connect(mapStateToProps, mapDispatchToProps),\r\n    reduxForm(reduxFormParameter),\r\n    // withWidth(),\r\n    WithAlertMessage,\r\n    WithLoading\r\n)(UserGroupControl);","import React, { Fragment, useState, useEffect } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { bindActionCreators } from 'redux';\r\nimport { reduxForm, getFormValues } from \"redux-form\";\r\nimport { compose } from \"recompose\";\r\nimport * as LayoutAction from '../../../Actions/UserManagements/LayoutAction';\r\nimport { BREADCRUMB_MENU_UM } from '../../../Constants/Constants';\r\n\r\n//import component\r\nimport UserGroupView from '../../../Presentationals/UserManagements/UserGroup/UserGroupView'\r\nimport UserGroupControl from './UserGroupControl'\r\nimport WithAlertMessage from '../../../HOC/WithAlertMessage';\r\nimport AlertMessageSuper from '../../../Controls/Containers/AlertMessageSuper';\r\nimport WithLoading from '../../../HOC/WithLoading';\r\nimport Loading from '../../../Controls/Containers/Loading'\r\n\r\n//import serviceUtils\r\nimport { isFindString, sortObjASC, sortObjDESC } from '../../../Utilities/Utils';\r\nimport { fetchGet_ } from '../../../Utilities/ServiceUtils'\r\n\r\n//import constants\r\nimport { ALERT_MESSAGE } from '../../../Constants/Constants'\r\n\r\nconst UserGroup = (props) => {\r\n\r\n    const { \r\n        layoutAction,\r\n        showAlert,\r\n        showLoading,\r\n        hideLoading,\r\n        isShowLoading\r\n    } = props;\r\n\r\n    // const rpp = parseInt(1 * ((window.innerHeight -354) / 48));\r\n    const [openFormAddOrEdit, setOpenFormAddOrEdit] = useState(false);\r\n    const [page, setPage] = useState(1);\r\n    const [sortType, setSortType] = useState('desc');\r\n    const [sortColomn, setSortColumn] = useState('groupName');\r\n    const [search, setSearch] = useState(\"\");\r\n    const [userGroupData, setUserGroupData] = useState([]);\r\n    const [initailForm, setInitialForm] = useState()\r\n\r\n    useEffect(() => {\r\n        showLoading();\r\n        initialForm();\r\n    },[])\r\n\r\n    const initialForm = async () => {\r\n        await layoutAction.setMenuBreadcrumb(BREADCRUMB_MENU_UM.USER_GROUP);\r\n        await callServiceGetDataUserGroup();\r\n        await createDataTable();\r\n\r\n        await hideLoading()\r\n    }\r\n\r\n    const callServiceGetDataUserGroup = async () => {\r\n        try {\r\n            const response = await fetchGet_(`${process.env.REACT_APP_LU_ALL_USERGROUP}`);\r\n            const objResult = await response.json();\r\n\r\n            const filterObj = objResult.result.filter(item => {\r\n                return item.groupID !== null && item.groupName !== null\r\n            })\r\n\r\n            setUserGroupData(sortObjASC(filterObj, sortColomn));\r\n        } catch(err) {\r\n            console.log('err callService userGroup/getAllUserGroup', err)\r\n        }   \r\n    }\r\n\r\n    const callServiceDeleteUserGroup = async (item) => {\r\n        showLoading();\r\n        try {\r\n            const response = await fetchGet_(`${process.env.REACT_APP_UM_DELETE_USERGROUP}?usergroupid=${item.groupID}`);\r\n            const objResult = await response.json();\r\n\r\n            if(objResult.statusCode === 1){\r\n                showAlert( { altMsg: ALERT_MESSAGE.POPUP.DELETE_SUCCESS } )\r\n            } else {\r\n                showAlert( { altMsg: ALERT_MESSAGE.POPUP.DELETE_FAIL } )\r\n            }\r\n\r\n            await callServiceGetDataUserGroup();\r\n            await hideLoading();\r\n        } catch(err) {\r\n            await hideLoading();\r\n            showAlert({ altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR })\r\n            console.log('err callService usergroup/deleteUserGroupByID', err)\r\n        }\r\n    }\r\n\r\n    const handleClickAddUserGroup = () => {\r\n        setSearch(\"\")\r\n        if(openFormAddOrEdit) {\r\n            setInitialForm(null);\r\n            callServiceGetDataUserGroup();\r\n            layoutAction.clearMenuBreadCrumb();\r\n            layoutAction.setMenuBreadcrumb(BREADCRUMB_MENU_UM.USER_GROUP);\r\n        } else {\r\n            layoutAction.setMenuBreadcrumb(BREADCRUMB_MENU_UM.USER_GROUP_ADD);\r\n        }\r\n        setOpenFormAddOrEdit(!openFormAddOrEdit)\r\n    }\r\n\r\n    const handleEditItem = async (item) => {\r\n        showLoading();\r\n        try {\r\n            const response = await fetchGet_(`${process.env.REACT_APP_UM_GET_USERGROUP_BY_ID}?usergroupid=${item.groupID}`);\r\n            const objResult = await response.json();\r\n            const functionValues = {};\r\n            await objResult.function.map(itemFunction => {\r\n                functionValues[`${itemFunction}`] = true;\r\n\r\n                return true\r\n            })\r\n            \r\n            const systemValues = {};\r\n            await objResult.system.map(itemSystem => {\r\n                systemValues[`${itemSystem}`] = true\r\n\r\n                return true\r\n            })\r\n\r\n            const dataOfUserGroup = {\r\n                groupName: objResult.userGroupName,\r\n                groupId: objResult.userGroupID,\r\n                defaultSystem: objResult.defaultSystem,\r\n                ...systemValues,\r\n                ...functionValues,\r\n            }\r\n\r\n            await setInitialForm(dataOfUserGroup);\r\n            hideLoading()\r\n            setSearch(\"\")\r\n            setOpenFormAddOrEdit(!openFormAddOrEdit)\r\n            layoutAction.setMenuBreadcrumb(BREADCRUMB_MENU_UM.USER_GROUP_EDIT);\r\n            // handleClickAddUserGroup();\r\n        } catch(err) {\r\n            hideLoading();\r\n            showAlert( { altMsg: ALERT_MESSAGE.POPUP.SYSTEM_ERROR } );\r\n            console.log('err callService usergroup/getUserGroupByID', err);\r\n        }\r\n    }\r\n\r\n    const handleDeleteItem = (item) => {\r\n        showAlert(\r\n            {   altMsg: `${ALERT_MESSAGE.QUESTION.DELETE} ${item.groupName} ?`, \r\n                altType: 2, \r\n                callbackConfirm: () => callServiceDeleteUserGroup(item) }\r\n        )\r\n    }\r\n\r\n    const handleBeforeShowControl = (data) => {\r\n        return false\r\n    }\r\n\r\n    const handleChangeSearch = (evt) => {\r\n        setSearch(evt.target.value);\r\n        setPage(1)\r\n    }\r\n\r\n    const handleChangePage = (evtPage) => {\r\n        setPage(evtPage)\r\n    }\r\n\r\n    const handleRowClickItem = (userGroupData, buttonType) => {\r\n        switch (buttonType) {\r\n            case \"edit\":\r\n                handleEditItem(userGroupData)\r\n                break;\r\n            case \"delete\":\r\n                handleDeleteItem(userGroupData);\r\n                break;\r\n            default:\r\n                break;\r\n        }\r\n    }\r\n\r\n    const handleSortColumn = async (columnSort, sortTypeSort) => {\r\n        const userGroupDataSort = await (sortType === \"asc\") ? sortObjASC(userGroupData, columnSort) : sortObjDESC(userGroupData, columnSort);\r\n       \r\n        await setSortColumn(columnSort);\r\n        await setSortType(sortType === 'asc' ? 'desc':'asc');\r\n        await setUserGroupData(userGroupDataSort)\r\n    }\r\n\r\n    const createDataTable = () => {\r\n        const searched = userGroupData.filter(item => isFindString(item.groupName, search));\r\n        const specSize = parseInt(1 * ((window.innerHeight - 354) / 48)) > 0 ?\r\n            parseInt(1 * (window.innerHeight - 354) / 48) : 1;\r\n        const finalListIntablePage = parseInt(page * specSize);\r\n        const lenTableData = (finalListIntablePage % specSize) === 0 ? finalListIntablePage : finalListIntablePage - (finalListIntablePage % specSize);\r\n        const tableData = searched.slice(((page - 1) * specSize), lenTableData)\r\n        const matHeight = (tableData.length * 48) + 135\r\n\r\n        return {\r\n            searched,\r\n            specSize,\r\n            finalListIntablePage,\r\n            lenTableData,\r\n            tableData,\r\n            matHeight,\r\n        }\r\n    }\r\n    \r\n    const renderView = () => {\r\n        const dataTable = createDataTable();\r\n\r\n        return (\r\n            <Fragment>\r\n                {openFormAddOrEdit ?\r\n                    <UserGroupControl \r\n                        onClickBackMenu = { handleClickAddUserGroup }\r\n                        initialValues = { initailForm }\r\n                        initialData = { initailForm }\r\n                        EditMode = { initailForm? true:false}\r\n                        userGroupData = { userGroupData }\r\n                    />:\r\n                    <UserGroupView\r\n                        onClickAddUserGroup = { handleClickAddUserGroup }\r\n                        onBeforeShowControl = { handleBeforeShowControl }\r\n                        onChangePage = { handleChangePage }\r\n                        onRowClick = { handleRowClickItem }\r\n                        onChangeSearch = { handleChangeSearch }\r\n                        onSortDataTable = { handleSortColumn }\r\n    \r\n                        userGroupData ={ dataTable.tableData }\r\n                        countUserGroupData = { dataTable.searched.length }\r\n                        rowPerPage = { dataTable.specSize }\r\n                        matHeight = { dataTable.matHeight }\r\n                        sortType = { sortType }\r\n                        sortColomn = { sortColomn }\r\n                        page = { page }\r\n                    />\r\n                }\r\n                <AlertMessageSuper {...props} />\r\n                <Loading isShowLoading = { isShowLoading } />\r\n            </Fragment>\r\n        )\r\n    } \r\n\r\n    return (\r\n        <Fragment>\r\n            {renderView()}\r\n        </Fragment>\r\n    )\r\n}\r\n\r\nconst mapStateToProps = state => ({\r\n    _values: getFormValues('userGroup')(state)\r\n})\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    layoutAction: bindActionCreators(LayoutAction, dispatch)\r\n})\r\n\r\nconst reduxFormParameter = {\r\n    form: 'userGroup'\r\n};\r\n\r\nexport default compose(\r\n    connect(mapStateToProps, mapDispatchToProps),\r\n    reduxForm(reduxFormParameter),\r\n    WithAlertMessage,\r\n    WithLoading\r\n)(UserGroup);","import { fetchGet_, fetchPost_ } from '../../../Utilities/ServiceUtils';\r\n\r\nexport const getSystem = () => {\r\n    return fetchGet_(process.env.REACT_APP_LU_SYSTEM)\r\n        .then(res => {\r\n            if (!res.ok) {\r\n                throw res.status\r\n            }\r\n            return res.json();\r\n        })\r\n        .catch(ex => {\r\n            console.log('ex getSystem', ex)\r\n        })\r\n}\r\n\r\nexport const getLoginHistory = ({\r\n    startTimeStamp,\r\n    endTimeStamp,\r\n    username,\r\n    usergroupID,\r\n    systemID\r\n}) => {\r\n    return fetchPost_(process.env.REACT_APP_UM_GET_LOGIN_HISTORY, {\r\n        startTimeStamp,\r\n        endTimeStamp,\r\n        username,\r\n        usergroupID,\r\n        systemID\r\n    })\r\n        .then(res => {\r\n            if (!res.ok) {\r\n                throw res.status\r\n            }\r\n            return res.json();\r\n        })\r\n        .catch(ex => {\r\n            console.log('ex getLoginHistory', ex)\r\n        })\r\n}","import React from 'react';\r\nimport Grid from '@material-ui/core/Grid';\r\nimport { withStyles } from '@material-ui/core/styles';\r\nimport { Scrollbars } from 'react-custom-scrollbars';\r\nimport { Field } from 'redux-form';\r\nimport TextFieldRedux from '../../../Controls/Containers/TextFieldRedux';\r\nimport SelectFieldRedux from '../../../Controls/Containers/SelectFieldRedux';\r\nimport Button from '../../../Controls/Containers/Button';\r\nimport ReduxFormDatePickerThai from '../../../Controls/Containers/Picker/ReduxFormDatePickerThai';\r\n\r\nconst ReportLoginView = ({\r\n    classes,\r\n    luSystem,\r\n    luUserGroup,\r\n    startDate,\r\n    endDate,\r\n    handleSubmit,\r\n    onSubmit,\r\n    onChangeStartDate,\r\n    onChangeEndDate,\r\n    onSystemChange,\r\n    isRequiredUserName\r\n}) => {\r\n    return (\r\n        <Grid container className={classes.root}>\r\n            <Scrollbars autoHide>\r\n                <Grid container>\r\n                    <Grid item sm={12}>\r\n                        <Grid item xs={12} sm={6} className={classes.paddingColLeft}>\r\n                            <Field\r\n                                name=\"system\"\r\n                                label=\"ระบบ\"\r\n                                component={SelectFieldRedux}\r\n                                onChange={onSystemChange}\r\n                                data={luSystem}\r\n                                keyData={{ value: \"value\", label: \"name\" }}\r\n                                required\r\n                            />\r\n                        </Grid>\r\n                    </Grid>\r\n                    <Grid item xs={12} sm={6} className={classes.paddingColLeft}>\r\n                        <Field\r\n                            name=\"startDate\"\r\n                            label=\"ช่วงเวลาเริ่มต้น\"\r\n                            component={ReduxFormDatePickerThai}\r\n                            onChange={onChangeStartDate}\r\n                            maxDate={endDate}\r\n                            required\r\n                        />\r\n                    </Grid>\r\n                    <Grid item xs={12} sm={6} className={classes.paddingColRight}>\r\n                        <Field\r\n                            name=\"endDate\"\r\n                            label=\"สิ้นสุด\"\r\n                            component={ReduxFormDatePickerThai}\r\n                            onChange={onChangeEndDate}\r\n                            minDate={startDate}\r\n                            required\r\n                        />\r\n                    </Grid>\r\n                    <Grid item xs={12} sm={6} className={classes.paddingColLeft}>\r\n                        <Field\r\n                            name=\"userName\"\r\n                            label=\"User Name\"\r\n                            component={TextFieldRedux}\r\n                            maxLength={50}\r\n                            required={isRequiredUserName}\r\n                        />\r\n                    </Grid>\r\n                    <Grid item xs={12} sm={6} className={classes.paddingColRight}>\r\n                        <Field\r\n                            name=\"userGroup\"\r\n                            label=\"User Group\"\r\n                            component={SelectFieldRedux}\r\n                            data={luUserGroup}\r\n                            keyData={{ value: \"groupID\", label: \"groupName\" }}\r\n                        />\r\n                    </Grid>\r\n                    \r\n\r\n                    <Grid spacing={24} justify=\"center\" container className={classes.footer}>\r\n                        <Grid item>\r\n                            <Button type=\"submit\" label=\"Export\" onClick={handleSubmit(onSubmit)} />\r\n                        </Grid>\r\n                    </Grid>\r\n                </Grid>\r\n            </Scrollbars>\r\n        </Grid>\r\n    )\r\n}\r\n\r\nexport default withStyles(theme => ({\r\n    root: {\r\n        width: '100%',\r\n        height: '100%',\r\n        padding: '10px'\r\n    },\r\n    paddingColLeft: {\r\n        paddingRight: '10px',\r\n        [theme.breakpoints.down('xs')]: {\r\n            paddingRight: '0px',\r\n        },\r\n    },\r\n    paddingColRight: {\r\n        paddingLeft: '10px',\r\n        [theme.breakpoints.down('xs')]: {\r\n            paddingLeft: '0px',\r\n        },\r\n    },\r\n    footer: {\r\n        margin: '10px 0px'\r\n    }\r\n}))(ReportLoginView)\r\n","import Excel from \"exceljs/dist/es5/exceljs.browser\";\r\n\r\nconst LoginReportExcel = ({ duration, system, datasource = [], userGroupName, userName, isAllSystem }) => {\r\n    // const startRowHeader = 3;//เป็น 3 ใน excel มีชื่อเรืองใช้่ row 1,2 ไปแล้ว\r\n    const countColumn = userGroupName ? isAllSystem ? 5:4 : isAllSystem ? 6:5;\r\n    let startRowHeader = 4\r\n    if (userGroupName) {\r\n        ++startRowHeader\r\n    }\r\n    if (userName) {\r\n        ++startRowHeader\r\n    }\r\n\r\n    const workbook = new Excel.Workbook();\r\n    const worksheet = workbook.addWorksheet('sheet', {//จำเป็นต้องตั้งค่าส่วนนี้\r\n        pageSetup: {\r\n            paperSize: 9, //follow documentation the 9 value is A4\r\n            orientation: 'portrait'\r\n        }\r\n    });\r\n    workbook.creator = 'PMR-WEB';\r\n    workbook.lastModifiedBy = 'PMR-WEB';\r\n\r\n    const setCellBorder = (colKey) => {\r\n        worksheet.getCell(colKey).border = {\r\n            top: { style: 'thin' },\r\n            left: { style: 'thin' },\r\n            bottom: { style: 'thin' },\r\n            right: { style: 'thin' }\r\n        };\r\n    }\r\n\r\n    const setContentBorder = (colKey) => {\r\n        worksheet.getCell(colKey).border = {\r\n            left: { style: 'thin' },\r\n            right: { style: 'thin' }\r\n        };\r\n    }\r\n\r\n    const setLastContentBorder = (colKey) => {\r\n        worksheet.getCell(colKey).border = {\r\n            left: { style: 'thin' },\r\n            bottom: { style: 'thin' },\r\n            right: { style: 'thin' }\r\n        };\r\n    }\r\n\r\n    const setContentColor = (colKey) => {\r\n        worksheet.getCell(colKey).fill = {\r\n            type: 'pattern',\r\n            pattern: 'solid',\r\n            fgColor: {\r\n                argb: '00D0EFDA'\r\n            }\r\n        };\r\n    }\r\n\r\n    const loadTopic = () => {\r\n        const endCell = userGroupName ? isAllSystem ? 'E':'D' : isAllSystem ? 'F':'E';\r\n        worksheet.mergeCells(`A1:${endCell}1`);\r\n        worksheet.getCell('A1').value = `รายงานประวัติการเข้าใช้งาน ${system}`;\r\n        worksheet.getCell('A1').alignment = { horizontal: 'center' };\r\n        worksheet.mergeCells(`A2:${endCell}2`);\r\n        worksheet.getCell('A2').value = `ตั้งแต่ ${duration}`;\r\n        worksheet.getCell('A2').alignment = { horizontal: 'center' };\r\n\r\n        if (userName) {\r\n            worksheet.mergeCells(`A3:${endCell}3`);\r\n            worksheet.getCell('A3').value = `ชื่อผู้ใช้งาน ${userName}`;\r\n            worksheet.getCell('A3').alignment = { horizontal: 'center' };\r\n        }\r\n\r\n        if (userGroupName) {\r\n            worksheet.mergeCells(`A${startRowHeader - 2}:${endCell}${startRowHeader - 2}`);\r\n            worksheet.getCell(`A${startRowHeader - 2}`).value = `กลุ่มผู้ใช้งาน ${userGroupName}`;\r\n            worksheet.getCell(`A${startRowHeader - 2}`).alignment = { horizontal: 'center' };\r\n        }\r\n    }\r\n\r\n    const loadHeader = () => {//ใน Excel จะอยู่แถวแรก A1,B1,C1,D1,E1,F1,G1,H1,I1\r\n        let arrHeader = [\r\n            {\r\n                name: 'วัน-เวลาเข้าใช้งาน',\r\n                key: 'loginTimestamp',\r\n                width: 30,\r\n            },\r\n            {\r\n                name: 'วัน-เวลาสิ้นสุดการใช้งาน',\r\n                key: 'logoutTimestamp',\r\n                width: 30\r\n            },\r\n            {\r\n                name: 'username',\r\n                key: 'username',\r\n                width: 30\r\n            },\r\n            {\r\n                name: 'usergroup',\r\n                key: 'usergroup',\r\n                width: 20\r\n            },\r\n            {\r\n                name: 'ip ที่เข้าใช้งาน',\r\n                key: 'ipAddress',\r\n                width: 20\r\n            },\r\n            {\r\n                name: 'ระบบ',\r\n                key: 'systemName',\r\n                width: 70\r\n            }\r\n        ];\r\n\r\n        if (userGroupName) {\r\n            arrHeader = arrHeader.filter(itm => itm.name !== \"usergroup\")\r\n        }\r\n\r\n        if (!isAllSystem) {\r\n            arrHeader = arrHeader.filter(item => item.key !== 'systemName')\r\n        }\r\n\r\n        worksheet.columns = arrHeader.map(itm => ({ key: itm.key, width: itm.width }));\r\n        worksheet.getRow(startRowHeader).values = arrHeader.map(itm => itm.name);\r\n        //กำหนด style ให้ cell Header\r\n        [\r\n            `A${startRowHeader}`,\r\n            `B${startRowHeader}`,\r\n            `C${startRowHeader}`,\r\n            `D${startRowHeader}`,\r\n            `E${startRowHeader}`,\r\n            `F${startRowHeader}`\r\n        ].forEach((colKey, index) => {\r\n            if (index < countColumn) {\r\n                setCellBorder(colKey)\r\n                worksheet.getCell(colKey).alignment = { vertical: 'middle', horizontal: 'center', wrapText: true };\r\n                worksheet.getCell(colKey).fill = {\r\n                    type: 'pattern',\r\n                    pattern: 'solid',\r\n                    fgColor: {\r\n                        argb: '005E9A50'\r\n                    }\r\n                }\r\n            }\r\n        });\r\n    }\r\n\r\n    const setCellFontColor = (colKey, argb, isBold) => {\r\n        worksheet.getCell(colKey).font = {\r\n            bold: isBold,\r\n            color: { argb: argb }\r\n        };\r\n    }\r\n\r\n    const makeRowITM = (rowNumber, rowITM, isSummaryRow = false) => {\r\n        worksheet.addRow({\r\n            loginTimestamp: rowITM.loginTimestamp,\r\n            logoutTimestamp: rowITM.logoutTimestamp,\r\n            username: rowITM.username,\r\n            usergroup: rowITM.usergroup,\r\n            ipAddress: rowITM.ipAddress,\r\n            systemName: rowITM.systemName\r\n        });\r\n\r\n        const arrColKey = [\r\n            `A${rowNumber}`,\r\n            `B${rowNumber}`,\r\n            `C${rowNumber}`,\r\n            `D${rowNumber}`,\r\n            `E${rowNumber}`,\r\n            `F${rowNumber}`\r\n        ];\r\n\r\n        arrColKey.forEach((colKey, index) => {\r\n            if (index < countColumn) {\r\n                setContentBorder(colKey)\r\n                if (rowITM.isOddRow) {\r\n                    setContentColor(colKey)\r\n                }\r\n                if (isSummaryRow) {//\r\n                    setCellFontColor(colKey, '00FF0000', true)\r\n                }\r\n                if (rowITM.lastRow) {\r\n                    setLastContentBorder(colKey)\r\n                }\r\n            }\r\n        })\r\n    }\r\n\r\n    const makeRowContent = () => {\r\n        try {\r\n            datasource.forEach((rowGroupITM, index) => {\r\n                makeRowITM(index + (startRowHeader + 1), {\r\n                    lastRow: datasource.length === (index + 1) ? true : false,\r\n                    isOddRow: (index + 1) % 2 === 0 ? false : true,\r\n                    ...rowGroupITM\r\n                })\r\n            });\r\n        }\r\n        catch (err) {\r\n            console.log('Error Generate Row Excel file LoginReportExcel.js: ', err);\r\n            throw new Error(err);\r\n        }\r\n    }\r\n\r\n    const processColumns = () => {\r\n        loadTopic();\r\n        loadHeader();\r\n        makeRowContent();\r\n    }\r\n\r\n    //Main Program\r\n    processColumns();\r\n    workbook.xlsx.writeBuffer().then(function (xls64data) {\r\n        const blob = new Blob([xls64data],\r\n            { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });\r\n        const url = window.URL.createObjectURL(blob);\r\n        const anchor = document.createElement('a');\r\n        anchor.href = url;\r\n        anchor.download = 'รายงานประวัติการเข้าใช้งาน.xlsx';\r\n        var isIE = /*@cc_on!@*/false || !!document.documentMode;\r\n        var isEdge = !isIE && !!window.StyleMedia;\r\n        if(isEdge){\r\n            anchor.click();\r\n            anchor.change();\r\n        } else {\r\n            anchor.click();\r\n        }\r\n        window.URL.revokeObjectURL(url);\r\n    });\r\n}\r\n\r\nexport default LoginReportExcel;","import React, { Component, Fragment } from 'react';\r\nimport { connect } from 'react-redux';\r\nimport { compose } from 'recompose';\r\nimport { bindActionCreators } from 'redux';\r\nimport { reduxForm } from 'redux-form';\r\nimport { format } from \"date-fns\";\r\nimport { BREADCRUMB_MENU_UM } from '../../../Constants/Constants';\r\nimport { reportLoginValidate } from '../../../Utilities/Validate';\r\nimport { convertDateTimeToDisplayDate,convertDateToFormatTHFromMoment, convertDatetimeToCallService } from '../../../Utilities/DateTimeUtil';\r\nimport * as LayoutAction from '../../../Actions/UserManagements/LayoutAction';\r\nimport * as ApiUser from '../User/ApiUser';\r\nimport * as ApiReport from './ApiReport';\r\nimport ReportLoginView from '../../../Presentationals/UserManagements/ReportLogin/ReportLoginView';\r\nimport LoginReportExcel from './LoginReportExcel';\r\nimport Loading from '../../../Controls/Containers/Loading';\r\nimport WithLoading from '../../../HOC/WithLoading';\r\nimport WithAlertMessage from '../../../HOC/WithAlertMessage';\r\nimport AlertMessageSuper from '../../../Controls/Containers/AlertMessageSuper';\r\n\r\nexport class ReportLogin extends Component {\r\n    constructor() {\r\n        super()\r\n        this.state = {\r\n            startDate: null,\r\n            endDate: null,\r\n            luUserGroup: [],\r\n            luSystem: [],\r\n            isRequiredUserName: false,\r\n        }\r\n    }\r\n\r\n    componentDidMount() {\r\n        this.props.layoutAction.setMenuBreadcrumb(BREADCRUMB_MENU_UM.REPORT_LOGIN)\r\n        this.getLookuo();\r\n    }\r\n\r\n    getLookuo = async () => {\r\n        const luUserGroup = ApiUser.getLuAllUserGroup();\r\n        const luSystem = ApiReport.getSystem();\r\n        const allLup = await Promise.all([luUserGroup, luSystem])\r\n\r\n        const createLuSystem = await [\r\n            { ID: 0, value: 'SYS00', name: 'ทุกระบบ' },\r\n            ...allLup[1].result\r\n        ]\r\n\r\n        this.setState({\r\n            luUserGroup: allLup[0] && allLup[0].result ? allLup[0].result : [],\r\n            luSystem: allLup[1] && allLup[1].result ? createLuSystem : []\r\n        })\r\n    }\r\n\r\n    handleSubmit = async values => {\r\n        this.props.showLoading();\r\n        const resultLoginHistory = await ApiReport.getLoginHistory({\r\n            startTimeStamp: convertDatetimeToCallService(`${format(values.startDate, 'MM/dd/YYYY')} 00:00:00`),\r\n            endTimeStamp: convertDatetimeToCallService(`${format(values.endDate, 'MM/dd/YYYY')} 23:59:59`),\r\n            username: values.userName,\r\n            usergroupID: values.userGroup,\r\n            systemID: values.system\r\n        })\r\n        this.props.hideLoading();\r\n        if (resultLoginHistory && resultLoginHistory.length > 0) {\r\n            // const duration = `${convertDateTimeToDisplayDate(values.startDate, 'dd/MM/YYYY')} - ${convertDateTimeToDisplayDate(values.endDate, 'dd/MM/YYYY')}`\r\n            // const system = this.state.luSystem.find(itm => {\r\n            //     return itm.value === values.system.toString();\r\n            // });\r\n\r\n            // LoginReportExcel(duration, system.name, resultLoginHistory)\r\n            this.generateReport({\r\n                systemID: values.system,\r\n                usergroupID: values.userGroup,\r\n                startDate: values.startDate,\r\n                endDate: values.endDate,\r\n                resultLoginHistory: resultLoginHistory,\r\n                userName: values.userName,\r\n            })\r\n        } else {\r\n            this.props.showAlert({ altMsg: \"ไม่พบข้อมูลออกรายงาน\" })\r\n        }\r\n    }\r\n\r\n    generateReport = ({ systemID, usergroupID, startDate, endDate, resultLoginHistory, userName }) => {\r\n        const { isRequiredUserName } = this.state;\r\n        const duration = `${convertDateToFormatTHFromMoment(startDate)} - ${convertDateToFormatTHFromMoment(endDate)}`\r\n        const system = systemID && this.state.luSystem.find(itm => {\r\n            return itm.value === systemID.toString();\r\n        });\r\n        const userGroup = usergroupID && this.state.luUserGroup.find(itm => {\r\n            return itm.groupID === usergroupID.toString();\r\n        });\r\n\r\n        \r\n        // const MOC_DATA = [\r\n        //     {\r\n        //         ipAddress: \"203.148.160.50\",\r\n        //         loginTimestamp: \"20/08/2562 09:12:62 AM\",\r\n        //         logoutTimestamp: null,\r\n        //         usergroup: \"Admin\",\r\n        //         username: \"geotalent.wmd@gmail.com\",\r\n        //         systemName: 'test1'\r\n        //     },\r\n        //     {\r\n        //         ipAddress: \"10.254.101.162\",\r\n        //         loginTimestamp: \"20/08/2562 09:58:62 AM\",\r\n        //         logoutTimestamp: \"20/08/2562 10:03:62 AM\",\r\n        //         usergroup: \"Admin\",\r\n        //         username: \"geotalent.wmd@gmail.com\",\r\n        //         systemName: 'test2'\r\n        //     },\r\n        //     {\r\n        //         ipAddress: \"125.25.50.92\",\r\n        //         loginTimestamp: \"20/08/2562 10:44:62 AM\",\r\n        //         logoutTimestamp: null,\r\n        //         usergroup: \"Admin\",\r\n        //         username: \"geotalent.wmd@gmail.com\",\r\n        //         systemName: 'test3'\r\n        //     }\r\n        // ]\r\n\r\n        LoginReportExcel({\r\n            duration,\r\n            system : system && system.name,\r\n            // system: 'ทุกระบบ',//test\r\n            datasource: resultLoginHistory,\r\n            // datasource: MOC_DATA,//test\r\n            userGroupName: userGroup && userGroup.groupName,\r\n            userName,\r\n            isAllSystem : isRequiredUserName\r\n            // isAllSystem: true//test\r\n        })\r\n\r\n    }\r\n\r\n    handleChangeStartDate = date => {\r\n        this.setState({\r\n            startDate: date\r\n        })\r\n    }\r\n\r\n    handleChangeEndDate = date => {\r\n        this.setState({\r\n            endDate: date\r\n        })\r\n    }\r\n\r\n    handleSystemChange = evt => {\r\n        const { value } = evt.target;\r\n        const { isRequiredUserName } = this.state;\r\n\r\n        if(value === 'SYS00' && !isRequiredUserName) {\r\n            this.setState({ isRequiredUserName: true })\r\n        } else if(value !== 'SYS00' && isRequiredUserName) {\r\n            this.setState({ isRequiredUserName: false })\r\n        }\r\n    }\r\n\r\n    render() {\r\n        const { handleSubmit, isShowLoading } = this.props;\r\n        const { startDate, endDate, luSystem, luUserGroup, isRequiredUserName } = this.state;\r\n\r\n        return (\r\n            <Fragment>\r\n                <ReportLoginView\r\n                    luSystem={luSystem}\r\n                    luUserGroup={luUserGroup}\r\n                    startDate={startDate}\r\n                    endDate={endDate}\r\n                    handleSubmit={handleSubmit}\r\n                    onSubmit={this.handleSubmit}\r\n                    onChangeStartDate={this.handleChangeStartDate}\r\n                    onChangeEndDate={this.handleChangeEndDate}\r\n                    onSystemChange={this.handleSystemChange}\r\n                    isRequiredUserName={isRequiredUserName}\r\n                />\r\n                <Loading isShowLoading={isShowLoading} />\r\n                <AlertMessageSuper {...this.props} />\r\n            </Fragment>\r\n        )\r\n    }\r\n}\r\n\r\nconst reduxFormParameter = {\r\n    form: \"reportLoginForm\",\r\n    validate: reportLoginValidate\r\n};\r\n\r\nconst mapDispatchToProps = dispatch => ({\r\n    layoutAction: bindActionCreators(LayoutAction, dispatch)\r\n})\r\n\r\nexport default compose(\r\n    connect(null, mapDispatchToProps),\r\n    reduxForm(reduxFormParameter),\r\n    WithLoading,\r\n    WithAlertMessage\r\n)(ReportLogin)\r\n","import React, { useState, useEffect, Fragment } from \"react\";\r\nimport { Route, Redirect } from \"react-router-dom\";\r\n\r\nimport { clearTokenLocalStore, getTypeLocalStore, getLoginHistoryLocalStore, setLoginHistoryLocalStore } from '../../Utilities/LocalStorageUtill';\r\nimport { TITLE_TAB_BROWSER, SYSTEM, SYSTEM_ID } from '../../Constants/Constants';\r\nimport { checkGotoDefaultSystem } from '../../Utilities/AuthenUtil';\r\nimport * as ApiPrivateRoute from './ApiPrivateRoute';\r\nimport Loading from '../../Controls/Containers/Loading';\r\nimport RouteConfig from './RouteConfig';\r\nimport WithAuthenReducer from '../../HOC/ConnectReducer/WithAuthenReducer';\r\nimport User from '../../Containers/UserManagements/User/User';\r\nimport UserGroup from '../../Containers/UserManagements/UserGroup/UserGroup';\r\nimport ReportLogin from '../../Containers/UserManagements/ReportLogin/ReportLogin';\r\n\r\nconst PrivateRoute = ({\r\n    component: Component,\r\n    authenRdc,\r\n    authenAction,\r\n    system,\r\n    ...PrivateRouteProps\r\n}) => {\r\n    const [isCheckAuthen, setCheckAuthen] = useState(false)\r\n    const [isShowLoading, setShowLoading] = useState(false)\r\n    // const [pathRedirect, setPathRedirect] = useState(null)\r\n    const url = new URL(window.location.href);\r\n    const paramType = url.searchParams.get(\"type\");\r\n    const localType = getTypeLocalStore()\r\n    let timeout = null\r\n\r\n    useEffect(() => {\r\n        // จะ render ทุกครั้งที่เปลื่ยน system\r\n        // await authenAction.updateSystem(null)\r\n        setShowLoading(true)\r\n        if (timeout) {\r\n            timeout.remove()\r\n        }\r\n        timeout = setTimeout(() => { // setTimeout เพื่อให้ component map layout ถูกทำลาย\r\n            checkAuthen();\r\n            setShowLoading(false)\r\n        }, 100)\r\n    }, [system]);\r\n\r\n    const checkAuthen = async () => {\r\n        document.title = TITLE_TAB_BROWSER[system]\r\n\r\n        if (system === SYSTEM.CMP && paramType !== \"o\") {\r\n            // กรณีเข้าสู่ระบบ cmp โดยไม่ login\r\n            // กรณีประชาชนจะเก็บ login history ทุกครั้งที่ทำการ refresh\r\n            clearTokenLocalStore();\r\n            await authenAction.clearAllReducer();\r\n            await authenAction.getMenuCMP();\r\n            saveLoginHistory()\r\n            setCheckAuthen(true)\r\n        } else if (!authenRdc.isLogin) {\r\n            const profile = localType === \"o\" ? await authenAction.getProfileBMA(system) : await authenAction.getProfileUser(system);\r\n\r\n            if (profile) {\r\n                setCheckAuthen(true)\r\n            } else {\r\n                await saveLogoutHistory() //กรณี token หมดอายุ\r\n                clearTokenLocalStore();\r\n                // await authenAction.clearAllReducer();\r\n                // let pathRedirect = localType === \"o\" ? RouteConfig.CMSLoginStaff : RouteConfig.CMSLogin;\r\n                // setPathRedirect(pathRedirect)\r\n                window.location.href = (localType === \"o\") ? window.ROOT_SYSTEM_URL + RouteConfig.CMSLoginStaff : window.ROOT_SYSTEM_URL + RouteConfig.CMSLogin;\r\n            }\r\n        } else {\r\n            if (authenRdc.system !== system) {\r\n                authenAction.updateSystem(system)\r\n                const userID = authenRdc && authenRdc.profile && authenRdc.profile.userID\r\n                saveLoginHistory(userID)\r\n            }\r\n        }\r\n    }\r\n\r\n    const saveLoginHistory = async (userID) => {\r\n        const result = await ApiPrivateRoute.saveLoginHistory({\r\n            userID: userID,\r\n            systemID: SYSTEM_ID[system]\r\n        })\r\n        result && result.id && setLoginHistoryLocalStore(result.id)\r\n    }\r\n\r\n    const saveLogoutHistory = () => {\r\n        const loginHistoryID = getLoginHistoryLocalStore();\r\n        if (loginHistoryID) { // update logout\r\n            ApiPrivateRoute.saveLogoutHistory(loginHistoryID)\r\n        }\r\n    }\r\n\r\n    const renderRoute = (props) => {\r\n        // if (pathRedirect) {\r\n        //     return <Redirect to={{ pathname: pathRedirect }} />\r\n        // } else \r\n        if ((isCheckAuthen || authenRdc.isLogin) && authenRdc.system && !isShowLoading) {\r\n            const permission = authenRdc.profile.functions[system]\r\n            if (!permission || permission.length < 1) {\r\n                const path = checkGotoDefaultSystem(authenRdc.profile.defaultSystemID, localType)\r\n                return <Redirect to={{ pathname: path }} />\r\n            } else if (authenRdc.system === SYSTEM.UM) {\r\n                return (\r\n                    <Component {...props} >\r\n                        <Fragment>\r\n                            <Route path={RouteConfig.UMUser} component={User} />\r\n                            <Route path={RouteConfig.UMUserGroup} component={UserGroup} />\r\n                            <Route path={RouteConfig.UMReportLogin} component={ReportLogin} />\r\n                        </Fragment>\r\n                    </Component>\r\n                )\r\n            } else {\r\n                return <Component {...props} />\r\n            }\r\n        } else {\r\n            return <Loading />\r\n        }\r\n    }\r\n\r\n    return <Route\r\n        {...PrivateRouteProps}\r\n        render={props => {\r\n            return renderRoute(props);\r\n        }}\r\n    />\r\n};\r\n\r\nexport default WithAuthenReducer(PrivateRoute)","import React from \"react\";\r\nimport Grid from \"@material-ui/core/Grid\";\r\nimport { withStyles } from \"@material-ui/core/styles\";\r\n\r\nconst IconHome = () => {\r\n    return (\r\n        <svg\r\n            xmlns=\"http://www.w3.org/2000/svg\"\r\n            height=\"40px\"\r\n            viewBox=\"0 0 24 24\"\r\n            width=\"40px\"\r\n            fill=\"#128c2c\">\r\n            <path d=\"M0 0h24v24H0V0z\" fill=\"none\" />\r\n            <path d=\"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z\" />\r\n        </svg>\r\n    );\r\n};\r\n\r\nconst IconMap = () => {\r\n    return (\r\n        <svg\r\n            width=\"35px\"\r\n            height=\"35px\"\r\n            viewBox=\"0 0 27 32\"\r\n            fill=\"none\"\r\n            xmlns=\"http://www.w3.org/2000/svg\">\r\n            <path\r\n                d=\"M13.0098 0C6.17965 0 0 5.23644 0 13.335C0 18.5064 3.98425 24.5885 11.9365 31.5975C12.5544 32.1342 13.4814 32.1342 14.0993 31.5975C22.0353 24.5885 26.0196 18.5064 26.0196 13.335C26.0196 5.23644 19.8399 0 13.0098 0ZM13.0098 16.2622C11.2209 16.2622 9.75733 14.7986 9.75733 13.0098C9.75733 11.2209 11.2209 9.75734 13.0098 9.75734C14.7986 9.75734 16.2622 11.2209 16.2622 13.0098C16.2622 14.7986 14.7986 16.2622 13.0098 16.2622Z\"\r\n                fill=\"#128C2C\"\r\n            />\r\n        </svg>\r\n    );\r\n};\r\n\r\nconst MobileHomeView = ({ classes, goToCMP, gotToCurrent }) => {\r\n    return (\r\n        <Grid container className={classes.container}>\r\n            <div className={classes.background} />\r\n            <Grid\r\n                container\r\n                alignItems=\"center\"\r\n                justify=\"center\"\r\n                className={classes.mainHeader}\r\n            />\r\n\r\n            <Grid container className={classes.header}>\r\n                <Grid item xs={2} sm={1} className={classes.banner}>\r\n                    <input\r\n                        type=\"image\"\r\n                        alt=\"img\"\r\n                        src={`${process.env.PUBLIC_URL}/img/layout/banner.png`}\r\n                        className={classes.bannerImage}\r\n                    />\r\n                </Grid>\r\n\r\n                <Grid item xs={10} className={classes.textHeader}>\r\n                    <div>ระบบตรวจสอบผังเมืองรวมและ</div>\r\n                    <div>ข้อบัญญัติกรุงเทพมหานคร</div>\r\n                </Grid>\r\n                <Grid item xs={10} className={classes.textHeaderXXS}>\r\n                    <div>ระบบตรวจสอบผังเมืองรวมและข้อบัญญัติกรุงเทพมหานคร</div>\r\n                </Grid>\r\n            </Grid>\r\n\r\n            <Grid container alignItems=\"center\" className={classes.bottomBox}>\r\n                <Grid container justify=\"center\">\r\n                    <Grid item xs={8} sm={4} className={classes.spacing}>\r\n                        <div className={classes.button} onClick={gotToCurrent}>\r\n                            <IconMap />\r\n                            <div>ตรวจสอบผังเมืองรวมจากตำแหน่งปัจจุบัน</div>\r\n                        </div>\r\n                    </Grid>\r\n\r\n                    <Grid item xs={8} sm={4} className={classes.spacing}>\r\n                        <div className={classes.button} onClick={goToCMP}>\r\n                            <IconHome />\r\n                            <div>\r\n                                เข้าสู่ระบบตรวจสอบผังเมืองรวมและข้อบัญญัติกรุงเทพมหานคร\r\n                            </div>\r\n                        </div>\r\n                    </Grid>\r\n                </Grid>\r\n            </Grid>\r\n        </Grid>\r\n    );\r\n};\r\n\r\nconst styles = (theme) => ({\r\n    background: {\r\n        background: `url(${\r\n            process.env.PUBLIC_URL\r\n        }/img/layout/bg-home-2.png) no-repeat center`,\r\n        opacity: \"0.5\",\r\n        position: \"absolute\",\r\n        zIndex: \"-1\",\r\n        height: \"100%\",\r\n        width: \"100%\",\r\n        backgroundSize: \"cover\",\r\n        [theme.breakpoints.up(\"sm\")]: {\r\n            backgroundSize: \"cover\",\r\n        },\r\n    },\r\n    mainHeader: {\r\n        background: `url(${process.env.PUBLIC_URL}/img/layout/header-2.png)`,\r\n        width: \"116%\",\r\n        backgroundRepeat: \"no-repeat\",\r\n        backgroundSize: \"contain\",\r\n        height: \"150px\",\r\n        position: \"absolute\",\r\n\r\n        [theme.breakpoints.down(\"xs\")]: {\r\n            background: `url(${\r\n                process.env.PUBLIC_URL\r\n            }/img/layout/header-1.png)`,\r\n            backgroundRepeat: \"no-repeat\",\r\n            backgroundSize: \"contain\",\r\n            width: \"100%\",\r\n            height: \"100%\",\r\n            position: \"absolute\",\r\n        },\r\n        [theme.breakpoints.down(\"420\")]: { height: \"150px\" },\r\n    },\r\n    header: { position: \"absolute\", padding: \"24px\" },\r\n    banner: { textAlign: \"center\" },\r\n    bannerImage: { width: 60, [theme.breakpoints.down(\"340\")]: { width: 45 } },\r\n    textHeader: {\r\n        textShadow: \"2px 2px 4px #000000\",\r\n        color: \"#FFFFFF\",\r\n        fontWeight: \"bold\",\r\n        fontSize: \"18px\",\r\n        paddingLeft: \"16px\",\r\n        [theme.breakpoints.down(\"340\")]: { display: \"none\" },\r\n        [theme.breakpoints.up(\"600\")]: { display: \"none\" },\r\n    },\r\n    textHeaderXXS: {\r\n        display: \"none\",\r\n        [theme.breakpoints.up(\"600\")]: {\r\n            display: \"block\",\r\n            textShadow: \"2px 2px 4px #000000\",\r\n            color: \"#FFFFFF\",\r\n            fontWeight: \"bold\",\r\n            fontSize: \"18px\",\r\n            paddingLeft: \"16px\",\r\n            paddingTop: \"12px\",\r\n        },\r\n        [theme.breakpoints.down(\"340\")]: {\r\n            display: \"block\",\r\n            textShadow: \"2px 2px 4px #000000\",\r\n            color: \"#FFFFFF\",\r\n            fontWeight: \"bold\",\r\n            fontSize: \"16px\",\r\n            paddingLeft: \"16px\",\r\n        },\r\n    },\r\n\r\n    container: {\r\n        width: \"100%\",\r\n        height: \"100%\",\r\n    },\r\n    bottomBox: {\r\n        zIndex: 3,\r\n        [theme.breakpoints.up(\"sm\")]: {\r\n            paddingTop: \"100px\",\r\n        },\r\n    },\r\n    spacing: {\r\n        [theme.breakpoints.up(\"sm\")]: {\r\n            margin: \"0px 10px\",\r\n        },\r\n    },\r\n    button: {\r\n        cursor: \"pointer\",\r\n        width: \"100%\",\r\n        padding: \"16px\",\r\n        borderRadius: \"4px\",\r\n        margin: \"10px 0px\",\r\n        color: \"#000000\",\r\n        backgroundColor: \"#FFFFFF\",\r\n        boxShadow:\r\n            \"0px 1px 5px 0px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%), 0px 3px 1px -2px rgb(0 0 0 / 12%)\",\r\n        [theme.breakpoints.up(\"sm\")]: {\r\n            height: \"150px\",\r\n        },\r\n    },\r\n});\r\n\r\nexport default withStyles(styles)(MobileHomeView);\r\n","import React, { Component } from \"react\";\r\nimport { bindActionCreators } from \"redux\";\r\nimport { connect } from \"react-redux\";\r\nimport MobileHomeView from \"../Presentationals/MobileHomeView\";\r\nimport * as MenuAction from \"../Actions/Web/MenuAction\";\r\nimport RouteConfig from \"../Config/AppRoute/RouteConfig\";\r\n\r\nclass MobileHome extends Component {\r\n    componentDidMount() {\r\n        const { menuAction } = this.props;\r\n        menuAction.activeMobileView();\r\n    }\r\n\r\n    goToCMP = () => {\r\n        const { history } = this.props;\r\n        history.push(RouteConfig.CMPWeb);\r\n    };\r\n\r\n    gotToCurrent = () => {\r\n        const { history } = this.props;\r\n        const { menuAction } = this.props;\r\n        menuAction.activeShortcut();\r\n        history.push(RouteConfig.CMPMobileCurrent);\r\n    };\r\n\r\n    render() {\r\n        return (\r\n            <MobileHomeView\r\n                goToCMP={this.goToCMP}\r\n                gotToCurrent={this.gotToCurrent}\r\n            />\r\n        );\r\n    }\r\n}\r\n\r\nconst mapStateToProps = (state) => ({\r\n    menuRdc: state.menu,\r\n});\r\n\r\nconst mapDispatchToProps = (dispatch) => ({\r\n    menuAction: bindActionCreators(MenuAction, dispatch),\r\n});\r\n\r\nexport default connect(\r\n    mapStateToProps,\r\n    mapDispatchToProps\r\n)(MobileHome);\r\n","import React, { Fragment } from \"react\";\r\nimport { Provider } from \"react-redux\";\r\nimport {\r\n    BrowserRouter as Router,\r\n    Route,\r\n    Switch,\r\n    Redirect,\r\n    withRouter,\r\n} from \"react-router-dom\";\r\n\r\nimport { SYSTEM } from \"../../Constants/Constants\";\r\nimport RouteConfig from \"./RouteConfig\";\r\nimport configureStore from \"../../Store/ConfigureStore\";\r\n\r\nimport CMSHome from \"../../Containers/Home\";\r\nimport CMSLogin from \"../../Containers/Authentications/Login\";\r\nimport CMSFormResetPassword from \"../../Containers/Authentications/FormResetPassword\";\r\n\r\nimport PMRRegister from \"../../Containers/Authentications/Register\";\r\nimport PMRActivateUser from \"../../Containers/Authentications/ActivateUser\";\r\n\r\nimport UMLayout from \"../../Containers/UserManagements/Layout\";\r\nimport WebLayout from \"../../Map/MapManager\";\r\n\r\nimport PrivateRouteCMS from \"./PrivateRouteCMS\";\r\nimport PrivateRoute from \"./PrivateRoute\";\r\n\r\nimport MobileHome from \"../../Containers/MobileHome\";\r\nimport AskWithShortcut from \"../../Containers/Web/Panel/Menu/MenuContent/AskTheCityPlan/AskWithShortcut\";\r\n\r\nconst _store = configureStore();\r\n\r\nconst RouteManagement = () => {\r\n    return (\r\n        <Fragment>\r\n            <Router basename={process.env.REACT_APP_NAME}>\r\n                <Provider store={_store}>\r\n                    <Switch>\r\n                        <PrivateRouteCMS\r\n                            path={RouteConfig.CMSLogin}\r\n                            system={SYSTEM.CMS}\r\n                            component={CMSLogin}\r\n                        />\r\n                        <PrivateRouteCMS\r\n                            path={RouteConfig.CMSLoginStaff}\r\n                            system={SYSTEM.CMS}\r\n                            component={CMSLogin}\r\n                        />\r\n\r\n                        <Route\r\n                            exact\r\n                            path={RouteConfig.CMSFormResetPassword}\r\n                            component={withRouter(CMSFormResetPassword)}\r\n                        />\r\n                        <Route\r\n                            path={RouteConfig.PMRRegister}\r\n                            component={PMRRegister}\r\n                        />\r\n                        <Route\r\n                            path={RouteConfig.PMRActivateUser}\r\n                            component={PMRActivateUser}\r\n                        />\r\n\r\n                        <PrivateRoute\r\n                            path={RouteConfig.PMRWeb}\r\n                            system={SYSTEM.PMR1}\r\n                            component={WebLayout}\r\n                        />\r\n                        <PrivateRoute\r\n                            path={RouteConfig.CMPWeb}\r\n                            system={SYSTEM.CMP}\r\n                            component={WebLayout}\r\n                        />\r\n                        <PrivateRoute\r\n                            path={RouteConfig.CAHWeb}\r\n                            system={SYSTEM.CAH}\r\n                            component={WebLayout}\r\n                        />\r\n                        <PrivateRoute\r\n                            path={RouteConfig.SurveyWeb}\r\n                            system={SYSTEM.Survey}\r\n                            component={WebLayout}\r\n                        />\r\n                        <PrivateRoute\r\n                            path={RouteConfig.UM}\r\n                            system={SYSTEM.UM}\r\n                            component={UMLayout}\r\n                        />\r\n\r\n                        <PrivateRoute\r\n                            path={RouteConfig.CMPMobile}\r\n                            system={SYSTEM.CMP}\r\n                            component={MobileHome}\r\n                        />\r\n\r\n                        <PrivateRoute\r\n                            path={RouteConfig.CMPMobileCurrent}\r\n                            system={SYSTEM.CMP}\r\n                            component={WebLayout}\r\n                        />\r\n                        {/* ใช้เฉพาะตอน dev เท่านั้น */}\r\n                        {/* <Route path={RouteConfig.CMSHome} component={CMSHome} />\r\n                        <Route path=\"/\" render={() => (<Redirect to={RouteConfig.CMSHome} />)} /> */}\r\n\r\n                        {/* <Route path=\"/\" render={() => (<Redirect to={RouteConfig.CMSLoginStaff} />)} /> */}\r\n\r\n                        {/* ใช้ตอน deploy*/}\r\n                        <Route\r\n                            path=\"/\"\r\n                            render={() => {\r\n                                window.location.href = window.URL_PORTAL;\r\n                            }}\r\n                        />\r\n                    </Switch>\r\n                </Provider>\r\n            </Router>\r\n        </Fragment>\r\n    );\r\n};\r\n\r\nexport default RouteManagement;\r\n","import { createStore, applyMiddleware } from \"redux\";\r\nimport thunkMiddleware from \"redux-thunk\"; //redux-thunk ช่วยให้เราสามารถเข้าถึง dispatch ได้\r\n// import {createLogger} from 'redux-logger'\r\nimport RootReducer from \"../Reducers/RootReducer\";\r\n// import { composeWithDevTools } from 'redux-devtools-extension';\r\n\r\n// const loggerMiddleware = createLogger()\r\n\r\nexport default function configureStore() {\r\n  // return createStore(reducer, applyMiddleware(thunkMiddleware, loggerMiddleware))\r\n  return createStore(RootReducer, applyMiddleware(thunkMiddleware));\r\n  // return createStore(RootReducer, composeWithDevTools(applyMiddleware(thunkMiddleware))); //สำหรับ debug ด้วย redux dev tools ใน chrome\r\n}","import React, { Component } from 'react';\r\nimport './App.css';\r\n// import RouteManagement from './Config/AppRoute/RouteManagement';\r\nimport RouteManagement from './BASE/Config/AppRoute/RouteManagement';\r\n\r\nclass App extends Component {\r\n\trender() {\r\n\t\treturn (\r\n\t\t\t<RouteManagement />\r\n\t\t);\r\n\t}\r\n}\r\n\r\nexport default App;\r\n","// This optional code is used to register a service worker.\r\n// register() is not called by default.\r\n\r\n// This lets the app load faster on subsequent visits in production, and gives\r\n// it offline capabilities. However, it also means that developers (and users)\r\n// will only see deployed updates on subsequent visits to a page, after all the\r\n// existing tabs open on the page have been closed, since previously cached\r\n// resources are updated in the background.\r\n\r\n// To learn more about the benefits of this model and instructions on how to\r\n// opt-in, read http://bit.ly/CRA-PWA\r\n\r\nconst isLocalhost = Boolean(\r\n  window.location.hostname === 'localhost' ||\r\n    // [::1] is the IPv6 localhost address.\r\n    window.location.hostname === '[::1]' ||\r\n    // 127.0.0.1/8 is considered localhost for IPv4.\r\n    window.location.hostname.match(\r\n      /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\r\n    )\r\n);\r\n\r\nexport function register(config) {\r\n  if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\r\n    // The URL constructor is available in all browsers that support SW.\r\n    const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\r\n    if (publicUrl.origin !== window.location.origin) {\r\n      // Our service worker won't work if PUBLIC_URL is on a different origin\r\n      // from what our page is served on. This might happen if a CDN is used to\r\n      // serve assets; see https://github.com/facebook/create-react-app/issues/2374\r\n      return;\r\n    }\r\n\r\n    window.addEventListener('load', () => {\r\n      const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\r\n\r\n      if (isLocalhost) {\r\n        // This is running on localhost. Let's check if a service worker still exists or not.\r\n        checkValidServiceWorker(swUrl, config);\r\n\r\n        // Add some additional logging to localhost, pointing developers to the\r\n        // service worker/PWA documentation.\r\n        navigator.serviceWorker.ready.then(() => {\r\n          console.log(\r\n            'This web app is being served cache-first by a service ' +\r\n              'worker. To learn more, visit http://bit.ly/CRA-PWA'\r\n          );\r\n        });\r\n      } else {\r\n        // Is not localhost. Just register service worker\r\n        registerValidSW(swUrl, config);\r\n      }\r\n    });\r\n  }\r\n}\r\n\r\nfunction registerValidSW(swUrl, config) {\r\n  navigator.serviceWorker\r\n    .register(swUrl)\r\n    .then(registration => {\r\n      registration.onupdatefound = () => {\r\n        const installingWorker = registration.installing;\r\n        if (installingWorker == null) {\r\n          return;\r\n        }\r\n        installingWorker.onstatechange = () => {\r\n          if (installingWorker.state === 'installed') {\r\n            if (navigator.serviceWorker.controller) {\r\n              // At this point, the updated precached content has been fetched,\r\n              // but the previous service worker will still serve the older\r\n              // content until all client tabs are closed.\r\n              console.log(\r\n                'New content is available and will be used when all ' +\r\n                  'tabs for this page are closed. See http://bit.ly/CRA-PWA.'\r\n              );\r\n\r\n              // Execute callback\r\n              if (config && config.onUpdate) {\r\n                config.onUpdate(registration);\r\n              }\r\n            } else {\r\n              // At this point, everything has been precached.\r\n              // It's the perfect time to display a\r\n              // \"Content is cached for offline use.\" message.\r\n              console.log('Content is cached for offline use.');\r\n\r\n              // Execute callback\r\n              if (config && config.onSuccess) {\r\n                config.onSuccess(registration);\r\n              }\r\n            }\r\n          }\r\n        };\r\n      };\r\n    })\r\n    .catch(error => {\r\n      console.error('Error during service worker registration:', error);\r\n    });\r\n}\r\n\r\nfunction checkValidServiceWorker(swUrl, config) {\r\n  // Check if the service worker can be found. If it can't reload the page.\r\n  fetch(swUrl)\r\n    .then(response => {\r\n      // Ensure service worker exists, and that we really are getting a JS file.\r\n      const contentType = response.headers.get('content-type');\r\n      if (\r\n        response.status === 404 ||\r\n        (contentType != null && contentType.indexOf('javascript') === -1)\r\n      ) {\r\n        // No service worker found. Probably a different app. Reload the page.\r\n        navigator.serviceWorker.ready.then(registration => {\r\n          registration.unregister().then(() => {\r\n            window.location.reload();\r\n          });\r\n        });\r\n      } else {\r\n        // Service worker found. Proceed as normal.\r\n        registerValidSW(swUrl, config);\r\n      }\r\n    })\r\n    .catch(() => {\r\n      console.log(\r\n        'No internet connection found. App is running in offline mode.'\r\n      );\r\n    });\r\n}\r\n\r\nexport function unregister() {\r\n  if ('serviceWorker' in navigator) {\r\n    navigator.serviceWorker.ready.then(registration => {\r\n      registration.unregister();\r\n    });\r\n  }\r\n}\r\n","import React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport './index.css';\r\nimport App from './App';\r\nimport * as serviceWorker from './serviceWorker';\r\nimport { MuiThemeProvider, createMuiTheme } from \"@material-ui/core/styles\";\r\nimport {\r\n    StylesProvider,\r\n    createGenerateClassName\r\n} from '@material-ui/styles';\r\nimport { WithMuiPickersUtilsProvider } from './BASE/Controls/Containers/Picker/DatePickerThai';\r\nimport CssBaseline from '@material-ui/core/CssBaseline';\r\n\r\n// import {WithMuiPickersUtilsProvider} from './Controls/Containers/Picker/DatePickerThai';\r\n\r\nconst color1 = \"#38A153\"; //เขียว header\r\nconst color2 = \"#FFFFFF\"; //ขาว\r\nconst color3 = \"#494949\"; //ดำ\r\nconst color4 = \"#0D7022\"; //เขียวปุ่ม map tools\r\nconst colorHover = \"#87F088\"; //สีสำหรับ hover\r\nconst colorActive = \"#87F088\";//สีสำหรับ Active\r\nconst colorTextHover = \"#FFFFFF\";\r\nconst colorTextActive = \"#000000\"\r\nconst theme = createMuiTheme({\r\n    typography: {\r\n        useNextVariants: true,\r\n        // Use the system font.\r\n        fontFamily: 'Prompt',\r\n    },\r\n    textSize: {\r\n        heading: '26px',\r\n        title: '16px', //18px\r\n        subtitle: '18px',\r\n        subtitleHeader: '14px',\r\n        normal: '16px',\r\n        mini: '12px'\r\n    },\r\n    mainTheme: {\r\n        //สีทีมทั้งโปรเจค\r\n        color1: color1,\r\n        colorAH: {\r\n            colorHover,\r\n            colorActive,\r\n            colorTextHover,\r\n            colorTextActive\r\n        },\r\n        color2: color2,\r\n        color3: color3,\r\n        color4: color4\r\n    },\r\n\r\n    palette: {\r\n        //สีปุ่มต่างๆ\r\n        primary: {\r\n            main: color1, //main color\r\n            dark: color1, //hover\r\n            contrastText: color2 //text color\r\n        },\r\n        secondary: {\r\n            main: color3,\r\n            dark: color3,\r\n            contrastText: color2\r\n        }\r\n    }\r\n});\r\nconst generateClassName = createGenerateClassName({ productionPrefix: 'got' });\r\n\r\nReactDOM.render(\r\n    <MuiThemeProvider theme={theme}>\r\n        <StylesProvider generateClassName={generateClassName}>\r\n            <CssBaseline />\r\n            {WithMuiPickersUtilsProvider(App)}\r\n        </StylesProvider>\r\n    </MuiThemeProvider>\r\n    ,\r\n    document.getElementById('root')\r\n);\r\n\r\nserviceWorker.unregister();\r\n","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGISURBVGhD7Zk/K4VhGIdfiuQMZGVRNnwIZWeRwsSAUSnf4gwIo5LFqMTMJzAYbWz+ZyCF33XXKdP7vMfJc251X3UN99PznO5f7/u8Z7iLIAhaYlhuyWv5Ib8y+yrP5bLslr9iRb7Lxo8S5CGjz/JnqCs5IptiVXL4U+7Icdkhc9Mrp+SlpJ8bOSQrwev0Jgkxy4IDeuSJJMwxC1XYlBzYtcoPA/Je0tsoCym42GzmdfIGHx5627CqhE7JpcZ23IkUS5Ige1aV0CfZ+GSVP+Yk/R1aVUIEyUQE8UYE8UYE8UYE8UYE8UYE8UYE8UYE8UYE8UYE8UYE8UYE8UblIDXJxher/NEIcmBVAsZdbGbI4o01SW91qxJcSDZPW+WLM0lvC1YlYHbIZsZdnp7KpGSKxmyxn4UUXZLBI2EYd1U69MdMyDtJT+ssVIXp6a3kIOOubbkoZzLK/JI7cSp5EvSyL5seQA1KBo/8QLt9lDyJlqZoY5KZHcPRo4zyX8HXaV56eL2D4B9TFN959STHAFEyvAAAAABJRU5ErkJggg==\""],"sourceRoot":""}