diff --git a/code/VideoAccess-VCMP/web/client/src/sections/offline/containers/statuscode.jsx b/code/VideoAccess-VCMP/web/client/src/sections/offline/containers/statuscode.jsx
index e14f667..09154ab 100644
--- a/code/VideoAccess-VCMP/web/client/src/sections/offline/containers/statuscode.jsx
+++ b/code/VideoAccess-VCMP/web/client/src/sections/offline/containers/statuscode.jsx
@@ -63,7 +63,11 @@ const Statuscode = (props) => {
const codegetStatus = () => {
searchData.current = { ...query, ...search }
dispatch(offline.getStatus(searchData.current)).then((res) => {
-
+ });
+ }
+ function banned(row){
+ dispatch(offline.putStatueBanned({statusId: row.id,forbidden: !row.forbidden,})).then(() => {
+ dispatch(offline.getStatus(searchData.current))
});
}
const columns = [
@@ -115,19 +119,7 @@ const Statuscode = (props) => {
{row.forbidden ? (
@@ -137,19 +129,7 @@ const Statuscode = (props) => {
arrowPointAtCenter={false}
showArrow={true}
position="topRight"
- onConfirm={() => {
- dispatch(
- offline.putStatueBanned(
- {
- statusId: row.id,
- forbidden: !row.forbidden,
- },
- row.forbidden
- )
- ).then(() => {
- codegetStatus();
- });
- }}
+ onConfirm={() => banned(row)}
>