견적서 저장 필수값 null체크 추가
This commit is contained in:
parent
bf00ba46fc
commit
c464f1ec3e
@ -1128,7 +1128,7 @@ export default function Estimate({ params }) {
|
|||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
id="next"
|
id="next"
|
||||||
checked={estimateContextState?.fileFlg === '0' ? false : true}
|
checked={estimateContextState?.fileFlg === '0' || estimateContextState?.fileFlg === null ? false : true}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
setEstimateContextState({
|
setEstimateContextState({
|
||||||
fileFlg: e.target.checked ? '1' : '0',
|
fileFlg: e.target.checked ? '1' : '0',
|
||||||
|
|||||||
@ -148,12 +148,12 @@ export const useEstimateController = (planNo) => {
|
|||||||
let originFileFlg = false
|
let originFileFlg = false
|
||||||
let fileFlg = true
|
let fileFlg = true
|
||||||
let itemFlg = true
|
let itemFlg = true
|
||||||
if (estimateData.charger.trim().length === 0) {
|
if (estimateData?.charger === null || estimateData?.charger?.trim().length === 0) {
|
||||||
flag = false
|
flag = false
|
||||||
return alert(getMessage('estimate.detail.save.requiredCharger'))
|
return alert(getMessage('estimate.detail.save.requiredCharger'))
|
||||||
}
|
}
|
||||||
|
|
||||||
if (estimateData.objectName.trim().length === 0) {
|
if (estimateData?.objectName === null || estimateData?.objectName?.trim().length === 0) {
|
||||||
flag = false
|
flag = false
|
||||||
return alert(getMessage('estimate.detail.save.requiredObjectName'))
|
return alert(getMessage('estimate.detail.save.requiredObjectName'))
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user