Skip to content

Commit

Permalink
Merge pull request #44 from CMP26Projects/assign-captain
Browse files Browse the repository at this point in the history
  • Loading branch information
AhmedHamed3699 authored Dec 27, 2023
2 parents 0c60ab3 + 47cacd4 commit 6ce535b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions client/src/components/assign-captain-page/AssignSector.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
};
Expand Down Expand Up @@ -114,7 +114,7 @@ export default function AssignSector() {
setChosenCaptainId(e.target.value);
}}
/>
{isFetchingCaptains && (
{(isFetchingCaptains || isLoadingAssignRegularCaptain) && (
<p
style={{
direction: "rtl",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default function UnitAssignSector() {
toast.success("تم تعيين القائد بنجاح");
} catch (err) {
toast.error("حدث خطأ أثناء تعيين القائد");
console.log(err);
console.log(JSON.stringify(err));
toast.error(JSON.stringify(err));
}
};
Expand Down
2 changes: 1 addition & 1 deletion client/src/redux/slices/sectorApiSlice.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const captainsApi = apiSlice.injectEndpoints({
}),
UpdateSectorRegularCaptain: builder.mutation({
query: (sector) => ({
url: `${SECTOR_URL}/${sector.baseName}/${sector.suffixName}`,
url: `${SECTOR_URL}/captain/${sector.baseName}/${sector.suffixName}`,
method: "PATCH",
body: sector,
}),
Expand Down

0 comments on commit 6ce535b

Please sign in to comment.