Merge pull request 'them thong bao khi import anh sai' (#5) from feature/import-img into dev

Reviewed-on: huyt/fsi_project#5
This commit is contained in:
huyt 2022-01-12 08:35:44 +00:00
commit 2b8ec4f708

View File

@ -105,8 +105,8 @@ const Modaledit = (props) => {
setCrrData({...crrData, _id: result.data.data})
setDisableBtn(false)
}
} else if (result.data.status === 10004) {
swal("Thất bại", "Sửa thông tin thất bại!", "error");
} else if (result.data.status === 10002) {
swal("Thất bại", "Lỗi hệ thống!", "error");
} else {
swal("Thất bại", "Sửa thông tin thất bại!", "error");
}
@ -174,6 +174,12 @@ const Modaledit = (props) => {
listImg.unshift(data.data.toString())
setCrrImages(listImg)
setCheckDeleteMulti(false)
} else if (data.status === 10003) {
if (data.message === "Too many face in image") {
swal("Thất bại", "Ảnh có nhiều khuôn mặt!", "error");
} else {
swal("Thất bại", "Ảnh không hợp lệ", "error");
}
}
})
}