@ecomplus/storefront-components 1.0.0-beta.173 → 1.0.0-beta.175
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/js/LoginBlock.js
CHANGED
|
@@ -78,7 +78,9 @@ export default {
|
|
|
78
78
|
getCustomer().main_email === this.email
|
|
79
79
|
if (isIdentified) {
|
|
80
80
|
this.$nextTick(() => {
|
|
81
|
-
this.$refs.InputDoc
|
|
81
|
+
if (this.$refs.InputDoc) {
|
|
82
|
+
this.$refs.InputDoc.$el.focus()
|
|
83
|
+
}
|
|
82
84
|
})
|
|
83
85
|
}
|
|
84
86
|
return isIdentified
|
|
@@ -174,6 +176,9 @@ export default {
|
|
|
174
176
|
const customer = getCustomer()
|
|
175
177
|
this.email = customer.main_email
|
|
176
178
|
this.isCompany = customer.registry_type === 'j'
|
|
179
|
+
if (customer._id && customer.doc_number) {
|
|
180
|
+
this.$emit('login', this.ecomPassport)
|
|
181
|
+
}
|
|
177
182
|
}
|
|
178
183
|
}
|
|
179
184
|
ecomPassport.on('login', () => {
|
package/src/js/TheAccount.js
CHANGED
|
@@ -40,6 +40,12 @@ export default {
|
|
|
40
40
|
return ['orders', 'favorites', 'subscriptions', 'points', 'account'].includes(value)
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
|
+
isExternalAuth: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default () {
|
|
46
|
+
return Boolean(window.$firebaseConfig && window.$firebaseConfig.authDomain)
|
|
47
|
+
}
|
|
48
|
+
},
|
|
43
49
|
ecomPassport: {
|
|
44
50
|
type: Object,
|
|
45
51
|
default () {
|
|
@@ -143,6 +149,10 @@ export default {
|
|
|
143
149
|
},
|
|
144
150
|
|
|
145
151
|
created () {
|
|
152
|
+
if (this.isExternalAuth && !this.ecomPassport.checkAuthorization()) {
|
|
153
|
+
window.location.href = '/app/account'
|
|
154
|
+
return
|
|
155
|
+
}
|
|
146
156
|
this.navTabs = [
|
|
147
157
|
{
|
|
148
158
|
label: this.i19registration,
|