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