mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-27 19:51:09 -04:00
merge master
This commit is contained in:
@ -307,7 +307,9 @@ export default {
|
||||
send_invoice: 'Send Invoice',
|
||||
invoice_template: 'Invoice Template',
|
||||
template: 'Template',
|
||||
mark_as_sent: 'Mark as Sent',
|
||||
mark_as_sent: 'Mark as sent',
|
||||
invoice_mark_as_sent: 'This invoice will be marked as sent',
|
||||
confirm_send: 'This invoice will be sent via email to the customer',
|
||||
invoice_date: 'Invoice Date',
|
||||
record_payment: 'Record Payment',
|
||||
add_new_invoice: 'Add New Invoice',
|
||||
@ -751,6 +753,7 @@ export default {
|
||||
invalid_url: 'Invalid url (ex: http://www.crater.com)',
|
||||
required: 'Field is required',
|
||||
email_incorrect: 'Incorrect Email.',
|
||||
email_already_taken: 'The email has already been taken.',
|
||||
email_does_not_exist: "User with given email doesn't exist",
|
||||
send_reset_link: 'Send Reset Link',
|
||||
not_yet: 'Not yet? Send it again',
|
||||
@ -767,9 +770,9 @@ export default {
|
||||
payment_greater_than_due_amount: 'Entered Payment is more than due amount of this invoice.',
|
||||
quantity_maxlength: 'Quantity should not be greater than 10 digits.',
|
||||
price_maxlength: 'Price should not be greater than 10 digits.',
|
||||
price_minvalue: 'Price should be greater than 0 digits',
|
||||
price_minvalue: 'Price should be greater than 0.',
|
||||
amount_maxlength: 'Amount should not be greater than 10 digits.',
|
||||
amount_minvalue: 'Amount should be greater than 0 digits',
|
||||
amount_minvalue: 'Amount should be greater than 0.',
|
||||
description_maxlength: 'Description should not be greater than 255 characters.',
|
||||
maximum_options_error: 'Maximum of {max} options selected. First remove a selected option to select another.',
|
||||
notes_maxlength: 'Notes should not be greater than 255 characters.',
|
||||
|
||||
@ -312,6 +312,8 @@ export default {
|
||||
invoice_template: 'Plantilla de factura',
|
||||
template: 'Modelo',
|
||||
mark_as_sent: 'Marcar como enviado',
|
||||
invoice_mark_as_sent: 'Esta factura se marcará como enviada',
|
||||
confirm_send: 'Estas facturas se enviarán por correo electrónico al cliente.',
|
||||
invoice_date: 'Fecha de la factura',
|
||||
record_payment: 'Registro de pago',
|
||||
add_new_invoice: 'Añadir nueva factura',
|
||||
|
||||
@ -312,6 +312,8 @@ export default {
|
||||
invoice_template: 'Modèle de facture',
|
||||
template: 'Modèle',
|
||||
mark_as_sent: 'Marquer comme envoyé',
|
||||
invoice_mark_as_sent: 'Cette facture sera marquée comme envoyé',
|
||||
confirm_send: 'Cette facture sera envoyée par courrier électronique au client.',
|
||||
invoice_date: 'Date de facturation',
|
||||
record_payment: 'Record de paiement',
|
||||
add_new_invoice: 'Ajouter une nouvelle facture',
|
||||
|
||||
@ -12,10 +12,15 @@
|
||||
focus
|
||||
type="email"
|
||||
name="email"
|
||||
@input="$v.loginData.email.$touch()"
|
||||
/>
|
||||
<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.email" class="text-danger"> {{ $tc('validation.email_incorrect') }} </span>
|
||||
<span v-if="!$v.loginData.email.required" class="text-danger">
|
||||
{{ $tc('validation.required') }}
|
||||
</span>
|
||||
<span v-if="!$v.loginData.email.email" class="text-danger">
|
||||
{{ $tc('validation.email_incorrect') }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@ -25,8 +30,10 @@
|
||||
:invalid="$v.loginData.password.$error"
|
||||
type="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.minLength" class="text-danger"> {{ $tc('validation.password_min_length', $v.loginData.password.$params.minLength.min, {count: $v.loginData.password.$params.minLength.min}) }} </span>
|
||||
</div>
|
||||
|
||||
@ -219,7 +219,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<hr> <!-- second row complete -->
|
||||
<div class="row same-address-checkbox-container">
|
||||
<div class="same-address-checkbox-container">
|
||||
<div class="p-1">
|
||||
<base-button ref="sameAddress" icon="copy" color="theme" class="btn-sm" @click="copyAddress(true)">
|
||||
{{ $t('customers.copy_billing_address') }}
|
||||
@ -624,17 +624,20 @@ export default {
|
||||
this.isLoading = true
|
||||
this.formData.currency_id = this.currency.id
|
||||
}
|
||||
|
||||
let response = await this.addCustomer(this.formData)
|
||||
|
||||
if (response.data.success) {
|
||||
window.toastr['success'](this.$t('customers.created_message'))
|
||||
this.$router.push('/admin/customers')
|
||||
this.isLoading = false
|
||||
return true
|
||||
try {
|
||||
let response = await this.addCustomer(this.formData)
|
||||
if (response.data.success) {
|
||||
window.toastr['success'](this.$t('customers.created_message'))
|
||||
this.$router.push('/admin/customers')
|
||||
this.isLoading = false
|
||||
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 () {
|
||||
|
||||
@ -247,13 +247,13 @@
|
||||
{{ $t('invoices.view') }}
|
||||
</router-link>
|
||||
</v-dropdown-item>
|
||||
<v-dropdown-item>
|
||||
<v-dropdown-item v-if="row.status == 'DRAFT'">
|
||||
<a class="dropdown-item" href="#" @click="sendInvoice(row.id)" >
|
||||
<font-awesome-icon icon="paper-plane" class="dropdown-item-icon" />
|
||||
{{ $t('invoices.send_invoice') }}
|
||||
</a>
|
||||
</v-dropdown-item>
|
||||
<v-dropdown-item v-if="row.status === 'DRAFT'">
|
||||
<v-dropdown-item v-if="row.status == 'DRAFT'">
|
||||
<a class="dropdown-item" href="#" @click="sentInvoice(row.id)">
|
||||
<font-awesome-icon icon="check-circle" class="dropdown-item-icon" />
|
||||
{{ $t('invoices.mark_as_sent') }}
|
||||
@ -384,24 +384,44 @@ export default {
|
||||
'fetchCustomers'
|
||||
]),
|
||||
async sendInvoice (id) {
|
||||
const data = {
|
||||
id: id
|
||||
}
|
||||
let response = await this.sendEmail(data)
|
||||
this.refreshTable()
|
||||
if (response.data) {
|
||||
window.toastr['success'](this.$tc('invoices.send_invoice'))
|
||||
}
|
||||
swal({
|
||||
title: this.$t('general.are_you_sure'),
|
||||
text: this.$t('invoices.confirm_send'),
|
||||
icon: '/assets/icon/paper-plane-solid.svg',
|
||||
buttons: true,
|
||||
dangerMode: true
|
||||
}).then(async (Send_Invoice) => {
|
||||
if (Send_Invoice) {
|
||||
const data = {
|
||||
id: id
|
||||
}
|
||||
let response = await this.sendEmail(data)
|
||||
this.refreshTable()
|
||||
if (response.data) {
|
||||
window.toastr['success'](this.$tc('invoices.send_invoice'))
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
async sentInvoice (id) {
|
||||
const data = {
|
||||
id: id
|
||||
}
|
||||
let response = await this.markAsSent(data)
|
||||
this.refreshTable()
|
||||
if (response.data) {
|
||||
window.toastr['success'](this.$tc('invoices.mark_as_sent'))
|
||||
}
|
||||
swal({
|
||||
title: this.$t('general.are_you_sure'),
|
||||
text: this.$t('invoices.invoice_mark_as_sent'),
|
||||
icon: '/assets/icon/check-circle-solid.svg',
|
||||
buttons: true,
|
||||
dangerMode: true
|
||||
}).then(async (MarkAsSend_Invoice) => {
|
||||
if (MarkAsSend_Invoice) {
|
||||
const data = {
|
||||
id: id
|
||||
}
|
||||
let response = await this.markAsSent(data)
|
||||
this.refreshTable()
|
||||
if (response.data) {
|
||||
window.toastr['success'](this.$tc('invoices.mark_as_sent'))
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
getStatus (val) {
|
||||
this.filters.status = {
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
</p>
|
||||
</div>
|
||||
<form action="" @submit.prevent="saveEmailConfig()">
|
||||
<div class="row my-2 mt-5">
|
||||
<div class="row">
|
||||
<div class="col-md-6 my-2">
|
||||
<label class="form-label">{{ $t('settings.mail.driver') }}</label>
|
||||
<span class="text-danger"> *</span>
|
||||
@ -116,12 +116,12 @@
|
||||
</div>
|
||||
<base-button
|
||||
:loading="loading"
|
||||
class="pull-right mt-5"
|
||||
class="pull-right mt-4"
|
||||
icon="save"
|
||||
color="theme"
|
||||
type="submit"
|
||||
>
|
||||
{{ $t('wizard.save_cont') }}
|
||||
{{ $t('general.save') }}
|
||||
</base-button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@ -43,6 +43,9 @@
|
||||
type="password"
|
||||
@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 class="col-md-6 mb-4 form-group">
|
||||
<label class="input-label">{{ $tc('settings.account_settings.confirm_password') }}</label>
|
||||
@ -78,7 +81,7 @@
|
||||
<script>
|
||||
import { validationMixin } from 'vuelidate'
|
||||
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 {
|
||||
mixins: [validationMixin],
|
||||
@ -103,6 +106,7 @@ export default {
|
||||
email
|
||||
},
|
||||
password: {
|
||||
minLength: minLength(8)
|
||||
},
|
||||
confirm_password: {
|
||||
required: requiredIf('isRequired'),
|
||||
|
||||
@ -45,6 +45,7 @@
|
||||
/>
|
||||
<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.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 class="col-md-6">
|
||||
@ -106,7 +107,8 @@ export default {
|
||||
required
|
||||
},
|
||||
password: {
|
||||
required
|
||||
required,
|
||||
minLength: minLength(8)
|
||||
},
|
||||
confirm_password: {
|
||||
required: requiredIf('isRequired'),
|
||||
|
||||
3
resources/assets/sass/base.scss
vendored
3
resources/assets/sass/base.scss
vendored
@ -111,6 +111,7 @@ code, .code {
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.swal-icon--custom {
|
||||
height: 50px !important;
|
||||
height: 70px !important;
|
||||
}
|
||||
|
||||
3
resources/assets/sass/pages/customers.scss
vendored
3
resources/assets/sass/pages/customers.scss
vendored
@ -27,8 +27,6 @@
|
||||
|
||||
.same-address-checkbox-container {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
padding-left: 12px;
|
||||
margin-bottom: 1.5rem;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
@ -97,7 +95,6 @@
|
||||
.same-address-checkbox-container {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
padding-left: 15px;
|
||||
margin-bottom: 0rem;
|
||||
}
|
||||
|
||||
|
||||
3
resources/assets/sass/pages/wizard.scss
vendored
3
resources/assets/sass/pages/wizard.scss
vendored
@ -98,6 +98,9 @@
|
||||
border-radius: 50%;
|
||||
height: 21px;
|
||||
width: 21px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.icon-check {
|
||||
font-style: normal;
|
||||
|
||||
Reference in New Issue
Block a user