Commit 3f9b6187 authored by krlsnvz93's avatar krlsnvz93
Browse files

Fixes in put in patients v2

parent 07486b3b
# [1.1.0](https://github.com/johnleider/zero-theme/compare/edde6e29248bb788873e2c958374675320325aac...1.1.0) (2020-05-11)
### Bug Fixes
* **HeroSection:** adjust maximum container width ([df19603](https://github.com/johnleider/zero-theme/commit/df19603c2bcdd4df0b71fd14d654de80a10d8531))
* **Projects:** pass through attributes ([75fd707](https://github.com/johnleider/zero-theme/commit/75fd707b6068b4173876240797d51242b7cf426d))
* **Settings:** adjust top position ([f089030](https://github.com/johnleider/zero-theme/commit/f089030090be52c065d16e9bbdd8f675aa624132))
* **SystemBar:** resolve mobile issues ([b8223d5](https://github.com/johnleider/zero-theme/commit/b8223d53ef1f024560d5092ca1d33fba902101d3))
### Features
* add images to theme ([41e32c9](https://github.com/johnleider/zero-theme/commit/41e32c97cb1ca8146bb500891170d5bf0d78debc))
* add more sections, update base components ([502b689](https://github.com/johnleider/zero-theme/commit/502b6898e350655138f76e04d36c677756eb05a2))
* add new hero-alt component and update views ([14d6cd7](https://github.com/johnleider/zero-theme/commit/14d6cd78d240c6381b8e319cd78de22090192496))
* add new section and abstract duplicate functionality ([d23e31c](https://github.com/johnleider/zero-theme/commit/d23e31c60bc4dd8ad64af6038af7fce5210fdc36))
* clean-up, renamed components, added new logo ([983275f](https://github.com/johnleider/zero-theme/commit/983275f282023139ebe87a7598b65c7e576c1823))
* **components:** add new components ([360d790](https://github.com/johnleider/zero-theme/commit/360d790e8bcbe553d2e4fe402d33b07f0a043344))
* **sections:** add default sections ([edde6e2](https://github.com/johnleider/zero-theme/commit/edde6e29248bb788873e2c958374675320325aac))
* **views:** add sections ([1f829de](https://github.com/johnleider/zero-theme/commit/1f829defee86ffa0f432f3e906bc518903c8caf7))
* **Views:** create new pages and supporting functionality ([429144d](https://github.com/johnleider/zero-theme/commit/429144de25ebba5531b233f7dd0bf2d9933f95b0))
* add new sections and components, clean-up ([a17e493](https://github.com/johnleider/zero-theme/commit/a17e493df767d8e0a305fc9a02a28cc46842b212))
import Vue from 'vue'
import App from './App.vue'
import vuetify from './plugins/vuetify'
import router from './router'
import store from './src/store/index'
import Vuebar from 'vuebar'
import axios from 'axios'
import './plugins/base'
import api from './src/utils/api'
import VueCookies from 'vue-cookies'
import VueCryptojs from 'vue-cryptojs'
import Vue from "vue";
import App from "./App.vue";
import vuetify from "./plugins/vuetify";
import router from "./router";
import store from "./src/store/index";
import Vuebar from "vuebar";
import axios from 'axios';
import "./plugins/base";
import api from './src/utils/api';
Vue.use(VueCryptojs)
Vue.config.productionTip = false
Vue.use(Vuebar)
Vue.use(VueCookies)
Vue.$cookies.config('8h')
Vue.config.productionTip = false;
Vue.use(Vuebar);
Vue.prototype.$axios = api
......@@ -25,4 +20,4 @@ new Vue({
axios,
router,
render: (h) => h(App),
}).$mount('#app')
}).$mount("#app");
......@@ -15695,19 +15695,6 @@
}
}
},
"vue-cookies": {
"version": "1.7.4",
"resolved": "https://registry.npmjs.org/vue-cookies/-/vue-cookies-1.7.4.tgz",
"integrity": "sha512-mOS5Btr8V9zvAtkmQ7/TfqJIropOx7etDAgBywPCmHjvfJl2gFbH2XgoMghleLoyyMTi5eaJss0mPN7arMoslA=="
},
"vue-cryptojs": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/vue-cryptojs/-/vue-cryptojs-2.1.5.tgz",
"integrity": "sha512-bllwNCd+jgQ6MOnhXuv+zMwisS7A+h7juFOJQjfrLlSo/Ld7/DTYlGS7OgYAW8bI3DZG3F6otE0iqKseVR2dlQ==",
"requires": {
"crypto-js": "^4.0.0"
}
},
"vue-eslint-parser": {
"version": "7.7.2",
"resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-7.7.2.tgz",
......
{
"name": "SIGI",
"version": "0.0.5",
"version": "0.0.1",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
......@@ -20,8 +20,6 @@
"vee-validate": "^3.4.10",
"vue": "^2.6.11",
"vue-cli": "^2.9.6",
"vue-cookies": "^1.7.4",
"vue-cryptojs": "^2.1.5",
"vue-meta": "^2.3.3",
"vue-router": "^3.1.6",
"vue-toastification": "^1.7.11",
......
......@@ -48,6 +48,15 @@ export async function assignatePatient (idCenter, idPatient) {
const response = await axios.post(url, data, requestDataFormUrlEncoded())
return response
}
export async function ingresarPacientes (patients_ids, id_area) {
const url = `${REQUEST_DIR}ingresar-pacientes`
const data = {
patients_ids: patients_ids,
id_paciente: id_area,
}
const response = await axios.post(url, data, requestDataFormUrlEncoded())
return response
}
export async function admitPatient (idPatient) {
const url = `${REQUEST_DIR}pacientes`
......
......@@ -108,7 +108,7 @@
sm="5"
md="10"
>
{{ patient.direccion }} => {{ municipality }} / {{ province }}
{{ patient.direccion }} => {{ patient.provincia }} / {{ patient.municipio }}
</v-col>
<v-col
cols="12"
......@@ -124,7 +124,7 @@
sm="5"
md="10"
>
{{ healthArea }}
{{ patient.area_salud }}
</v-col>
<v-col
cols="12"
......@@ -383,80 +383,48 @@
<v-card-actions>
<v-spacer />
<v-btn
v-if="editable"
color="orange darken-1"
color="blue darken-1"
text
@click="sendEdit"
@click="sendClose"
>
<v-icon>mdi-pencil</v-icon>
Editar
OK
</v-btn>
<v-spacer v-if="!verified && role === 'MCPREV'" />
<v-spacer v-if="!verified" />
<v-btn
v-if="!verified && role === 'MCPREV'"
v-if="!verified"
color="blue darken-1"
text
@click="dataVerified"
>
<v-icon>mdi-account-check</v-icon>
Verificar
</v-btn>
<v-spacer />
<v-btn
color="green darken-1"
dark
@click="sendClose"
>
OK
</v-btn>
<v-spacer />
</v-card-actions>
</v-card>
</template>
<script>
import { getMunicipalities, getHealthAreas } from '@/axios/nomenclators'
import { mapGetters, mapMutations } from 'vuex'
import errorHandler from '@/mixins/error-handler'
import { checkPatientData } from '@/axios/patients'
export default {
name: 'PatientFile',
props: {
patient: {
type: Object,
default: null,
},
},
data: () => ({
editable: true,
formTitle: 'Datos del Paciente',
healthAreas: [],
healthArea: null,
municipality: null,
}),
computed: {
...mapGetters(['patient']),
role () {
return localStorage.getItem('role')
},
verified () {
return this.patient.estado_sistema > 2
},
estadoSistema () {
const ststus = this.systemStatuses
const pepe = this.systemStatuses
let ok = null
ststus.forEach(element => {
pepe.forEach(element => {
if (element.id === this.patient.estado_sistema) {
ok = element.nombre
}
})
return ok
},
province () {
const prov = this.provinces
let ok = null
prov.forEach(element => {
if (element.id === this.patient.provincia) {
ok = element.nombre
}
})
console.log(ok)
return ok
},
noApp () {
......@@ -474,74 +442,28 @@
systemStatuses () {
return this.$store.getters.systemStatuses
},
provinces () {
return this.$store.getters.provinces
},
municipalities () {
return this.$store.getters.municipalities
},
},
async created () {
const hResponse = await getHealthAreas(this.patient.municipio)
this.healthAreas = hResponse.data
await getMunicipalities(this.patient.provincia)
const munic = this.municipalities
let ok = null
munic.forEach(element => {
if (element.id === this.patient.municipio) {
ok = element.nombre
}
})
this.municipality = ok
let hItem = null
const hh = this.healthAreas
hh.forEach(element => {
if (element.id === this.patient.area_salud) {
hItem = element.nombre
}
})
this.healthArea = hItem
},
methods: {
...mapMutations(['setEditFromFile', 'setPIndex']),
async getHealthAreasData () {
try {
const hResponse = await getHealthAreas(this.patient.municipio)
this.healthAreas = hResponse.data
} catch (e) {
errorHandler(e)
}
},
sendClose () {
this.$emit('close-click')
},
sendEdit () {
this.setEditFromFile(true)
this.setPIndex(1)
this.$emit('edit-click')
},
async dataVerified () {
try {
await checkPatientData(this.patient)
this.$toast.success('Se ha verificado los datos correctamente', {
position: 'top-center',
dataVerified () {
// TODO: Cambiar el estado de los datos del paciente
this.$toast.success('Usted ha verificado los datos satisfactoriamente', {
position: 'bottom-center',
timeout: 5000,
closeOnClick: true,
pauseOnFocusLoss: false,
pauseOnHover: false,
pauseOnHover: true,
draggable: true,
draggablePercent: 0.6,
showCloseButtonOnHover: false,
hideProgressBar: false,
hideProgressBar: true,
closeButton: 'button',
icon: true,
rtl: false,
})
this.patient.estado_sistema = 3
} catch (e) {
errorHandler(e)
}
this.$emit('ok-click')
this.$emit('close-click')
},
},
}
......
<script>
import { VCard } from 'vuetify/lib'
export default {
name: 'Card',
extends: VCard,
}
</script>
<template>
<v-theme-provider :dark="dark">
<v-container class="pa-0">
<v-row
:justify="justify"
no-gutters
>
<v-col
v-if="icon"
:class="`text-${align}`"
cols="12"
class="mb-4"
>
<base-icon :color="color">
{{ icon }}
</base-icon>
</v-col>
<v-col
v-if="title || subtitle"
:cols="callout ? 9 : 12"
>
<base-subtitle
v-if="subtitle"
:title="subtitle"
space="1"
/>
<base-title
:title="title"
class="text-uppercase"
space="1"
/>
<base-divider :color="color" />
<base-body
v-if="text || $slots.default"
:text="text"
space="6"
>
<slot />
</base-body>
</v-col>
<v-col
v-if="callout"
cols="2"
>
<div
class="text-h2 grey--text text--lighten-4 font-weight-bold pr-8"
v-text="callout"
/>
</v-col>
</v-row>
</v-container>
</v-theme-provider>
</template>
<script>
// Mixins
import Heading from '@/mixins/heading'
export default {
name: 'BaseInfoCard',
mixins: [Heading],
props: {
dark: Boolean,
callout: String,
color: {
type: String,
default: 'primary',
},
icon: String,
subtitle: String,
text: String,
title: String,
},
}
</script>
<template>
<v-card
v-bind="$attrs"
:class="classes"
class="v-card--material pa-3"
color="white"
>
<div class="d-flex grow flex-wrap">
<v-avatar
v-if="avatar"
size="128"
class="mx-auto v-card--material__avatar elevation-6"
color="grey"
>
<v-img :src="avatar" />
</v-avatar>
<v-sheet
v-else
:class="{
'pa-7': !$slots.image
}"
:color="color"
:max-height="icon ? 90 : undefined"
:width="icon ? 'auto' : '100%'"
elevation="6"
class="text-start v-card--material__heading"
dark
>
<slot
v-if="$slots.heading"
name="heading"
/>
<slot
v-else-if="$slots.image"
name="image"
/>
<div
v-else-if="title && !icon"
class="text-h4 font-weight-light"
v-text="title"
/>
<v-icon
v-else-if="icon"
size="32"
v-text="icon"
/>
<div
v-if="text"
class="text-h4 font-weight-thin"
v-text="text"
/>
</v-sheet>
<div
v-if="$slots['after-heading']"
class="ml-6"
>
<slot name="after-heading" />
</div>
<div
v-else-if="icon && title"
class="ml-4"
>
<div
class="card-title font-weight-light"
v-text="title"
/>
</div>
</div>
<slot />
<template v-if="$slots.actions">
<v-divider class="mt-2" />
<v-card-actions class="pb-0">
<slot name="actions" />
</v-card-actions>
</template>
</v-card>
</template>
<script>
export default {
name: 'MaterialCard',
props: {
avatar: {
type: String,
default: '',
},
color: {
type: String,
default: 'success',
},
icon: {
type: String,
default: undefined,
},
image: {
type: Boolean,
default: false,
},
text: {
type: String,
default: '',
},
title: {
type: String,
default: '',
},
},
computed: {
classes () {
return {
'v-card--material--has-heading': this.hasHeading,
}
},
hasHeading () {
return Boolean(this.$slots.heading || this.title || this.icon)
},
hasAltHeading () {
return Boolean(this.$slots.heading || (this.title && this.icon))
},
},
}
</script>
<style lang="sass">
.v-card--material
&__avatar
position: relative
top: -64px
margin-bottom: -32px
&__heading
position: relative
top: -40px
transition: .3s ease
z-index: 1
</style>
<template>
<base-material-card
:icon="icon"
class="v-card--material-stats"
v-bind="$attrs"
v-on="$listeners"
>
<template v-slot:after-heading>
<div class="ml-auto text-right">
<div
class="body-3 grey--text font-weight-light"
v-text="title"
/>
<h3 class="text-h4 font-weight-light text--primary">
{{ value }} <small>{{ smallValue }}</small>
</h3>
</div>
</template>
<v-col
cols="12"
class="px-0"
>
<v-divider />
</v-col>
<v-icon
:color="subIconColor"
size="16"
class="ml-2 mr-1"
>
{{ subIcon }}
</v-icon>
<span
:class="subTextColor"
class="text-caption grey--text font-weight-light"
v-text="subText"
/>
</base-material-card>
</template>
<script>
import Card from './Card'
export default {
name: 'MaterialStatsCard',
inheritAttrs: false,
props: {
...Card.props,
icon: {
type: String,
required: true,
},
subIcon: {
type: String,
default: undefined,
},
subIconColor: {
type: String,
default: 'grey',
},
subTextColor: {
type: String,
default: undefined,
},
subText: {
type: String,
default: undefined,
},
title: {
type: String,
default: undefined,
},
value: {
type: String,
default: undefined,
},
smallValue: {
type: String,
default: undefined,
},
},
}
</script>
<style lang="sass">
.v-card--material-stats
display: flex
flex-wrap: wrap
position: relative
> div:first-child
justify-content: space-between
.v-card
border-radius: 4px
flex: 0 1 auto
.v-card__text
display: inline-block
flex: 1 0 calc(100% - 120px)
position: absolute
top: 0
right: 0
width: 100%
.v-card__actions
flex: 1 0 100%
</style>
......@@ -8,115 +8,41 @@
height="80"
>
<v-spacer />
<v-app-bar-nav-icon
@click="showHideDrawer"
/>
<v-menu
offset-y
max-width="200"
min-width="200"
>
<template v-slot:activator="{ on, attrs }">
<v-btn
v-bind="attrs"
icon
fab
class=""
v-on="on"
>
<v-tooltip
bottom
max-width="125"
min-width="125"
color="rgba(0,0,0, 0.8)"
>
<template v-slot:activator="{ on, attrs }">
<v-icon
v-bind="attrs"
color="#2D89C5"
v-on="on"
<!-- <div>
<v-tabs
class="hidden-sm-and-down"
optional
>
mdi-account
</v-icon>
<svg
viewBox="0 0 36 36"
height="12px"
width="12px"
role="img"
aria-hidden="true"
class="v-icon__svg langbtn"
<v-tab
v-for="(name, i) in items"
:key="i"
:to="{ name }"
:exact="name === 'Home'"
:ripple="false"
active-class="text--primary"
class="font-weight-bold"
min-width="96"
text
>
<path
fill="#2D89C5"
d="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"
{{ name }}
</v-tab>
</v-tabs>
</div> -->
<v-app-bar-nav-icon
@click="showHideDrawer"
/>
</svg>
</template>
<span class="tooltip">Usuario</span>
</v-tooltip>
</v-btn>
</template>
<v-lazy>
<v-card>
<v-list
dense
style="margin-left: 16px"
>
<v-list-item-title class="h3">
<b>
{{ userData }}
</b>
</v-list-item-title>
<v-list-item-subtitle>{{ role }}</v-list-item-subtitle>
</v-list>
<v-list
dense
>
<v-list-item
v-for="item in globalActions"
:key="item.title"
@click="navigateProcesses(item.link)"
>
<v-list-item-avatar>
<v-avatar
fab
>
<v-icon color="#2D89C5">
{{ item.icon }}
</v-icon>
</v-avatar>
</v-list-item-avatar>
<v-list-item-content>
<v-list-item-title>{{ item.title }}</v-list-item-title>
</v-list-item-content>
</v-list-item>
<v-list-item
@click="getMeOut"
>
<v-list-item-avatar>
<v-avatar
fab
>
<v-icon color="#2D89C5">
mdi-logout
</v-icon>
</v-avatar>
</v-list-item-avatar>
<v-list-item-content>
<v-list-item-title>Cerrar Sesión</v-list-item-title>
</v-list-item-content>
</v-list-item>
</v-list>
</v-card>
</v-lazy>
</v-menu>
</v-app-bar>
<!-- <home-drawer
v-model="drawer"
:items="items"
/> -->
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import { logout } from '@/axios/auth'
export default {
name: 'HomeAppBar',
......@@ -125,58 +51,15 @@
}, */
data: () => ({
drawer: null,
items: [
'Home',
'About',
'Contact',
'Pro',
],
}),
computed: {
globalActions () {
if (this.role === 'SADM') {
return [{ link: 'lol', title: 'Registrar', icon: 'mdi-account-plus' }]
} else {
return []
}
},
role () {
return localStorage.getItem('role')
},
userData () {
return localStorage.getItem('userData')
},
},
methods: {
navigateProcesses (link) {
this.$router.push({ name: 'Register' })
},
async getMeOut () {
// Todo: SEND LOGOUT REQUEST
try {
await logout()
localStorage.setItem('tkn', null)
localStorage.setItem('userData', null)
localStorage.setItem('role', null)
this.$toast.success('Sesión cerrada con éxito', {
position: 'bottom-center',
timeout: 3000,
closeOnClick: true,
pauseOnFocusLoss: false,
pauseOnHover: true,
draggable: true,
draggablePercent: 0.6,
showCloseButtonOnHover: false,
hideProgressBar: true,
closeButton: 'button',
icon: true,
rtl: false,
})
localStorage.setItem('tkn', null)
localStorage.setItem('userData', null)
localStorage.setItem('role', null)
this.$router.push({ name: 'Login' })
} catch (e) {
localStorage.setItem('tkn', null)
localStorage.setItem('userData', null)
localStorage.setItem('role', null)
this.$router.push({ name: 'Login' })
}
},
showHideDrawer () {
this.$store.commit('setDrawer')
},
......
......@@ -24,16 +24,14 @@
shaped
>
<v-list-item
v-for="link in lol"
:key="link.name"
:to="{ name: link.name }"
:exact="link.name === 'Home'"
v-for="name in items"
:key="name"
:to="{ name }"
:exact="name === 'Home'"
color="primary"
>
<v-list-item-content>
<v-list-item-title>
<v-icon>{{ link.icon }}</v-icon> {{ link.name }}
</v-list-item-title>
<v-list-item-title v-text="name" />
</v-list-item-content>
</v-list-item>
</v-list>
......@@ -41,7 +39,6 @@
</template>
<script>
import { mapGetters } from 'vuex'
export default {
name: 'HomeDrawer',
......@@ -53,37 +50,13 @@
},
data: () => ({
iconsrc: '@/assets/icon.png',
lol: [],
}),
computed: {
...mapGetters(['user', 'drawer']),
ok () {
return this.items
drawer () {
return this.$store.getters.drawer
},
role () {
return localStorage.getItem('role')
},
},
created () {
this.filterLinks()
},
methods: {
filterLinks () {
const filtered = this.items.filter(ok => ok.type === 'default')
switch (this.role) {
case 'MCP': {
this.lol = this.items
break
}
case 'SADM': {
this.lol = this.items
break
}
default: {
this.lol = filtered
}
}
},
},
}
</script>
......@@ -35,7 +35,7 @@
cols="12"
md="12"
>
<b>2021</b> FMFC@UCLV
<b>2020</b> FMFC@UCLV
</v-col>
</v-row>
</v-container>
......
......@@ -13,7 +13,6 @@
</template>
<script>
import { mapGetters } from 'vuex'
export default {
name: 'HomeLayout',
......@@ -26,17 +25,11 @@
},
data: () => ({
drawer: !null,
links: [
{ name: 'Control', type: 'default', icon: 'mdi-view-dashboard' },
{ name: 'Centros', type: 'admin', icon: 'mdi-hospital-building' },
{ name: 'Pacientes', type: 'default', icon: 'mdi-account-multiple' },
items: [
'Control',
'Centros',
'Pacientes',
],
}),
computed: {
...mapGetters(['user']),
items () {
return this.links
},
},
}
</script>
......@@ -11,7 +11,7 @@ import 'vue-toastification/dist/index.css'
import axios from 'axios'
import api from '@/utils/api'
import { encrypt } from './utils/enc'
import MultiFiltersPlugin from '@/plugins/MultiFilters'
import MultiFiltersPlugin from "@/plugins/MultiFilters";
Vue.use(Vuex)
......@@ -21,41 +21,18 @@ Vue.use(Vuebar)
Vue.use(MultiFiltersPlugin)
Vue.prototype.$axios = api
localStorage.setItem('tkn', encrypt('pepe'))
/* if (process.env.NODE_ENV === 'development') {
const { worker } = require('./mocks/browser')
worker.start()
} */
// if (process.env.NODE_ENV === 'development') {
// const { worker } = require('./mocks/browser')
// worker.start()
// }
Vue.use(Toast, {
transition: 'Vue-Toastification__bounce',
maxToasts: 20,
newestOnTop: true,
})
// CHECK SECURITY
router.beforeEach((to, from, next) => {
if (to.name !== 'Login' && localStorage.getItem('tkn') === 'null') {
Vue.$toast.error('Debe estar logueado para poder navegar en nuestro sitio', {
position: 'bottom-center',
timeout: 5000,
closeOnClick: true,
pauseOnFocusLoss: false,
pauseOnHover: true,
draggable: true,
draggablePercent: 0.6,
showCloseButtonOnHover: false,
hideProgressBar: true,
closeButton: 'button',
icon: true,
rtl: false,
})
router.push({ name: 'Login' })
} else if (to.name === 'Login' && localStorage.getItem('tkn') !== 'null') {
next({ name: 'Control' })
} else {
next()
}
})
new Vue({
axios,
......
This diff is collapsed.
......@@ -2,6 +2,7 @@
* Enabled v-data-table to have moire than one filter.
*/
class MultiFilters {
/**
* Constructor.
*
......@@ -10,12 +11,12 @@ class MultiFilters {
* @param filter
* @param headers
*/
constructor (items, filters, filter, headers) {
this.items = items
this.filter = filter
this.headers = headers
this.filters = filters
this.filterCallbacks = {}
constructor(items, filters, filter, headers) {
this.items = items;
this.filter = filter;
this.headers = headers;
this.filters = filters;
this.filterCallbacks = {};
}
/**
......@@ -24,8 +25,8 @@ class MultiFilters {
* @param val JSON chunk to be updated.
* @returns {*}
*/
static updateFilters (filters, val) {
return Object.assign({}, filters, val)
static updateFilters(filters, val) {
return Object.assign({}, filters, val);
}
/**
......@@ -33,31 +34,31 @@ class MultiFilters {
* @param filterName The name of the filter from which the information will be extracted
* @param filterCallback The callback that will apply the filter.
*/
registerFilter (filterName, filterCallback) {
this.filterCallbacks[filterName] = filterCallback
registerFilter(filterName, filterCallback) {
this.filterCallbacks[filterName] = filterCallback;
}
/**
* Run all filters.
* @returns {*}
*/
runFilters () {
const self = this
let filteredItems = self.items
runFilters() {
const self = this;
let filteredItems = self.items;
Object.entries(this.filterCallbacks)
.forEach(([entity, cb]) => {
filteredItems = cb.call(self, self.filters[entity], filteredItems)
})
filteredItems = cb.call(self, self.filters[entity], filteredItems);
});
return filteredItems
return filteredItems;
}
}
// Vue plugin.
const MultiFiltersPlugin = {
install (Vue, options) {
Vue.prototype.$MultiFilters = MultiFilters
},
}
install(Vue, options) {
Vue.prototype.$MultiFilters = MultiFilters;
}
};
export default MultiFiltersPlugin
export default MultiFiltersPlugin;
......@@ -59,11 +59,6 @@ const router = new Router({
component: () => import('@/views/pro/Index.vue'),
meta: { src: require('@/assets/pro.jpg') },
},
{
path: 'register',
name: 'Register',
component: () => import('@/views/admin/Index.vue'),
},
{
path: '*',
name: 'FourOhFour',
......
......@@ -3,16 +3,4 @@ export default {
systemStatuses: state => state.systemStatuses,
provinces: state => state.provinces,
municipalities: state => state.municipalities,
categories: state => state.categories,
centers: state => state.centers,
clasifications: state => state.clasifications,
antigens: state => state.antigens,
healthAreas: state => state.healthAreas,
healthStatuses: state => state.healthStatuses,
pIndex: state => state.pIndex,
patient: state => state.patient,
user: state => state.user,
filters: state => state.filters,
filterStatus: state => state.filterStatus,
editFromFile: state => state.editFromFile,
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment