mirror of
https://github.com/Telecominfraproject/wlan-cloud-ui.git
synced 2025-10-30 10:22:37 +00:00
filter_equipment query refetches after AP is added
This commit is contained in:
@@ -12,7 +12,12 @@ import ClientDeviceDetails from 'containers/Network/containers/ClientDeviceDetai
|
|||||||
import BulkEditAccessPoints from 'containers/Network/containers/BulkEditAccessPoints';
|
import BulkEditAccessPoints from 'containers/Network/containers/BulkEditAccessPoints';
|
||||||
|
|
||||||
import UserContext from 'contexts/UserContext';
|
import UserContext from 'contexts/UserContext';
|
||||||
import { GET_ALL_LOCATIONS, GET_LOCATION, GET_ALL_PROFILES } from 'graphql/queries';
|
import {
|
||||||
|
GET_ALL_LOCATIONS,
|
||||||
|
GET_LOCATION,
|
||||||
|
GET_ALL_PROFILES,
|
||||||
|
FILTER_EQUIPMENT,
|
||||||
|
} from 'graphql/queries';
|
||||||
import {
|
import {
|
||||||
CREATE_LOCATION,
|
CREATE_LOCATION,
|
||||||
UPDATE_LOCATION,
|
UPDATE_LOCATION,
|
||||||
@@ -37,13 +42,21 @@ const Network = () => {
|
|||||||
const [createLocation] = useMutation(CREATE_LOCATION);
|
const [createLocation] = useMutation(CREATE_LOCATION);
|
||||||
const [updateLocation] = useMutation(UPDATE_LOCATION);
|
const [updateLocation] = useMutation(UPDATE_LOCATION);
|
||||||
const [deleteLocation] = useMutation(DELETE_LOCATION);
|
const [deleteLocation] = useMutation(DELETE_LOCATION);
|
||||||
const [createEquipment] = useMutation(CREATE_EQUIPMENT);
|
|
||||||
const [checkedLocations, setCheckedLocations] = useState([]);
|
const [checkedLocations, setCheckedLocations] = useState([]);
|
||||||
const [deleteModal, setDeleteModal] = useState(false);
|
const [deleteModal, setDeleteModal] = useState(false);
|
||||||
const [editModal, setEditModal] = useState(false);
|
const [editModal, setEditModal] = useState(false);
|
||||||
const [addModal, setAddModal] = useState(false);
|
const [addModal, setAddModal] = useState(false);
|
||||||
const [apModal, setApModal] = useState(false);
|
const [apModal, setApModal] = useState(false);
|
||||||
|
|
||||||
|
const [createEquipment] = useMutation(CREATE_EQUIPMENT, {
|
||||||
|
refetchQueries: [
|
||||||
|
{
|
||||||
|
query: FILTER_EQUIPMENT,
|
||||||
|
variables: { customerId, locationIds: checkedLocations, equipmentType: 'AP' },
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
|
||||||
const handleGetSingleLocation = id => {
|
const handleGetSingleLocation = id => {
|
||||||
getLocation({
|
getLocation({
|
||||||
variables: { id },
|
variables: { id },
|
||||||
|
|||||||
Reference in New Issue
Block a user