From 47cacd4d4ae34a0e2940107973f2f17b8a7b265c Mon Sep 17 00:00:00 2001 From: amir-kedis Date: Wed, 27 Dec 2023 16:00:27 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20feat:=20assign=20captain=20worki?= =?UTF-8?q?ng?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/components/assign-captain-page/AssignSector.jsx | 4 ++-- .../src/components/assign-captain-page/UnitAssignSector.jsx | 2 +- client/src/redux/slices/sectorApiSlice.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/src/components/assign-captain-page/AssignSector.jsx b/client/src/components/assign-captain-page/AssignSector.jsx index 03667088..49b95b44 100644 --- a/client/src/components/assign-captain-page/AssignSector.jsx +++ b/client/src/components/assign-captain-page/AssignSector.jsx @@ -58,7 +58,7 @@ export default function AssignSector() { toast.success("تم تعيين القائد بنجاح"); } catch (err) { toast.error("حدث خطأ أثناء تعيين القائد"); - console.log(err); + console.log(JSON.stringify(err)); toast.error(JSON.stringify(err)); } }; @@ -114,7 +114,7 @@ export default function AssignSector() { setChosenCaptainId(e.target.value); }} /> - {isFetchingCaptains && ( + {(isFetchingCaptains || isLoadingAssignRegularCaptain) && (

({ - url: `${SECTOR_URL}/${sector.baseName}/${sector.suffixName}`, + url: `${SECTOR_URL}/captain/${sector.baseName}/${sector.suffixName}`, method: "PATCH", body: sector, }),