fix : search test type in add test result

This commit is contained in:
zeinab.ashrafi
2025-06-09 09:37:24 +03:30
parent 4cc45515f0
commit 4ecc7c7352
2 changed files with 586 additions and 576 deletions
+3
View File
@@ -24,6 +24,9 @@ const urls = {
getInputs: function (id) { getInputs: function (id) {
return "/GetInputs/" + id; return "/GetInputs/" + id;
}, },
getInputsByCode: function (code) {
return "/GetInputs/" + code+"?by=code";
},
listMessages: function (page) { listMessages: function (page) {
return `/Messages?page=${page}`; return `/Messages?page=${page}`;
}, },
+111 -104
View File
@@ -2,45 +2,45 @@
<v-form ref="form"> <v-form ref="form">
<v-container grid-list-xs> <v-container grid-list-xs>
<material-card color="black" title="Submit Test Result"> <material-card color="black" title="Submit Test Result">
<v-layout wrap class="px-3 my-3" v-if="!$route.params.testResult"> <v-layout v-if="!$route.params.testResult" class="px-3 my-3" wrap>
<v-flex xs12 sm6 md4 lg3 xl2 class="WM-FlexCenter"> <v-flex class="WM-FlexCenter" lg3 md4 sm6 xl2 xs12>
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"/> <v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"/>
<v-autocomplete <v-autocomplete
:search-input.sync="searchInput"
:items="testTypeNames"
v-model="filter.name" v-model="filter.name"
:items="testTypeNames"
:search-input.sync="searchInput"
class="py-3 pr-3"
color="black"
item-text="name" item-text="name"
item-value="id" item-value="id"
label="Choose Test Type" label="Choose Test Type"
color="black"
class="py-3 pr-3"
/> />
</v-flex> </v-flex>
<v-flex xs12 sm6 md4 lg3 xl2 class="WM-FlexCenter ml-3"> <v-flex class="WM-FlexCenter ml-3" lg3 md4 sm6 xl2 xs12>
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"/> <v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"/>
<v-text-field <v-text-field
name="testcode"
v-model="filter.unique_code" v-model="filter.unique_code"
label="Or Enter Test Unique Code"
color="black"
class="py-3 pr-3" class="py-3 pr-3"
color="black"
label="Or Enter Test Unique Code"
name="testcode"
/> />
</v-flex> </v-flex>
<v-spacer/> <v-spacer/>
<v-flex xs12 sm4 md4 lg4 xl3 class="text-center text-md-right"> <v-flex class="text-center text-md-right" lg4 md4 sm4 xl3 xs12>
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black" <v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black"
@click="selectTestType" style="padding:10px 60px;"
style="padding:10px 60px;"> @click="selectTestType">
<v-icon class="black--text mr-2 caption">fas fa-chevron-right</v-icon> <v-icon class="black--text mr-2 caption">fas fa-chevron-right</v-icon>
<span class="black--text">Select Test Result</span> <span class="black--text">Select Test Result</span>
</v-btn> </v-btn>
</v-flex> </v-flex>
</v-layout> </v-layout>
<v-layout row wrap class="px-3 my-3" v-if="!$route.params.testResult && form.length"> <v-layout v-if="!$route.params.testResult && form.length" class="px-3 my-3" row wrap>
<v-divider/> <v-divider/>
</v-layout> </v-layout>
<v-layout wrap class="px-3 my-3" v-if="form.length"> <v-layout v-if="form.length" class="px-3 my-3" wrap>
<v-flex xs12 sm12 md12> <v-flex md12 sm12 xs12>
<h3 class="WM-BorderLeftTitle">{{ testTypeNameSelected }}</h3> <h3 class="WM-BorderLeftTitle">{{ testTypeNameSelected }}</h3>
</v-flex> </v-flex>
<!-- <v-flex xs12 sm3 md3> <!-- <v-flex xs12 sm3 md3>
@@ -53,35 +53,35 @@
prepend-icon="fas fa-sort-numeric-up" prepend-icon="fas fa-sort-numeric-up"
/> />
</v-flex> --> </v-flex> -->
<v-flex xs12 sm2 md2> <v-flex md2 sm2 xs12>
<v-menu lazy style="z-index: 12;" <v-menu v-model="menu" :close-on-content-click="true"
:close-on-content-click="true" class="pa-2"
transition="v-scale-transition" lazy
offset-y offset-y
v-model="menu" style="z-index: 12;"
class="pa-2"> transition="v-scale-transition">
<v-text-field style="padding-top:0 !important" <v-text-field slot="activator"
v-model="formData.date"
color="black"
label="Date"
prepend-icon="far fa-calendar-alt" prepend-icon="far fa-calendar-alt"
required required
slot="activator" style="padding-top:0 !important"/>
label="Date"
v-model="formData.date"
color="black"/>
<v-date-picker <v-date-picker
v-model="formData.date"
:date-format="date => new Date(formData.date).toDateString()"
:min="today" :min="today"
color="pink" color="pink"
no-title no-title/>
v-model="formData.date"
:date-format="date => new Date(formData.date).toDateString()"/>
</v-menu> </v-menu>
</v-flex> </v-flex>
<v-flex xs12 sm2 md2> <v-flex md2 sm2 xs12>
<v-switch color="light-green accent-3" v-model="result" :label="'Result: ' + formData.result"/> <v-switch v-model="result" :label="'Result: ' + formData.result" color="light-green accent-3"/>
</v-flex> </v-flex>
<v-spacer/> <v-spacer/>
<v-flex xs12 sm12 md12 v-if="galleryDataLoaded"> <v-flex v-if="galleryDataLoaded" md12 sm12 xs12>
<template> <template>
<wm-Dropzone :Images="galleries" :BatchID="file_batch_id" <wm-Dropzone :BatchID="file_batch_id" :Images="galleries"
:ModelID="$route.params.testResult||null" ModelType="TestResult"/> :ModelID="$route.params.testResult||null" ModelType="TestResult"/>
</template> </template>
</v-flex> </v-flex>
@@ -90,33 +90,33 @@
<!--______________________ DynamicComponent :: Began _______________________--> <!--______________________ DynamicComponent :: Began _______________________-->
<v-layout wrap class="px-3 my-3 align-center"> <v-layout class="px-3 my-3 align-center" wrap>
<v-flex :class="['pa-2', item.size]" v-for="(item, key) in form" :key="key"> <v-flex v-for="(item, key) in form" :key="key" :class="['pa-2', item.size]">
<v-container row md-12 sm-12 xs-12 class="pa-0" v-if="item.type == 'Temperature'"> <v-container v-if="item.type == 'Temperature'" class="pa-0" md-12 row sm-12 xs-12>
<v-layout row wrap> <v-layout row wrap>
<h3 class="WM-BorderLeftTitle">{{ item.name }}</h3> <h3 class="WM-BorderLeftTitle">{{ item.name }}</h3>
</v-layout> </v-layout>
<v-layout row wrap> <v-layout row wrap>
<v-container fluid class="WM-Padding-LR-0"> <v-container class="WM-Padding-LR-0" fluid>
<v-flex xs12> <v-flex xs12>
<v-slider <v-slider
step="0.1"
prepend-icon="fas fa-temperature-high"
v-model="formData[item.name+'_'+item.id]" v-model="formData[item.name+'_'+item.id]"
min="0"
max="200" max="200"
min="0"
prepend-icon="fas fa-temperature-high"
step="0.1"
thumb-label="always" thumb-label="always"
/> />
</v-flex> </v-flex>
</v-container> </v-container>
</v-layout> </v-layout>
</v-container> </v-container>
<v-container row md-12 sm-12 xs-12 class="pa-0" v-if="item.type == 'Text'"> <v-container v-if="item.type == 'Text'" class="pa-0" md-12 row sm-12 xs-12>
<v-layout row wrap> <v-layout row wrap>
<h3 class="WM-BorderLeftTitle">{{ item.name }}</h3> <h3 class="WM-BorderLeftTitle">{{ item.name }}</h3>
</v-layout> </v-layout>
<v-layout row wrap> <v-layout row wrap>
<v-container fluid class="WM-Padding-LR-0"> <v-container class="WM-Padding-LR-0" fluid>
<v-text-field <v-text-field
v-model="formData[item.name+'_'+item.id]" v-model="formData[item.name+'_'+item.id]"
:label="item.name" :label="item.name"
@@ -126,72 +126,72 @@
</v-container> </v-container>
</v-layout> </v-layout>
</v-container> </v-container>
<v-container row md-12 sm-12 xs-12 class="pa-0" v-if="item.type == 'Pressure'"> <v-container v-if="item.type == 'Pressure'" class="pa-0" md-12 row sm-12 xs-12>
<v-layout row wrap> <v-layout row wrap>
<h3 class="WM-BorderLeftTitle">{{ item.name }}</h3> <h3 class="WM-BorderLeftTitle">{{ item.name }}</h3>
</v-layout> </v-layout>
<v-layout row wrap> <v-layout row wrap>
<v-container fluid class="WM-Padding-LR-0"> <v-container class="WM-Padding-LR-0" fluid>
<v-flex xs12> <v-flex xs12>
<v-slider <v-slider
v-model="formData[item.name+'_'+item.id]"
max="3"
min="-1"
prepend-icon="fa fa-flask" prepend-icon="fa fa-flask"
step="0.01" step="0.01"
v-model="formData[item.name+'_'+item.id]"
min="-1"
max="3"
thumb-label="always" thumb-label="always"
/> />
</v-flex> </v-flex>
</v-container> </v-container>
</v-layout> </v-layout>
</v-container> </v-container>
<v-container row md-12 sm-12 xs-12 class="pa-0" v-if="item.type == 'Select'"> <v-container v-if="item.type == 'Select'" class="pa-0" md-12 row sm-12 xs-12>
<v-layout row wrap> <v-layout row wrap>
<h3 class="WM-BorderLeftTitle">{{ item.name }}</h3> <h3 class="WM-BorderLeftTitle">{{ item.name }}</h3>
</v-layout> </v-layout>
<v-layout row wrap> <v-layout row wrap>
<v-container fluid class="WM-Padding-LR-0"> <v-container class="WM-Padding-LR-0" fluid>
<v-flex xs12> <v-flex xs12>
<v-select <v-select
multiple
prepend-icon="fa fa-check"
:items="item.options"
v-model="formData[item.name+'_'+item.id]" v-model="formData[item.name+'_'+item.id]"
:items="item.options"
:label="item.name" :label="item.name"
:menu-props="{ closeOnContentClick: false }"
color="black" color="black"
item-text="title" item-text="title"
item-value="id" item-value="id"
:menu-props="{ closeOnContentClick: false }" multiple
prepend-icon="fa fa-check"
/> />
</v-flex> </v-flex>
</v-container> </v-container>
</v-layout> </v-layout>
</v-container> </v-container>
<v-container row md-12 sm-12 xs-12 class="pa-0" v-if="item.type == 'Checkbox'"> <v-container v-if="item.type == 'Checkbox'" class="pa-0" md-12 row sm-12 xs-12>
<v-layout row wrap> <v-layout row wrap>
<h3 class="WM-BorderLeftTitle">{{ item.name }}</h3> <h3 class="WM-BorderLeftTitle">{{ item.name }}</h3>
</v-layout> </v-layout>
<v-layout row wrap> <v-layout row wrap>
<v-container fluid class="WM-Padding-LR-0"> <v-container class="WM-Padding-LR-0" fluid>
<v-flex xs12 class="WM-FlexWrap mr-3"> <v-flex class="WM-FlexWrap mr-3" xs12>
<v-checkbox <v-checkbox
v-for="(optionValue, keyOption) in item.options" v-for="(optionValue, keyOption) in item.options"
:key="keyOption" :key="keyOption"
:label="optionValue.title"
v-model="formData[item.name+'_'+item.id]" v-model="formData[item.name+'_'+item.id]"
:label="optionValue.title"
:value="optionValue.id" :value="optionValue.id"
/> />
</v-flex> </v-flex>
</v-container> </v-container>
</v-layout> </v-layout>
</v-container> </v-container>
<v-container row md-12 sm-12 xs-12 class="pa-0" v-if="item.type == 'Radiobutton'"> <v-container v-if="item.type == 'Radiobutton'" class="pa-0" md-12 row sm-12 xs-12>
<v-layout row wrap> <v-layout row wrap>
<h3 class="WM-BorderLeftTitle">{{ item.name }}</h3> <h3 class="WM-BorderLeftTitle">{{ item.name }}</h3>
</v-layout> </v-layout>
<v-layout row wrap> <v-layout row wrap>
<v-container fluid class="WM-Padding-LR-0"> <v-container class="WM-Padding-LR-0" fluid>
<v-flex xs12 class="WM-FlexWrap"> <v-flex class="WM-FlexWrap" xs12>
<v-radio-group v-model="formData[item.name+'_'+item.id]"> <v-radio-group v-model="formData[item.name+'_'+item.id]">
<v-radio <v-radio
v-for="(optionValue, keyOption) in item.options" v-for="(optionValue, keyOption) in item.options"
@@ -204,54 +204,54 @@
</v-container> </v-container>
</v-layout> </v-layout>
</v-container> </v-container>
<v-container row md-12 sm-12 xs-12 class="pa-0" v-if="item.type == 'Switch'"> <v-container v-if="item.type == 'Switch'" class="pa-0" md-12 row sm-12 xs-12>
<v-layout row wrap> <v-layout row wrap>
<h3 class="WM-BorderLeftTitle">{{ item.name }}</h3> <h3 class="WM-BorderLeftTitle">{{ item.name }}</h3>
</v-layout> </v-layout>
<v-layout row wrap> <v-layout row wrap>
<v-container fluid class="WM-Padding-LR-0"> <v-container class="WM-Padding-LR-0" fluid>
<v-flex xs12> <v-flex xs12>
<v-switch <v-switch
color="light-green accent-3"
v-model="formData[item.name+'_'+item.id]" v-model="formData[item.name+'_'+item.id]"
:label="item.name + ': ' + formData[item.name+'_'+item.id].toString()" :label="item.name + ': ' + formData[item.name+'_'+item.id].toString()"
color="light-green accent-3"
/> />
</v-flex> </v-flex>
</v-container> </v-container>
</v-layout> </v-layout>
</v-container> </v-container>
<v-container row md-12 sm-12 xs-12 class="pa-0" v-if="item.type == 'Range'"> <v-container v-if="item.type == 'Range'" class="pa-0" md-12 row sm-12 xs-12>
<v-layout row wrap> <v-layout row wrap>
<h3 class="WM-BorderLeftTitle">{{ item.name }}</h3> <h3 class="WM-BorderLeftTitle">{{ item.name }}</h3>
</v-layout> </v-layout>
<v-layout row wrap> <v-layout row wrap>
<v-container fluid class="WM-Padding-LR-0"> <v-container class="WM-Padding-LR-0" fluid>
<v-flex xs12> <v-flex xs12>
<v-slider <v-slider
v-model="formData[item.name+'_'+item.id]" v-model="formData[item.name+'_'+item.id]"
:min="item.options[0].title"
:max="item.options[1].title" :max="item.options[1].title"
thumb-label="always" :min="item.options[0].title"
color="black" color="black"
prepend-icon="fa fa-sliders" prepend-icon="fa fa-sliders"
thumb-label="always"
/> />
</v-flex> </v-flex>
</v-container> </v-container>
</v-layout> </v-layout>
</v-container> </v-container>
<v-container row md-12 sm-12 xs-12 class="pa-0" v-if="item.type == 'Time'"> <v-container v-if="item.type == 'Time'" class="pa-0" md-12 row sm-12 xs-12>
<v-layout row wrap> <v-layout row wrap>
<h3 class="WM-BorderLeftTitle">{{ item.name }}</h3> <h3 class="WM-BorderLeftTitle">{{ item.name }}</h3>
</v-layout> </v-layout>
<v-layout row wrap> <v-layout row wrap>
<v-container fluid class="WM-Padding-LR-0"> <v-container class="WM-Padding-LR-0" fluid>
<v-flex xs12> <v-flex xs12>
<v-text-field <v-text-field
v-model="formData[item.name+'_'+item.id]" v-model="formData[item.name+'_'+item.id]"
:label="item.name" :label="item.name"
class="WM-Font-30" class="WM-Font-30"
mask="##:##"
color="black" color="black"
mask="##:##"
prepend-icon="fa fa-clock-o" prepend-icon="fa fa-clock-o"
/> />
</v-flex> </v-flex>
@@ -260,84 +260,85 @@
</v-container> </v-container>
<!-- <v-layout row wrap> <!-- <v-layout row wrap>
<template v-if="item.type == 'Form'"> --> <template v-if="item.type == 'Form'"> -->
<v-container row md-12 sm-12 xs-12 <v-container v-if="item.type == 'Form'"
class="WM-Border WM-Border-LightGray WM-Padding-10 WM-BorderRadius-5" class="WM-Border WM-Border-LightGray WM-Padding-10 WM-BorderRadius-5" md-12 row
v-if="item.type == 'Form'"> sm-12
xs-12>
<v-layout row wrap> <v-layout row wrap>
<h3 class="WM-BorderLeftTitle">{{ item.name }}</h3> <h3 class="WM-BorderLeftTitle">{{ item.name }}</h3>
</v-layout> </v-layout>
<v-layout row wrap> <v-layout row wrap>
<v-flex <v-flex
:class="['pa-2', children.size]"
v-for="(children, keyChildren) in item.children" v-for="(children, keyChildren) in item.children"
:key="keyChildren"> :key="keyChildren"
<v-container fluid v-if="children.type == 'Text'" class="pa-0"> :class="['pa-2', children.size]">
<v-container v-if="children.type == 'Text'" class="pa-0" fluid>
<p>{{ children.name }}</p> <p>{{ children.name }}</p>
<v-flex xs12> <v-flex xs12>
<v-text-field <v-text-field
prepend-icon="fa fa-align-left"
v-model="formData[children.name+'_'+children.id]" v-model="formData[children.name+'_'+children.id]"
:label="children.name" :label="children.name"
color="black" color="black"
prepend-icon="fa fa-align-left"
/> />
</v-flex> </v-flex>
</v-container> </v-container>
<v-container fluid v-if="children.type == 'Temperature'" class="pa-0"> <v-container v-if="children.type == 'Temperature'" class="pa-0" fluid>
<p>{{ children.name }}</p> <p>{{ children.name }}</p>
<v-flex xs12> <v-flex xs12>
<v-slider <v-slider
v-model="formData[children.name+'_'+children.id]"
max="200"
min="0"
prepend-icon="fas fa-temperature-high" prepend-icon="fas fa-temperature-high"
step="0.1" step="0.1"
v-model="formData[children.name+'_'+children.id]"
min="0"
max="200"
thumb-label="always" thumb-label="always"
/> />
</v-flex> </v-flex>
</v-container> </v-container>
<v-container fluid v-if="children.type == 'Pressure'" class="pa-0"> <v-container v-if="children.type == 'Pressure'" class="pa-0" fluid>
<p>{{ children.name }}</p> <p>{{ children.name }}</p>
<v-flex xs12> <v-flex xs12>
<v-slider <v-slider
prepend-icon="fa fa-flask"
v-model="formData[children.name+'_'+children.id]" v-model="formData[children.name+'_'+children.id]"
min="-1"
step="0.01"
max="3" max="3"
min="-1"
prepend-icon="fa fa-flask"
step="0.01"
thumb-label="always" thumb-label="always"
/> />
</v-flex> </v-flex>
</v-container> </v-container>
<v-container fluid v-if="children.type == 'Select'" class="pa-0"> <v-container v-if="children.type == 'Select'" class="pa-0" fluid>
<p>{{ children.name }}</p> <p>{{ children.name }}</p>
<v-flex xs12> <v-flex xs12>
<v-select <v-select
multiple
prepend-icon="fa fa-check"
:items="children.options"
v-model="formData[children.name+'_'+children.id]" v-model="formData[children.name+'_'+children.id]"
:items="children.options"
:label="children.name" :label="children.name"
color="black" color="black"
item-text="title" item-text="title"
item-value="id" item-value="id"
multiple
prepend-icon="fa fa-check"
/> />
</v-flex> </v-flex>
</v-container> </v-container>
<v-container fluid v-if="children.type == 'Checkbox'" class="pa-0"> <v-container v-if="children.type == 'Checkbox'" class="pa-0" fluid>
<p>{{ children.name }}</p> <p>{{ children.name }}</p>
<v-flex xs12 class="WM-FlexWrap mr-3"> <v-flex class="WM-FlexWrap mr-3" xs12>
<v-checkbox <v-checkbox
v-for="(optionValue, keyOption) in children.options" v-for="(optionValue, keyOption) in children.options"
:key="keyOption" :key="keyOption"
:label="optionValue.title"
v-model="formData[children.name+'_'+children.id]" v-model="formData[children.name+'_'+children.id]"
:label="optionValue.title"
:value="optionValue.id" :value="optionValue.id"
/> />
</v-flex> </v-flex>
</v-container> </v-container>
<v-container fluid v-if="children.type == 'Radiobutton'" class="pa-0"> <v-container v-if="children.type == 'Radiobutton'" class="pa-0" fluid>
<p>{{ children.name }}</p> <p>{{ children.name }}</p>
<v-flex xs12 class="WM-FlexWrap"> <v-flex class="WM-FlexWrap" xs12>
<v-radio-group v-model="formData[children.name+'_'+children.id]"> <v-radio-group v-model="formData[children.name+'_'+children.id]">
<v-radio <v-radio
v-for="(optionValue, keyOption) in children.options" v-for="(optionValue, keyOption) in children.options"
@@ -348,29 +349,29 @@
</v-radio-group> </v-radio-group>
</v-flex> </v-flex>
</v-container> </v-container>
<v-container fluid v-if="children.type == 'Switch'" class="pa-0"> <v-container v-if="children.type == 'Switch'" class="pa-0" fluid>
<p>{{ children.name }}</p> <p>{{ children.name }}</p>
<v-flex xs12> <v-flex xs12>
<v-switch <v-switch
color="light-green accent-3"
v-model="formData[children.name+'_'+children.id]" v-model="formData[children.name+'_'+children.id]"
:label="children.name + ': ' + formData[children.name+'_'+children.id].toString()" :label="children.name + ': ' + formData[children.name+'_'+children.id].toString()"
color="light-green accent-3"
/> />
</v-flex> </v-flex>
</v-container> </v-container>
<v-container fluid v-if="children.type == 'Range'" class="pa-0"> <v-container v-if="children.type == 'Range'" class="pa-0" fluid>
<p>{{ item.name }}</p> <p>{{ item.name }}</p>
<v-flex xs12> <v-flex xs12>
<v-slider <v-slider
v-model="formData[children.name+'_'+children.id]" v-model="formData[children.name+'_'+children.id]"
:min="children.options[0].title"
:max="children.options[1].title" :max="children.options[1].title"
thumb-label="always" :min="children.options[0].title"
prepend-icon="fa fa-check" prepend-icon="fa fa-check"
thumb-label="always"
/> />
</v-flex> </v-flex>
</v-container> </v-container>
<v-container fluid v-if="children.type == 'Time'" class="pa-0"> <v-container v-if="children.type == 'Time'" class="pa-0" fluid>
<p>{{ children.name }}</p> <p>{{ children.name }}</p>
<v-flex xs12> <v-flex xs12>
<v-text-field <v-text-field
@@ -389,10 +390,10 @@
</v-layout> --> </v-layout> -->
</v-flex> </v-flex>
</v-layout> </v-layout>
<v-layout row wrap class="px-3 my-3"> <v-layout class="px-3 my-3" row wrap>
<v-divider/> <v-divider/>
</v-layout> </v-layout>
<v-layout align-center justify-center wrap class="px-3 mt-2"> <v-layout align-center class="px-3 mt-2" justify-center wrap>
<router-link :to="{name: 'AllResultTest'}"> <router-link :to="{name: 'AllResultTest'}">
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black"> <v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black">
<v-icon class="black--text mr-2 caption">fas fa-chevron-left</v-icon> <v-icon class="black--text mr-2 caption">fas fa-chevron-left</v-icon>
@@ -480,8 +481,14 @@ export default {
this.testTypeNames = result.data.data; this.testTypeNames = result.data.data;
}, },
async selectTestType() { async selectTestType() {
let result;
let selectedTestType = this.filter.unique_code !== "" ? +this.filter.unique_code : this.filter.name; let selectedTestType = this.filter.unique_code !== "" ? +this.filter.unique_code : this.filter.name;
const result = await ApiService.get(urls.getInputs(selectedTestType)); if (this.filter.unique_code !== "") {
result = await ApiService.get(urls.getInputsByCode(selectedTestType));
} else {
result = await ApiService.get(urls.getInputs(selectedTestType));
}
if (result && result.data.data && result.status == 200) { if (result && result.data.data && result.status == 200) {
this.testTypeNameSelected = result.data.data.testType.name; this.testTypeNameSelected = result.data.data.testType.name;
this.form = result.data.data.inputs; this.form = result.data.data.inputs;