Skip to content

Commit

Permalink
Merge pull request #435 from ertush/hotfix
Browse files Browse the repository at this point in the history
Fixed issue of saving users
  • Loading branch information
ertush authored Jul 30, 2024
2 parents 1ff69ad + 21a982d commit 82c9067
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions pages/user/edit/[id].js
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ function User(props) {
</div>

<div className='flex justify-start gap-4 mt-4'>
<button className="bg-red-400 text-white font-semibold p-2 text-center" type="button" disabled={!delete_user} onClick={(e) => { deleteUser(e, props['6']?.token); setOpen(false) }} >Deactivate</button>
<button className="bg-red-400 text-white font-semibold p-2 text-center" type="button" disabled={!delete_user} onClick={(e) => { deleteUser(e, props?.token); setOpen(false) }} >Deactivate</button>
<button className="bg-gray-500 text-white font-semibold p-2 text-center"
onClick={() => { setOpen(false) }}
>Cancel</button>
Expand All @@ -287,7 +287,15 @@ function User(props) {
status?.status.includes("error") &&
<Alert severity={status?.status} sx={{ width: '100%' }}>

{status?.message?.__all__.length > 0 && status?.message?.__all__[0] }
<pre>
{
JSON.stringify(
status?.message ? status?.message : 'An Error occured when saving',
null,
2
)
}
</pre>

</Alert>
}
Expand Down Expand Up @@ -324,7 +332,7 @@ function User(props) {
</h4>
<form
className='flex flex-col w-full items-start justify-start gap-3'
onSubmit={e => handleBasicDetailsSubmit(e, props['6']?.token)}
onSubmit={e => handleBasicDetailsSubmit(e, props?.token)}
>
{/* first name*/}
<div className='w-full flex flex-col items-start justify-start gap-1 mb-3'>
Expand Down

0 comments on commit 82c9067

Please sign in to comment.