mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-28 04:01:10 -04:00
merge master
This commit is contained in:
@ -15,10 +15,10 @@ class UsersTableSeeder extends Seeder
|
||||
public function run()
|
||||
{
|
||||
User::create([
|
||||
'email' => 'admin@crater.in',
|
||||
'email' => 'admin@craterapp.com',
|
||||
'name' => 'Jane Doe',
|
||||
'role' => 'admin',
|
||||
'password' => Hash::make('admin@123')
|
||||
'password' => Hash::make('crater@123')
|
||||
]);
|
||||
|
||||
Setting::setSetting('profile_complete', 0);
|
||||
|
||||
18556
public/assets/css/laraspace.css
vendored
Normal file
18556
public/assets/css/laraspace.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
public/assets/css/laraspace.css.map
Normal file
1
public/assets/css/laraspace.css.map
Normal file
File diff suppressed because one or more lines are too long
17
public/assets/icon/check-circle-solid.svg
Normal file
17
public/assets/icon/check-circle-solid.svg
Normal file
@ -0,0 +1,17 @@
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
focusable="false"
|
||||
data-prefix="fas"
|
||||
data-icon="check-circle"
|
||||
class="svg-inline--fa fa-check-circle fa-w-16"
|
||||
role="img"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 512 512">
|
||||
<path
|
||||
fill="#55547A"
|
||||
d="M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z">
|
||||
</path>
|
||||
</svg>
|
||||
|
||||
|
||||
|
||||
|
After Width: | Height: | Size: 658 B |
13
public/assets/icon/envelope-solid.svg
Normal file
13
public/assets/icon/envelope-solid.svg
Normal file
@ -0,0 +1,13 @@
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
focusable="false"
|
||||
data-prefix="fas"
|
||||
data-icon="envelope"
|
||||
class="svg-inline--fa fa-envelope fa-w-16"
|
||||
role="img" xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 512 512">
|
||||
<path
|
||||
fill="#55547A"
|
||||
d="M502.3 190.8c3.9-3.1 9.7-.2 9.7 4.7V400c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V195.6c0-5 5.7-7.8 9.7-4.7 22.4 17.4 52.1 39.5 154.1 113.6 21.1 15.4 56.7 47.8 92.2 47.6 35.7.3 72-32.8 92.3-47.6 102-74.1 131.6-96.3 154-113.7zM256 320c23.2.4 56.6-29.2 73.4-41.4 132.7-96.3 142.8-104.7 173.4-128.7 5.8-4.5 9.2-11.5 9.2-18.9v-19c0-26.5-21.5-48-48-48H48C21.5 64 0 85.5 0 112v19c0 7.4 3.4 14.3 9.2 18.9 30.6 23.9 40.7 32.4 173.4 128.7 16.8 12.2 50.2 41.8 73.4 41.4z">
|
||||
</path>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 751 B |
14
public/assets/icon/paper-plane-solid.svg
Normal file
14
public/assets/icon/paper-plane-solid.svg
Normal file
@ -0,0 +1,14 @@
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
focusable="false"
|
||||
data-prefix="fas"
|
||||
data-icon="paper-plane"
|
||||
class="svg-inline--fa fa-paper-plane fa-w-16"
|
||||
role="img"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 512 512">
|
||||
<path
|
||||
fill="#55547A"
|
||||
d="M476 3.2L12.5 270.6c-18.1 10.4-15.8 35.6 2.2 43.2L121 358.4l287.3-253.2c5.5-4.9 13.3 2.6 8.6 8.3L176 407v80.5c0 23.6 28.5 32.9 42.5 15.8L282 426l124.6 52.2c14.2 6 30.4-2.9 33-18.2l72-432C515 7.8 493.3-6.8 476 3.2z">
|
||||
</path>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 510 B |
14
public/assets/icon/times-circle-solid.svg
Normal file
14
public/assets/icon/times-circle-solid.svg
Normal file
@ -0,0 +1,14 @@
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
focusable="false"
|
||||
data-prefix="fas"
|
||||
data-icon="times-circle"
|
||||
class="svg-inline--fa fa-times-circle fa-w-16"
|
||||
role="img"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 512 512">
|
||||
<path
|
||||
fill="#55547A"
|
||||
d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm121.6 313.1c4.7 4.7 4.7 12.3 0 17L338 377.6c-4.7 4.7-12.3 4.7-17 0L256 312l-65.1 65.6c-4.7 4.7-12.3 4.7-17 0L134.4 338c-4.7-4.7-4.7-12.3 0-17l65.6-65-65.6-65.1c-4.7-4.7-4.7-12.3 0-17l39.6-39.6c4.7-4.7 12.3-4.7 17 0l65 65.7 65.1-65.6c4.7-4.7 12.3-4.7 17 0l39.6 39.6c4.7 4.7 4.7 12.3 0 17L312 256l65.6 65.1z">
|
||||
</path>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 674 B |
14
public/assets/icon/trash-solid.svg
Normal file
14
public/assets/icon/trash-solid.svg
Normal file
@ -0,0 +1,14 @@
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
focusable="false"
|
||||
data-prefix="fas"
|
||||
data-icon="trash"
|
||||
class="svg-inline--fa fa-trash fa-w-14"
|
||||
role="img"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 448 512">
|
||||
<path
|
||||
fill="#55547A"
|
||||
d="M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z">
|
||||
</path>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 519 B |
@ -228,6 +228,10 @@ export default {
|
||||
save_estimate: 'Save Estimate',
|
||||
confirm_conversion: 'You want to convert this Estimate into Invoice?',
|
||||
conversion_message: 'Conversion successful',
|
||||
confirm_send_estimate: 'This estimate will be sent via email to the customer',
|
||||
confirm_mark_as_sent: 'This estimate will be marked as sent',
|
||||
confirm_mark_as_accepted: 'This estimate will be marked as Accepted',
|
||||
confirm_mark_as_rejected: 'This estimate will be marked as Rejected',
|
||||
no_matching_estimates: 'There are no matching estimates!',
|
||||
errors: {
|
||||
required: 'Field is required'
|
||||
@ -624,6 +628,7 @@ export default {
|
||||
created_message: 'Sales tax created successfully',
|
||||
updated_message: 'Sales tax updated successfully',
|
||||
deleted_message: 'Sales tax deleted successfully',
|
||||
confirm_delete: 'You will not be able to recover this Tax Type',
|
||||
already_in_use: 'Tax is already in use'
|
||||
},
|
||||
expense_category: {
|
||||
@ -636,6 +641,7 @@ export default {
|
||||
created_message: 'Category created successfully',
|
||||
deleted_message: 'Expense category deleted successfully',
|
||||
updated_message: 'Expense category updated successfully',
|
||||
confirm_delete: 'You will not be able to recover this Expense Category',
|
||||
already_in_use: 'Category is already in use'
|
||||
},
|
||||
preferences: {
|
||||
|
||||
@ -228,12 +228,15 @@ export default {
|
||||
estimate_template: 'Plantilla de estimación',
|
||||
convert_to_invoice: 'Convertir a factura',
|
||||
mark_as_sent: 'Marcar como enviado',
|
||||
send_estimate: 'Enviar presupuesto',
|
||||
record_payment: 'Registro de pago',
|
||||
add_estimate: 'Agregar presupuesto',
|
||||
save_estimate: 'Guardar estimación',
|
||||
confirm_conversion: '¿Quiere convertir esta estimación en factura?',
|
||||
conversion_message: 'Conversión exitosa',
|
||||
confirm_send_estimate: 'Esta estimación se enviará por correo electrónico al cliente',
|
||||
confirm_mark_as_sent: 'Esta estimación se marcará como enviada',
|
||||
confirm_mark_as_accepted: 'Esta estimación se marcará como Aceptada',
|
||||
confirm_mark_as_rejected: 'Esta estimación se marcará como Rechazada',
|
||||
errors: {
|
||||
required: 'Se requiere campo'
|
||||
},
|
||||
@ -613,6 +616,7 @@ export default {
|
||||
created_message: 'Impuesto sobre las ventas creado con éxito',
|
||||
updated_message: 'Impuesto sobre ventas actualizado con éxito',
|
||||
deleted_message: 'Impuesto sobre las ventas eliminado con éxito',
|
||||
confirm_delete: 'No podrá recuperar este tipo de impuesto',
|
||||
already_in_use: 'El impuesto ya está en uso.'
|
||||
},
|
||||
expense_category: {
|
||||
@ -625,6 +629,7 @@ export default {
|
||||
created_message: 'Categoría creada con éxito',
|
||||
deleted_message: 'Categoría de gastos eliminada correctamente',
|
||||
updated_message: 'Categoría de gastos actualizada con éxito',
|
||||
confirm_delete: 'No podrá recuperar esta categoría de gastos',
|
||||
already_in_use: 'La categoría ya está en uso.'
|
||||
},
|
||||
preferences: {
|
||||
|
||||
@ -233,6 +233,10 @@ export default {
|
||||
save_estimate: 'Sauvegarder lestimation',
|
||||
confirm_conversion: 'Vous souhaitez convertir cette estimation en facture?',
|
||||
conversion_message: 'Conversion réussie',
|
||||
confirm_send_estimate: 'Cette estimation sera envoyée par courrier électronique au client.',
|
||||
confirm_mark_as_sent: 'Cette estimation sera marquée comme envoyé',
|
||||
confirm_mark_as_accepted: 'Cette estimation sera marquée comme acceptée',
|
||||
confirm_mark_as_rejected: 'Cette estimation sera marquée comme Rejetée',
|
||||
errors: {
|
||||
required: 'Champ requis'
|
||||
},
|
||||
@ -614,6 +618,7 @@ export default {
|
||||
created_message: 'La taxe de vente créée avec succès',
|
||||
updated_message: 'La taxe de vente a été mise à jour avec succès',
|
||||
deleted_message: 'La taxe de vente a été supprimée avec succès',
|
||||
confirm_delete: 'Vous ne pourrez pas récupérer ce type de taxe',
|
||||
already_in_use: 'La taxe est déjà utilisée'
|
||||
},
|
||||
expense_category: {
|
||||
@ -626,6 +631,7 @@ export default {
|
||||
created_message: 'Catégorie créée avec succès',
|
||||
deleted_message: 'La catégorie de dépenses a été supprimée avec succès',
|
||||
updated_message: 'Catégorie de dépenses mise à jour avec succès',
|
||||
confirm_delete: 'Vous ne pourrez pas récupérer cette catégorie de dépenses',
|
||||
already_in_use: 'La catégorie est déjà utilisée'
|
||||
},
|
||||
preferences: {
|
||||
|
||||
@ -343,7 +343,7 @@ export default {
|
||||
swal({
|
||||
title: this.$t('general.are_you_sure'),
|
||||
text: this.$tc('customers.confirm_delete'),
|
||||
icon: 'error',
|
||||
icon: '/assets/icon/trash-solid.svg',
|
||||
buttons: true,
|
||||
dangerMode: true
|
||||
}).then(async (willDelete) => {
|
||||
@ -363,7 +363,7 @@ export default {
|
||||
swal({
|
||||
title: this.$t('general.are_you_sure'),
|
||||
text: this.$tc('customers.confirm_delete', 2),
|
||||
icon: 'error',
|
||||
icon: '/assets/icon/trash-solid.svg',
|
||||
buttons: true,
|
||||
dangerMode: true
|
||||
}).then(async (willDelete) => {
|
||||
|
||||
@ -249,25 +249,25 @@
|
||||
{{ $t('estimates.convert_to_invoice') }}
|
||||
</a>
|
||||
</v-dropdown-item>
|
||||
<v-dropdown-item>
|
||||
<v-dropdown-item v-if="row.status !== 'SENT'">
|
||||
<a class="dropdown-item" href="#" @click.self="onMarkAsSent(row.id)">
|
||||
<font-awesome-icon icon="check-circle" class="dropdown-item-icon" />
|
||||
{{ $t('estimates.mark_as_sent') }}
|
||||
</a>
|
||||
</v-dropdown-item>
|
||||
<v-dropdown-item>
|
||||
<v-dropdown-item v-if="row.status !== 'SENT'">
|
||||
<a class="dropdown-item" href="#" @click.self="sendEstimate(row.id)">
|
||||
<font-awesome-icon icon="paper-plane" class="dropdown-item-icon" />
|
||||
{{ $t('estimates.send_estimate') }}
|
||||
</a>
|
||||
</v-dropdown-item>
|
||||
<v-dropdown-item v-if="row.status === 'DRAFT'">
|
||||
<v-dropdown-item v-if="row.status === 'DRAFT' || row.status === 'REJECTED'">
|
||||
<a class="dropdown-item" href="#" @click.self="onMarkAsAccepted(row.id)">
|
||||
<font-awesome-icon icon="check-circle" class="dropdown-item-icon" />
|
||||
{{ $t('estimates.mark_as_accepted') }}
|
||||
</a>
|
||||
</v-dropdown-item>
|
||||
<v-dropdown-item v-if="row.status === 'DRAFT'">
|
||||
<v-dropdown-item v-if="row.status === 'ACCEPTED' || row.status === 'DRAFT'">
|
||||
<a class="dropdown-item" href="#" @click.self="onMarkAsRejected(row.id)">
|
||||
<font-awesome-icon icon="times-circle" class="dropdown-item-icon" />
|
||||
{{ $t('estimates.mark_as_rejected') }}
|
||||
@ -409,28 +409,48 @@ export default {
|
||||
}
|
||||
},
|
||||
async onMarkAsAccepted (id) {
|
||||
const data = {
|
||||
id: id
|
||||
}
|
||||
let response = await this.markAsAccepted(data)
|
||||
this.refreshTable()
|
||||
if (response.data) {
|
||||
this.filters.status = 'ACCEPTED'
|
||||
this.$refs.table.refresh()
|
||||
window.toastr['success'](this.$tc('estimates.marked_as_accepted_message'))
|
||||
}
|
||||
swal({
|
||||
title: this.$t('general.are_you_sure'),
|
||||
text: this.$t('estimates.confirm_mark_as_accepted'),
|
||||
icon: '/assets/icon/check-circle-solid.svg',
|
||||
buttons: true,
|
||||
dangerMode: true
|
||||
}).then(async (markedAsRejected) => {
|
||||
if (markedAsRejected) {
|
||||
const data = {
|
||||
id: id
|
||||
}
|
||||
let response = await this.markAsAccepted(data)
|
||||
this.refreshTable()
|
||||
if (response.data) {
|
||||
this.filters.status = 'ACCEPTED'
|
||||
this.$refs.table.refresh()
|
||||
window.toastr['success'](this.$tc('estimates.marked_as_rejected_message'))
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
async onMarkAsRejected (id) {
|
||||
const data = {
|
||||
id: id
|
||||
}
|
||||
let response = await this.markAsRejected(data)
|
||||
this.refreshTable()
|
||||
if (response.data) {
|
||||
this.filters.status = 'REJECTED'
|
||||
this.$refs.table.refresh()
|
||||
window.toastr['success'](this.$tc('estimates.marked_as_rejected_message'))
|
||||
}
|
||||
swal({
|
||||
title: this.$t('general.are_you_sure'),
|
||||
text: this.$t('estimates.confirm_mark_as_rejected'),
|
||||
icon: '/assets/icon/times-circle-solid.svg',
|
||||
buttons: true,
|
||||
dangerMode: true
|
||||
}).then(async (markedAsRejected) => {
|
||||
if (markedAsRejected) {
|
||||
const data = {
|
||||
id: id
|
||||
}
|
||||
let response = await this.markAsRejected(data)
|
||||
this.refreshTable()
|
||||
if (response.data) {
|
||||
this.filters.status = 'REJECTED'
|
||||
this.$refs.table.refresh()
|
||||
window.toastr['success'](this.$tc('estimates.marked_as_rejected_message'))
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
setFilters () {
|
||||
this.filtersApplied = true
|
||||
@ -470,7 +490,7 @@ export default {
|
||||
swal({
|
||||
title: this.$t('general.are_you_sure'),
|
||||
text: this.$tc('estimates.confirm_delete', 1),
|
||||
icon: 'error',
|
||||
icon: '/assets/icon/trash-solid.svg',
|
||||
buttons: true,
|
||||
dangerMode: true
|
||||
}).then(async (willDelete) => {
|
||||
@ -491,7 +511,7 @@ export default {
|
||||
swal({
|
||||
title: this.$t('general.are_you_sure'),
|
||||
text: this.$t('estimates.confirm_conversion'),
|
||||
icon: 'error',
|
||||
icon: '/assets/icon/envelope-solid.svg',
|
||||
buttons: true,
|
||||
dangerMode: true
|
||||
}).then(async (willDelete) => {
|
||||
@ -510,7 +530,7 @@ export default {
|
||||
swal({
|
||||
title: this.$t('general.are_you_sure'),
|
||||
text: this.$tc('estimates.confirm_delete', 2),
|
||||
icon: 'error',
|
||||
icon: '/assets/icon/trash-solid.svg',
|
||||
buttons: true,
|
||||
dangerMode: true
|
||||
}).then(async (willDelete) => {
|
||||
@ -536,24 +556,44 @@ export default {
|
||||
this.refreshTable()
|
||||
},
|
||||
async onMarkAsSent (id) {
|
||||
const data = {
|
||||
id: id
|
||||
}
|
||||
let response = await this.markAsSent(data)
|
||||
this.refreshTable()
|
||||
if (response.data) {
|
||||
window.toastr['success'](this.$tc('estimates.mark_as_sent'))
|
||||
}
|
||||
swal({
|
||||
title: this.$t('general.are_you_sure'),
|
||||
text: this.$t('estimates.confirm_mark_as_sent'),
|
||||
icon: '/assets/icon/check-circle-solid.svg',
|
||||
buttons: true,
|
||||
dangerMode: true
|
||||
}).then(async (willDelete) => {
|
||||
if (willDelete) {
|
||||
const data = {
|
||||
id: id
|
||||
}
|
||||
let response = await this.markAsSent(data)
|
||||
this.refreshTable()
|
||||
if (response.data) {
|
||||
window.toastr['success'](this.$tc('estimates.mark_as_sent'))
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
async sendEstimate (id) {
|
||||
const data = {
|
||||
id: id
|
||||
}
|
||||
let response = await this.sendEmail(data)
|
||||
this.refreshTable()
|
||||
if (response.data) {
|
||||
window.toastr['success'](this.$tc('estimates.mark_as_sent'))
|
||||
}
|
||||
swal({
|
||||
title: this.$t('general.are_you_sure'),
|
||||
text: this.$t('estimates.confirm_send_estimate'),
|
||||
icon: '/assets/icon/paper-plane-solid.svg',
|
||||
buttons: true,
|
||||
dangerMode: true
|
||||
}).then(async (sendEstimate) => {
|
||||
if (sendEstimate) {
|
||||
const data = {
|
||||
id: id
|
||||
}
|
||||
let response = await this.sendEmail(data)
|
||||
this.refreshTable()
|
||||
if (response.data) {
|
||||
window.toastr['success'](this.$tc('estimates.mark_as_sent'))
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -358,7 +358,7 @@ export default {
|
||||
swal({
|
||||
title: this.$t('general.are_you_sure'),
|
||||
text: this.$tc('expenses.confirm_delete'),
|
||||
icon: 'error',
|
||||
icon: '/assets/icon/trash-solid.svg',
|
||||
buttons: true,
|
||||
dangerMode: true
|
||||
}).then(async (willDelete) => {
|
||||
@ -378,7 +378,7 @@ export default {
|
||||
swal({
|
||||
title: this.$t('general.are_you_sure'),
|
||||
text: this.$tc('expenses.confirm_delete', 2),
|
||||
icon: 'error',
|
||||
icon: '/assets/icon/trash-solid.svg',
|
||||
buttons: true,
|
||||
dangerMode: true
|
||||
}).then(async (willDelete) => {
|
||||
|
||||
@ -476,7 +476,7 @@ export default {
|
||||
swal({
|
||||
title: this.$t('general.are_you_sure'),
|
||||
text: this.$tc('invoices.confirm_delete'),
|
||||
icon: 'error',
|
||||
icon: '/assets/icon/trash-solid.svg',
|
||||
buttons: true,
|
||||
dangerMode: true
|
||||
}).then(async (willDelete) => {
|
||||
@ -506,7 +506,7 @@ export default {
|
||||
swal({
|
||||
title: this.$t('general.are_you_sure'),
|
||||
text: this.$tc('invoices.confirm_delete', 2),
|
||||
icon: 'error',
|
||||
icon: '/assets/icon/trash-solid.svg',
|
||||
buttons: true,
|
||||
dangerMode: true
|
||||
}).then(async (willDelete) => {
|
||||
|
||||
@ -362,7 +362,7 @@ export default {
|
||||
swal({
|
||||
title: this.$t('general.are_you_sure'),
|
||||
text: this.$tc('items.confirm_delete'),
|
||||
icon: 'error',
|
||||
icon: '/assets/icon/trash-solid.svg',
|
||||
buttons: true,
|
||||
dangerMode: true
|
||||
}).then(async (willDelete) => {
|
||||
@ -388,7 +388,7 @@ export default {
|
||||
swal({
|
||||
title: this.$t('general.are_you_sure'),
|
||||
text: this.$tc('items.confirm_delete', 2),
|
||||
icon: 'error',
|
||||
icon: '/assets/icon/trash-solid.svg',
|
||||
buttons: true,
|
||||
dangerMode: true
|
||||
}).then(async (willDelete) => {
|
||||
|
||||
@ -101,7 +101,6 @@
|
||||
</div>
|
||||
<div v-if="$v.formData.amount.$error">
|
||||
<span v-if="!$v.formData.amount.required" class="text-danger">{{ $t('validation.required') }}</span>
|
||||
<span v-if="!$v.formData.amount.numeric" class="text-danger">{{ $t('validation.numbers_only') }}</span>
|
||||
<span v-if="!$v.formData.amount.between && $v.formData.amount.numeric && amount <= 0" class="text-danger">{{ $t('validation.payment_greater_than_zero') }}</span>
|
||||
<span v-if="!$v.formData.amount.between && amount > 0" class="text-danger">{{ $t('validation.payment_greater_than_due_amount') }}</span>
|
||||
</div>
|
||||
@ -156,7 +155,7 @@ import { mapActions, mapGetters } from 'vuex'
|
||||
import MultiSelect from 'vue-multiselect'
|
||||
import { validationMixin } from 'vuelidate'
|
||||
import moment from 'moment'
|
||||
const { required, numeric, between, maxLength } = require('vuelidate/lib/validators')
|
||||
const { required, between, maxLength } = require('vuelidate/lib/validators')
|
||||
|
||||
export default {
|
||||
components: { MultiSelect },
|
||||
@ -201,7 +200,6 @@ export default {
|
||||
},
|
||||
amount: {
|
||||
required,
|
||||
numeric,
|
||||
between: between(1, this.maxPayableAmount + 1)
|
||||
},
|
||||
notes: {
|
||||
|
||||
@ -368,7 +368,7 @@ export default {
|
||||
swal({
|
||||
title: this.$t('general.are_you_sure'),
|
||||
text: this.$tc('payments.confirm_delete'),
|
||||
icon: 'error',
|
||||
icon: '/assets/icon/trash-solid.svg',
|
||||
buttons: true,
|
||||
dangerMode: true
|
||||
}).then(async (willDelete) => {
|
||||
@ -388,7 +388,7 @@ export default {
|
||||
swal({
|
||||
title: this.$t('general.are_you_sure'),
|
||||
text: this.$tc('payments.confirm_delete', 2),
|
||||
icon: 'error',
|
||||
icon: '/assets/icon/trash-solid.svg',
|
||||
buttons: true,
|
||||
dangerMode: true
|
||||
}).then(async (willDelete) => {
|
||||
|
||||
@ -101,13 +101,23 @@ export default {
|
||||
'deleteCategory'
|
||||
]),
|
||||
async removeExpenseCategory (id, index) {
|
||||
let response = await this.deleteCategory(id)
|
||||
if (response.data.success) {
|
||||
window.toastr['success'](this.$tc('settings.expense_category.deleted_message'))
|
||||
this.id = null
|
||||
this.$refs.table.refresh()
|
||||
return true
|
||||
} window.toastr['success'](this.$t('settings.expense_category.already_in_use'))
|
||||
swal({
|
||||
title: this.$t('general.are_you_sure'),
|
||||
text: this.$t('settings.expense_category.confirm_delete'),
|
||||
icon: '/assets/icon/trash-solid.svg',
|
||||
buttons: true,
|
||||
dangerMode: true
|
||||
}).then(async (willDelete) => {
|
||||
if (willDelete) {
|
||||
let response = await this.deleteCategory(id)
|
||||
if (response.data.success) {
|
||||
window.toastr['success'](this.$tc('settings.expense_category.deleted_message'))
|
||||
this.id = null
|
||||
this.$refs.table.refresh()
|
||||
return true
|
||||
} window.toastr['error'](this.$t('settings.expense_category.already_in_use'))
|
||||
}
|
||||
})
|
||||
},
|
||||
openCategoryModal () {
|
||||
this.openModal({
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
>
|
||||
<template slot-scope="row">
|
||||
<span>{{ $t('settings.tax_types.tax_name') }}</span>
|
||||
<span class="tax-name">
|
||||
<span class="tax-name mt-3">
|
||||
{{ row.name }}
|
||||
</span>
|
||||
</template>
|
||||
@ -159,13 +159,23 @@ export default {
|
||||
}
|
||||
},
|
||||
async removeTax (id, index) {
|
||||
let response = await this.deleteTaxType(id)
|
||||
if (response.data.success) {
|
||||
window.toastr['success'](this.$t('settings.tax_types.deleted_message'))
|
||||
this.id = null
|
||||
this.$refs.table.refresh()
|
||||
return true
|
||||
}window.toastr['success'](this.$t('settings.tax_types.already_in_use'))
|
||||
swal({
|
||||
title: this.$t('general.are_you_sure'),
|
||||
text: this.$t('settings.tax_types.confirm_delete'),
|
||||
icon: '/assets/icon/trash-solid.svg',
|
||||
buttons: true,
|
||||
dangerMode: true
|
||||
}).then(async (willDelete) => {
|
||||
if (willDelete) {
|
||||
let response = await this.deleteTaxType(id)
|
||||
if (response.data.success) {
|
||||
window.toastr['success'](this.$t('settings.tax_types.deleted_message'))
|
||||
this.id = null
|
||||
this.$refs.table.refresh()
|
||||
return true
|
||||
}window.toastr['error'](this.$t('settings.tax_types.already_in_use'))
|
||||
}
|
||||
})
|
||||
},
|
||||
openTaxModal () {
|
||||
this.openModal({
|
||||
|
||||
3
resources/assets/sass/base.scss
vendored
3
resources/assets/sass/base.scss
vendored
@ -111,3 +111,6 @@ code, .code {
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.swal-icon--custom {
|
||||
height: 50px !important;
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
fieldset[disabled] .multiselect {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.in-valid {
|
||||
border: 1px solid $ls-color-red !important;
|
||||
}
|
||||
@ -18,6 +19,7 @@ fieldset[disabled] .multiselect {
|
||||
background: #fff;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.multiselect__spinner:before,
|
||||
.multiselect__spinner:after {
|
||||
position: absolute;
|
||||
@ -33,23 +35,28 @@ fieldset[disabled] .multiselect {
|
||||
border-width: 2px;
|
||||
box-shadow: 0 0 0 1px transparent;
|
||||
}
|
||||
|
||||
.multiselect__spinner:before {
|
||||
animation: spinning 2.4s cubic-bezier(0.41, 0.26, 0.2, 0.62);
|
||||
animation-iteration-count: infinite;
|
||||
}
|
||||
|
||||
.multiselect__spinner:after {
|
||||
animation: spinning 2.4s cubic-bezier(0.51, 0.09, 0.21, 0.8);
|
||||
animation-iteration-count: infinite;
|
||||
}
|
||||
|
||||
.multiselect__loading-enter-active,
|
||||
.multiselect__loading-leave-active {
|
||||
transition: opacity 0.4s ease-in-out;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.multiselect__loading-enter,
|
||||
.multiselect__loading-leave-active {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.multiselect,
|
||||
.multiselect__input,
|
||||
.multiselect__single {
|
||||
@ -57,34 +64,41 @@ fieldset[disabled] .multiselect {
|
||||
font-size: 14px;
|
||||
touch-action: manipulation;
|
||||
}
|
||||
|
||||
.multiselect {
|
||||
box-sizing: content-box;
|
||||
display: block;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
min-height: 45px;
|
||||
min-height: 40px;
|
||||
text-align: left;
|
||||
color: #35495e;
|
||||
}
|
||||
|
||||
.multiselect * {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.multiselect:focus {
|
||||
border: 1px solid #817ae3 !important;
|
||||
}
|
||||
|
||||
.multiselect--disabled {
|
||||
pointer-events: none;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.multiselect--active {
|
||||
z-index: 50;
|
||||
}
|
||||
|
||||
.multiselect--active:not(.multiselect--above) .multiselect__current,
|
||||
.multiselect--active:not(.multiselect--above) .multiselect__input,
|
||||
.multiselect--active:not(.multiselect--above) .multiselect__tags {
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
|
||||
.multiselect--active .multiselect__select {
|
||||
transform: rotateZ(180deg);
|
||||
}
|
||||
@ -94,6 +108,7 @@ fieldset[disabled] .multiselect {
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
|
||||
.multiselect__input,
|
||||
.multiselect__single {
|
||||
position: relative;
|
||||
@ -110,9 +125,11 @@ fieldset[disabled] .multiselect {
|
||||
// margin-bottom: 8px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.multiselect__input::placeholder {
|
||||
color: $ls-color-gray;
|
||||
}
|
||||
|
||||
.multiselect__tag ~ .multiselect__input,
|
||||
.multiselect__tag ~ .multiselect__single {
|
||||
width: auto;
|
||||
@ -345,68 +362,85 @@ fieldset[disabled] .multiselect {
|
||||
cursor: text;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.multiselect__option--group {
|
||||
background: #ededed;
|
||||
color: #35495e;
|
||||
}
|
||||
|
||||
.multiselect__option--group.multiselect__option--highlight {
|
||||
background: #35495e;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.multiselect__option--group.multiselect__option--highlight:after {
|
||||
background: #35495e;
|
||||
}
|
||||
|
||||
.multiselect__option--disabled.multiselect__option--highlight {
|
||||
background: #dedede;
|
||||
}
|
||||
|
||||
.multiselect__option--group-selected.multiselect__option--highlight {
|
||||
background: #ff6a6a;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.multiselect__option--group-selected.multiselect__option--highlight:after {
|
||||
background: #ff6a6a;
|
||||
content: attr(data-deselect);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.multiselect-enter-active,
|
||||
.multiselect-leave-active {
|
||||
transition: all 0.15s ease;
|
||||
}
|
||||
|
||||
.multiselect-enter,
|
||||
.multiselect-leave-active {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.multiselect__strong {
|
||||
margin-bottom: 8px;
|
||||
line-height: 20px;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
*[dir="rtl"] .multiselect {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
*[dir="rtl"] .multiselect__select {
|
||||
right: auto;
|
||||
left: 1px;
|
||||
}
|
||||
|
||||
*[dir="rtl"] .multiselect__tags {
|
||||
padding: 8px 8px 0px 40px;
|
||||
}
|
||||
|
||||
*[dir="rtl"] .multiselect__content {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
*[dir="rtl"] .multiselect__option:after {
|
||||
right: auto;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
*[dir="rtl"] .multiselect__clear {
|
||||
right: auto;
|
||||
left: 12px;
|
||||
}
|
||||
|
||||
*[dir="rtl"] .multiselect__spinner {
|
||||
right: auto;
|
||||
left: 1px;
|
||||
}
|
||||
|
||||
@keyframes spinning {
|
||||
from {
|
||||
transform: rotate(0);
|
||||
@ -417,6 +451,7 @@ fieldset[disabled] .multiselect {
|
||||
}
|
||||
|
||||
.multiselect {
|
||||
|
||||
.multiselect__option--highlight {
|
||||
background: $ls-color-primary;
|
||||
color: $ls-color-black;
|
||||
@ -459,6 +494,7 @@ fieldset[disabled] .multiselect {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.error {
|
||||
border: 1px solid $ls-color-red;
|
||||
border-radius: 5px;
|
||||
|
||||
@ -490,7 +490,7 @@
|
||||
font-weight: 300;
|
||||
font-size: 12px;
|
||||
padding-top: 2px;
|
||||
padding-left: 10px;
|
||||
// padding-left: 10px;
|
||||
|
||||
textarea {
|
||||
|
||||
@ -504,6 +504,7 @@
|
||||
border: none;
|
||||
resize: none;
|
||||
width: 100%;
|
||||
padding-left: 11px;
|
||||
color: $ls-color-gray--very-dark;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user