refactoring
This commit is contained in:
@@ -63,11 +63,11 @@ import { fetchGisStationsStaticDistrictThunk } from "../../redux/thunks/webservi
|
||||
import { fetchGisStationsStatusDistrictThunk } from "../../redux/thunks/webservice/fetchGisStationsStatusDistrictThunk";
|
||||
import { fetchLocationDevicesThunk } from "../../redux/thunks/database/fetchLocationDevicesThunk";
|
||||
import { fetchPriorityConfigThunk } from "../../redux/thunks/database/fetchPriorityConfigThunk";
|
||||
import { fetchGisLinesThunk } from "../../redux/thunks/database/fetchGisLinesThunk";
|
||||
import { fetchGisLinesThunk } from "../../redux/thunks/database/polylines/fetchGisLinesThunk.js";
|
||||
import { fetchGisLinesStatusThunk } from "../../redux/thunks/webservice/fetchGisLinesStatusThunk";
|
||||
import { fetchUserRightsThunk } from "../../redux/thunks/webservice/fetchUserRightsThunk";
|
||||
import { fetchPoiIconsDataThunk } from "../../redux/thunks/database/fetchPoiIconsDataThunk";
|
||||
import { fetchPoiTypThunk } from "../../redux/thunks/database/fetchPoiTypThunk";
|
||||
import { fetchPoiIconsDataThunk } from "../../redux/thunks/database/pois/fetchPoiIconsDataThunk.js";
|
||||
import { fetchPoiTypThunk } from "../../redux/thunks/database/pois/fetchPoiTypThunk.js";
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------
|
||||
const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
|
||||
|
||||
@@ -4,8 +4,8 @@ import { useDispatch, useSelector } from "react-redux";
|
||||
import { selectGisStationsStaticDistrict } from "../../redux/slices/webservice/gisStationsStaticDistrictSlice";
|
||||
import { fetchPoiTypes } from "../../redux/slices/database/poiTypesSlice";
|
||||
import { incrementTrigger } from "../../redux/slices/poiReadFromDbTriggerSlice";
|
||||
import { addPoiThunk } from "../../redux/thunks/database/addPoiThunk";
|
||||
import { fetchPoiIconsDataThunk } from "../../redux/thunks/database/fetchPoiIconsDataThunk";
|
||||
import { addPoiThunk } from "../../redux/thunks/database/pois/addPoiThunk";
|
||||
import { fetchPoiIconsDataThunk } from "../../redux/thunks/database/pois/fetchPoiIconsDataThunk";
|
||||
|
||||
const AddPOIModal = ({ onClose, map, latlng }) => {
|
||||
const dispatch = useDispatch();
|
||||
|
||||
@@ -3,11 +3,11 @@ import React, { useState, useEffect } from "react";
|
||||
import Select from "react-select";
|
||||
import { useSelector, useDispatch } from "react-redux";
|
||||
import { fetchLocationDevicesThunk } from "../../redux/thunks/database/fetchLocationDevicesThunk";
|
||||
import { fetchPoiTypThunk } from "../../redux/thunks/database/fetchPoiTypThunk";
|
||||
import { fetchPoiTypThunk } from "../../redux/thunks/database/pois/fetchPoiTypThunk";
|
||||
import { selectMapLayersState } from "../../redux/slices/mapLayersSlice";
|
||||
import { selectPoiTypData, selectPoiTypStatus } from "../../redux/slices/database/poiTypSlice";
|
||||
import { deletePoiThunk } from "../../redux/thunks/database/deletePoiThunk";
|
||||
import { updatePoiThunk } from "../../redux/thunks/database/updatePoiThunk";
|
||||
import { deletePoiThunk } from "../../redux/thunks/database/pois/deletePoiThunk";
|
||||
import { updatePoiThunk } from "../../redux/thunks/database/pois/updatePoiThunk";
|
||||
|
||||
const PoiUpdateModal = ({ onClose, poiData }) => {
|
||||
const dispatch = useDispatch();
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
// /config/appVersion
|
||||
export const APP_VERSION = "1.1.168";
|
||||
export const APP_VERSION = "1.1.169";
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import { useEffect, useState } from "react";
|
||||
import { useSelector, useDispatch } from "react-redux";
|
||||
import { selectGisLinesStatusFromWebservice } from "../redux/slices/webservice/gisLinesStatusSlice";
|
||||
import { fetchGisLinesThunk } from "../redux/thunks/database/fetchGisLinesThunk";
|
||||
import { fetchGisLinesThunk } from "../redux/thunks/database/polylines/fetchGisLinesThunk";
|
||||
import { fetchGisLinesStatusThunk } from "../redux/thunks/webservice/fetchGisLinesStatusThunk";
|
||||
|
||||
const useLineData = () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { createSlice } from "@reduxjs/toolkit";
|
||||
import { addPoiThunk } from "../../thunks/database/addPoiThunk";
|
||||
import { addPoiThunk } from "../../thunks/database/pois/addPoiThunk";
|
||||
|
||||
const initialState = {
|
||||
status: "idle", // idle | loading | succeeded | failed
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// /redux/slices/database/gisLinesSlice.js
|
||||
import { createSlice } from "@reduxjs/toolkit";
|
||||
import { fetchGisLinesThunk } from "../../thunks/database/fetchGisLinesThunk";
|
||||
import { fetchGisLinesThunk } from "../../thunks/database/polylines/fetchGisLinesThunk";
|
||||
|
||||
const gisLinesSlice = createSlice({
|
||||
name: "gisLinesFromDatabase",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// /redux/slices/database/poiIconsDataSlice.js
|
||||
import { createSlice } from "@reduxjs/toolkit";
|
||||
import { fetchPoiIconsDataThunk } from "../../thunks/database/fetchPoiIconsDataThunk";
|
||||
import { fetchPoiIconsDataThunk } from "../../thunks/database/pois/fetchPoiIconsDataThunk";
|
||||
|
||||
const initialState = {
|
||||
data: [],
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// /redux/slices/database/poiTypSlice.js
|
||||
import { createSlice } from "@reduxjs/toolkit";
|
||||
import { fetchPoiTypThunk } from "../../thunks/database/fetchPoiTypThunk";
|
||||
import { fetchPoiTypThunk } from "../../thunks/database/pois/fetchPoiTypThunk";
|
||||
|
||||
const initialState = {
|
||||
data: [],
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// /redux/thunks/database/addPoiThunk.js
|
||||
// /redux/thunks/database/pois/addPoiThunk.js
|
||||
import { createAsyncThunk } from "@reduxjs/toolkit";
|
||||
import { addPoiService } from "../../../services/database/pois/addPoiService";
|
||||
import { addPoiService } from "../../../../services/database/pois/addPoiService";
|
||||
|
||||
export const addPoiThunk = createAsyncThunk("poi/add", async (formData, thunkAPI) => {
|
||||
try {
|
||||
@@ -1,7 +1,7 @@
|
||||
// /redux/thunks/database/deletePoiThunk.js
|
||||
|
||||
import { createAsyncThunk } from "@reduxjs/toolkit";
|
||||
import { deletePoiService } from "../../../services/database/pois/deletePoiService";
|
||||
import { deletePoiService } from "../../../../services/database/pois/deletePoiService";
|
||||
|
||||
export const deletePoiThunk = createAsyncThunk("poi/delete", async (id, thunkAPI) => {
|
||||
try {
|
||||
@@ -1,6 +1,6 @@
|
||||
// /redux/thunks/database/fetchPoiIconsDataThunk.js
|
||||
import { createAsyncThunk } from "@reduxjs/toolkit";
|
||||
import { fetchPoiIconsDataService } from "../../../services/database/pois/fetchPoiIconsDataService";
|
||||
import { fetchPoiIconsDataService } from "../../../../services/database/pois/fetchPoiIconsDataService";
|
||||
|
||||
export const fetchPoiIconsDataThunk = createAsyncThunk("poiIconsData/fetch", async (_, thunkAPI) => {
|
||||
try {
|
||||
@@ -1,6 +1,6 @@
|
||||
// /redux/thunks/database/fetchPoiTypThunk.js
|
||||
import { createAsyncThunk } from "@reduxjs/toolkit";
|
||||
import { fetchPoiTypService } from "../../../services/database/pois/fetchPoiTypService";
|
||||
import { fetchPoiTypService } from "../../../../services/database/pois/fetchPoiTypService";
|
||||
|
||||
export const fetchPoiTypThunk = createAsyncThunk("poiTyp/fetch", async (_, thunkAPI) => {
|
||||
try {
|
||||
@@ -1,7 +1,7 @@
|
||||
// /redux/thunks/database/updatePoiThunk.js
|
||||
|
||||
import { createAsyncThunk } from "@reduxjs/toolkit";
|
||||
import { updatePoiService } from "../../../services/database/pois/updatePoiService";
|
||||
import { updatePoiService } from "../../../../services/database/pois/updatePoiService";
|
||||
|
||||
export const updatePoiThunk = createAsyncThunk("pois/update", async (poi, thunkAPI) => {
|
||||
try {
|
||||
@@ -1,6 +1,6 @@
|
||||
// /redux/thunks/database/fetchGisLinesThunk.js
|
||||
import { createAsyncThunk } from "@reduxjs/toolkit";
|
||||
import { fetchGisLinesService } from "../../../services/database/polylines/fetchGisLinesService";
|
||||
import { fetchGisLinesService } from "../../../../services/database/polylines/fetchGisLinesService";
|
||||
|
||||
export const fetchGisLinesThunk = createAsyncThunk("gisLines/fetch", async () => {
|
||||
return await fetchGisLinesService();
|
||||
Reference in New Issue
Block a user