Add new variables/data for Vue in Administration

Hi :slight_smile:

I’ve added a new e-mail field to the customer via an entity extension.
The new field is added via the file /var/www/html/custom/plugins/MyPlugin/src/Resources/app/administration/src/module/extension/sw-customer/component/sw-customer-card/sw-customer-card.html.twig
And in the original file there is the original e-mail field:

<sw-email-field
                            v-else
                            v-model="customer.email"
                            validation="required"
                            required
                            :label="$tc('sw-customer.card.labelEmail')"
                            :placeholder="$tc('sw-customer.card.placeholderEmail')"
                            :error="customerEmailError"
                        />

I now want to add my own variable for the error line for the new field

 :error="customerEmailError"

But how can I do that?
I’ve found out that the original variable „customerEmailError“ is defined in the file /var/www/html/vendor/shopware/administration/Resources/app/administration/src/module/sw-customer/page/sw-customer-detail/index.js
So I’ve tried it like this:

import template from './sw-customer-detail.html.twig'

Shopware.Component.override('sw-customer-detail', {
    template,
    data() {
        return {
            errorAdditionalEmailCustomer: null
        };
    }
})

But my variable „errorAdditionalEmailCustomer“ is not defined in the template of the new field. I’ve also overridden the onSave method to add validation for my new field which is working. So I’m sure the file is loaded. Using a computed property is also not working.

Any ideas how to solve that?

Or is there a way to view available Vue variables in the administration? The browser plugin is not working /: