Rejected or canceled reservations, comments
This commit is contained in:
@ -47,9 +47,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui top attached tabular menu" id="tabs">
|
||||
<div class="yellow active item" data-tab="pending">Pendientes</div>
|
||||
<div class="green item" data-tab="active">Activas</div>
|
||||
<div class="red item" data-tab="rejected">Rechazadas</div>
|
||||
<div class="yellow active item link" data-tab="pending">Pendientes</div>
|
||||
<div class="green item link" data-tab="active">Activas</div>
|
||||
<div class="red item link" data-tab="rejected">Rechazadas</div>
|
||||
</div>
|
||||
<div class="ui bottom attached tab fitted segment active" data-tab="pending">
|
||||
<table class="ui yellow striped table" id="pending_reservations">
|
||||
@ -107,7 +107,7 @@
|
||||
@push('page_styles')
|
||||
<style>
|
||||
.item.link {
|
||||
cursor: pointer;
|
||||
cursor: pointer !important;
|
||||
text-decoration: underline;
|
||||
}
|
||||
</style>
|
||||
@ -294,9 +294,9 @@
|
||||
}
|
||||
}
|
||||
columnsData() {
|
||||
return this.reservations.map(reservation => {
|
||||
return this.reservations.map(reservation => {
|
||||
const date = new Date(Date.parse(reservation.date) + 24 * 60 * 60 * 1000)
|
||||
return {
|
||||
return {
|
||||
id: reservation.id,
|
||||
unidades: reservation.summary,
|
||||
cliente: reservation.buyer.nombreCompleto,
|
||||
@ -412,7 +412,7 @@
|
||||
columnsData() {
|
||||
const data = super.columnsData();
|
||||
return data.map(row => {
|
||||
delete (row['valida'])
|
||||
delete(row['valida'])
|
||||
return row
|
||||
})
|
||||
}
|
||||
@ -475,8 +475,8 @@
|
||||
columnsData() {
|
||||
const data = super.columnsData()
|
||||
return this.reservations.map((reservation, idx) => {
|
||||
data[idx]['estado'] = reservation.state.charAt(0).toUpperCase() + reservation.state.slice(1)
|
||||
data[idx]['comentarios'] = reservation.comments?.join('<br />\n') ?? ''
|
||||
data[idx]['estado'] = this.mapState(reservation.current_state)
|
||||
data[idx]['comentarios'] = reservation.comments ?? ''
|
||||
return data[idx]
|
||||
})
|
||||
}
|
||||
@ -484,6 +484,13 @@
|
||||
return ''
|
||||
}
|
||||
watch() {}
|
||||
|
||||
mapState(state) {
|
||||
return {
|
||||
'canceled': 'Cancelado',
|
||||
'rejected': 'Rechazado'
|
||||
}[state.toLowerCase()]
|
||||
}
|
||||
}
|
||||
|
||||
const reservations = {
|
||||
@ -645,6 +652,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(() => {
|
||||
reservations.setup({
|
||||
ids: {
|
||||
|
Reference in New Issue
Block a user