fix mac addr parsing

This commit is contained in:
2025-12-05 10:10:10 +01:00
parent 778bdc94d9
commit f1533b8a0b

View File

@@ -378,7 +378,8 @@ Vue.component('Cpeprovisioning', {
handleMacInput(item, val) {
if (val !== undefined) {
item.cpe_data.mac = val;
// Fix encoding issue: replace ß (scharfes s) with - before processing
item.cpe_data.mac = val.replace(/ß/g, '-');
}
const itemKey = item.orderproduct_id;
@@ -414,11 +415,17 @@ Vue.component('Cpeprovisioning', {
},
processMacAddress(item) {
const inputValue = item.cpe_data.mac;
let inputValue = item.cpe_data.mac;
const routerType = item.cpe_data.routertype;
if (!inputValue) return;
// Fix encoding issue: replace ß (scharfes s) with - before processing
if (inputValue.includes('ß')) {
inputValue = inputValue.replace(/ß/g, '-');
this.$set(item.cpe_data, 'mac', inputValue); // Update field with corrected value
}
// Only process QR codes for FritzBox 4050 and 7690
if (routerType === 'FritzBox 4050' || routerType === 'FritzBox 7690') {
const parsedMac = this.parseMacFromQrCode(inputValue);