Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
FatemehAskari committed Dec 25, 2023
2 parents b05a636 + 24603a4 commit db79341
Show file tree
Hide file tree
Showing 42 changed files with 4,608 additions and 805 deletions.
16 changes: 12 additions & 4 deletions vakilpors-front/src/components/case-pages/ShowCases.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,14 @@ const ShowCases = () => {
if (token) {
setloading(true);
const tokenData = jwt(token);
console.log(tokenData.uid, "fdggf");
const url =
BASE_API_ROUTE +
(isLawyer.split("_")[0] === "true"
? `Document/GetDocumentsThatLawyerHasAccessToByUserId`
: `Document/GetDocumentsByUserId?userId=${tokenData.uid}`);
: `Document/GetDocumentsByUserId?userId=${
tokenData.uid
}&PageNumber=${1}&PageSize=${5}`);
const Data = {
userId: isLawyer.split("_")[1],
lawyerId: isLawyer.split("_")[2],
Expand All @@ -148,7 +151,12 @@ const ShowCases = () => {
headers: { Authorization: `Bearer ${token}` },
})
: axios.get(url, { headers: { Authorization: `Bearer ${token}` } }));
setCases(response.data.data);
if (isLawyer.split("_")[0] === "true") {
setCases(response.data.data);
}
else{
setCases(response.data.data.results);
}
console.log(response.data.data);
setaccess(response.data.data.accesses);

Expand Down Expand Up @@ -612,7 +620,7 @@ const ShowCases = () => {
alignItems: "center",
marginRight: "10px",
fontWeight: "600",
width:'80px'
width: "80px",
}}
>
{info.lawyer.user.name}
Expand All @@ -629,7 +637,7 @@ const ShowCases = () => {
<div
style={{
display: "flex",
width:'80px',
width: "80px",
justifyContent: "center",
alignItems: "center",
marginRight: "100px",
Expand Down
Loading

0 comments on commit db79341

Please # to comment.