From c4737e86603855215a3b1b9c88eed2634cc3d9e4 Mon Sep 17 00:00:00 2001 From: "ajat91.sudrajat" Date: Mon, 24 Jan 2022 18:24:25 +0700 Subject: [PATCH] Bug Fixing PPOB --- src/pages/Membership/DetailUser.js | 3 ++- src/pages/Membership/Konfirmasi.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pages/Membership/DetailUser.js b/src/pages/Membership/DetailUser.js index 196645a..1de7474 100644 --- a/src/pages/Membership/DetailUser.js +++ b/src/pages/Membership/DetailUser.js @@ -64,7 +64,7 @@ export const DetailUser = observer(() => { }; const changeStatus = async (id, is_active) => { - let status = is_active ? false : true; + let status = is_active ? "inactive" : "active"; let status2 = is_active ? "Inactivating" : "Activating"; console.log(status, "status terbaru"); try { @@ -145,6 +145,7 @@ export const DetailUser = observer(() => { response.body.statusCode !== 201 && response.body.statusCode !== 200 ? message.error(response?.body?.message || `Failed Approve`) : message.success(response?.body?.message || `Success Approve`); + await getData(); } catch (e) { console.error(e, "apa errornya"); message.error(e.response?.body?.message || "Fail Approve"); diff --git a/src/pages/Membership/Konfirmasi.js b/src/pages/Membership/Konfirmasi.js index 2e63388..d55bbab 100644 --- a/src/pages/Membership/Konfirmasi.js +++ b/src/pages/Membership/Konfirmasi.js @@ -109,7 +109,7 @@ export const Konfirmasi = observer(() => { setToko(record); setVisibleModalToko(true); }} - style={{ backgroundColor: "#7c3ea3", color: "white" }} + // type="primary" > Lihat Foto