-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from td1128/main
updating branch hatif to main
- Loading branch information
Showing
99 changed files
with
4,337 additions
and
4,138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
VITE_APP_API_URL=https://library-management-system-ce6z.onrender.com | ||
VITE_APP_COMMON_PATH="api/common" | ||
VITE_APP_ADMIN_PATH="api/admin" | ||
VITE_APP_USER_PATH="api/user" | ||
VITE_APP_USER_ROOT_URL=https://library-management-system-f9gh.onrender.com/api/user | ||
VITE_APP_GET_USER_DETAILS=profile/ | ||
VITE_APP_USER_ROOT_URL_2=https://library-management-system-ce6z.onrender.com/api/user |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,42 @@ | ||
#root { | ||
display: flex; | ||
flex-direction: column; | ||
flex-grow: 1; | ||
width: fit-content; | ||
} | ||
|
||
/*.logo { | ||
height: 6em; | ||
padding: 1.5em; | ||
will-change: filter; | ||
transition: filter 300ms; | ||
} | ||
.logo:hover { | ||
filter: drop-shadow(0 0 2em #646cffaa); | ||
} | ||
.logo.react:hover { | ||
filter: drop-shadow(0 0 2em #61dafbaa); | ||
} | ||
@keyframes logo-spin { | ||
from { | ||
transform: rotate(0deg); | ||
} | ||
to { | ||
transform: rotate(360deg); | ||
} | ||
} | ||
@media (prefers-reduced-motion: no-preference) { | ||
a:nth-of-type(2) .logo { | ||
animation: logo-spin infinite 20s linear; | ||
} | ||
} | ||
.card { | ||
padding: 2em; | ||
} | ||
.read-the-docs { | ||
color: #888; | ||
}*/ | ||
#root { | ||
display: flex; | ||
flex-direction: column; | ||
flex-grow: 1; | ||
/* width: fit-content; */ | ||
} | ||
|
||
/*.logo { | ||
height: 6em; | ||
padding: 1.5em; | ||
will-change: filter; | ||
transition: filter 300ms; | ||
} | ||
.logo:hover { | ||
filter: drop-shadow(0 0 2em #646cffaa); | ||
} | ||
.logo.react:hover { | ||
filter: drop-shadow(0 0 2em #61dafbaa); | ||
} | ||
@keyframes logo-spin { | ||
from { | ||
transform: rotate(0deg); | ||
} | ||
to { | ||
transform: rotate(360deg); | ||
} | ||
} | ||
@media (prefers-reduced-motion: no-preference) { | ||
a:nth-of-type(2) .logo { | ||
animation: logo-spin infinite 20s linear; | ||
} | ||
} | ||
.card { | ||
padding: 2em; | ||
} | ||
.read-the-docs { | ||
color: #888; | ||
}*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import axios from 'axios'; | ||
|
||
const fetchUserDetails = async ( studentID ) => { | ||
const userRootUrl = import.meta.env.VITE_APP_USER_ROOT_URL; | ||
const getUserDetails = import.meta.env.VITE_APP_GET_USER_DETAILS; | ||
|
||
try { | ||
const response = await axios.get( `${userRootUrl}/${getUserDetails}/${studentID}` ); | ||
console.log( response ) | ||
return response.data; | ||
} catch ( error ) { | ||
console.log( error.message ); | ||
} | ||
} | ||
|
||
export default fetchUserDetails; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import axios from 'axios'; | ||
|
||
const fetchWishListBook = async ( memberId ) => { | ||
const rootUrl = import.meta.env.VITE_APP_API_URL; | ||
console.log("app url at api: ",rootUrl); | ||
|
||
try { | ||
const response = await axios.get( `${rootUrl}/api/user/myBooks/wishlist/memberId/${memberId}` ); | ||
console.log("response at api call of fetch wishlisted books: ", response ) | ||
return response.data; | ||
} catch ( error ) { | ||
console.log( error.message ); | ||
} | ||
} | ||
|
||
export default fetchWishListBook; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import axios from 'axios'; | ||
|
||
const getLibraryCards = async ( membershipId ) => { | ||
const userRootUrl = import.meta.env.VITE_APP_USER_ROOT_URL_2; | ||
const getLibraryCardsUrl = import.meta.env.VITE_APP_GET_LIBRARY_CARDS; | ||
|
||
try { | ||
const response = await axios.get( `${ userRootUrl }/${ getLibraryCardsUrl }/${ membershipId }` ); | ||
return response.data; | ||
} catch (error) { | ||
if (error.response) { | ||
console.error('Error response:', error.response.data); | ||
throw new Error(error.response.data.message || 'Error getting the library cards'); | ||
} else if (error.request) { | ||
console.error('Error request:', error.request); | ||
throw new Error('No response received while getting the library cards'); | ||
} else { | ||
console.error('Error message:', error.message); | ||
throw new Error(error.message || 'Error getting the library cards'); | ||
} | ||
} | ||
} | ||
|
||
export default getLibraryCards; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,7 @@ | ||
import axios from 'axios'; | ||
|
||
const fetchUserDetails = async ( studentID ) => { | ||
const userRootUrl = import.meta.env.VITE_APP_USER_ROOT_URL; | ||
const getUserDetails = import.meta.env.VITE_APP_GET_USER_DETAILS; | ||
|
||
const res = await axios.get( `${userRootUrl}/${getUserDetails}/${studentID}` ); | ||
console.log( res ) | ||
return res.data; | ||
} | ||
|
||
export { fetchUserDetails }; | ||
import fetchUserDetails from "./fetchUserDetails"; | ||
import updateUserDetails from "./updateUserDetails"; | ||
import updateFavSubject from "./updateFavSubject"; | ||
import getLibraryCards from "./getLibraryCards"; | ||
import fetchWishListBook from "./fetchWishListBook"; | ||
|
||
export { fetchUserDetails, updateUserDetails, updateFavSubject, getLibraryCards, fetchWishListBook }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import axios from 'axios'; | ||
|
||
const updateFavSubject = async (membershipId, subjects) => { | ||
const userRootUrl = import.meta.env.VITE_APP_USER_ROOT_URL_2; | ||
const addSubUrl = import.meta.env.VITE_APP_UPDATE_USER_SUBJECT; | ||
|
||
try { | ||
const response = await axios.put(`${userRootUrl}/${addSubUrl}/${membershipId}`, { sub_list: subjects }); | ||
return response.data; | ||
} catch (error) { | ||
if (error.response) { | ||
console.error('Error response:', error.response.data); | ||
throw new Error(error.response.data.message || 'Error updating favorite subjects'); | ||
} else if (error.request) { | ||
console.error('Error request:', error.request); | ||
throw new Error('No response received while updating favorite subjects'); | ||
} else { | ||
console.error('Error message:', error.message); | ||
throw new Error(error.message || 'Error updating favorite subjects'); | ||
} | ||
} | ||
}; | ||
|
||
export default updateFavSubject; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import axios from 'axios'; | ||
|
||
const updateUserDetails = async ( studentDetails ) => { | ||
const userRootUrl = import.meta.env.VITE_APP_USER_ROOT_URL; | ||
const updateUrl = import.meta.env.VITE_APP_UPDATE_USER_DETAILS; | ||
|
||
try { | ||
const response = await axios.put( `${ userRootUrl }/${ updateUrl }`, studentDetails ); | ||
console.log( response ); | ||
} catch ( error ) { | ||
console.log( error.message ); | ||
} | ||
} | ||
|
||
export default updateUserDetails; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
import { configureStore } from '@reduxjs/toolkit'; | ||
import { statsReducer, searchBookReducer } from '../features'; | ||
import RelatedBookReducer from '../features/relatedBoolReducer/RelatedBookReducer'; | ||
|
||
export const store = configureStore({ | ||
reducer: { | ||
stats: statsReducer, | ||
relatedBookList: RelatedBookReducer, | ||
searchBookList: searchBookReducer, | ||
}, | ||
}); | ||
import { configureStore } from '@reduxjs/toolkit'; | ||
import { statsReducer, searchBookReducer, userSliceReducer,recomendedBookReducer } from '../features'; | ||
import RelatedBookReducer from '../features/relatedBoolReducer/RelatedBookReducer'; | ||
import ShowOverlayReducer from '../features/showOverlayReducer/ShowOverlayReducer' | ||
|
||
export const store = configureStore({ | ||
reducer: { | ||
user: userSliceReducer, | ||
stats: statsReducer, | ||
relatedBookList: RelatedBookReducer, | ||
recomendedBookList:recomendedBookReducer, | ||
searchBookList: searchBookReducer, | ||
showOverlay:ShowOverlayReducer, | ||
}, | ||
}); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +0,0 @@ | ||
.horizontal-scroll-container { | ||
overflow-x: auto; | ||
margin-bottom: 15px; | ||
position: relative; | ||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
.navbar { | ||
@apply flex flex-col justify-start bg-gray-200 ml-4 mr-10 mb-8 pt-4 w-40 rounded-md text-base; | ||
} | ||
|
||
.navbar_title { | ||
@apply text-2xl font-bold whitespace-nowrap; | ||
color: #666666 | ||
} | ||
.navbar { | ||
@apply flex flex-col justify-start bg-gray-200 ml-4 mr-10 mb-8 pt-4 w-40 rounded-md text-base; | ||
} | ||
|
||
.navbar_title { | ||
@apply text-2xl font-bold whitespace-nowrap; | ||
color: #666666 | ||
} |
Oops, something went wrong.