Skip to content

Commit

Permalink
feat: '발주페이지 품목추가 #19'
Browse files Browse the repository at this point in the history
  • Loading branch information
kaf829 committed Aug 25, 2023
1 parent 1cd8b57 commit 8474785
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 8 deletions.
1 change: 0 additions & 1 deletion frontend/src/redux/slices/porderModalDuck.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const porderModalReducer = createSlice({
reducers: {
open_Modal: (state) => {
state.openModal = true;
console.log('모달오픈()')
},
close_Modal: (state) => {
state.openModal = false;
Expand Down
2 changes: 0 additions & 2 deletions frontend/src/views/dashboard/components/PorderComponents2.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ const PorderComponets2 = () => {
return formattedDate
}
const pOrderitemInsert = () => {
console.log("발주코드" + pOrderCode);
const data = {
itemCode: itemCode,
receiveDeadline: formatDate(selectedDateTime),
Expand Down Expand Up @@ -204,7 +203,6 @@ const PorderComponets2 = () => {
receiveDeadline: formatDate(editReceiveDeadLine),
pOrderPrice: editPOrderItemPrice
}
console.log(pOrderItemStateModifyDto)

axios.patch(`http://localhost:8888/api/porder-item/modify?pOrderItemNo=${pOrderItemNo}`, pOrderItemStateModifyDto)
.then(() => {
Expand Down
6 changes: 1 addition & 5 deletions frontend/src/views/dashboard/components/modal/PorderModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ const PorderModal = () => {
pOrderDate: formatDate(new Date()),
manager: manageName,
}
console.log("피오더데이트" + saveData.pOrderDate);
console.log("pOrderComponent2" + JSON.stringify(saveData))
itemAddAxios(saveData);
dispatch(close_Modal());//위에 dispatch를 사용하면 지워야함
setSelectedItems([]);
Expand All @@ -119,7 +117,6 @@ const PorderModal = () => {
const handleRowClick = (clickedItem) => {
// 이미 선택된 로우는 중복 추가하지 않습니다.
if (!selectedItems.some(item => item.itemCode === clickedItem.itemCode)) {
console.log(clickedItem)
const newItem = {
itemCode: clickedItem.itemCode,
pOrderCount: '0', // 초기에는 수량을 0으로 설정합니다.
Expand All @@ -142,7 +139,7 @@ const PorderModal = () => {
const newData = prevData.map((item) =>
item.itemCode === editedData.itemCode ? { ...item, pOrderCount: editedData.pOrderCount, pOrderPrice: editedData.pOrderPrice } : item
);
console.log(newData);


return newData;
});
Expand Down Expand Up @@ -180,7 +177,6 @@ const PorderModal = () => {
const formattedDate = format(receiveDeadline, 'yyyy-MM-dd HH:mm:ss'); // "yyyy-MM-dd HH:mm:ss" 형식으로 변환
setSelectedItems(prevItems => {
const updatedItems = [...prevItems];
console.log("Formatted Date:", formattedDate);
updatedItems[index].receiveDeadline = formattedDate;
return updatedItems;
});
Expand Down

0 comments on commit 8474785

Please sign in to comment.