Skip to content

Commit

Permalink
fix: update Login component layout and remove password from session s…
Browse files Browse the repository at this point in the history
…torage; adjust background color in SDashboard; add console log for hotel details response
  • Loading branch information
Kartikayy007 committed Dec 7, 2024
1 parent a2d4ca3 commit 9ced3e9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/components/Login/Login.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ const Login = () => {
} else {
sessionStorage.setItem('sessionCredentials', JSON.stringify({
email: email.toLowerCase(),
password: password
}));
localStorage.removeItem('rememberedCredentials');
}
Expand Down Expand Up @@ -315,6 +314,7 @@ const Login = () => {
autoComplete="email"
/>
</div>
<div className="mt-12">
{errorMsg && (
<div
className="text-[#99182C] text-base text-center lg:text-left lg:w-full"
Expand All @@ -323,6 +323,7 @@ const Login = () => {
{errorMsg}
</div>
)}
</div>

<div className="flex justify-end">
<button
Expand Down Expand Up @@ -413,7 +414,7 @@ const Login = () => {
)}
</div>

<div className="flex justify-end flex-row items-center lg:text-base text-sm">
<div className="flex mt-32 justify-end flex-row items-center lg:text-base text-sm">
<button
type="button"
onClick={() => {
Expand Down
4 changes: 2 additions & 2 deletions src/components/Staff/StaffComponents/SDashboard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ const fetchHistoryLoading=useSelector(selectFetchHistoryLoading);
// const durationInMillis = toDate - fromDate;
// const durationInDays = durationInMillis / (1000 * 3600 * 24) + 1;
return (
<div key={leave.id} className='bg-[#e6efe9] font-sans my-4 p-3 rounded-lg flex flex-col '>
<div key={leave.id} className='bg-[#e6eef9] font-sans my-4 p-3 rounded-lg flex flex-col '>
{/* <p className="text-md text-gray-500">{leave.created_at}</p> */}
<p className="text-md ">{leave.description}</p>

Expand Down Expand Up @@ -548,7 +548,7 @@ const fetchHistoryLoading=useSelector(selectFetchHistoryLoading);
hour12: true,
});
return (
<div key={announcement.id} className='bg-[#e6efe9] my-4 p-3 rounded-lg flex flex-col '>
<div key={announcement.id} className='bg-[#e6eef9] my-4 p-3 rounded-lg flex flex-col '>
<h2 className="text-lg font-semibold text-gray-800">{announcement.title}</h2>
<p className="text-gray-600 mt-2">{announcement.description}</p>
<p className="text-sm text-gray-500 mt-1">
Expand Down
1 change: 1 addition & 0 deletions src/redux/slices/HotelDetailsSlice.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export const fetchHotelDetails = createAsyncThunk(
'Authorization': `Bearer ${token}`
}
});
console.log(response.data)
return response.data.hotel_details;
} catch (error) {
return rejectWithValue(error.response.data);
Expand Down
2 changes: 1 addition & 1 deletion src/redux/slices/StaffTaskSlice.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const updateStaffTaskStatus = createAsyncThunk(
async ({ id, status }, { rejectWithValue }) => {
try {
const response = await axios.patch(
`https://hotelcrew-1.onrender.com/api/taskassignment/tasks/staff/${id}/`, // Task ID in the URL
`https://hotelcrew-1.onrender.com/api/taskassignment/tasks/update/${id}/`, // Task ID in the URL
{ status }, // Send status in the request body
{ headers: getAuthHeaders() } // Include Authorization header
);
Expand Down

0 comments on commit 9ced3e9

Please sign in to comment.