견적서 저장
This commit is contained in:
parent
776ddb00e2
commit
5131b0d049
@ -12,7 +12,7 @@ const reducer = (prevState, nextState) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
const ESTIMATE_API_ENDPOINT = '/api/estimates' // API 엔드포인트 정의
|
const ESTIMATE_API_ENDPOINT = '/api/estimate' // API 엔드포인트 정의
|
||||||
|
|
||||||
const defaultEstimateData = {
|
const defaultEstimateData = {
|
||||||
estimateDate: new Date(), //견적일
|
estimateDate: new Date(), //견적일
|
||||||
@ -183,13 +183,17 @@ export const useEstimateController = (planNo) => {
|
|||||||
return alert(getMessage('estimate.detail.save.requiredItem'))
|
return alert(getMessage('estimate.detail.save.requiredItem'))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// console.log('최종 남은 아이템정보:::', estimateData.itemList)
|
||||||
console.log('최종 정보::;', estimateData)
|
console.log('최종 정보::;', estimateData)
|
||||||
console.log('최종 남은 아이템정보:::', estimateData.itemList)
|
//drawingFlg null ????
|
||||||
//2. 상세데이터 저장
|
//2. 상세데이터 저장
|
||||||
// return
|
// return
|
||||||
await promisePost({ url: `${ESTIMATE_API_ENDPOINT}/save-estimate`, data: estimateData }).then((res) => {
|
await promisePost({ url: `${ESTIMATE_API_ENDPOINT}/save-estimate`, data: estimateData }).then((res) => {
|
||||||
if (res) {
|
console.log('res::::::::::::', res)
|
||||||
|
if (res.status === 201) {
|
||||||
|
console.log('201:::::::::')
|
||||||
alert(getMessage('estimate.detail.save.alertMsg'))
|
alert(getMessage('estimate.detail.save.alertMsg'))
|
||||||
|
//어디로 보낼지
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user