Changeset View
Changeset View
Standalone View
Standalone View
src/resources/js/app.js
Show First 20 Lines • Show All 84 Lines • ▼ Show 20 Lines | methods: { | ||||
// Clear (bootstrap) form validation state | // Clear (bootstrap) form validation state | ||||
clearFormValidation(form) { | clearFormValidation(form) { | ||||
$(form).find('.is-invalid').removeClass('is-invalid') | $(form).find('.is-invalid').removeClass('is-invalid') | ||||
$(form).find('.invalid-feedback').remove() | $(form).find('.invalid-feedback').remove() | ||||
}, | }, | ||||
hasRoute(name) { | hasRoute(name) { | ||||
return this.$router.resolve({ name: name }).resolved.matched.length > 0 | return this.$router.resolve({ name: name }).resolved.matched.length > 0 | ||||
}, | }, | ||||
hasBeta(name) { | hasSKU(name) { | ||||
const authInfo = store.state.authInfo | const authInfo = store.state.authInfo | ||||
return authInfo.statusInfo.betaSKUs && authInfo.statusInfo.betaSKUs.indexOf(name) != -1 | return authInfo.statusInfo.skus && authInfo.statusInfo.skus.indexOf(name) != -1 | ||||
}, | }, | ||||
isController(wallet_id) { | isController(wallet_id) { | ||||
if (wallet_id && store.state.authInfo) { | if (wallet_id && store.state.authInfo) { | ||||
let i | let i | ||||
for (i = 0; i < store.state.authInfo.wallets.length; i++) { | for (i = 0; i < store.state.authInfo.wallets.length; i++) { | ||||
if (wallet_id == store.state.authInfo.wallets[i].id) { | if (wallet_id == store.state.authInfo.wallets[i].id) { | ||||
return true | return true | ||||
} | } | ||||
▲ Show 20 Lines • Show All 366 Lines • Show Last 20 Lines |