diff --git a/resources/views/form/rapport-vitalis/1782108512-d82ecb15-56f9-45f0-9a57-3ed76e9a5187.blade.php b/resources/views/form/rapport-vitalis/1782108512-d82ecb15-56f9-45f0-9a57-3ed76e9a5187.blade.php
index f8adf18c..eea271ed 100644
--- a/resources/views/form/rapport-vitalis/1782108512-d82ecb15-56f9-45f0-9a57-3ed76e9a5187.blade.php
+++ b/resources/views/form/rapport-vitalis/1782108512-d82ecb15-56f9-45f0-9a57-3ed76e9a5187.blade.php
@@ -72,7 +72,7 @@
name="{{$question->code}}"
class="form-control"
{{$question->required == 'yes'?'required':'' }}
- {{ in_array($question->code, ['speciality','msl_code']) ? 'readonly' : '' }}
+ {{ in_array($question->code, ['speciality','legacy_code']) ? 'readonly' : '' }}
value="{{isset($question->value)?$question->value:''}}">
@break
@case('date')
@@ -88,11 +88,20 @@
@break
@@ -243,7 +252,7 @@
$("")
.attr("value", itm.value)
- .attr("msl_code", itm.contact.msl_code)
+ .attr("legacy_code", itm.contact.legacy_code)
.attr("speciality", itm.contact.speciality)
.text(itm.display)
@@ -285,9 +294,16 @@
});
+ // $('#field-contact_id').change(function() {
+ // $('#field-speciality').val($('option:selected', this).attr('speciality'))
+ // })
$('#field-contact_id').change(function() {
- $('#field-speciality').val($('option:selected', this).attr('speciality'))
- })
+ let speciality = $('option:selected', this).attr('speciality');
+
+ console.log('Speciality:', speciality);
+
+ $('#field-speciality').val(speciality);
+});
$('#field-contact_id').change(function() {
@@ -297,16 +313,16 @@
console.log(
"MSL CODE:",
- $('option:selected', this).attr('msl_code')
+ $('option:selected', this).attr('legacy_code')
);
- $('#field-msl_code').val(
- $('option:selected', this).attr('msl_code')
+ $('#field-legacy_code').val(
+ $('option:selected', this).attr('legacy_code')
);
});
- $('#field-speciality,#field-msl_code').attr('readonly',true);
+ $('#field-speciality,#field-legacy_code').attr('readonly',true);
$('#field-chemist_name').on('input', function () {
this.value = this.value.replace(/[^a-zA-Z\s]/g, '');