mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-28 04:01:10 -04:00
fix small issues
This commit is contained in:
@ -745,6 +745,7 @@ export default {
|
|||||||
invalid_url: 'Invalid url (ex: http://www.crater.com)',
|
invalid_url: 'Invalid url (ex: http://www.crater.com)',
|
||||||
required: 'Field is required',
|
required: 'Field is required',
|
||||||
email_incorrect: 'Incorrect Email.',
|
email_incorrect: 'Incorrect Email.',
|
||||||
|
email_already_taken: 'The email has already been taken.',
|
||||||
email_does_not_exist: "User with given email doesn't exist",
|
email_does_not_exist: "User with given email doesn't exist",
|
||||||
send_reset_link: 'Send Reset Link',
|
send_reset_link: 'Send Reset Link',
|
||||||
not_yet: 'Not yet? Send it again',
|
not_yet: 'Not yet? Send it again',
|
||||||
|
|||||||
@ -12,10 +12,15 @@
|
|||||||
focus
|
focus
|
||||||
type="email"
|
type="email"
|
||||||
name="email"
|
name="email"
|
||||||
|
@input="$v.loginData.email.$touch()"
|
||||||
/>
|
/>
|
||||||
<div v-if="$v.loginData.email.$error">
|
<div v-if="$v.loginData.email.$error">
|
||||||
<span v-if="!$v.loginData.email.required" class="text-danger">{{ $tc('validation.required') }}</span>
|
<span v-if="!$v.loginData.email.required" class="text-danger">
|
||||||
<span v-if="!$v.loginData.email.email" class="text-danger"> {{ $tc('validation.email_incorrect') }} </span>
|
{{ $tc('validation.required') }}
|
||||||
|
</span>
|
||||||
|
<span v-if="!$v.loginData.email.email" class="text-danger">
|
||||||
|
{{ $tc('validation.email_incorrect') }}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -25,8 +30,10 @@
|
|||||||
:invalid="$v.loginData.password.$error"
|
:invalid="$v.loginData.password.$error"
|
||||||
type="password"
|
type="password"
|
||||||
name="password"
|
name="password"
|
||||||
|
show-password
|
||||||
|
@input="$v.loginData.password.$touch()"
|
||||||
/>
|
/>
|
||||||
<div v-if="$v.loginData.email.$error">
|
<div v-if="$v.loginData.password.$error">
|
||||||
<span v-if="!$v.loginData.password.required" class="text-danger">{{ $tc('validation.required') }}</span>
|
<span v-if="!$v.loginData.password.required" class="text-danger">{{ $tc('validation.required') }}</span>
|
||||||
<span v-if="!$v.loginData.password.minLength" class="text-danger"> {{ $tc('validation.password_min_length', $v.loginData.password.$params.minLength.min, {count: $v.loginData.password.$params.minLength.min}) }} </span>
|
<span v-if="!$v.loginData.password.minLength" class="text-danger"> {{ $tc('validation.password_min_length', $v.loginData.password.$params.minLength.min, {count: $v.loginData.password.$params.minLength.min}) }} </span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -624,17 +624,20 @@ export default {
|
|||||||
this.isLoading = true
|
this.isLoading = true
|
||||||
this.formData.currency_id = this.currency.id
|
this.formData.currency_id = this.currency.id
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
let response = await this.addCustomer(this.formData)
|
let response = await this.addCustomer(this.formData)
|
||||||
|
if (response.data.success) {
|
||||||
if (response.data.success) {
|
window.toastr['success'](this.$t('customers.created_message'))
|
||||||
window.toastr['success'](this.$t('customers.created_message'))
|
this.$router.push('/admin/customers')
|
||||||
this.$router.push('/admin/customers')
|
this.isLoading = false
|
||||||
this.isLoading = false
|
return true
|
||||||
return true
|
}
|
||||||
|
} catch (err) {
|
||||||
|
if (err.response.data.errors.email) {
|
||||||
|
this.isLoading = false
|
||||||
|
window.toastr['error'](this.$t('validation.email_already_taken'))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
window.toastr['error'](response.data.error)
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async fetchBillingState () {
|
async fetchBillingState () {
|
||||||
|
|||||||
@ -43,6 +43,9 @@
|
|||||||
type="password"
|
type="password"
|
||||||
@input="$v.formData.password.$touch()"
|
@input="$v.formData.password.$touch()"
|
||||||
/>
|
/>
|
||||||
|
<div v-if="$v.formData.password.$error">
|
||||||
|
<span v-if="!$v.formData.password.minLength" class="text-danger"> {{ $tc('validation.password_min_length', $v.formData.password.$params.minLength.min, {count: $v.formData.password.$params.minLength.min}) }} </span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6 mb-4 form-group">
|
<div class="col-md-6 mb-4 form-group">
|
||||||
<label class="input-label">{{ $tc('settings.account_settings.confirm_password') }}</label>
|
<label class="input-label">{{ $tc('settings.account_settings.confirm_password') }}</label>
|
||||||
@ -78,7 +81,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { validationMixin } from 'vuelidate'
|
import { validationMixin } from 'vuelidate'
|
||||||
import { mapActions } from 'vuex'
|
import { mapActions } from 'vuex'
|
||||||
const { required, requiredIf, sameAs, email } = require('vuelidate/lib/validators')
|
const { required, requiredIf, sameAs, email, minLength } = require('vuelidate/lib/validators')
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [validationMixin],
|
mixins: [validationMixin],
|
||||||
@ -103,6 +106,7 @@ export default {
|
|||||||
email
|
email
|
||||||
},
|
},
|
||||||
password: {
|
password: {
|
||||||
|
minLength: minLength(8)
|
||||||
},
|
},
|
||||||
confirm_password: {
|
confirm_password: {
|
||||||
required: requiredIf('isRequired'),
|
required: requiredIf('isRequired'),
|
||||||
|
|||||||
@ -45,6 +45,7 @@
|
|||||||
/>
|
/>
|
||||||
<div v-if="$v.profileData.password.$error">
|
<div v-if="$v.profileData.password.$error">
|
||||||
<span v-if="!$v.profileData.password.required" class="text-danger">{{ $tc('validation.required') }}</span>
|
<span v-if="!$v.profileData.password.required" class="text-danger">{{ $tc('validation.required') }}</span>
|
||||||
|
<span v-if="!$v.profileData.password.minLength" class="text-danger"> {{ $tc('validation.password_min_length', $v.profileData.password.$params.minLength.min, {count: $v.profileData.password.$params.minLength.min}) }} </span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
@ -106,7 +107,8 @@ export default {
|
|||||||
required
|
required
|
||||||
},
|
},
|
||||||
password: {
|
password: {
|
||||||
required
|
required,
|
||||||
|
minLength: minLength(8)
|
||||||
},
|
},
|
||||||
confirm_password: {
|
confirm_password: {
|
||||||
required: requiredIf('isRequired'),
|
required: requiredIf('isRequired'),
|
||||||
|
|||||||
3
resources/assets/sass/pages/wizard.scss
vendored
3
resources/assets/sass/pages/wizard.scss
vendored
@ -98,6 +98,9 @@
|
|||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
height: 21px;
|
height: 21px;
|
||||||
width: 21px;
|
width: 21px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
.icon-check {
|
.icon-check {
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
|
|||||||
Reference in New Issue
Block a user