Add OtomatikSwitch to AjouteTradiksyon and EkriTeks
This commit is contained in:
@@ -84,6 +84,7 @@ function EkriTeks({selectedTeks, setSelectedTeks}) {
|
||||
const [loading, setLoading] = useState(false)
|
||||
const [currentTeksId, setCurrentTeksId] = useState(null)
|
||||
const [open, setOpen] = useState(false)
|
||||
const [tradiksyonOtomatik, setTradiksyonOtomatik] = useState(false)
|
||||
|
||||
const handleUpdate = useCallback(update => {
|
||||
setTeksEkri({...teksEkri, ...update})
|
||||
@@ -143,7 +144,8 @@ function EkriTeks({selectedTeks, setSelectedTeks}) {
|
||||
italiano: it === '' ? null : it
|
||||
},
|
||||
user,
|
||||
awtis: awtisResponse.data.awtis.map(id => id)
|
||||
awtis: awtisResponse.data.awtis.map(id => id),
|
||||
tradiksyonOtomatik
|
||||
}, {
|
||||
headers
|
||||
})
|
||||
@@ -180,7 +182,8 @@ function EkriTeks({selectedTeks, setSelectedTeks}) {
|
||||
italiano: it === '' ? null : it
|
||||
},
|
||||
user,
|
||||
awtis: [awtisResponse.data._id]
|
||||
awtis: [awtisResponse.data._id],
|
||||
tradiksyonOtomatik
|
||||
}, {
|
||||
headers
|
||||
})
|
||||
@@ -206,6 +209,7 @@ function EkriTeks({selectedTeks, setSelectedTeks}) {
|
||||
setTradiksyon({fr: '', en: '', es: '', de: '', it: ''})
|
||||
setKiChwalang([])
|
||||
setCurrentTeksId(null)
|
||||
setTradiksyonOtomatik(false)
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
@@ -362,7 +366,7 @@ function EkriTeks({selectedTeks, setSelectedTeks}) {
|
||||
</FormControl>
|
||||
))}
|
||||
</form>
|
||||
<AjouteTradiksyon chwaLang={kiChawLang} setChwaLang={setKiChwalang} />
|
||||
<AjouteTradiksyon disableSwitch={tradiksyon.fr === ''} tradiksyonOtomatik={tradiksyonOtomatik} setTradiksyonOtomatik={setTradiksyonOtomatik} canAutoTranslate={user.canAutoTranslate} chwaLang={kiChawLang} setChwaLang={setKiChwalang} />
|
||||
<div>
|
||||
<Button
|
||||
fullWidth
|
||||
|
||||
Reference in New Issue
Block a user