From 1634d38825515805c2d9d9f17a77d381b18ceba4 Mon Sep 17 00:00:00 2001 From: matt Date: Fri, 12 Jul 2019 21:54:43 -0500 Subject: [PATCH] show selected status of charge correctly --- components/view/charge-fields.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/components/view/charge-fields.vue b/components/view/charge-fields.vue index 2027eef..e277654 100644 --- a/components/view/charge-fields.vue +++ b/components/view/charge-fields.vue @@ -35,15 +35,18 @@ computed: { convicted() { - return this.$store.state.convictions[this.conviction_index].charges[this.charge_index]['convicted'] ? ' -- Convicted' : ''; + return parseInt(this.charge.convicted)? ' -- Convicted' : ''; }, eligible() { - return this.$store.state.convictions[this.conviction_index].charges[this.charge_index]['eligible'] ? ', Eligible' : ''; + return parseInt(this.charge.eligible)? ', Eligible' : ''; }, please_expunge() { - return this.$store.state.convictions[this.conviction_index].charges[this.charge_index]['please_expunge'] ? ', PleaseExpunge' : ''; + return parseInt(this.charge.please_expunge) ? ', PleaseExpunge' : ''; }, }, + mounted() { + console.log('mounted charge', this.eligible, this.charge.eligible) + } }