Commit 250c86ea authored by Martin Wortschack's avatar Martin Wortschack

Merge branch 'jivanvl-replace-underscore-lodash-subscriptions' into 'master'

Replace underscore/lodash in subscriptions

Closes #210269

See merge request gitlab-org/gitlab!27444
parents 015cfbc7 f9777d81
<script> <script>
import _ from 'underscore'; import { isEmpty } from 'lodash';
import autofocusonshow from '~/vue_shared/directives/autofocusonshow'; import autofocusonshow from '~/vue_shared/directives/autofocusonshow';
import { mapState, mapActions } from 'vuex'; import { mapState, mapActions } from 'vuex';
import { GlFormGroup, GlFormInput, GlFormSelect } from '@gitlab/ui'; import { GlFormGroup, GlFormInput, GlFormSelect } from '@gitlab/ui';
...@@ -77,10 +77,10 @@ export default { ...@@ -77,10 +77,10 @@ export default {
}, },
isValid() { isValid() {
return ( return (
!_.isEmpty(this.country) && !isEmpty(this.country) &&
!_.isEmpty(this.streetAddressLine1) && !isEmpty(this.streetAddressLine1) &&
!_.isEmpty(this.city) && !isEmpty(this.city) &&
!_.isEmpty(this.zipCode) !isEmpty(this.zipCode)
); );
}, },
countryOptionsWithDefault() { countryOptionsWithDefault() {
......
<script> <script>
import _ from 'underscore'; import { isEmpty } from 'lodash';
import autofocusonshow from '~/vue_shared/directives/autofocusonshow'; import autofocusonshow from '~/vue_shared/directives/autofocusonshow';
import { mapState, mapGetters, mapActions } from 'vuex'; import { mapState, mapGetters, mapActions } from 'vuex';
import { NEW_GROUP } from 'ee/subscriptions/new/constants'; import { NEW_GROUP } from 'ee/subscriptions/new/constants';
...@@ -74,13 +74,13 @@ export default { ...@@ -74,13 +74,13 @@ export default {
isValid() { isValid() {
if (this.isSetupForCompany) { if (this.isSetupForCompany) {
return ( return (
!_.isEmpty(this.selectedPlan) && !isEmpty(this.selectedPlan) &&
(!_.isEmpty(this.organizationName) || this.isGroupSelected) && (!isEmpty(this.organizationName) || this.isGroupSelected) &&
this.numberOfUsers > 0 && this.numberOfUsers > 0 &&
this.numberOfUsers >= this.selectedGroupUsers this.numberOfUsers >= this.selectedGroupUsers
); );
} }
return !_.isEmpty(this.selectedPlan) && this.numberOfUsers === 1; return !isEmpty(this.selectedPlan) && this.numberOfUsers === 1;
}, },
isShowingGroupSelector() { isShowingGroupSelector() {
return !this.isNewUser && this.groupData.length; return !this.isNewUser && this.groupData.length;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment