diff --git a/src/components/core/Drawer.vue b/src/components/core/Drawer.vue
index 0de6261..c471437 100644
--- a/src/components/core/Drawer.vue
+++ b/src/components/core/Drawer.vue
@@ -19,15 +19,15 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
@@ -53,7 +53,7 @@ export default {
{
to: {name: 'MyInfo'},
icon: 'mdi-account',
- text: 'My Info'
+ text: 'My Info',
},
{
to: {name: 'SubmitTestResult'},
@@ -63,53 +63,36 @@ export default {
{
to: {name: 'AllResultTest'},
icon: 'description',
- text: 'All Test Result',
- line: true
- },
- {
- to: {name: 'ManageMedicalCenter'},
- icon: 'far fa-building',
- text: 'Manage Medical Center',
- role: 'Admin',
- },
- {
- to: {name: 'ManageUsers'},
- icon: 'far fa-address-book',
- text: 'Manage Users',
- role: 'Admin',
- },
- {
- to: {name: 'ListTestType'},
- icon: 'fas fa-vial',
- text: 'List Test Type',
- role: 'Admin',
+ text: 'Test Results',
line: true
},
+
{
to: {name: 'AllItem'},
icon: 'far fa-clone',
text: 'Items',
- role: 'Admin|Supervisor|User'
},
{
to: {name: 'MyItem'},
icon: 'far fa-clone',
text: 'My Items',
- role: 'Admin|Supervisor|User',
line: true
},
{
to: {name: 'AllPackage'},
icon: 'fas fa-archive',
text: 'Packages',
- role: 'Admin|Supervisor|User',
+ },
+ {
+ to: {name: 'MyPackage'},
+ icon: 'far fa-clone',
+ text: 'My Packages',
line: true
},
{
to: {name: 'AllLabels'},
icon: 'fas fa-inbox',
text: 'Labels',
- line: true
},
{
to: {name: 'AllCycle'},
@@ -117,16 +100,34 @@ export default {
text: 'Cycles',
line: true
},
- /* {
- to: {name: 'Statistics'},
- icon: 'fas fa-chart-bar',
- text: 'Statistics',
+ {
+ to: {name: 'ManageMedicalCenter'},
+ icon: 'far fa-building',
+ text: 'Medical Center',
+ role: 'Admin',
},
{
- to: {name: 'Tickets'},
- icon: 'style',
- text: 'Tickets',
- },*/
+ to: {name: 'ManageUsers'},
+ icon: 'far fa-address-book',
+ text: 'Users',
+ role: 'Admin|Supervisor',
+ },
+ {
+ to: {name: 'ListTestType'},
+ icon: 'fas fa-vial',
+ text: 'Manage Test Type',
+ role: 'Admin',
+ },
+ /* {
+ to: {name: 'Statistics'},
+ icon: 'fas fa-chart-bar',
+ text: 'Statistics',
+ },
+ {
+ to: {name: 'Tickets'},
+ icon: 'style',
+ text: 'Tickets',
+ },*/
],
responsive: false
}),
diff --git a/src/components/core/Dropzone.vue b/src/components/core/Dropzone.vue
index 91dc8cc..ad3ad59 100644
--- a/src/components/core/Dropzone.vue
+++ b/src/components/core/Dropzone.vue
@@ -24,7 +24,6 @@
import { ApiService } from "@/services";
import { urls } from "@/config/urls";
import toast from "@/services/global/toast.service";
- import { mapGetters } from 'vuex'
export default {
props: ['ModelID', 'Images', 'BatchID', 'ModelType'],
@@ -33,7 +32,7 @@
},
data: () => ({
dropzoneOptions: {
- url: '/api/UploadFile',
+ url: '/api/store_media',
thumbnailWidth: 150,
maxFilesize: 2,
headers: { "Authorization": `Bearer ${TokenService.getToken()}` },
@@ -69,7 +68,7 @@
}
},
sending(file, xhr, form_data) {
- form_data.append('file', file);
+ // form_data.append('file', file);
form_data.append('model_id', this.ModelID);
form_data.append('model_type', this.ModelType);
form_data.append('batch_id', this.BatchID);
diff --git a/src/components/core/Toolbar.vue b/src/components/core/Toolbar.vue
index 0868077..c2096ec 100644
--- a/src/components/core/Toolbar.vue
+++ b/src/components/core/Toolbar.vue
@@ -5,7 +5,7 @@
mdi-view-list
- {{ title }}
+
{{ title }}
@@ -76,10 +76,7 @@
diff --git a/src/components/material/Cards.vue b/src/components/material/Cards.vue
index 2d451e5..fa59e8b 100644
--- a/src/components/material/Cards.vue
+++ b/src/components/material/Cards.vue
@@ -1,83 +1,86 @@
-
-
-
-
-
-
-
{{title}}
-
{{text}}
-
-
-
-
-
-
-
-
+
+
+
+
+
+ {{ icon }}
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/material/ChartCard.vue b/src/components/material/ChartCard.vue
index 2876dd0..7909fcd 100644
--- a/src/components/material/ChartCard.vue
+++ b/src/components/material/ChartCard.vue
@@ -1,9 +1,5 @@
-
+
-
+ :type="type"/>
-
-
+
diff --git a/src/components/material/Notification.vue b/src/components/material/Notification.vue
index d608c72..c5328d1 100644
--- a/src/components/material/Notification.vue
+++ b/src/components/material/Notification.vue
@@ -4,8 +4,7 @@
:class="[`elevation-${elevation}`]"
:value="value"
class="v-alert--notification"
- v-on="$listeners"
- >
+ v-on="$listeners">
diff --git a/src/components/material/StatsCard.vue b/src/components/material/StatsCard.vue
index a4b174d..341fa8b 100644
--- a/src/components/material/StatsCard.vue
+++ b/src/components/material/StatsCard.vue
@@ -1,46 +1,20 @@
-
+
-
- {{ icon }}
-
+ dark>
+ {{ icon }}
-
-
- {{ value }} {{ smallValue }}
-
+
+
{{ value }} {{ smallValue }}
-
-
- {{ subIcon }}
-
-
+ {{ subIcon }}
+
diff --git a/src/components/modal/package/Show.vue b/src/components/modal/package/Show.vue
index cfa73e1..b0ca596 100644
--- a/src/components/modal/package/Show.vue
+++ b/src/components/modal/package/Show.vue
@@ -58,13 +58,13 @@
-
+
- {{ key+1 + ": " + item.name }} ({{ item.pivot.count }})
+ {{ key+1 + ": " + item.name }} ({{ item.pivot.count }})
note : {{ item.note }}
@@ -72,6 +72,9 @@
+
+ No Item Has Been Selected
+
diff --git a/src/config/urls.js b/src/config/urls.js
index c4501a2..aa31f35 100644
--- a/src/config/urls.js
+++ b/src/config/urls.js
@@ -98,6 +98,9 @@ const urls = {
listPackage: function (filter) {
return "/Packages" + filter;
},
+ listMyPackage: function (filter) {
+ return "/MyPackages" + filter;
+ },
showPackage: function (id) {
return `/Packages/${id}`;
},
diff --git a/src/router/paths.js b/src/router/paths.js
index 4417191..ba3ecbe 100644
--- a/src/router/paths.js
+++ b/src/router/paths.js
@@ -284,6 +284,14 @@ export default [
title:'My Item | CSSD Dashboard',
}
},
+ {
+ path: '/my-Package',
+ name: 'MyPackage',
+ view: 'MyPackage/List',
+ meta:{
+ title:'My Package | CSSD Dashboard',
+ }
+ },
{
path: '/tickets',
name: 'Tickets',
diff --git a/src/styles/css/Assets/Main.scss b/src/styles/css/Assets/Main.scss
index fe08e60..e68d0bd 100644
--- a/src/styles/css/Assets/Main.scss
+++ b/src/styles/css/Assets/Main.scss
@@ -106,6 +106,9 @@ h3.CSSD-font {
border-left: 3px solid;
}
+.WM-LightGray-BG {
+ background-color: #eee !important;
+}
.WM-OrangeGradient-BG {
background: linear-gradient(-245.99599235188236deg, rgba(252, 184, 162, 1) -0.3020833333333286%, rgba(255, 236, 210, 1) 93.03125%);
}
diff --git a/src/views/Dashboard.vue b/src/views/Dashboard.vue
index f90e000..e3d9556 100644
--- a/src/views/Dashboard.vue
+++ b/src/views/Dashboard.vue
@@ -1,12 +1,12 @@
-
+
-
+
-
+
@@ -17,13 +17,13 @@
-
+
-
+
-
+
-
+
@@ -63,34 +63,34 @@ export default {
{
title: 'Manage Users',
text: 'You can Manage the users information',
- icon: '/img/Static/Dashboard/manageusers.png',
- color: 'WM-LightGreenGradient-BG',
+ // image: '/img/Static/Dashboard/manageusers.png',
+ color: 'WM-LightGray-BG',
route: {name: 'ManageUsers'},
aligntext: 'text-md-left',
alignimg: 'text-md-left',
- column: 'xs12 md12 sm12',
+ column: 'xs12 md6 sm6',
role: 'Admin|Supervisor'
},
{
title: 'Manage Medical Center',
text: 'You can edit the medical center information',
- icon: '/img/Static/Dashboard/settings.png',
- color: 'WM-MuskGradient-BG',
+ // image: '/img/Static/Dashboard/settings.png',
+ color: 'WM-LightGray-BG',
route: {name: 'ManageMedicalCenter'},
aligntext: 'text-md-left',
alignimg: 'text-md-right',
- column: 'xs12 md7 sm7',
+ column: 'xs12 md6 sm6',
role: 'Admin'
},
{
title: 'List Test Type',
text: 'You can simply add your test type',
- icon: '/img/Static/Dashboard/result.png',
- color: 'WM-GreyGradient-BG',
+ // image: '/img/Static/Dashboard/result.png',
+ color: 'WM-LightGray-BG',
route: {name: 'ListTestType'},
aligntext: 'text-md-left',
alignimg: 'text-md-ce',
- column: 'xs12 md5 sm5',
+ column: 'xs12 md12 sm12',
role: 'Admin'
}
],
@@ -98,23 +98,23 @@ export default {
{
title: 'Manage Users',
text: 'You can Manage the users information',
- icon: '/img/Static/Dashboard/manageusers.png',
- color: 'WM-LightGreenGradient-BG',
+ // image: '/img/Static/Dashboard/manageusers.png',
+ color: 'WM-LightGray-BG',
route: {name: 'ManageUsers'},
aligntext: 'text-md-left',
alignimg: 'text-md-left',
- column: 'xs12 md12 sm12',
+ column: 'xs12 md6 sm6',
role: 'Admin|Supervisor'
},
{
title: 'Test to Verify',
text: 'You can simply verify your own medical center test result in this section of website',
- icon: '/img/Static/Dashboard/verify.png',
- color: 'WM-PinkGradient-BG',
+ // image: '/img/Static/Dashboard/verify.png',
+ color: 'WM-LightGray-BG',
route: {name: 'NotVerifyTestResult'},
aligntext: 'text-md-left',
alignimg: 'text-md-left',
- column: 'xs12 md12 sm12',
+ column: 'xs12 md6 sm6',
role: 'Admin|Supervisor'
},
],
@@ -122,34 +122,141 @@ export default {
{
title: 'My Info',
text: 'You can easily edit your registration information',
- icon: '/img/Static/Dashboard/info.png',
- color: 'WM-OrangeGradient-BG',
+ // image: '/img/Static/Dashboard/info.png',
+ color: 'WM-LightGray-BG',
route: {name: 'MyInfo'},
aligntext: 'text-md-left',
alignimg: 'text-md-right',
- column: 'xs12 md6 sm6',
+ column: 'xs12 md12 sm12',
role: 'Admin|Supervisor|User'
},
{
title: 'All Test Result',
text: 'You can see all user tests and own tests',
- icon: '/img/Static/Dashboard/alltest.png',
- color: 'WM-GreenGradient-BG',
+ // image: '/img/Static/Dashboard/alltest.png',
+ color: 'WM-LightGray-BG',
route: {name: 'AllResultTest'},
aligntext: 'text-md-left',
alignimg: 'text-md-right',
- column: 'xs12 md6 sm6',
+ column: 'xs12 md8 sm8',
role: 'Admin|Supervisor|User'
},
{
- title: 'Add a Test Result',
- text: 'You can add the test result',
- icon: '/img/Static/Dashboard/addtest.png',
- color: 'WM-YellowGradient-BG',
+ title: `Add A
Test Result`,
+ icon: 'fas fa-plus',
+ color: 'black text-white',
route: {name: 'SubmitTestResult'},
aligntext: 'text-md-left',
alignimg: 'text-md-left',
- column: 'xs12 md12 sm12',
+ column: 'xs12 md4 sm4',
+ role: 'Admin|Supervisor|User'
+ },
+ {
+ title: 'MY Items',
+ text: 'items that you posses',
+ // image: '/img/Static/Dashboard/alltest.png',
+ color: 'WM-LightGray-BG',
+ route: {name: 'MyItem'},
+ aligntext: 'text-md-left',
+ alignimg: 'text-md-right',
+ column: 'xs12 md4 sm4',
+ role: 'Admin|Supervisor|User'
+ },
+ {
+ title: 'All Items',
+ text: 'all existing items in your medical center ',
+ // image: '/img/Static/Dashboard/alltest.png',
+ color: 'WM-LightGray-BG',
+ route: {name: 'AllItem'},
+ aligntext: 'text-md-left',
+ alignimg: 'text-md-right',
+ column: 'xs12 md4 sm4',
+ role: 'Admin|Supervisor|User'
+ },
+ {
+ title: `Add new
item`,
+ icon: 'fas fa-plus',
+ color: 'blue text-white',
+ route: {name: 'AddItem'},
+ aligntext: 'text-md-left',
+ alignimg: 'text-md-left',
+ column: 'xs12 md4 sm4',
+ role: 'Admin|Supervisor|User'
+ },
+ {
+ title: 'MY package',
+ text: 'packages that you posses',
+ // image: '/img/Static/Dashboard/alltest.png',
+ color: 'WM-LightGray-BG',
+ route: {name: 'MyItem'},
+ aligntext: 'text-md-left',
+ alignimg: 'text-md-right',
+ column: 'xs12 md4 sm4',
+ role: 'Admin|Supervisor|User'
+ },
+ {
+ title: 'All package',
+ text: 'all existing packages in your medical center ',
+ // image: '/img/Static/Dashboard/alltest.png',
+ color: 'WM-LightGray-BG',
+ route: {name: 'AllItem'},
+ aligntext: 'text-md-left',
+ alignimg: 'text-md-right',
+ column: 'xs12 md4 sm4',
+ role: 'Admin|Supervisor|User'
+ },
+ {
+ title: `Add new
Package`,
+ icon: 'fas fa-plus',
+ color: 'cyan text-white',
+ route: {name: 'AddPackage'},
+ aligntext: 'text-md-left',
+ alignimg: 'text-md-left',
+ column: 'xs12 md4 sm4',
+ role: 'Admin|Supervisor|User'
+ },
+
+ {
+ title: 'All labels',
+ text: 'All active labels in your medical center',
+ // image: '/img/Static/Dashboard/alltest.png',
+ color: 'WM-LightGray-BG',
+ route: {name: 'AllResultTest'},
+ aligntext: 'text-md-left',
+ alignimg: 'text-md-right',
+ column: 'xs12 md8 sm8',
+ role: 'Admin|Supervisor|User'
+ },
+ {
+ title: `Add new
label`,
+ icon: 'fas fa-plus',
+ color: 'purple text-white',
+ route: {name: 'AddLabel'},
+ aligntext: 'text-md-left',
+ alignimg: 'text-md-left',
+ column: 'xs12 md4 sm4',
+ role: 'Admin|Supervisor|User'
+ },
+
+ {
+ title: 'All cycles',
+ text: 'All active cycles in your medical center',
+ // image: '/img/Static/Dashboard/alltest.png',
+ color: 'WM-LightGray-BG',
+ route: {name: 'AllResultTest'},
+ aligntext: 'text-md-left',
+ alignimg: 'text-md-right',
+ column: 'xs12 md8 sm8',
+ role: 'Admin|Supervisor|User'
+ },
+ {
+ title: `Add new
cycle`,
+ icon: 'fas fa-plus',
+ color: 'red text-white',
+ route: {name: 'AddCycle'},
+ aligntext: 'text-md-left',
+ alignimg: 'text-md-left',
+ column: 'xs12 md4 sm4',
role: 'Admin|Supervisor|User'
},
],
@@ -157,4 +264,3 @@ export default {
},
}
-
diff --git a/src/views/Item/List.vue b/src/views/Item/List.vue
index 4498fb1..11054f8 100644
--- a/src/views/Item/List.vue
+++ b/src/views/Item/List.vue
@@ -128,10 +128,10 @@
-
+
+ :total-visible="6"/>
diff --git a/src/views/MyItem/List.vue b/src/views/MyItem/List.vue
index 1773769..fbfff4f 100644
--- a/src/views/MyItem/List.vue
+++ b/src/views/MyItem/List.vue
@@ -2,30 +2,108 @@
-
-
-
-
- My Items
- fa-clone
-
-
-
- My Requests
- fa-paper-plane
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ fas fa-search
+ Filter
+
+
+
+
+
+ fas fa-plus
+ Add
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | {{ item.id }} |
+
+ {{ item.name }} |
+ {{ item.udi }} |
+ {{ item.size }} |
+
+
+
+
+ fas fa-eye
+ Show
+
+
+ Show
+
+
+
+
+ fas fa-barcode
+ Generate Barcode
+
+
+ Generate Barcode
+
+
+
+
+ fas fa-arrows-alt
+ Transfer
+
+
+ Transfer
+
+
+
+
+ fas fa-trash
+ Remove
+
+
+ Remove
+
+ |
+
+
+
+
+
+
+
+
@@ -38,28 +116,143 @@
-
-
+
\ No newline at end of file
diff --git a/src/views/MyItem/Tabs/MyItems.vue b/src/views/MyItem/Tabs/MyItems.vue
deleted file mode 100644
index 07285e4..0000000
--- a/src/views/MyItem/Tabs/MyItems.vue
+++ /dev/null
@@ -1,250 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- fas fa-search
- Filter
-
-
-
-
-
- fas fa-plus
- Add
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ item.id }} |
-
- {{ item.name }} |
- {{ item.udi }} |
- {{ item.size }} |
-
-
-
-
- fas fa-eye
- Show
-
-
- Show
-
-
-
-
- fas fa-barcode
- Generate Barcode
-
-
- Generate Barcode
-
-
-
-
- fas fa-arrows-alt
- Transfer
-
-
- Transfer
-
-
-
-
- fas fa-trash
- Remove
-
-
- Remove
-
- |
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/views/MyItem/Tabs/MyRequests.vue b/src/views/MyItem/Tabs/MyRequests.vue
deleted file mode 100644
index 9747a9e..0000000
--- a/src/views/MyItem/Tabs/MyRequests.vue
+++ /dev/null
@@ -1,209 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- fas fa-search
- Filter
-
-
-
-
-
- fas fa-plus
- Add
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ item.id }} |
-
- {{ item.name }} |
- {{ item.udi }} |
- {{ item.size }} |
-
-
-
-
- fas fa-eye
- Show
-
-
- Show
-
-
-
-
- fas fa-barcode
- Generate Barcode
-
-
- Generate Barcode
-
- |
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/views/MyPackage/List.vue b/src/views/MyPackage/List.vue
new file mode 100644
index 0000000..7513fcb
--- /dev/null
+++ b/src/views/MyPackage/List.vue
@@ -0,0 +1,310 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ fas fa-search
+ Filter
+
+
+
+
+
+ fas fa-plus
+ Add
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.id }} |
+
+ {{ item.name }} |
+
+ {{ (item.user && item.user.medical_center) ? item.user.medical_center.name : '' }}
+ |
+
+ {{ item.user ? item.user.name : '' | text_20_letter }}
+ |
+ {{ item.description }} |
+ {{ item.status }} |
+
+
+
+
+
+ fas
+ {{ !['suspended', 'rejected'].includes(item.status) ? 'fa-close' : 'fa-check' }}
+
+
+ {{ !['suspended', 'rejected'].includes(item.status) ? 'reject' : 'approve' }}
+
+
+
+ {{ !['suspended', 'rejected'].includes(item.status) ? 'reject' : 'approve' }}
+
+
+
+
+ fas fa-eye
+ Show
+
+
+ Show
+
+
+
+
+
+ fas fa-pen
+ Edit
+
+
+
+ Edit
+
+
+
+
+ fas fa-barcode
+ Generate Barcode
+
+
+ Generate Barcode
+
+
+
+
+ fas fa-arrows-alt
+ Transfer
+
+
+ Transfer
+
+
+
+
+ fas fa-trash
+ Remove
+
+
+ Remove
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+ fas fa-chevron-left
+ Back
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/Package/AddEdit.vue b/src/views/Package/AddEdit.vue
index aee1d0a..1d95336 100644
--- a/src/views/Package/AddEdit.vue
+++ b/src/views/Package/AddEdit.vue
@@ -41,7 +41,6 @@
-
- fas {{
- !['suspended', 'rejected'].includes(item.status) ? 'fa-close' : 'fa-check'
- }}
+ fas {{!['suspended', 'rejected'].includes(item.status) ? 'fa-close' : 'fa-check'}}
- {{
- !['suspended', 'rejected'].includes(item.status) ? 'reject' : 'approve'
- }}
+ {{!['suspended', 'rejected'].includes(item.status) ? 'reject' : 'approve'}}
- {{
- !['suspended', 'rejected'].includes(item.status) ? 'reject' : 'approve'
- }}
+ {{!['suspended', 'rejected'].includes(item.status) ? 'reject' : 'approve'}}
diff --git a/src/views/TestResult/AddEdit.vue b/src/views/TestResult/AddEdit.vue
index 7749489..bcda3e4 100644
--- a/src/views/TestResult/AddEdit.vue
+++ b/src/views/TestResult/AddEdit.vue
@@ -484,67 +484,29 @@ export default {
for (const key in result.data.data.inputs) {
if (result.data.data.inputs.hasOwnProperty(key)) {
if (result.data.data.inputs[key].type == "Form") {
- for (const keyForm in result.data.data.inputs[key]
- .children) {
- if (
- result.data.data.inputs[
- key
- ].children.hasOwnProperty(keyForm)
- ) {
- if (
- result.data.data.inputs[key].children[
- keyForm
- ].type == "Checkbox" ||
- result.data.data.inputs[key].children[
- keyForm
- ].type == "Select"
- ) {
- this.formData[
- result.data.data.inputs[key]
- .children[keyForm].name +
- "_" +
- result.data.data.inputs[key]
- .children[keyForm].id
- ] = [];
+ for (const keyForm in result.data.data.inputs[key].children) {
+ if (result.data.data.inputs[key].children.hasOwnProperty(keyForm)) {
+ if (result.data.data.inputs[key].children[keyForm].type == "Checkbox" ||
+ result.data.data.inputs[key].children[keyForm].type == "Select") {
+ this.formData[result.data.data.inputs[key].children[keyForm].name + "_" + result.data.data.inputs[key].children[keyForm].id] = [];
} else {
- this.formData[
- result.data.data.inputs[key]
- .children[keyForm].name +
- "_" +
- result.data.data.inputs[key]
- .children[keyForm].id
- ] = "";
+ this.formData[result.data.data.inputs[key].children[keyForm].name + "_" + result.data.data.inputs[key].children[keyForm].id] = "";
}
}
}
- } else if (
- result.data.data.inputs[key].type == "Checkbox" ||
- result.data.data.inputs[key].type == "Select"
- ) {
- this.formData[
- result.data.data.inputs[key].name +
- "_" +
- result.data.data.inputs[key].id
- ] = [];
- } else {
- this.formData[
- result.data.data.inputs[key].name +
- "_" +
- result.data.data.inputs[key].id
- ] = "";
+ } else if (result.data.data.inputs[key].type == "Checkbox" || result.data.data.inputs[key].type == "Select") {
+ this.formData[result.data.data.inputs[key].name + "_" + result.data.data.inputs[key].id] = [];
+ } else {this.formData[result.data.data.inputs[key].name + "_" + result.data.data.inputs[key].id] = "";
}
}
}
if (this.$route.params.testResult) {
- const result = await ApiService.get(
- urls.editTestResult(this.$route.params.testResult)
- );
+ const result = await ApiService.get(urls.editTestResult(this.$route.params.testResult));
if (result && result.status == 200) {
this.formData = result.data.data;
for (const key in result.data.data.imagesPath) {
if (result.data.data.imagesPath.hasOwnProperty(key)) {
- result.data.data.imagesPath[key] =
- result.data.data.imagesPath[key];
+ result.data.data.imagesPath[key] = result.data.data.imagesPath[key];
}
}
// this.images = result.data.data.imagesPath;
@@ -558,15 +520,9 @@ export default {
let result;
this.formData['file_batch_id'] = this.file_batch_id;
if (this.$route.params.testResult) {
- result = await ApiService.put(
- urls.updateTestResult(this.$route.params.testResult),
- this.formData
- );
+ result = await ApiService.put(urls.updateTestResult(this.$route.params.testResult), this.formData);
} else {
- result = await ApiService.post(
- urls.storeTestResult,
- this.formData
- );
+ result = await ApiService.post(urls.storeTestResult, this.formData);
}
if (result && result.status == 200) {