tab name changes, aypos button, removed area related tabs
This commit is contained in:
@@ -14,7 +14,7 @@ public class CORSConfig {
|
||||
public CorsFilter corsFilter() {
|
||||
CorsConfiguration config = new CorsConfiguration();
|
||||
config.setAllowCredentials(true);
|
||||
config.addAllowedOrigin("http://localhost:8080");
|
||||
config.addAllowedOrigin("http://localhost:3000");
|
||||
config.addAllowedHeader("*");
|
||||
config.addAllowedOriginPattern("*");
|
||||
config.addAllowedMethod(CorsConfiguration.ALL);
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
|
||||
SKIP_PREFLIGHT_CHECK=true
|
||||
# Vite environment variables
|
||||
REACT_APP_API_BASE_URL=https://bgreen.blc-css.com/api/v1
|
||||
REACT_APP_API_WEBSOCKET_BASE_URL=https://bgreen.blc-css.com
|
||||
REACT_APP_API_BASE_URL=http://localhost:8080/api/v1
|
||||
REACT_APP_API_WEBSOCKET_BASE_URL=http://localhost:8080
|
||||
REACT_APP_DEFAULT_EMAIL=info@blc-css.com
|
||||
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ const VerticalMenuHeader = (props) => {
|
||||
<ul className="nav navbar-nav flex-row">
|
||||
<li className="nav-item mr-auto">
|
||||
<NavLink to="/" className="navbar-brand">
|
||||
<h2 className="brand-text mb-0">SECAPSoft</h2>
|
||||
<h2 className="brand-text mb-0">Bgreen</h2>
|
||||
</NavLink>
|
||||
</li>
|
||||
<li className="nav-item nav-toggle">
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
//Template config options
|
||||
const themeConfig = {
|
||||
app: {
|
||||
appName: "SECAPSoft",
|
||||
appName: "Bgreen",
|
||||
},
|
||||
layout: {
|
||||
isRTL: false,
|
||||
|
||||
@@ -71,11 +71,11 @@
|
||||
},
|
||||
|
||||
"DataInput": {
|
||||
"area": "Area",
|
||||
"area": "Area ",
|
||||
"report": "Report ",
|
||||
"reports": "Reports ",
|
||||
"data": "Data",
|
||||
"datas": "Datas",
|
||||
"reports": "Raw Data",
|
||||
"data": "Data ",
|
||||
"datas": "Data ",
|
||||
"dataInput": "Data Input",
|
||||
"year": "Year",
|
||||
"month": "Month",
|
||||
@@ -87,13 +87,14 @@
|
||||
"update": "Update Data",
|
||||
"showDeleted": "Show Deleted Reports",
|
||||
"result": "Result",
|
||||
"directToAllDatas": "See All Datas",
|
||||
"directToAllDatas": "See All Data",
|
||||
"addNewData": "Add New Data",
|
||||
"failUploadExcel": "An error occurred while uploading the file!"
|
||||
"failUploadExcel": "File upload failed!"
|
||||
},
|
||||
|
||||
"Graphics": {
|
||||
"graphics": "Graphics"
|
||||
"graphics": "Reports",
|
||||
"reports": "Reports"
|
||||
},
|
||||
|
||||
"EmissionSources": {
|
||||
@@ -279,7 +280,7 @@
|
||||
},
|
||||
|
||||
"DataCenters": {
|
||||
"dataCenter": "Data Center"
|
||||
"title": "Data Centers"
|
||||
},
|
||||
|
||||
"DataCenter": {
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
"DataInput": {
|
||||
"area": "Bölge ",
|
||||
"report": "Rapor ",
|
||||
"reports": "Raporlar ",
|
||||
"reports": "Raw Data",
|
||||
"data": "Veri ",
|
||||
"datas": "Veriler ",
|
||||
"dataInput": "Veri Girişi",
|
||||
@@ -92,7 +92,8 @@
|
||||
},
|
||||
|
||||
"Graphics": {
|
||||
"graphics": "Grafikler"
|
||||
"graphics": "Raporlar",
|
||||
"reports": "Raporlar"
|
||||
},
|
||||
|
||||
"EmissionSources": {
|
||||
@@ -290,5 +291,21 @@
|
||||
"createSuccess": "Veri merkezi başarıyla oluşturuldu",
|
||||
"deleteSuccess": "Veri merkezi başarıyla silindi",
|
||||
"searchPlaceholder": "Veri merkezlerinde ara..."
|
||||
},
|
||||
|
||||
"DataCenters": {
|
||||
"title": "Veri Merkezleri",
|
||||
"create": "Veri Merkezi Ekle",
|
||||
"name": "İsim",
|
||||
"namePlaceholder": "Veri merkezi ismini girin",
|
||||
"externalId": "Harici ID",
|
||||
"externalIdPlaceholder": "Harici ID girin",
|
||||
"number": "Numara",
|
||||
"numberPlaceholder": "Numara girin",
|
||||
"url": "URL",
|
||||
"urlPlaceholder": "URL girin",
|
||||
"createSuccess": "Veri merkezi başarıyla oluşturuldu",
|
||||
"deleteSuccess": "Veri merkezi başarıyla silindi",
|
||||
"searchPlaceholder": "Veri merkezlerinde ara..."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ export default [
|
||||
permissionCheck("paginate_roles_get")) && [
|
||||
{
|
||||
id: "Organizations",
|
||||
title: "Organizations.organizations",
|
||||
title: "DataCenters.title",
|
||||
icon: <Home size={20} />,
|
||||
navLink: "/organizasyonlar",
|
||||
display: permissionCheck("paginate_organizations_get") ? "" : "none",
|
||||
@@ -79,14 +79,14 @@ export default [
|
||||
},
|
||||
{
|
||||
id: "Datas",
|
||||
title: "DataInput.reports",
|
||||
title: "Raw Data",
|
||||
icon: <BarChart2 size={20} />,
|
||||
navLink: "/raporlar",
|
||||
display: permissionCheck("paginate_datasets_get") ? "" : "none",
|
||||
},
|
||||
{
|
||||
id: "Graphics",
|
||||
title: "Graphics.graphics",
|
||||
title: "Reports",
|
||||
icon: <Layers size={20} />,
|
||||
navLink: "/grafikler",
|
||||
display: permissionCheck("show_graphics") ? "" : "none",
|
||||
@@ -138,64 +138,10 @@ export default [
|
||||
},
|
||||
{
|
||||
id: "DataCenter",
|
||||
title: "Data Center",
|
||||
title: "Data Centers",
|
||||
icon: <Zap size={20} />,
|
||||
navLink: "/verimerkezi",
|
||||
},
|
||||
{
|
||||
id: "Areas",
|
||||
title: "Areas.areas",
|
||||
icon: <List size={20} />,
|
||||
display:
|
||||
permissionCheck("paginate_areas_get") ||
|
||||
permissionCheck("paginate_countries_get") ||
|
||||
permissionCheck("paginate_cities_get") ||
|
||||
permissionCheck("paginate_districts_get") ||
|
||||
permissionCheck("paginate_neighborhoods_get")
|
||||
? ""
|
||||
: "none",
|
||||
children: (permissionCheck("paginate_areas_get") ||
|
||||
permissionCheck("paginate_countries_get") ||
|
||||
permissionCheck("paginate_cities_get") ||
|
||||
permissionCheck("paginate_districts_get") ||
|
||||
permissionCheck("paginate_neighborhoods_get")) && [
|
||||
{
|
||||
id: "Areas",
|
||||
title: "Areas.areas",
|
||||
icon: <ArrowRight size={20} />,
|
||||
navLink: "/alanlar",
|
||||
display: permissionCheck("paginate_areas_get") ? "" : "none",
|
||||
},
|
||||
{
|
||||
id: "Countries",
|
||||
title: "Areas.countries",
|
||||
icon: <ArrowRight size={20} />,
|
||||
navLink: "/ulkeler",
|
||||
display: permissionCheck("paginate_countries_get") ? "" : "none",
|
||||
},
|
||||
{
|
||||
id: "Cities",
|
||||
title: "Areas.cities",
|
||||
icon: <ArrowRight size={20} />,
|
||||
navLink: "/iller",
|
||||
display: permissionCheck("paginate_cities_get") ? "" : "none",
|
||||
},
|
||||
{
|
||||
id: "Districts",
|
||||
title: "Areas.districts",
|
||||
icon: <ArrowRight size={20} />,
|
||||
navLink: "/ilceler",
|
||||
display: permissionCheck("paginate_districts_get") ? "" : "none",
|
||||
},
|
||||
{
|
||||
id: "Neighborhoods",
|
||||
title: "Areas.neighborhoods",
|
||||
icon: <ArrowRight size={20} />,
|
||||
navLink: "/mahalleler",
|
||||
display: permissionCheck("paginate_neighborhoods_get") ? "" : "none",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "Survey",
|
||||
title: "Survey.survey",
|
||||
|
||||
@@ -49,7 +49,7 @@ export default [
|
||||
permissionCheck("paginate_roles_get")) && [
|
||||
{
|
||||
id: "DataCenters",
|
||||
title: "DataCenter.title",
|
||||
title: "DataCenters.title",
|
||||
icon: <Zap size={20} />,
|
||||
navLink: "/organizasyonlar",
|
||||
display: permissionCheck("paginate_datacenters_get") ? "" : "none",
|
||||
@@ -79,14 +79,14 @@ export default [
|
||||
},
|
||||
{
|
||||
id: "Datas",
|
||||
title: "DataInput.reports",
|
||||
title: "Raw Data",
|
||||
icon: <BarChart2 size={20} />,
|
||||
navLink: "/raporlar",
|
||||
display: permissionCheck("paginate_datasets_get") ? "" : "none",
|
||||
},
|
||||
{
|
||||
id: "Graphics",
|
||||
title: "Grafikler",
|
||||
title: "Reports",
|
||||
icon: <Layers size={20} />,
|
||||
navLink: "/grafikler",
|
||||
display: permissionCheck("show_graphics") ? "" : "none",
|
||||
@@ -138,64 +138,10 @@ export default [
|
||||
},
|
||||
{
|
||||
id: "DataCenter",
|
||||
title: "Data Center",
|
||||
title: "DataCenters",
|
||||
icon: <Zap size={20} />,
|
||||
navLink: "/verimerkezi",
|
||||
},
|
||||
{
|
||||
id: "Areas",
|
||||
title: "Areas.areas",
|
||||
icon: <List size={20} />,
|
||||
display:
|
||||
permissionCheck("paginate_areas_get") ||
|
||||
permissionCheck("paginate_countries_get") ||
|
||||
permissionCheck("paginate_cities_get") ||
|
||||
permissionCheck("paginate_districts_get") ||
|
||||
permissionCheck("paginate_neighborhoods_get")
|
||||
? ""
|
||||
: "none",
|
||||
children: (permissionCheck("paginate_areas_get") ||
|
||||
permissionCheck("paginate_countries_get") ||
|
||||
permissionCheck("paginate_cities_get") ||
|
||||
permissionCheck("paginate_districts_get") ||
|
||||
permissionCheck("paginate_neighborhoods_get")) && [
|
||||
{
|
||||
id: "Areas",
|
||||
title: "Areas.areas",
|
||||
icon: <ArrowRight size={20} />,
|
||||
navLink: "/alanlar",
|
||||
display: permissionCheck("paginate_areas_get") ? "" : "none",
|
||||
},
|
||||
{
|
||||
id: "Countries",
|
||||
title: "Areas.countries",
|
||||
icon: <ArrowRight size={20} />,
|
||||
navLink: "/ulkeler",
|
||||
display: permissionCheck("paginate_countries_get") ? "" : "none",
|
||||
},
|
||||
{
|
||||
id: "Cities",
|
||||
title: "Areas.cities",
|
||||
icon: <ArrowRight size={20} />,
|
||||
navLink: "/iller",
|
||||
display: permissionCheck("paginate_cities_get") ? "" : "none",
|
||||
},
|
||||
{
|
||||
id: "Districts",
|
||||
title: "Areas.districts",
|
||||
icon: <ArrowRight size={20} />,
|
||||
navLink: "/ilceler",
|
||||
display: permissionCheck("paginate_districts_get") ? "" : "none",
|
||||
},
|
||||
{
|
||||
id: "Neighborhoods",
|
||||
title: "Areas.neighborhoods",
|
||||
icon: <ArrowRight size={20} />,
|
||||
navLink: "/mahalleler",
|
||||
display: permissionCheck("paginate_neighborhoods_get") ? "" : "none",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "Survey",
|
||||
title: "Survey.survey",
|
||||
|
||||
@@ -9,8 +9,8 @@ const notificationsReducer = (state = initialState, action) => {
|
||||
case "GET_QUICKNOTIFICATIONS":
|
||||
return {
|
||||
...state,
|
||||
getQuickNotifications: action.payload.getQuickNotifications,
|
||||
totalForQuick: action.payload.getQuickNotifications.filter(
|
||||
getQuickNotifications: action.payload.getQuickNotifications || [],
|
||||
totalForQuick: (action.payload.getQuickNotifications || []).filter(
|
||||
(notification) => notification.read === false
|
||||
).length,
|
||||
};
|
||||
@@ -25,7 +25,7 @@ const notificationsReducer = (state = initialState, action) => {
|
||||
case "GET_ALLNOTIFICATION":
|
||||
return {
|
||||
...state,
|
||||
notifications: action.payload.getAllNotifications,
|
||||
notifications: action.payload.getAllNotifications || [],
|
||||
};
|
||||
|
||||
case "GET_NOTIFICATIONREMOVE":
|
||||
|
||||
@@ -33,7 +33,7 @@ const DataCenter = () => {
|
||||
minWidth: "100px",
|
||||
},
|
||||
{
|
||||
name: "Data Center",
|
||||
name: "Data Centers",
|
||||
selector: (row) => row.dataCenter,
|
||||
sortable: true,
|
||||
minWidth: "200px",
|
||||
|
||||
@@ -30,7 +30,6 @@ import { default as SweetAlert } from "sweetalert2";
|
||||
import withReactContent from "sweetalert2-react-content";
|
||||
import { getDataCenters, createDataCenter, updateDataCenter, deleteDataCenter } from "../redux/actions/dataCenter";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { getAreas } from "../redux/actions/areas";
|
||||
import { getSectors, getSectorById, getSubSectorById, getConsuptionUnits } from "../redux/actions/datas";
|
||||
import { getAllEmissionSources } from "../redux/actions/emissionSources";
|
||||
import { permissionCheck } from "../components/permission-check";
|
||||
@@ -105,7 +104,6 @@ const DataCenterManagement = () => {
|
||||
name: "",
|
||||
externalId: "",
|
||||
number: "",
|
||||
areaId: null,
|
||||
address: "",
|
||||
latitude: null,
|
||||
longitude: null,
|
||||
@@ -122,10 +120,8 @@ const DataCenterManagement = () => {
|
||||
const [mapPosition, setMapPosition] = useState(null);
|
||||
|
||||
const dataCenterStore = useSelector((state) => state.dataCenter);
|
||||
const areasStore = useSelector((state) => state.areas);
|
||||
const datasStore = useSelector((state) => state.datas);
|
||||
const emissionSourceStore = useSelector((state) => state.emissionSources);
|
||||
const [areasOptions, setAreasOptions] = useState([]);
|
||||
const [sectorsOptions, setSectorsOptions] = useState([]);
|
||||
const [subSectorsOptions, setSubSectorsOptions] = useState([]);
|
||||
const [emissionSourcesOptions, setEmissionSourcesOptions] = useState([]);
|
||||
@@ -154,14 +150,7 @@ const DataCenterManagement = () => {
|
||||
minWidth: "200px",
|
||||
},
|
||||
{
|
||||
name: t("DataCenter.city"),
|
||||
selector: (row) => row.area?.cityNames,
|
||||
sortable: true,
|
||||
minWidth: "150px",
|
||||
cell: (row) => <span>{row.area?.cityNames || "-"}</span>,
|
||||
},
|
||||
{
|
||||
name: "AYPOS",
|
||||
name: "Dashboard",
|
||||
selector: (row) => row.ayposURL,
|
||||
sortable: false,
|
||||
minWidth: "150px",
|
||||
@@ -173,7 +162,7 @@ const DataCenterManagement = () => {
|
||||
size="sm"
|
||||
onClick={() => window.open(row.ayposURL, '_blank')}
|
||||
>
|
||||
AYPOS
|
||||
Dashboard
|
||||
</Button>
|
||||
) : (
|
||||
<span>-</span>
|
||||
@@ -225,19 +214,9 @@ const DataCenterManagement = () => {
|
||||
|
||||
useEffect(() => {
|
||||
dispatch(getDataCenters());
|
||||
dispatch(getAreas());
|
||||
dispatch(getSectors());
|
||||
}, [dispatch]);
|
||||
|
||||
useEffect(() => {
|
||||
setAreasOptions(
|
||||
areasStore?.areas?.map((area) => ({
|
||||
value: area?.id,
|
||||
label: area?.tag,
|
||||
}))
|
||||
);
|
||||
}, [areasStore]);
|
||||
|
||||
useEffect(() => {
|
||||
setSectorsOptions(
|
||||
datasStore?.sectors?.map((sector) => ({
|
||||
@@ -334,7 +313,6 @@ const DataCenterManagement = () => {
|
||||
name: row.dataCenter,
|
||||
externalId: row.externalId,
|
||||
number: row.number,
|
||||
areaId: row.area?.id,
|
||||
address: row.address,
|
||||
latitude: row.latitude,
|
||||
longitude: row.longitude,
|
||||
@@ -432,7 +410,6 @@ const DataCenterManagement = () => {
|
||||
name: "",
|
||||
externalId: "",
|
||||
number: "",
|
||||
areaId: null,
|
||||
address: "",
|
||||
latitude: null,
|
||||
longitude: null,
|
||||
@@ -638,28 +615,6 @@ const DataCenterManagement = () => {
|
||||
/>
|
||||
</FormGroup>
|
||||
</Col>
|
||||
<Col sm="12">
|
||||
<FormGroup>
|
||||
<Label for="area">{t("DataCenter.area")}</Label>
|
||||
<Select
|
||||
id="area"
|
||||
name="area"
|
||||
placeholder={t("DataCenter.selectArea")}
|
||||
options={areasOptions}
|
||||
value={areasOptions?.find(
|
||||
(option) => option.value === selectedDataCenter.areaId
|
||||
)}
|
||||
onChange={(option) =>
|
||||
setSelectedDataCenter({
|
||||
...selectedDataCenter,
|
||||
areaId: option?.value,
|
||||
})
|
||||
}
|
||||
isClearable
|
||||
filterOption={customFilterForSelect}
|
||||
/>
|
||||
</FormGroup>
|
||||
</Col>
|
||||
<Col sm="12">
|
||||
<FormGroup>
|
||||
<Label for="address">{t("DataCenter.address")}</Label>
|
||||
|
||||
@@ -701,7 +701,7 @@ const Graphics = () => {
|
||||
<div style={{ marginTop: "2%", marginBottom: "2%" }}>
|
||||
<Card>
|
||||
<CardHeader className="border-bottom">
|
||||
<CardTitle tag="h4">Grafikler</CardTitle>
|
||||
<CardTitle tag="h4">Reports</CardTitle>
|
||||
<Button
|
||||
className="ml-2"
|
||||
color="primary"
|
||||
|
||||
@@ -642,16 +642,13 @@ const Map = () => {
|
||||
</p>
|
||||
)}
|
||||
{dc.ayposURL && (
|
||||
<div className="mt-2">
|
||||
<Button
|
||||
color="primary"
|
||||
size="sm"
|
||||
className="w-100"
|
||||
onClick={() => window.open(dc.ayposURL, '_blank')}
|
||||
>
|
||||
AYPOS
|
||||
</Button>
|
||||
</div>
|
||||
<Button
|
||||
className="w-100 mb-1"
|
||||
color="primary"
|
||||
onClick={() => window.open(dc.ayposURL, '_blank')}
|
||||
>
|
||||
Dashboard
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
</Popup>
|
||||
|
||||
Reference in New Issue
Block a user