Skip to content

Commit

Permalink
Merge pull request #66 from PLADI-ALM/feat/PDW-42-admin-resource-booking
Browse files Browse the repository at this point in the history
[PDW-42] fix: UI 일부 수정
  • Loading branch information
ryr0121 authored Oct 11, 2023
2 parents 2d3dcb0 + 812dc11 commit 8b582d6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 31 deletions.
1 change: 1 addition & 0 deletions src/components/officeBooking/BookingTimeBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ var endT = -1;

export const BookingContentContainer = styled.div`
margin-left: 40px;
padding-top: 40px;
display: flex;
`

Expand Down
14 changes: 3 additions & 11 deletions src/pages/booking/officeBooking/OfficeBooking.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,7 @@ function OfficeBooking(props) {
.then((Response) => {
setBookingState(Response.data.data.bookedTimes)
})
.catch((Error) => {
console.log(Error)
window.alert("정보를 불러올 수 없습니댜.")
window.history.back()
});
.catch((Error)=>{ basicError(Error) });
};

const getOfficeInfoForBooking = (id) => {
Expand All @@ -106,11 +102,7 @@ function OfficeBooking(props) {
console.log(Response.data.data)
setOfficeInfo(Response.data.data)
})
.catch((Error) => {
console.log(Error)
window.alert("정보를 불러올 수 없습니댜.")
window.history.back()
});
.catch((Error)=>{ basicError(Error) });
};

useEffect(() => {
Expand Down Expand Up @@ -208,7 +200,7 @@ function requestBooking(bookingPurpose, startT, endT) {
if (response.data.status === '200') { alert('예약에 성공하였습니다!') }
else { alert(response.data.message); }
})
.catch(function (error) { console.log(error) });
.catch((Error)=>{ basicError(Error) });
}
}
export { requestBooking };
12 changes: 2 additions & 10 deletions src/pages/booking/officeBooking/OfficeBookingCheck.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,7 @@ function OfficeBookingCheck(props) {
getOfficeInfo(officeId)
setBookingTime(Response.data.data.startTime, Response.data.data.endTime)
})
.catch((Error) => {
console.log('Error -> ', Error)
window.alert("예약 정보를 불러올 수 없습니댜.")
window.history.back()
});
.catch((Error)=>{ basicError(Error) });
};

const getOfficeInfo = (id) => {
Expand All @@ -64,11 +60,7 @@ function OfficeBookingCheck(props) {
console.log(Response.data.data)
setOfficeInfo(Response.data.data)
})
.catch((Error) => {
console.log(Error)
window.alert("정보를 불러올 수 없습니댜.")
window.history.back()
});
.catch((Error)=>{ basicError(Error) });
};

useEffect(() => {
Expand Down
13 changes: 3 additions & 10 deletions src/pages/booking/resourceBooking/ResourceBookingCheck.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { findStatus } from 'constants/BookingStatus';
import { RightContainer, WhiteContainer } from 'components/rightContainer/RightContainer';
import { TitleText, BookingDateText, PurposeTextarea } from './ResourceBooking';
import { getToken } from 'utils/IsLoginUtil';
import { basicError } from 'utils/ErrorHandlerUtil';

const MyStatusContainer = styled(StatusContainer)`
margin-top: 12px;
Expand All @@ -38,11 +39,7 @@ function ResourceBookingCheck(props) {
const getResourceInfo = () => {
ResourcesAxios.get(`/${resourceId}`)
.then((Response)=>{ setResourceInfo(Response.data.data) })
.catch((Error)=>{
console.log(Error)
window.alert("자원 정보를 불러올 수 없습니댜.")
window.history.back()
});
.catch((Error)=>{ basicError(Error) });
};
const getBookingInfo = () => {
(props.isAdmin
Expand All @@ -58,11 +55,7 @@ function ResourceBookingCheck(props) {
resourceId = Response.data.data.resourceId
getResourceInfo(resourceId)
})
.catch((Error)=>{
console.log('Error -> ', Error)
window.alert("자원 예약 정보를 불러올 수 없습니댜.")
window.history.back()
});
.catch((Error)=>{ basicError(Error) });
};

useEffect(() => {
Expand Down

0 comments on commit 8b582d6

Please sign in to comment.