Bläddra i källkod

Prescriptions - fix vue js error

Vijayakrishnan 3 år sedan
förälder
incheckning
f1dde6da3e
1 ändrade filer med 3 tillägg och 3 borttagningar
  1. 3 3
      resources/views/app/patient/prescriptions/index.blade.php

+ 3 - 3
resources/views/app/patient/prescriptions/index.blade.php

@@ -276,7 +276,7 @@
 
             function init() {
 
-                window.booApp = new Vue({
+                new Vue({
                     el: '#prescriptions-{{$patient->id}}',
                     delimiters: ['@{{', '}}'],
                     data: {
@@ -286,7 +286,7 @@
                         currentPrescriptionType: '',
 
                         // selected
-                        currentPrescription:  <?= $currentPrescription ?>,
+                        currentPrescription:  <?= $currentPrescription ? json_encode($currentPrescription) : 'null' ?>,
 
                         // for editing clinical details
                         currentPrescription_DRUG: {
@@ -409,7 +409,7 @@
                             copyToPatient: false,
                             copyToPatientFaxNumber: '',
                             copyToPatientEmail: '',
-                        },
+                        }
                     },
                     methods: {