forked from nathalie/pedi2
Merge branch 'master' of https://git.mps.org.uy/nathalie/pedi2
This commit is contained in:
commit
33d59073e3
|
@ -20,3 +20,10 @@ main.chisma-abierta {
|
|||
padding-top: 25.5rem !important;
|
||||
}
|
||||
|
||||
#main {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.container {
|
||||
max-height: 100% !important;
|
||||
}
|
||||
|
|
|
@ -2957,6 +2957,13 @@ __webpack_require__.r(__webpack_exports__);
|
|||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
/* harmony default export */ __webpack_exports__["default"] = ({
|
||||
name: "SubpedidosGdc",
|
||||
|
@ -2982,9 +2989,25 @@ __webpack_require__.r(__webpack_exports__);
|
|||
fetchSubpedidos: function fetchSubpedidos() {
|
||||
var _this2 = this;
|
||||
|
||||
axios.get("/api/subpedidos/resources").then(function (response) {
|
||||
axios.get("/api/subpedidos/resources", {
|
||||
params: {
|
||||
grupo_de_compra: this.gdc
|
||||
}
|
||||
}).then(function (response) {
|
||||
_this2.subpedidos = response.data.data;
|
||||
});
|
||||
},
|
||||
totalAprobados: function totalAprobados() {
|
||||
var suma = 0;
|
||||
var aprobados = this.subpedidos.filter(function (sp) {
|
||||
return sp.aprobado;
|
||||
});
|
||||
|
||||
for (var i = 0; i < aprobados.length; i++) {
|
||||
suma += parseFloat(aprobados[i].total.replace(/,/g, ''));
|
||||
}
|
||||
|
||||
return suma;
|
||||
}
|
||||
},
|
||||
mounted: function mounted() {
|
||||
|
@ -5902,7 +5925,7 @@ var render = function () {
|
|||
},
|
||||
],
|
||||
staticClass:
|
||||
"container table-container chismosa-container is-max-widescreen is-max-desktop animate__animated",
|
||||
"container is-max-widescreen is-max-desktop animate__animated",
|
||||
class: _vm.animation,
|
||||
},
|
||||
[
|
||||
|
@ -5922,6 +5945,16 @@ var render = function () {
|
|||
[
|
||||
_vm._m(0),
|
||||
_vm._v(" "),
|
||||
_c("tfoot", [
|
||||
_c("tr", [
|
||||
_c("th"),
|
||||
_vm._v(" "),
|
||||
_c("th", [_vm._v("Total de los aprobados")]),
|
||||
_vm._v(" "),
|
||||
_c("th", [_vm._v("$ " + _vm._s(_vm.totalAprobados()))]),
|
||||
]),
|
||||
]),
|
||||
_vm._v(" "),
|
||||
_c(
|
||||
"tbody",
|
||||
_vm._l(this.subpedidos, function (subpedido) {
|
||||
|
@ -19492,8 +19525,8 @@ __webpack_require__.r(__webpack_exports__);
|
|||
/*! no static exports found */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
__webpack_require__(/*! /home/ale/MPS/App/pedi2/resources/js/app.js */"./resources/js/app.js");
|
||||
module.exports = __webpack_require__(/*! /home/ale/MPS/App/pedi2/resources/sass/app.scss */"./resources/sass/app.scss");
|
||||
__webpack_require__(/*! /var/www/resources/js/app.js */"./resources/js/app.js");
|
||||
module.exports = __webpack_require__(/*! /var/www/resources/sass/app.scss */"./resources/sass/app.scss");
|
||||
|
||||
|
||||
/***/ })
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div class="container table-container chismosa-container is-max-widescreen is-max-desktop animate__animated" :class="animation" v-show="!init">
|
||||
<div class="container is-max-widescreen is-max-desktop animate__animated" :class="animation" v-show="!init">
|
||||
<table v-show="this.subpedidos.length !== 0" class="table is-fullwidth is-striped is-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -8,11 +8,18 @@
|
|||
<th><abbr title="Aprobacion">Aprobación</abbr></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<subpedido-row v-for="subpedido in this.subpedidos"
|
||||
:subpedido="subpedido" :key="subpedido.id">
|
||||
</subpedido-row>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Total de los aprobados</th>
|
||||
<th>$ {{ totalAprobados() }}</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<subpedido-row v-for="subpedido in this.subpedidos"
|
||||
:subpedido="subpedido" :key="subpedido.id">
|
||||
</subpedido-row>
|
||||
</tbody>
|
||||
</table>
|
||||
<p class="has-text-centered" v-show="this.subpedidos.length === 0">
|
||||
Todavía no hay ningún pedido para administrar.
|
||||
|
@ -39,9 +46,21 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
fetchSubpedidos() {
|
||||
axios.get("/api/subpedidos/resources").then(response => {
|
||||
axios.get("/api/subpedidos/resources", {
|
||||
params: {
|
||||
grupo_de_compra: this.gdc
|
||||
}
|
||||
}).then(response => {
|
||||
this.subpedidos = response.data.data
|
||||
});
|
||||
},
|
||||
totalAprobados() {
|
||||
let suma = 0;
|
||||
let aprobados = this.subpedidos.filter(sp => sp.aprobado);
|
||||
for (let i = 0; i < aprobados.length; i++) {
|
||||
suma += parseFloat(aprobados[i].total.replace(/,/g, ''));
|
||||
}
|
||||
return suma;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
|
|
@ -24,4 +24,13 @@ table.table td {
|
|||
|
||||
main.chisma-abierta {
|
||||
padding-top: 25.5rem !important;
|
||||
}
|
||||
}
|
||||
|
||||
#main {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.container {
|
||||
max-height: 100% !important;
|
||||
}
|
||||
|
Loading…
Reference in New Issue