chore: remove 19 debug console.log statements (F4.2)
Remove all console.log/warn/debug/info from production code across 6 files. Keep console.error for legitimate error handling (72 instances). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -12,7 +12,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, onMounted, watch } from 'vue'
|
import { computed, onMounted } from 'vue'
|
||||||
import RequirementListEditor from '~/components/common/RequirementListEditor.vue'
|
import RequirementListEditor from '~/components/common/RequirementListEditor.vue'
|
||||||
import { usePieceTypes } from '~/composables/usePieceTypes'
|
import { usePieceTypes } from '~/composables/usePieceTypes'
|
||||||
|
|
||||||
@@ -91,11 +91,5 @@ onMounted(async () => {
|
|||||||
if (!pieceTypes.value.length) {
|
if (!pieceTypes.value.length) {
|
||||||
await loadPieceTypes()
|
await loadPieceTypes()
|
||||||
}
|
}
|
||||||
console.log('[PieceRequirementsSection] pieceTypes loaded:', pieceTypes.value.map(t => ({ id: t.id, name: t.name })))
|
|
||||||
console.log('[PieceRequirementsSection] requirements on mount:', props.modelValue.map(r => ({ id: r.id, typePieceId: r.typePieceId })))
|
|
||||||
})
|
})
|
||||||
|
|
||||||
watch(() => props.modelValue, (newVal) => {
|
|
||||||
console.log('[PieceRequirementsSection] requirements updated:', newVal.map(r => ({ id: r.id, typePieceId: r.typePieceId })))
|
|
||||||
}, { deep: true })
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -184,8 +184,7 @@ watch(
|
|||||||
|
|
||||||
watch(
|
watch(
|
||||||
baseOptions,
|
baseOptions,
|
||||||
(newOptions) => {
|
(_newOptions) => {
|
||||||
console.log('[SearchSelect] baseOptions changed, count:', newOptions.length, 'modelValue:', props.modelValue, 'selectedOption:', selectedOption.value?.id)
|
|
||||||
if (!openDropdown.value && selectedOption.value) {
|
if (!openDropdown.value && selectedOption.value) {
|
||||||
searchTerm.value = resolveLabel(selectedOption.value)
|
searchTerm.value = resolveLabel(selectedOption.value)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -185,25 +185,16 @@ const toDisplayCount = (value, fallback) => {
|
|||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
try {
|
try {
|
||||||
const typeId = route.params.id
|
const typeId = route.params.id
|
||||||
console.log('=== TYPE DETAIL PAGE LOADING ===')
|
|
||||||
console.log('Loading type with ID:', typeId)
|
|
||||||
console.log('Full route params:', route.params)
|
|
||||||
|
|
||||||
if (!typeId) {
|
if (!typeId) {
|
||||||
console.error('No type ID provided in route')
|
|
||||||
showError('Aucun identifiant de type fourni')
|
showError('Aucun identifiant de type fourni')
|
||||||
loading.value = false
|
loading.value = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const result = await getMachineTypeById(typeId)
|
const result = await getMachineTypeById(typeId)
|
||||||
console.log('API Result:', result)
|
|
||||||
|
|
||||||
if (result.success) {
|
if (result.success) {
|
||||||
type.value = result.data
|
type.value = result.data
|
||||||
console.log('Type loaded successfully:', type.value)
|
|
||||||
} else {
|
} else {
|
||||||
console.error('Failed to load type:', result.error)
|
|
||||||
showError('Type non trouvé')
|
showError('Type non trouvé')
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -211,7 +202,6 @@ onMounted(async () => {
|
|||||||
showError('Erreur lors du chargement')
|
showError('Erreur lors du chargement')
|
||||||
} finally {
|
} finally {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
console.log('Loading finished, loading.value:', loading.value)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -206,15 +206,9 @@ const saveChanges = async () => {
|
|||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
try {
|
try {
|
||||||
const typeId = route.params.id
|
const typeId = route.params.id
|
||||||
console.log('=== EDIT TYPE PAGE LOADING ===')
|
|
||||||
console.log('Loading type with ID:', typeId)
|
|
||||||
|
|
||||||
const result = await getMachineTypeById(typeId, true)
|
const result = await getMachineTypeById(typeId, true)
|
||||||
console.log('API Result:', result)
|
|
||||||
|
|
||||||
if (result.success) {
|
if (result.success) {
|
||||||
type.value = result.data
|
type.value = result.data
|
||||||
console.log('Type loaded successfully:', type.value)
|
|
||||||
|
|
||||||
// Initialiser les données éditées
|
// Initialiser les données éditées
|
||||||
editedType.value = {
|
editedType.value = {
|
||||||
@@ -236,7 +230,6 @@ onMounted(async () => {
|
|||||||
showError('Erreur lors du chargement')
|
showError('Erreur lors du chargement')
|
||||||
} finally {
|
} finally {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
console.log('Loading finished, loading.value:', loading.value)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user