Compare commits
No commits in common. "dev" and "master" have entirely different histories.
@ -352,15 +352,6 @@
|
|||||||
"watchThrottled": true,
|
"watchThrottled": true,
|
||||||
"watchTriggerable": true,
|
"watchTriggerable": true,
|
||||||
"watchWithFilter": true,
|
"watchWithFilter": true,
|
||||||
"whenever": true,
|
"whenever": true
|
||||||
"validUSAPhone": true,
|
|
||||||
"requiredPhone": true,
|
|
||||||
"requiredFirstName": true,
|
|
||||||
"requiredLastName": true,
|
|
||||||
"requiredEmail": true,
|
|
||||||
"requiredExcelValidator": true,
|
|
||||||
"requiredImageValidator": true,
|
|
||||||
"requiredName": true,
|
|
||||||
"requiredAmountFloat": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
4
.vscode/settings.json
vendored
4
.vscode/settings.json
vendored
@ -91,7 +91,5 @@
|
|||||||
"borderStyle": "solid"
|
"borderStyle": "solid"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
}
|
||||||
"editor.autoIndent": "advanced",
|
|
||||||
"editor.bracketPairColorization.independentColorPoolPerBracketType": true
|
|
||||||
}
|
}
|
||||||
|
27
auto-imports.d.ts
vendored
27
auto-imports.d.ts
vendored
@ -121,14 +121,6 @@ declare global {
|
|||||||
const refWithControl: typeof import('@vueuse/core')['refWithControl']
|
const refWithControl: typeof import('@vueuse/core')['refWithControl']
|
||||||
const regexValidator: typeof import('./resources/js/@core/utils/validators.js')['regexValidator']
|
const regexValidator: typeof import('./resources/js/@core/utils/validators.js')['regexValidator']
|
||||||
const registerPlugins: typeof import('./resources/js/@core/utils/plugins.js')['registerPlugins']
|
const registerPlugins: typeof import('./resources/js/@core/utils/plugins.js')['registerPlugins']
|
||||||
const requiredAmountFloat: typeof import('./resources/js/@core/utils/validators.js')['requiredAmountFloat']
|
|
||||||
const requiredEmail: typeof import('./resources/js/@core/utils/validators.js')['requiredEmail']
|
|
||||||
const requiredExcelValidator: typeof import('./resources/js/@core/utils/validators.js')['requiredExcelValidator']
|
|
||||||
const requiredFirstName: typeof import('./resources/js/@core/utils/validators.js')['requiredFirstName']
|
|
||||||
const requiredImageValidator: typeof import('./resources/js/@core/utils/validators.js')['requiredImageValidator']
|
|
||||||
const requiredLastName: typeof import('./resources/js/@core/utils/validators.js')['requiredLastName']
|
|
||||||
const requiredName: typeof import('./resources/js/@core/utils/validators.js')['requiredName']
|
|
||||||
const requiredPhone: typeof import('./resources/js/@core/utils/validators.js')['requiredPhone']
|
|
||||||
const requiredValidator: typeof import('./resources/js/@core/utils/validators.js')['requiredValidator']
|
const requiredValidator: typeof import('./resources/js/@core/utils/validators.js')['requiredValidator']
|
||||||
const resolveComponent: typeof import('vue')['resolveComponent']
|
const resolveComponent: typeof import('vue')['resolveComponent']
|
||||||
const resolveRef: typeof import('@vueuse/core')['resolveRef']
|
const resolveRef: typeof import('@vueuse/core')['resolveRef']
|
||||||
@ -339,7 +331,6 @@ declare global {
|
|||||||
const useWindowFocus: typeof import('@vueuse/core')['useWindowFocus']
|
const useWindowFocus: typeof import('@vueuse/core')['useWindowFocus']
|
||||||
const useWindowScroll: typeof import('@vueuse/core')['useWindowScroll']
|
const useWindowScroll: typeof import('@vueuse/core')['useWindowScroll']
|
||||||
const useWindowSize: typeof import('@vueuse/core')['useWindowSize']
|
const useWindowSize: typeof import('@vueuse/core')['useWindowSize']
|
||||||
const validUSAPhone: typeof import('./resources/js/@core/utils/validators.js')['validUSAPhone']
|
|
||||||
const watch: typeof import('vue')['watch']
|
const watch: typeof import('vue')['watch']
|
||||||
const watchArray: typeof import('@vueuse/core')['watchArray']
|
const watchArray: typeof import('@vueuse/core')['watchArray']
|
||||||
const watchAtMost: typeof import('@vueuse/core')['watchAtMost']
|
const watchAtMost: typeof import('@vueuse/core')['watchAtMost']
|
||||||
@ -484,14 +475,6 @@ declare module 'vue' {
|
|||||||
readonly refWithControl: UnwrapRef<typeof import('@vueuse/core')['refWithControl']>
|
readonly refWithControl: UnwrapRef<typeof import('@vueuse/core')['refWithControl']>
|
||||||
readonly regexValidator: UnwrapRef<typeof import('./resources/js/@core/utils/validators.js')['regexValidator']>
|
readonly regexValidator: UnwrapRef<typeof import('./resources/js/@core/utils/validators.js')['regexValidator']>
|
||||||
readonly registerPlugins: UnwrapRef<typeof import('./resources/js/@core/utils/plugins.js')['registerPlugins']>
|
readonly registerPlugins: UnwrapRef<typeof import('./resources/js/@core/utils/plugins.js')['registerPlugins']>
|
||||||
readonly requiredAmountFloat: UnwrapRef<typeof import('./resources/js/@core/utils/validators.js')['requiredAmountFloat']>
|
|
||||||
readonly requiredEmail: UnwrapRef<typeof import('./resources/js/@core/utils/validators.js')['requiredEmail']>
|
|
||||||
readonly requiredExcelValidator: UnwrapRef<typeof import('./resources/js/@core/utils/validators.js')['requiredExcelValidator']>
|
|
||||||
readonly requiredFirstName: UnwrapRef<typeof import('./resources/js/@core/utils/validators.js')['requiredFirstName']>
|
|
||||||
readonly requiredImageValidator: UnwrapRef<typeof import('./resources/js/@core/utils/validators.js')['requiredImageValidator']>
|
|
||||||
readonly requiredLastName: UnwrapRef<typeof import('./resources/js/@core/utils/validators.js')['requiredLastName']>
|
|
||||||
readonly requiredName: UnwrapRef<typeof import('./resources/js/@core/utils/validators.js')['requiredName']>
|
|
||||||
readonly requiredPhone: UnwrapRef<typeof import('./resources/js/@core/utils/validators.js')['requiredPhone']>
|
|
||||||
readonly requiredValidator: UnwrapRef<typeof import('./resources/js/@core/utils/validators.js')['requiredValidator']>
|
readonly requiredValidator: UnwrapRef<typeof import('./resources/js/@core/utils/validators.js')['requiredValidator']>
|
||||||
readonly resolveComponent: UnwrapRef<typeof import('vue')['resolveComponent']>
|
readonly resolveComponent: UnwrapRef<typeof import('vue')['resolveComponent']>
|
||||||
readonly resolveRef: UnwrapRef<typeof import('@vueuse/core')['resolveRef']>
|
readonly resolveRef: UnwrapRef<typeof import('@vueuse/core')['resolveRef']>
|
||||||
@ -702,7 +685,6 @@ declare module 'vue' {
|
|||||||
readonly useWindowFocus: UnwrapRef<typeof import('@vueuse/core')['useWindowFocus']>
|
readonly useWindowFocus: UnwrapRef<typeof import('@vueuse/core')['useWindowFocus']>
|
||||||
readonly useWindowScroll: UnwrapRef<typeof import('@vueuse/core')['useWindowScroll']>
|
readonly useWindowScroll: UnwrapRef<typeof import('@vueuse/core')['useWindowScroll']>
|
||||||
readonly useWindowSize: UnwrapRef<typeof import('@vueuse/core')['useWindowSize']>
|
readonly useWindowSize: UnwrapRef<typeof import('@vueuse/core')['useWindowSize']>
|
||||||
readonly validUSAPhone: UnwrapRef<typeof import('./resources/js/@core/utils/validators.js')['validUSAPhone']>
|
|
||||||
readonly watch: UnwrapRef<typeof import('vue')['watch']>
|
readonly watch: UnwrapRef<typeof import('vue')['watch']>
|
||||||
readonly watchArray: UnwrapRef<typeof import('@vueuse/core')['watchArray']>
|
readonly watchArray: UnwrapRef<typeof import('@vueuse/core')['watchArray']>
|
||||||
readonly watchAtMost: UnwrapRef<typeof import('@vueuse/core')['watchAtMost']>
|
readonly watchAtMost: UnwrapRef<typeof import('@vueuse/core')['watchAtMost']>
|
||||||
@ -840,14 +822,6 @@ declare module '@vue/runtime-core' {
|
|||||||
readonly refWithControl: UnwrapRef<typeof import('@vueuse/core')['refWithControl']>
|
readonly refWithControl: UnwrapRef<typeof import('@vueuse/core')['refWithControl']>
|
||||||
readonly regexValidator: UnwrapRef<typeof import('./resources/js/@core/utils/validators.js')['regexValidator']>
|
readonly regexValidator: UnwrapRef<typeof import('./resources/js/@core/utils/validators.js')['regexValidator']>
|
||||||
readonly registerPlugins: UnwrapRef<typeof import('./resources/js/@core/utils/plugins.js')['registerPlugins']>
|
readonly registerPlugins: UnwrapRef<typeof import('./resources/js/@core/utils/plugins.js')['registerPlugins']>
|
||||||
readonly requiredAmountFloat: UnwrapRef<typeof import('./resources/js/@core/utils/validators.js')['requiredAmountFloat']>
|
|
||||||
readonly requiredEmail: UnwrapRef<typeof import('./resources/js/@core/utils/validators.js')['requiredEmail']>
|
|
||||||
readonly requiredExcelValidator: UnwrapRef<typeof import('./resources/js/@core/utils/validators.js')['requiredExcelValidator']>
|
|
||||||
readonly requiredFirstName: UnwrapRef<typeof import('./resources/js/@core/utils/validators.js')['requiredFirstName']>
|
|
||||||
readonly requiredImageValidator: UnwrapRef<typeof import('./resources/js/@core/utils/validators.js')['requiredImageValidator']>
|
|
||||||
readonly requiredLastName: UnwrapRef<typeof import('./resources/js/@core/utils/validators.js')['requiredLastName']>
|
|
||||||
readonly requiredName: UnwrapRef<typeof import('./resources/js/@core/utils/validators.js')['requiredName']>
|
|
||||||
readonly requiredPhone: UnwrapRef<typeof import('./resources/js/@core/utils/validators.js')['requiredPhone']>
|
|
||||||
readonly requiredValidator: UnwrapRef<typeof import('./resources/js/@core/utils/validators.js')['requiredValidator']>
|
readonly requiredValidator: UnwrapRef<typeof import('./resources/js/@core/utils/validators.js')['requiredValidator']>
|
||||||
readonly resolveComponent: UnwrapRef<typeof import('vue')['resolveComponent']>
|
readonly resolveComponent: UnwrapRef<typeof import('vue')['resolveComponent']>
|
||||||
readonly resolveRef: UnwrapRef<typeof import('@vueuse/core')['resolveRef']>
|
readonly resolveRef: UnwrapRef<typeof import('@vueuse/core')['resolveRef']>
|
||||||
@ -1058,7 +1032,6 @@ declare module '@vue/runtime-core' {
|
|||||||
readonly useWindowFocus: UnwrapRef<typeof import('@vueuse/core')['useWindowFocus']>
|
readonly useWindowFocus: UnwrapRef<typeof import('@vueuse/core')['useWindowFocus']>
|
||||||
readonly useWindowScroll: UnwrapRef<typeof import('@vueuse/core')['useWindowScroll']>
|
readonly useWindowScroll: UnwrapRef<typeof import('@vueuse/core')['useWindowScroll']>
|
||||||
readonly useWindowSize: UnwrapRef<typeof import('@vueuse/core')['useWindowSize']>
|
readonly useWindowSize: UnwrapRef<typeof import('@vueuse/core')['useWindowSize']>
|
||||||
readonly validUSAPhone: UnwrapRef<typeof import('./resources/js/@core/utils/validators.js')['validUSAPhone']>
|
|
||||||
readonly watch: UnwrapRef<typeof import('vue')['watch']>
|
readonly watch: UnwrapRef<typeof import('vue')['watch']>
|
||||||
readonly watchArray: UnwrapRef<typeof import('@vueuse/core')['watchArray']>
|
readonly watchArray: UnwrapRef<typeof import('@vueuse/core')['watchArray']>
|
||||||
readonly watchAtMost: UnwrapRef<typeof import('@vueuse/core')['watchAtMost']>
|
readonly watchAtMost: UnwrapRef<typeof import('@vueuse/core')['watchAtMost']>
|
||||||
|
200
package-lock.json
generated
200
package-lock.json
generated
@ -24,15 +24,11 @@
|
|||||||
"@vueuse/core": "^10.5.0",
|
"@vueuse/core": "^10.5.0",
|
||||||
"@vueuse/math": "^10.5.0",
|
"@vueuse/math": "^10.5.0",
|
||||||
"apexcharts": "3.37.0",
|
"apexcharts": "3.37.0",
|
||||||
"axios": "^1.7.2",
|
|
||||||
"axios-mock-adapter": "^1.21.4",
|
|
||||||
"axois": "^0.0.1-security",
|
|
||||||
"chart.js": "^4.4.0",
|
"chart.js": "^4.4.0",
|
||||||
"cookie-es": "^1.0.0",
|
"cookie-es": "^1.0.0",
|
||||||
"eslint-import-resolver-custom-alias": "^1.3.2",
|
"eslint-import-resolver-custom-alias": "^1.3.2",
|
||||||
"jwt-decode": "^4.0.0",
|
"jwt-decode": "^4.0.0",
|
||||||
"mapbox-gl": "3.0.1",
|
"mapbox-gl": "3.0.1",
|
||||||
"moment": "^2.30.1",
|
|
||||||
"ofetch": "^1.3.3",
|
"ofetch": "^1.3.3",
|
||||||
"pinia": "^2.1.7",
|
"pinia": "^2.1.7",
|
||||||
"prismjs": "^1.29.0",
|
"prismjs": "^1.29.0",
|
||||||
@ -50,7 +46,6 @@
|
|||||||
"vue3-apexcharts": "^1.4.4",
|
"vue3-apexcharts": "^1.4.4",
|
||||||
"vue3-perfect-scrollbar": "^1.6.1",
|
"vue3-perfect-scrollbar": "^1.6.1",
|
||||||
"vuetify": "3.4.4",
|
"vuetify": "3.4.4",
|
||||||
"vuex": "^4.0.2",
|
|
||||||
"webfontloader": "^1.6.28"
|
"webfontloader": "^1.6.28"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@ -986,6 +981,7 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"ppc64"
|
"ppc64"
|
||||||
],
|
],
|
||||||
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"aix"
|
"aix"
|
||||||
@ -1001,6 +997,7 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"arm"
|
"arm"
|
||||||
],
|
],
|
||||||
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"android"
|
"android"
|
||||||
@ -1016,6 +1013,7 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"android"
|
"android"
|
||||||
@ -1031,6 +1029,7 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"android"
|
"android"
|
||||||
@ -1046,6 +1045,7 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"darwin"
|
"darwin"
|
||||||
@ -1061,6 +1061,7 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"darwin"
|
"darwin"
|
||||||
@ -1076,6 +1077,7 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"freebsd"
|
"freebsd"
|
||||||
@ -1091,6 +1093,7 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"freebsd"
|
"freebsd"
|
||||||
@ -1106,6 +1109,7 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"arm"
|
"arm"
|
||||||
],
|
],
|
||||||
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"linux"
|
"linux"
|
||||||
@ -1121,6 +1125,7 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"linux"
|
"linux"
|
||||||
@ -1136,6 +1141,7 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"ia32"
|
"ia32"
|
||||||
],
|
],
|
||||||
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"linux"
|
"linux"
|
||||||
@ -1151,6 +1157,7 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"loong64"
|
"loong64"
|
||||||
],
|
],
|
||||||
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"linux"
|
"linux"
|
||||||
@ -1166,6 +1173,7 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"mips64el"
|
"mips64el"
|
||||||
],
|
],
|
||||||
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"linux"
|
"linux"
|
||||||
@ -1181,6 +1189,7 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"ppc64"
|
"ppc64"
|
||||||
],
|
],
|
||||||
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"linux"
|
"linux"
|
||||||
@ -1196,6 +1205,7 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"riscv64"
|
"riscv64"
|
||||||
],
|
],
|
||||||
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"linux"
|
"linux"
|
||||||
@ -1211,6 +1221,7 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"s390x"
|
"s390x"
|
||||||
],
|
],
|
||||||
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"linux"
|
"linux"
|
||||||
@ -1226,6 +1237,7 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"linux"
|
"linux"
|
||||||
@ -1241,6 +1253,7 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"netbsd"
|
"netbsd"
|
||||||
@ -1256,6 +1269,7 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"openbsd"
|
"openbsd"
|
||||||
@ -1271,6 +1285,7 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"sunos"
|
"sunos"
|
||||||
@ -1286,6 +1301,7 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"win32"
|
"win32"
|
||||||
@ -1301,6 +1317,7 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"ia32"
|
"ia32"
|
||||||
],
|
],
|
||||||
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"win32"
|
"win32"
|
||||||
@ -1316,6 +1333,7 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"win32"
|
"win32"
|
||||||
@ -2007,6 +2025,7 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"arm"
|
"arm"
|
||||||
],
|
],
|
||||||
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"android"
|
"android"
|
||||||
@ -2019,6 +2038,7 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"android"
|
"android"
|
||||||
@ -2031,6 +2051,7 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"darwin"
|
"darwin"
|
||||||
@ -2043,6 +2064,7 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"darwin"
|
"darwin"
|
||||||
@ -2055,6 +2077,7 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"arm"
|
"arm"
|
||||||
],
|
],
|
||||||
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"linux"
|
"linux"
|
||||||
@ -2067,6 +2090,7 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"arm"
|
"arm"
|
||||||
],
|
],
|
||||||
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"linux"
|
"linux"
|
||||||
@ -2079,6 +2103,7 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"linux"
|
"linux"
|
||||||
@ -2091,6 +2116,7 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"linux"
|
"linux"
|
||||||
@ -2103,6 +2129,7 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"ppc64"
|
"ppc64"
|
||||||
],
|
],
|
||||||
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"linux"
|
"linux"
|
||||||
@ -2115,6 +2142,7 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"riscv64"
|
"riscv64"
|
||||||
],
|
],
|
||||||
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"linux"
|
"linux"
|
||||||
@ -2127,6 +2155,7 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"s390x"
|
"s390x"
|
||||||
],
|
],
|
||||||
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"linux"
|
"linux"
|
||||||
@ -2139,6 +2168,7 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"linux"
|
"linux"
|
||||||
@ -2151,6 +2181,7 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"linux"
|
"linux"
|
||||||
@ -2163,6 +2194,7 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"arm64"
|
"arm64"
|
||||||
],
|
],
|
||||||
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"win32"
|
"win32"
|
||||||
@ -2175,6 +2207,7 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"ia32"
|
"ia32"
|
||||||
],
|
],
|
||||||
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"win32"
|
"win32"
|
||||||
@ -2187,6 +2220,7 @@
|
|||||||
"cpu": [
|
"cpu": [
|
||||||
"x64"
|
"x64"
|
||||||
],
|
],
|
||||||
|
"dev": true,
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"win32"
|
"win32"
|
||||||
@ -2774,7 +2808,7 @@
|
|||||||
"version": "20.12.12",
|
"version": "20.12.12",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.12.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.12.tgz",
|
||||||
"integrity": "sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw==",
|
"integrity": "sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw==",
|
||||||
"devOptional": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"undici-types": "~5.26.4"
|
"undici-types": "~5.26.4"
|
||||||
}
|
}
|
||||||
@ -3865,11 +3899,6 @@
|
|||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/asynckit": {
|
|
||||||
"version": "0.4.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
|
||||||
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
|
|
||||||
},
|
|
||||||
"node_modules/available-typed-arrays": {
|
"node_modules/available-typed-arrays": {
|
||||||
"version": "1.0.7",
|
"version": "1.0.7",
|
||||||
"resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz",
|
"resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz",
|
||||||
@ -3884,33 +3913,6 @@
|
|||||||
"url": "https://github.com/sponsors/ljharb"
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/axios": {
|
|
||||||
"version": "1.7.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/axios/-/axios-1.7.2.tgz",
|
|
||||||
"integrity": "sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw==",
|
|
||||||
"dependencies": {
|
|
||||||
"follow-redirects": "^1.15.6",
|
|
||||||
"form-data": "^4.0.0",
|
|
||||||
"proxy-from-env": "^1.1.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/axios-mock-adapter": {
|
|
||||||
"version": "1.22.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/axios-mock-adapter/-/axios-mock-adapter-1.22.0.tgz",
|
|
||||||
"integrity": "sha512-dmI0KbkyAhntUR05YY96qg2H6gg0XMl2+qTW0xmYg6Up+BFBAJYRLROMXRdDEL06/Wqwa0TJThAYvFtSFdRCZw==",
|
|
||||||
"dependencies": {
|
|
||||||
"fast-deep-equal": "^3.1.3",
|
|
||||||
"is-buffer": "^2.0.5"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"axios": ">= 0.17.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/axois": {
|
|
||||||
"version": "0.0.1-security",
|
|
||||||
"resolved": "https://registry.npmjs.org/axois/-/axois-0.0.1-security.tgz",
|
|
||||||
"integrity": "sha512-8Nui4fwwyxHfjAfpDlg3Jt66EJA4i1D1eJch3D+wM/Oe+qhpyp7yfiszko/O5/adYu20wc37RG9/Eg8QIJHcvA=="
|
|
||||||
},
|
|
||||||
"node_modules/babel-walk": {
|
"node_modules/babel-walk": {
|
||||||
"version": "3.0.0-canary-5",
|
"version": "3.0.0-canary-5",
|
||||||
"resolved": "https://registry.npmjs.org/babel-walk/-/babel-walk-3.0.0-canary-5.tgz",
|
"resolved": "https://registry.npmjs.org/babel-walk/-/babel-walk-3.0.0-canary-5.tgz",
|
||||||
@ -4564,17 +4566,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/colord/-/colord-2.9.3.tgz",
|
"resolved": "https://registry.npmjs.org/colord/-/colord-2.9.3.tgz",
|
||||||
"integrity": "sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw=="
|
"integrity": "sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw=="
|
||||||
},
|
},
|
||||||
"node_modules/combined-stream": {
|
|
||||||
"version": "1.0.8",
|
|
||||||
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
|
|
||||||
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
|
|
||||||
"dependencies": {
|
|
||||||
"delayed-stream": "~1.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 0.8"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/commander": {
|
"node_modules/commander": {
|
||||||
"version": "7.2.0",
|
"version": "7.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz",
|
||||||
@ -5220,14 +5211,6 @@
|
|||||||
"url": "https://github.com/sponsors/ljharb"
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/delayed-stream": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
|
||||||
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=0.4.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/destr": {
|
"node_modules/destr": {
|
||||||
"version": "2.0.3",
|
"version": "2.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/destr/-/destr-2.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/destr/-/destr-2.0.3.tgz",
|
||||||
@ -6979,25 +6962,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz",
|
||||||
"integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw=="
|
"integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw=="
|
||||||
},
|
},
|
||||||
"node_modules/follow-redirects": {
|
|
||||||
"version": "1.15.6",
|
|
||||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz",
|
|
||||||
"integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==",
|
|
||||||
"funding": [
|
|
||||||
{
|
|
||||||
"type": "individual",
|
|
||||||
"url": "https://github.com/sponsors/RubenVerborgh"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=4.0"
|
|
||||||
},
|
|
||||||
"peerDependenciesMeta": {
|
|
||||||
"debug": {
|
|
||||||
"optional": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/for-each": {
|
"node_modules/for-each": {
|
||||||
"version": "0.3.3",
|
"version": "0.3.3",
|
||||||
"resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz",
|
"resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz",
|
||||||
@ -7006,19 +6970,6 @@
|
|||||||
"is-callable": "^1.1.3"
|
"is-callable": "^1.1.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/form-data": {
|
|
||||||
"version": "4.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
|
|
||||||
"integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
|
|
||||||
"dependencies": {
|
|
||||||
"asynckit": "^0.4.0",
|
|
||||||
"combined-stream": "^1.0.8",
|
|
||||||
"mime-types": "^2.1.12"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 6"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/fs-extra": {
|
"node_modules/fs-extra": {
|
||||||
"version": "11.2.0",
|
"version": "11.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz",
|
||||||
@ -7572,7 +7523,7 @@
|
|||||||
"version": "4.3.6",
|
"version": "4.3.6",
|
||||||
"resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.6.tgz",
|
"resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.6.tgz",
|
||||||
"integrity": "sha512-Ju0+lEMyzMVZarkTn/gqRpdqd5dOPaz1mCZ0SH3JV6iFw81PldE/PEB1hWVEA288HPt4WXW8O7AWxB10M+03QQ==",
|
"integrity": "sha512-Ju0+lEMyzMVZarkTn/gqRpdqd5dOPaz1mCZ0SH3JV6iFw81PldE/PEB1hWVEA288HPt4WXW8O7AWxB10M+03QQ==",
|
||||||
"devOptional": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/import-fresh": {
|
"node_modules/import-fresh": {
|
||||||
"version": "3.3.0",
|
"version": "3.3.0",
|
||||||
@ -7849,28 +7800,6 @@
|
|||||||
"url": "https://github.com/sponsors/ljharb"
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/is-buffer": {
|
|
||||||
"version": "2.0.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz",
|
|
||||||
"integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==",
|
|
||||||
"funding": [
|
|
||||||
{
|
|
||||||
"type": "github",
|
|
||||||
"url": "https://github.com/sponsors/feross"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "patreon",
|
|
||||||
"url": "https://www.patreon.com/feross"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "consulting",
|
|
||||||
"url": "https://feross.org/support"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=4"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/is-builtin-module": {
|
"node_modules/is-builtin-module": {
|
||||||
"version": "3.2.1",
|
"version": "3.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz",
|
||||||
@ -8985,25 +8914,6 @@
|
|||||||
"node": ">=8.6"
|
"node": ">=8.6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/mime-db": {
|
|
||||||
"version": "1.52.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
|
|
||||||
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 0.6"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/mime-types": {
|
|
||||||
"version": "2.1.35",
|
|
||||||
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
|
|
||||||
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
|
|
||||||
"dependencies": {
|
|
||||||
"mime-db": "1.52.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 0.6"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/mimic-fn": {
|
"node_modules/mimic-fn": {
|
||||||
"version": "2.1.0",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
|
||||||
@ -9131,14 +9041,6 @@
|
|||||||
"ufo": "^1.5.3"
|
"ufo": "^1.5.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/moment": {
|
|
||||||
"version": "2.30.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz",
|
|
||||||
"integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==",
|
|
||||||
"engines": {
|
|
||||||
"node": "*"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/mpd-parser": {
|
"node_modules/mpd-parser": {
|
||||||
"version": "1.3.0",
|
"version": "1.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/mpd-parser/-/mpd-parser-1.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/mpd-parser/-/mpd-parser-1.3.0.tgz",
|
||||||
@ -10871,11 +10773,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/protocol-buffers-schema/-/protocol-buffers-schema-3.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/protocol-buffers-schema/-/protocol-buffers-schema-3.6.0.tgz",
|
||||||
"integrity": "sha512-TdDRD+/QNdrCGCE7v8340QyuXd4kIWIgapsE2+n/SaGiSSbomYl4TjHlvIoCWRpE7wFt02EpB35VVA2ImcBVqw=="
|
"integrity": "sha512-TdDRD+/QNdrCGCE7v8340QyuXd4kIWIgapsE2+n/SaGiSSbomYl4TjHlvIoCWRpE7wFt02EpB35VVA2ImcBVqw=="
|
||||||
},
|
},
|
||||||
"node_modules/proxy-from-env": {
|
|
||||||
"version": "1.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
|
|
||||||
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="
|
|
||||||
},
|
|
||||||
"node_modules/pug": {
|
"node_modules/pug": {
|
||||||
"version": "3.0.3",
|
"version": "3.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/pug/-/pug-3.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/pug/-/pug-3.0.3.tgz",
|
||||||
@ -11587,7 +11484,7 @@
|
|||||||
"version": "1.77.2",
|
"version": "1.77.2",
|
||||||
"resolved": "https://registry.npmjs.org/sass/-/sass-1.77.2.tgz",
|
"resolved": "https://registry.npmjs.org/sass/-/sass-1.77.2.tgz",
|
||||||
"integrity": "sha512-eb4GZt1C3avsX3heBNlrc7I09nyT00IUuo4eFhAbeXWU2fvA7oXI53SxODVAA+zgZCk9aunAZgO+losjR3fAwA==",
|
"integrity": "sha512-eb4GZt1C3avsX3heBNlrc7I09nyT00IUuo4eFhAbeXWU2fvA7oXI53SxODVAA+zgZCk9aunAZgO+losjR3fAwA==",
|
||||||
"devOptional": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"chokidar": ">=3.0.0 <4.0.0",
|
"chokidar": ">=3.0.0 <4.0.0",
|
||||||
"immutable": "^4.0.0",
|
"immutable": "^4.0.0",
|
||||||
@ -12850,7 +12747,7 @@
|
|||||||
"version": "5.26.5",
|
"version": "5.26.5",
|
||||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
|
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
|
||||||
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
|
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
|
||||||
"devOptional": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/unimport": {
|
"node_modules/unimport": {
|
||||||
"version": "3.7.2",
|
"version": "3.7.2",
|
||||||
@ -13797,17 +13694,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/vuex": {
|
|
||||||
"version": "4.0.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/vuex/-/vuex-4.0.2.tgz",
|
|
||||||
"integrity": "sha512-M6r8uxELjZIK8kTKDGgZTYX/ahzblnzC4isU1tpmEuOIIKmV+TRdc+H4s8ds2NuZ7wpUTdGRzJRtoj+lI+pc0Q==",
|
|
||||||
"dependencies": {
|
|
||||||
"@vue/devtools-api": "^6.0.0-beta.11"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"vue": "^3.0.2"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/w3c-keyname": {
|
"node_modules/w3c-keyname": {
|
||||||
"version": "2.2.8",
|
"version": "2.2.8",
|
||||||
"resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.8.tgz",
|
"resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.8.tgz",
|
||||||
|
@ -27,15 +27,11 @@
|
|||||||
"@vueuse/core": "^10.5.0",
|
"@vueuse/core": "^10.5.0",
|
||||||
"@vueuse/math": "^10.5.0",
|
"@vueuse/math": "^10.5.0",
|
||||||
"apexcharts": "3.37.0",
|
"apexcharts": "3.37.0",
|
||||||
"axios": "^1.7.2",
|
|
||||||
"axios-mock-adapter": "^1.21.4",
|
|
||||||
"axois": "^0.0.1-security",
|
|
||||||
"chart.js": "^4.4.0",
|
"chart.js": "^4.4.0",
|
||||||
"cookie-es": "^1.0.0",
|
"cookie-es": "^1.0.0",
|
||||||
"eslint-import-resolver-custom-alias": "^1.3.2",
|
"eslint-import-resolver-custom-alias": "^1.3.2",
|
||||||
"jwt-decode": "^4.0.0",
|
"jwt-decode": "^4.0.0",
|
||||||
"mapbox-gl": "3.0.1",
|
"mapbox-gl": "3.0.1",
|
||||||
"moment": "^2.30.1",
|
|
||||||
"ofetch": "^1.3.3",
|
"ofetch": "^1.3.3",
|
||||||
"pinia": "^2.1.7",
|
"pinia": "^2.1.7",
|
||||||
"prismjs": "^1.29.0",
|
"prismjs": "^1.29.0",
|
||||||
@ -53,7 +49,6 @@
|
|||||||
"vue3-apexcharts": "^1.4.4",
|
"vue3-apexcharts": "^1.4.4",
|
||||||
"vue3-perfect-scrollbar": "^1.6.1",
|
"vue3-perfect-scrollbar": "^1.6.1",
|
||||||
"vuetify": "3.4.4",
|
"vuetify": "3.4.4",
|
||||||
"vuex": "^4.0.2",
|
|
||||||
"webfontloader": "^1.6.28"
|
"webfontloader": "^1.6.28"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@ -89,7 +84,6 @@
|
|||||||
"eslint-plugin-sonarjs": "^0.23.0",
|
"eslint-plugin-sonarjs": "^0.23.0",
|
||||||
"eslint-plugin-unicorn": "^50.0.1",
|
"eslint-plugin-unicorn": "^50.0.1",
|
||||||
"eslint-plugin-vue": "^9.19.2",
|
"eslint-plugin-vue": "^9.19.2",
|
||||||
"laravel-vite-plugin": "^1.0.0",
|
|
||||||
"msw": "^1.3.2",
|
"msw": "^1.3.2",
|
||||||
"postcss-html": "^1.5.0",
|
"postcss-html": "^1.5.0",
|
||||||
"postcss-scss": "^4.0.9",
|
"postcss-scss": "^4.0.9",
|
||||||
@ -109,7 +103,8 @@
|
|||||||
"vite-plugin-vue-layouts": "^0.10.0",
|
"vite-plugin-vue-layouts": "^0.10.0",
|
||||||
"vite-plugin-vuetify": "2.0.1",
|
"vite-plugin-vuetify": "2.0.1",
|
||||||
"vite-svg-loader": "^5.1.0",
|
"vite-svg-loader": "^5.1.0",
|
||||||
"vue-shepherd": "^3.0.0"
|
"vue-shepherd": "^3.0.0",
|
||||||
|
"laravel-vite-plugin": "^1.0.0"
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"postcss": "^8",
|
"postcss": "^8",
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 7.2 KiB |
Binary file not shown.
Before Width: | Height: | Size: 7.2 KiB |
Binary file not shown.
Before Width: | Height: | Size: 9.7 KiB |
@ -93,80 +93,3 @@ export const alphaDashValidator = value => {
|
|||||||
|
|
||||||
return /^[0-9A-Z_-]*$/i.test(valueAsString) || 'All Character are not valid'
|
return /^[0-9A-Z_-]*$/i.test(valueAsString) || 'All Character are not valid'
|
||||||
}
|
}
|
||||||
export const validUSAPhone = value => {
|
|
||||||
if (isEmpty(value))
|
|
||||||
return true
|
|
||||||
const valueAsString = String(value)
|
|
||||||
|
|
||||||
return /^\(\d{3}\)\s\d{3}-\d{4}$/i.test(valueAsString) || 'Phone are not valid'
|
|
||||||
}
|
|
||||||
export const requiredPhone = value => {
|
|
||||||
if (isNullOrUndefined(value) || isEmptyArray(value) || value === false)
|
|
||||||
return 'Phone is required'
|
|
||||||
|
|
||||||
return !!String(value).trim().length || ' Phone is required'
|
|
||||||
}
|
|
||||||
export const requiredFirstName = value => {
|
|
||||||
if (isNullOrUndefined(value) || isEmptyArray(value) || value === false)
|
|
||||||
return 'First Name field is required'
|
|
||||||
|
|
||||||
return !!String(value).trim().length || 'Name is required'
|
|
||||||
}
|
|
||||||
export const requiredName = value => {
|
|
||||||
if (isNullOrUndefined(value) || isEmptyArray(value) || value === false)
|
|
||||||
return 'Name field is required'
|
|
||||||
|
|
||||||
return !!String(value).trim().length || 'Name is required'
|
|
||||||
}
|
|
||||||
export const requiredLastName = value => {
|
|
||||||
if (isNullOrUndefined(value) || isEmptyArray(value) || value === false)
|
|
||||||
return 'Last Name field is required'
|
|
||||||
|
|
||||||
return !!String(value).trim().length || ' Last Name is required'
|
|
||||||
}
|
|
||||||
export const requiredEmail = value => {
|
|
||||||
if (isNullOrUndefined(value) || isEmptyArray(value) || value === false)
|
|
||||||
return 'Email field is required'
|
|
||||||
|
|
||||||
return !!String(value).trim().length || 'Email is required'
|
|
||||||
}
|
|
||||||
export const requiredImageValidator = value => {
|
|
||||||
if (isNullOrUndefined(value) || isEmptyArray(value) || value === false)
|
|
||||||
return 'Image field is required'
|
|
||||||
|
|
||||||
return !!String(value).trim().length || 'Email is required'
|
|
||||||
}
|
|
||||||
export const requiredExcelValidator = value => {
|
|
||||||
if (isNullOrUndefined(value) || isEmptyArray(value) || value === false)
|
|
||||||
return 'Excel field is required'
|
|
||||||
|
|
||||||
return !!String(value).trim().length || 'Email is required'
|
|
||||||
}
|
|
||||||
export const requiredAmountFloat = (value) => {
|
|
||||||
// Check if the value is null, undefined, an empty array, or false
|
|
||||||
if (isNullOrUndefined(value) || isEmptyArray(value) || value === false) {
|
|
||||||
return 'Amount field is required';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check if the value is a valid float number
|
|
||||||
if (!isFloat(value)) {
|
|
||||||
return 'Please enter a valid amount';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Additional checks as needed...
|
|
||||||
|
|
||||||
// Return true if the value passes validation
|
|
||||||
return true;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Check if a value is a valid float number
|
|
||||||
const isFloat = (value) => {
|
|
||||||
if (typeof value !== 'number' && typeof value !== 'string') {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
// Use regex to match a valid float number (including negatives and decimals)
|
|
||||||
return /^-?\d*\.?\d+$/.test(value);
|
|
||||||
};
|
|
||||||
|
@ -1,20 +1,15 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
|
import { PerfectScrollbar } from 'vue3-perfect-scrollbar'
|
||||||
|
import { VNodeRenderer } from './VNodeRenderer'
|
||||||
import { layoutConfig } from '@layouts'
|
import { layoutConfig } from '@layouts'
|
||||||
import {
|
import {
|
||||||
VerticalNavGroup,
|
VerticalNavGroup,
|
||||||
VerticalNavLink,
|
VerticalNavLink,
|
||||||
VerticalNavSectionTitle,
|
VerticalNavSectionTitle,
|
||||||
} from '@layouts/components'
|
} from '@layouts/components'
|
||||||
import VerticalNavDropdown from '@layouts/components/VerticalNavDropdown.vue'
|
|
||||||
import { useLayoutConfigStore } from '@layouts/stores/config'
|
import { useLayoutConfigStore } from '@layouts/stores/config'
|
||||||
import { injectionKeyIsVerticalNavHovered } from '@layouts/symbols'
|
import { injectionKeyIsVerticalNavHovered } from '@layouts/symbols'
|
||||||
import { PerfectScrollbar } from 'vue3-perfect-scrollbar'
|
|
||||||
import { useStore } from 'vuex'
|
|
||||||
import { VNodeRenderer } from './VNodeRenderer'
|
|
||||||
const store = useStore();
|
|
||||||
const router = useRouter()
|
|
||||||
const ability = useAbility()
|
|
||||||
const userData = useCookie('userData')
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
tag: {
|
tag: {
|
||||||
type: null,
|
type: null,
|
||||||
@ -45,10 +40,9 @@ const configStore = useLayoutConfigStore()
|
|||||||
const resolveNavItemComponent = item => {
|
const resolveNavItemComponent = item => {
|
||||||
if ('heading' in item)
|
if ('heading' in item)
|
||||||
return VerticalNavSectionTitle
|
return VerticalNavSectionTitle
|
||||||
if ('children' in item && item.isDropdownButton)
|
|
||||||
return VerticalNavDropdown
|
|
||||||
if ('children' in item)
|
if ('children' in item)
|
||||||
return VerticalNavGroup
|
return VerticalNavGroup
|
||||||
|
|
||||||
return VerticalNavLink
|
return VerticalNavLink
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,26 +51,7 @@ Close overlay vertical nav when link is clicked
|
|||||||
*/
|
*/
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
|
||||||
watch(() => route.name, async () => {
|
watch(() => route.name, () => {
|
||||||
|
|
||||||
|
|
||||||
await store.dispatch('checkLogin')
|
|
||||||
const isLoggedIn = await store.getters.getCheckLoginExpire
|
|
||||||
console.log('check login', isLoggedIn)
|
|
||||||
|
|
||||||
// Add additional logic or redirection based on login status if needed
|
|
||||||
if (isLoggedIn) {
|
|
||||||
await store.dispatch('updateCheckToken',false)
|
|
||||||
|
|
||||||
// Redirect to login page or perform any other action
|
|
||||||
useCookie('accessToken').value = null
|
|
||||||
|
|
||||||
localStorage.removeItem('admin_access_token');
|
|
||||||
useCookie('userAbilityRules').value = null
|
|
||||||
ability.update([])
|
|
||||||
router.push({ name: 'login' })
|
|
||||||
}
|
|
||||||
|
|
||||||
props.toggleIsOverlayNavActive(false)
|
props.toggleIsOverlayNavActive(false)
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -173,7 +148,6 @@ const hideTitleAndIcon = configStore.isVerticalNavMini(isHovered)
|
|||||||
|
|
||||||
<slot name="after-nav-items" />
|
<slot name="after-nav-items" />
|
||||||
</Component>
|
</Component>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@ -269,10 +243,4 @@ const hideTitleAndIcon = configStore.isVerticalNavMini(isHovered)
|
|||||||
transition: transform 0.25s ease-in-out;
|
transition: transform 0.25s ease-in-out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.v-icon {
|
|
||||||
margin-right: 8px; /* Adds space between the icon and the text */
|
|
||||||
}
|
|
||||||
.list-item-reset a {
|
|
||||||
color: rgb(46,38,61) !important;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,97 +0,0 @@
|
|||||||
<template>
|
|
||||||
<li class="nav-item" :class="item.class?item.class:''">
|
|
||||||
|
|
||||||
<div class="demo-space-x">
|
|
||||||
<VMenu transition="scale-transition">
|
|
||||||
<template #activator="{ props }">
|
|
||||||
<Component
|
|
||||||
:is="itemIcon(item)"
|
|
||||||
v-if="!hideTitleAndIcon && item.icon"
|
|
||||||
:class="itemIconClass(item)"
|
|
||||||
/>
|
|
||||||
<VBtn v-bind="props" block variant="text"
|
|
||||||
color="rgb(46,38,61)">
|
|
||||||
<VIcon v-if="item.icon" :icon="item.icon.icon" class="mr-2" size="20"/>{{ item.title }}
|
|
||||||
</VBtn>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<VList class="list-reset">
|
|
||||||
<VListItem
|
|
||||||
v-for="(child, index) in item.children"
|
|
||||||
:key="index"
|
|
||||||
class="list-item-reset"
|
|
||||||
>
|
|
||||||
|
|
||||||
<VerticalNavLink :item="child" :hideTitleAndIcon="hideTitleAndIcon" />
|
|
||||||
</VListItem>
|
|
||||||
</VList>
|
|
||||||
</VMenu>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
import VerticalNavLink from './VerticalNavLink.vue';
|
|
||||||
|
|
||||||
const props = defineProps({
|
|
||||||
item: {
|
|
||||||
type: Object,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
hideTitleAndIcon: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false,
|
|
||||||
},
|
|
||||||
hideMarker: {
|
|
||||||
type: Boolean,
|
|
||||||
default: true,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
const itemIcon = (item) => {
|
|
||||||
return item.icon.icon ? item.icon.icon : ''
|
|
||||||
}
|
|
||||||
|
|
||||||
const itemIconClass = (item) => {
|
|
||||||
return item.icon ? item.icon.class : ''
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.nav-item {
|
|
||||||
list-style-type: none; /* Removes default list styling */
|
|
||||||
padding: 0; /* Removes default padding */
|
|
||||||
}
|
|
||||||
|
|
||||||
.list-reset {
|
|
||||||
list-style: none; /* Removes bullets or numbers from the list */
|
|
||||||
padding: 0; /* Removes default padding */
|
|
||||||
margin: 0; /* Removes default margin */
|
|
||||||
}
|
|
||||||
|
|
||||||
.list-item-reset {
|
|
||||||
list-style: none; /* Ensures each list item has no bullets or numbers */
|
|
||||||
padding: 0; /* Removes default padding */
|
|
||||||
margin: 0; /* Removes default margin */
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-item > .v-menu {
|
|
||||||
width: 100%; /* Ensures the menu takes the full width */
|
|
||||||
}
|
|
||||||
|
|
||||||
.v-btn {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: flex-start;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bottom-end {
|
|
||||||
position: fixed;
|
|
||||||
width: 100%;
|
|
||||||
bottom: 20px;
|
|
||||||
padding-inline: 18px;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
|
@ -1,12 +1,12 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { layoutConfig } from '@layouts';
|
import { layoutConfig } from '@layouts'
|
||||||
import { can } from '@layouts/plugins/casl';
|
import { can } from '@layouts/plugins/casl'
|
||||||
import { useLayoutConfigStore } from '@layouts/stores/config';
|
import { useLayoutConfigStore } from '@layouts/stores/config'
|
||||||
import {
|
import {
|
||||||
getComputedNavLinkToProp,
|
getComputedNavLinkToProp,
|
||||||
getDynamicI18nProps,
|
getDynamicI18nProps,
|
||||||
isNavLinkActive,
|
isNavLinkActive,
|
||||||
} from '@layouts/utils';
|
} from '@layouts/utils'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
item: {
|
item: {
|
||||||
@ -29,7 +29,6 @@ const hideTitleAndBadge = configStore.isVerticalNavMini()
|
|||||||
:is="item.to ? 'RouterLink' : 'a'"
|
:is="item.to ? 'RouterLink' : 'a'"
|
||||||
v-bind="getComputedNavLinkToProp(item)"
|
v-bind="getComputedNavLinkToProp(item)"
|
||||||
:class="{ 'router-link-active router-link-exact-active': isNavLinkActive(item, $router) }"
|
:class="{ 'router-link-active router-link-exact-active': isNavLinkActive(item, $router) }"
|
||||||
|
|
||||||
>
|
>
|
||||||
<Component
|
<Component
|
||||||
:is="layoutConfig.app.iconRenderer || 'div'"
|
:is="layoutConfig.app.iconRenderer || 'div'"
|
||||||
|
@ -46,46 +46,18 @@ export const resolveNavLinkRouteName = (link, router) => {
|
|||||||
*/
|
*/
|
||||||
export const isNavLinkActive = (link, router) => {
|
export const isNavLinkActive = (link, router) => {
|
||||||
// Matched routes array of current route
|
// Matched routes array of current route
|
||||||
const matchedRoutes = router.currentRoute.value.matched;
|
const matchedRoutes = router.currentRoute.value.matched
|
||||||
const currentRoute = router.currentRoute.value;
|
|
||||||
|
|
||||||
// Check if the parent menu item should be active
|
|
||||||
|
|
||||||
if (isParentActive(currentRoute,router,link)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check if provided route matches route's matched route
|
// Check if provided route matches route's matched route
|
||||||
const resolveRoutedName = resolveNavLinkRouteName(link, router);
|
const resolveRoutedName = resolveNavLinkRouteName(link, router)
|
||||||
if (!resolveRoutedName) {
|
if (!resolveRoutedName)
|
||||||
return false;
|
return false
|
||||||
}
|
|
||||||
|
|
||||||
return matchedRoutes.some(route => {
|
return matchedRoutes.some(route => {
|
||||||
return route.name === resolveRoutedName || route.meta.navActiveLink === resolveRoutedName;
|
return route.name === resolveRoutedName || route.meta.navActiveLink === resolveRoutedName
|
||||||
});
|
})
|
||||||
};
|
}
|
||||||
const ParentMenuItemName = 'admin-patients';
|
|
||||||
|
|
||||||
export const isParentActive = (route, router,link) => {
|
|
||||||
// Get the current route's activeParent meta property
|
|
||||||
const activeParent = route.meta.activeParent;
|
|
||||||
|
|
||||||
// Check if the activeParent is defined and not an empty string
|
|
||||||
if (activeParent && activeParent.trim().length > 0) {
|
|
||||||
// Find the parent route configuration
|
|
||||||
const parentRoute = router.options.routes.find(r => r.name === activeParent);
|
|
||||||
console.log('fffff', link.to)
|
|
||||||
// Check if the parent route configuration exists
|
|
||||||
if (link.to) {
|
|
||||||
// Use the parent route's name or any other property as the parent menu item name
|
|
||||||
return link.to === activeParent;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// If the activeParent is not defined, an empty string, or the parent route configuration is not found, return false
|
|
||||||
return false;
|
|
||||||
};
|
|
||||||
/**
|
/**
|
||||||
* Check if nav group is active
|
* Check if nav group is active
|
||||||
* @param {Array} children Group children
|
* @param {Array} children Group children
|
||||||
|
@ -1,14 +1,13 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
|
import { useTheme } from 'vuetify'
|
||||||
import ScrollToTop from '@core/components/ScrollToTop.vue'
|
import ScrollToTop from '@core/components/ScrollToTop.vue'
|
||||||
import initCore from '@core/initCore'
|
import initCore from '@core/initCore'
|
||||||
import {
|
import {
|
||||||
initConfigStore,
|
initConfigStore,
|
||||||
useConfigStore,
|
useConfigStore,
|
||||||
} from '@core/stores/config'
|
} from '@core/stores/config'
|
||||||
import { hexToRgb } from '@layouts/utils'
|
import { hexToRgb } from '@layouts/utils'
|
||||||
import { useTheme } from 'vuetify'
|
|
||||||
import { useStore } from 'vuex'
|
|
||||||
const store = useStore()
|
|
||||||
const { global } = useTheme()
|
const { global } = useTheme()
|
||||||
|
|
||||||
// ℹ️ Sync current theme with initial loader theme
|
// ℹ️ Sync current theme with initial loader theme
|
||||||
@ -19,27 +18,6 @@ const configStore = useConfigStore()
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VOverlay
|
|
||||||
v-model="store.getters.getIsLoading"
|
|
||||||
contained
|
|
||||||
persistent
|
|
||||||
scroll-strategy="none"
|
|
||||||
class="align-center justify-center"
|
|
||||||
>
|
|
||||||
<VProgressCircular indeterminate />
|
|
||||||
</VOverlay>
|
|
||||||
<VSnackbar v-model="store.getters.getSuccessMsg" :timeout="5000" location="top end" variant="flat"
|
|
||||||
color="success">
|
|
||||||
<VIcon
|
|
||||||
class="ri-success-line success-icon"
|
|
||||||
/> {{ store.getters.getShowMsg }}
|
|
||||||
</VSnackbar>
|
|
||||||
<VSnackbar v-model="store.getters.getErrorMsg" :timeout="5000" location="top end" variant="flat"
|
|
||||||
color="error">
|
|
||||||
<VIcon
|
|
||||||
class="ri-success-line success-icon"
|
|
||||||
/> {{ store.getters.getShowMsg }}
|
|
||||||
</VSnackbar>
|
|
||||||
<VLocaleProvider :rtl="configStore.isAppRTL">
|
<VLocaleProvider :rtl="configStore.isAppRTL">
|
||||||
<!-- ℹ️ This is required to set the background color of active nav link based on currently active global theme's primary -->
|
<!-- ℹ️ This is required to set the background color of active nav link based on currently active global theme's primary -->
|
||||||
<VApp :style="`--v-global-theme-primary: ${hexToRgb(global.current.value.colors.primary)}`">
|
<VApp :style="`--v-global-theme-primary: ${hexToRgb(global.current.value.colors.primary)}`">
|
||||||
|
@ -69,7 +69,11 @@ const addressTypes = [
|
|||||||
>
|
>
|
||||||
<VCardText class="pt-5">
|
<VCardText class="pt-5">
|
||||||
<!-- 👉 dialog close btn -->
|
<!-- 👉 dialog close btn -->
|
||||||
|
<DialogCloseBtn
|
||||||
|
variant="text"
|
||||||
|
size="default"
|
||||||
|
@click="resetForm"
|
||||||
|
/>
|
||||||
|
|
||||||
<!-- 👉 Title -->
|
<!-- 👉 Title -->
|
||||||
<div class="text-center mb-6">
|
<div class="text-center mb-6">
|
||||||
|
@ -1,67 +0,0 @@
|
|||||||
export const GET_BASE_PATH = ""
|
|
||||||
let MAIN_DOMAIN = "http://127.0.0.1:8000";
|
|
||||||
//let MAIN_DOMAIN = "http://telemedpro.test";
|
|
||||||
export const ADMIN_LOGIN_API = MAIN_DOMAIN + "/api/admin/login"
|
|
||||||
|
|
||||||
export const PATIENT_FILTER_LIST_API = MAIN_DOMAIN + "/api/admin/patient-list/"
|
|
||||||
export const PATIENT_LIST_API = MAIN_DOMAIN + "/api/admin/patient-list"
|
|
||||||
export const PATIENT_INFO_API = MAIN_DOMAIN + "/api/admin/patient/"
|
|
||||||
export const PATIENT_MEETING_LIST_API = MAIN_DOMAIN + "/api/admin/get-meeting-history/"
|
|
||||||
export const PATIENT_UPDATE_API = MAIN_DOMAIN + "/api/admin/patient-update/"
|
|
||||||
export const PATIENT_DELETE_API = MAIN_DOMAIN + "/api/admin/patient-delete/"
|
|
||||||
|
|
||||||
|
|
||||||
export const PATIENT_LABKIT_LIST_API = MAIN_DOMAIN + "/api/admin/patient-labkit-list/"
|
|
||||||
export const PATIENT_LABKIT_STATUS_UPDATE_API = MAIN_DOMAIN + "/api/admin/labkit-status-update/"
|
|
||||||
export const PATIENT_PRESCRIPTION_STATUS_UPDATE_API = MAIN_DOMAIN + "/api/admin/patient-prescription-status-update/"
|
|
||||||
|
|
||||||
export const SUBCRIPTIONS_LIST_API = MAIN_DOMAIN + "/api/plans/"
|
|
||||||
|
|
||||||
|
|
||||||
export const PROVIDER_FILTER_LIST_API = MAIN_DOMAIN + "/api/admin/telemed-pro-list"
|
|
||||||
export const PROVIDER_LIST_API = MAIN_DOMAIN + "/api/admin/telemed-pro-list"
|
|
||||||
export const PROVIDER_INFO_API = MAIN_DOMAIN + "/api/admin/telemed-pro/"
|
|
||||||
export const PROVIDER_UPDATE_API = MAIN_DOMAIN + "/api/admin/telemed-pro-update/"
|
|
||||||
export const PROVIDER_DELETE_API = MAIN_DOMAIN + "/api/admin/telemed-pro-delete/"
|
|
||||||
|
|
||||||
export const LABS_LIST_API = MAIN_DOMAIN + "/api/admin/labs-list"
|
|
||||||
export const LABS_INFO_API = MAIN_DOMAIN + "/api/admin/labs/"
|
|
||||||
export const LABS_UPDATE_API = MAIN_DOMAIN + "/api/admin/labs-update/"
|
|
||||||
export const LABS_DELETE_API = MAIN_DOMAIN + "/api/admin/labs-delete/"
|
|
||||||
|
|
||||||
export const MEETING_PRESCREPTIONS_API = MAIN_DOMAIN + "/api/admin/get-patient-prescriptions/"
|
|
||||||
export const MEETING_NOTES_API = MAIN_DOMAIN + "/api/admin/get-note/"
|
|
||||||
export const APPOINTMENT_DETAILS_API = MAIN_DOMAIN + "/api/admin/get-appointment/"
|
|
||||||
|
|
||||||
|
|
||||||
export const MEDICINE_LIST_API = MAIN_DOMAIN + "/api/admin/get-med-list"
|
|
||||||
export const MEDICINE_ADD_QUESTIONERIES_EXCEL_API = MAIN_DOMAIN + "/api/admin/questions-files"
|
|
||||||
|
|
||||||
export const MEDICINE_SAVE_API = MAIN_DOMAIN + "/api/admin/save-med"
|
|
||||||
export const MEDICINE_UPDATE_API = MAIN_DOMAIN + "/api/admin/update-med/"
|
|
||||||
export const MEDICINE_DELETE_API = MAIN_DOMAIN + "/api/admin/delete-med/"
|
|
||||||
export const PROVIDER_MEETING_LIST_API = MAIN_DOMAIN + "/api/admin/get-meeting-history-with-agent/"
|
|
||||||
|
|
||||||
export const ADMIN_LOGIN_DETAIL = MAIN_DOMAIN + "/api/admin/admin-details"
|
|
||||||
export const ADMIN_GET_SITE_SETTING = MAIN_DOMAIN + "/api/admin/site-settings"
|
|
||||||
export const ADMIN_UPDATE_SITE_SETTING = MAIN_DOMAIN + "/api/admin/update-settings/"
|
|
||||||
export const ADMIN_UPDATE_PASSWORD = MAIN_DOMAIN + "/api/admin/password-update"
|
|
||||||
export const PROFILE_UPDATE_API = MAIN_DOMAIN + "/api/admin/admin-update-profile"
|
|
||||||
|
|
||||||
export const ADMIN_LAB_KIT_LIST_API = MAIN_DOMAIN + "/api/admin/labkit-list"
|
|
||||||
export const ADMIN_LAB_KIT_UPDATE_API = MAIN_DOMAIN + "/api/admin/labkit-update/"
|
|
||||||
export const ADMIN_LAB_KIT_ADD_API = MAIN_DOMAIN + "/api/admin/labkit-list-create"
|
|
||||||
export const ADMIN_LAB_KIT_DELETE_API = MAIN_DOMAIN + "/api/admin/labkit-delete/"
|
|
||||||
|
|
||||||
export const ADMIN_PATIENT_DETAIL_API = MAIN_DOMAIN + "/api/admin/patient-full-detail/"
|
|
||||||
export const ADMIN_PROVIDER_DETAIL_API = MAIN_DOMAIN + "/api/admin/telemed-full-detail/"
|
|
||||||
|
|
||||||
export const ADMIN_PATIENT_PROFILE_API = MAIN_DOMAIN + "/api/admin/get-question-builder/"
|
|
||||||
|
|
||||||
export const ADMIN_PROVIDER_REPORT_API = MAIN_DOMAIN + "/api/admin/provider-report"
|
|
||||||
|
|
||||||
export const ADMIN_PROVIDER_REPORT_POST_API = MAIN_DOMAIN + "/api/admin/provider-report-post"
|
|
||||||
|
|
||||||
export const ADMIN_GET_ORDER_API = MAIN_DOMAIN + "/api/admin/get-order-data"
|
|
||||||
|
|
||||||
|
|
@ -4,12 +4,12 @@ import { themeConfig } from '@themeConfig'
|
|||||||
|
|
||||||
// Components
|
// Components
|
||||||
import Footer from '@/layouts/components/Footer.vue'
|
import Footer from '@/layouts/components/Footer.vue'
|
||||||
// import NavBarNotifications from '@/layouts/components/NavBarNotifications.vue'
|
import NavBarNotifications from '@/layouts/components/NavBarNotifications.vue'
|
||||||
// import NavSearchBar from '@/layouts/components/NavSearchBar.vue'
|
import NavSearchBar from '@/layouts/components/NavSearchBar.vue'
|
||||||
// import NavbarShortcuts from '@/layouts/components/NavbarShortcuts.vue'
|
import NavbarShortcuts from '@/layouts/components/NavbarShortcuts.vue'
|
||||||
import NavbarThemeSwitcher from '@/layouts/components/NavbarThemeSwitcher.vue'
|
import NavbarThemeSwitcher from '@/layouts/components/NavbarThemeSwitcher.vue'
|
||||||
import UserProfile from '@/layouts/components/UserProfile.vue'
|
import UserProfile from '@/layouts/components/UserProfile.vue'
|
||||||
// import NavBarI18n from '@core/components/I18n.vue'
|
import NavBarI18n from '@core/components/I18n.vue'
|
||||||
import { HorizontalNavLayout } from '@layouts'
|
import { HorizontalNavLayout } from '@layouts'
|
||||||
import { VNodeRenderer } from '@layouts/components/VNodeRenderer'
|
import { VNodeRenderer } from '@layouts/components/VNodeRenderer'
|
||||||
|
|
||||||
@ -45,16 +45,16 @@ watch([
|
|||||||
</RouterLink>
|
</RouterLink>
|
||||||
<VSpacer />
|
<VSpacer />
|
||||||
|
|
||||||
<!-- <NavSearchBar /> -->
|
<NavSearchBar />
|
||||||
|
|
||||||
<!-- <NavBarI18n
|
<NavBarI18n
|
||||||
v-if="themeConfig.app.i18n.enable && themeConfig.app.i18n.langConfig?.length"
|
v-if="themeConfig.app.i18n.enable && themeConfig.app.i18n.langConfig?.length"
|
||||||
:languages="themeConfig.app.i18n.langConfig"
|
:languages="themeConfig.app.i18n.langConfig"
|
||||||
/> -->
|
/>
|
||||||
|
|
||||||
<NavbarThemeSwitcher />
|
<NavbarThemeSwitcher />
|
||||||
<!-- <NavbarShortcuts /> -->
|
<NavbarShortcuts />
|
||||||
<!-- <NavBarNotifications class="me-2" /> -->
|
<NavBarNotifications class="me-2" />
|
||||||
<UserProfile />
|
<UserProfile />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -77,6 +77,6 @@ watch([
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 👉 Customizer -->
|
<!-- 👉 Customizer -->
|
||||||
<!-- <TheCustomizer /> -->
|
<TheCustomizer />
|
||||||
</HorizontalNavLayout>
|
</HorizontalNavLayout>
|
||||||
</template>
|
</template>
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import navItems from '@/navigation/vertical';
|
import navItems from '@/navigation/vertical'
|
||||||
import { useStore } from 'vuex';
|
import { themeConfig } from '@themeConfig'
|
||||||
const store = useStore()
|
|
||||||
// Components
|
// Components
|
||||||
import Footer from '@/layouts/components/Footer.vue';
|
import Footer from '@/layouts/components/Footer.vue'
|
||||||
// import NavBarNotifications from '@/layouts/components/NavBarNotifications.vue';
|
import NavBarNotifications from '@/layouts/components/NavBarNotifications.vue'
|
||||||
// import NavSearchBar from '@/layouts/components/NavSearchBar.vue';
|
import NavSearchBar from '@/layouts/components/NavSearchBar.vue'
|
||||||
// import NavbarShortcuts from '@/layouts/components/NavbarShortcuts.vue';
|
import NavbarShortcuts from '@/layouts/components/NavbarShortcuts.vue'
|
||||||
import NavbarThemeSwitcher from '@/layouts/components/NavbarThemeSwitcher.vue';
|
import NavbarThemeSwitcher from '@/layouts/components/NavbarThemeSwitcher.vue'
|
||||||
import UserProfile from '@/layouts/components/UserProfile.vue';
|
import UserProfile from '@/layouts/components/UserProfile.vue'
|
||||||
// import NavBarI18n from '@core/components/I18n.vue';
|
import NavBarI18n from '@core/components/I18n.vue'
|
||||||
|
|
||||||
// @layouts plugin
|
// @layouts plugin
|
||||||
import { VerticalNavLayout } from '@layouts';
|
import { VerticalNavLayout } from '@layouts'
|
||||||
|
|
||||||
// SECTION: Loading Indicator
|
// SECTION: Loading Indicator
|
||||||
const isFallbackStateActive = ref(false)
|
const isFallbackStateActive = ref(false)
|
||||||
@ -31,7 +31,6 @@ watch([
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
||||||
<VerticalNavLayout :nav-items="navItems">
|
<VerticalNavLayout :nav-items="navItems">
|
||||||
<!-- 👉 navbar -->
|
<!-- 👉 navbar -->
|
||||||
<template #navbar="{ toggleVerticalOverlayNavActive }">
|
<template #navbar="{ toggleVerticalOverlayNavActive }">
|
||||||
@ -44,17 +43,17 @@ watch([
|
|||||||
<VIcon icon="ri-menu-line" />
|
<VIcon icon="ri-menu-line" />
|
||||||
</IconBtn>
|
</IconBtn>
|
||||||
|
|
||||||
<!-- <NavSearchBar class="ms-lg-n2" /> -->
|
<NavSearchBar class="ms-lg-n2" />
|
||||||
|
|
||||||
<VSpacer />
|
<VSpacer />
|
||||||
|
|
||||||
<!-- <NavBarI18n
|
<NavBarI18n
|
||||||
v-if="themeConfig.app.i18n.enable && themeConfig.app.i18n.langConfig?.length"
|
v-if="themeConfig.app.i18n.enable && themeConfig.app.i18n.langConfig?.length"
|
||||||
:languages="themeConfig.app.i18n.langConfig"
|
:languages="themeConfig.app.i18n.langConfig"
|
||||||
/> -->
|
/>
|
||||||
<NavbarThemeSwitcher />
|
<NavbarThemeSwitcher />
|
||||||
<!-- <NavbarShortcuts /> -->
|
<NavbarShortcuts />
|
||||||
<!-- <NavBarNotifications class="me-2" /> -->
|
<NavBarNotifications class="me-2" />
|
||||||
<UserProfile />
|
<UserProfile />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -78,6 +77,6 @@ watch([
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 👉 Customizer -->
|
<!-- 👉 Customizer -->
|
||||||
<!-- <TheCustomizer /> -->
|
<TheCustomizer />
|
||||||
</VerticalNavLayout>
|
</VerticalNavLayout>
|
||||||
</template>
|
</template>
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
<div class="h-100 d-flex align-center justify-space-between text-medium-emphasis">
|
<div class="h-100 d-flex align-center justify-space-between text-medium-emphasis">
|
||||||
<!-- 👉 Footer: left content -->
|
<!-- 👉 Footer: left content -->
|
||||||
<span class="d-flex align-center">
|
<span class="d-flex align-center">
|
||||||
© Copyright
|
©
|
||||||
{{ new Date().getFullYear() }}
|
{{ new Date().getFullYear() }}
|
||||||
, All Rights Reserved.
|
Made With
|
||||||
<!-- <VIcon
|
<VIcon
|
||||||
icon="ri-heart-line"
|
icon="ri-heart-line"
|
||||||
color="error"
|
color="error"
|
||||||
size="1.25rem"
|
size="1.25rem"
|
||||||
@ -16,10 +16,10 @@
|
|||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
class="text-primary ms-1"
|
class="text-primary ms-1"
|
||||||
>ThemeSelection</a> -->
|
>ThemeSelection</a>
|
||||||
</span>
|
</span>
|
||||||
<!-- 👉 Footer: right content -->
|
<!-- 👉 Footer: right content -->
|
||||||
<!-- <span class="d-md-flex gap-x-4 text-primary d-none">
|
<span class="d-md-flex gap-x-4 text-primary d-none">
|
||||||
<a
|
<a
|
||||||
href="https://themeselection.com/license/"
|
href="https://themeselection.com/license/"
|
||||||
target="noopener noreferrer"
|
target="noopener noreferrer"
|
||||||
@ -32,6 +32,6 @@
|
|||||||
href="https://demos.themeselection.com/materio-vuetify-vuejs-admin-template/documentation/guide/laravel-integration/folder-structure.html"
|
href="https://demos.themeselection.com/materio-vuetify-vuejs-admin-template/documentation/guide/laravel-integration/folder-structure.html"
|
||||||
target="noopener noreferrer"
|
target="noopener noreferrer"
|
||||||
>Documentation</a>
|
>Documentation</a>
|
||||||
</span> -->
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { useConfigStore } from '@core/stores/config';
|
import Shepherd from 'shepherd.js'
|
||||||
import Shepherd from 'shepherd.js';
|
import { withQuery } from 'ufo'
|
||||||
import { withQuery } from 'ufo';
|
import { useConfigStore } from '@core/stores/config'
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
// 👉 Is App Search Bar Visible
|
// 👉 Is App Search Bar Visible
|
||||||
@ -133,11 +133,11 @@ const noDataSuggestions = [
|
|||||||
params: { tab: 'account' },
|
params: { tab: 'account' },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// {
|
{
|
||||||
// title: 'Pricing Page',
|
title: 'Pricing Page',
|
||||||
// icon: 'ri-cash-line',
|
icon: 'ri-cash-line',
|
||||||
// url: { name: 'pages-pricing' },
|
url: { name: 'pages-pricing' },
|
||||||
// },
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
const searchQuery = ref('')
|
const searchQuery = ref('')
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { PerfectScrollbar } from 'vue3-perfect-scrollbar';
|
import { PerfectScrollbar } from 'vue3-perfect-scrollbar'
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const ability = useAbility()
|
const ability = useAbility()
|
||||||
@ -11,7 +11,6 @@ const logout = async () => {
|
|||||||
|
|
||||||
// Remove "accessToken" from cookie
|
// Remove "accessToken" from cookie
|
||||||
useCookie('accessToken').value = null
|
useCookie('accessToken').value = null
|
||||||
localStorage.removeItem('admin_access_token');
|
|
||||||
|
|
||||||
// Remove "userData" from cookie
|
// Remove "userData" from cookie
|
||||||
userData.value = null
|
userData.value = null
|
||||||
@ -30,15 +29,15 @@ const logout = async () => {
|
|||||||
|
|
||||||
const userProfileList = [
|
const userProfileList = [
|
||||||
{ type: 'divider' },
|
{ type: 'divider' },
|
||||||
// {
|
{
|
||||||
// type: 'navItem',
|
type: 'navItem',
|
||||||
// icon: 'ri-user-line',
|
icon: 'ri-user-line',
|
||||||
// title: 'Profile',
|
title: 'Profile',
|
||||||
// to: {
|
to: {
|
||||||
// name: 'apps-user-view-id',
|
name: 'apps-user-view-id',
|
||||||
// params: { id: 21 },
|
params: { id: 21 },
|
||||||
// },
|
},
|
||||||
// },
|
},
|
||||||
{
|
{
|
||||||
type: 'navItem',
|
type: 'navItem',
|
||||||
icon: 'ri-settings-4-line',
|
icon: 'ri-settings-4-line',
|
||||||
@ -48,32 +47,32 @@ const userProfileList = [
|
|||||||
params: { tab: 'account' },
|
params: { tab: 'account' },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// {
|
{
|
||||||
// type: 'navItem',
|
type: 'navItem',
|
||||||
// icon: 'ri-file-text-line',
|
icon: 'ri-file-text-line',
|
||||||
// title: 'Billing Plan',
|
title: 'Billing Plan',
|
||||||
// to: {
|
to: {
|
||||||
// name: 'pages-account-settings-tab',
|
name: 'pages-account-settings-tab',
|
||||||
// params: { tab: 'billing-plans' },
|
params: { tab: 'billing-plans' },
|
||||||
// },
|
},
|
||||||
// badgeProps: {
|
badgeProps: {
|
||||||
// color: 'error',
|
color: 'error',
|
||||||
// content: '5',
|
content: '4',
|
||||||
// },
|
},
|
||||||
// },
|
},
|
||||||
// { type: 'divider' },
|
{ type: 'divider' },
|
||||||
// {
|
{
|
||||||
// type: 'navItem',
|
type: 'navItem',
|
||||||
// icon: 'ri-money-dollar-circle-line',
|
icon: 'ri-money-dollar-circle-line',
|
||||||
// title: 'Pricing',
|
title: 'Pricing',
|
||||||
// to: { name: 'pages-pricing' },
|
to: { name: 'pages-pricing' },
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// type: 'navItem',
|
type: 'navItem',
|
||||||
// icon: 'ri-question-line',
|
icon: 'ri-question-line',
|
||||||
// title: 'FAQ',
|
title: 'FAQ',
|
||||||
// to: { name: 'pages-faq' },
|
to: { name: 'pages-faq' },
|
||||||
// },
|
},
|
||||||
{ type: 'divider' },
|
{ type: 'divider' },
|
||||||
]
|
]
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,15 +1,14 @@
|
|||||||
|
import { createApp } from 'vue'
|
||||||
import App from '@/App.vue'
|
import App from '@/App.vue'
|
||||||
import { registerPlugins } from '@core/utils/plugins'
|
import { registerPlugins } from '@core/utils/plugins'
|
||||||
import { createApp } from 'vue'
|
|
||||||
|
|
||||||
// Styles
|
// Styles
|
||||||
import '@core-scss/template/index.scss'
|
import '@core-scss/template/index.scss'
|
||||||
import '@styles/styles.scss'
|
import '@styles/styles.scss'
|
||||||
import store from './store'
|
|
||||||
|
|
||||||
// Create vue app
|
// Create vue app
|
||||||
const app = createApp(App)
|
const app = createApp(App)
|
||||||
app.use(store)
|
|
||||||
|
|
||||||
// Register plugins
|
// Register plugins
|
||||||
registerPlugins(app)
|
registerPlugins(app)
|
||||||
|
@ -1,142 +1,61 @@
|
|||||||
|
|
||||||
export default [
|
export default [
|
||||||
{
|
{
|
||||||
title: 'Dashboard',
|
title: 'Dashboards',
|
||||||
icon: { icon: 'ri-home-smile-line' },
|
icon: { icon: 'ri-home-smile-line' },
|
||||||
to: 'admin-dashboard',
|
|
||||||
// children: [
|
|
||||||
// {
|
|
||||||
// title: 'CRM',
|
|
||||||
// to: 'dashboards-crm',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: 'Analytics',
|
|
||||||
// to: 'dashboards-analytics',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: 'eCommerce',
|
|
||||||
// to: 'dashboards-ecommerce',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: 'Academy',
|
|
||||||
// to: 'dashboards-academy',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: 'Logistics',
|
|
||||||
// to: 'dashboards-logistics',
|
|
||||||
// },
|
|
||||||
// ],
|
|
||||||
// badgeContent: '5',
|
|
||||||
// badgeClass: 'bg-error',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Patients',
|
|
||||||
icon: { icon: 'ri-user-line' },
|
|
||||||
to: 'admin-patients',
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
title: 'Providers',
|
|
||||||
icon: { icon: 'ri-stethoscope-line' },
|
|
||||||
to: 'admin-providers',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Lab Kites',
|
|
||||||
icon: { icon: 'ri-test-tube-line' },
|
|
||||||
to: 'admin-lab-kites',
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
title: 'Prodcuts',
|
|
||||||
icon: { icon: 'ri-medicine-bottle-line' },
|
|
||||||
to: 'admin-products',
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// title: 'Orders',
|
|
||||||
// icon: { icon: 'ri-medicine-bottle-line' },
|
|
||||||
// to: 'admin-orders',
|
|
||||||
// },
|
|
||||||
{
|
|
||||||
title: 'Settings',
|
|
||||||
icon: { icon: 'ri-settings-4-line' },
|
|
||||||
class: 'bottom-end',
|
|
||||||
isDropdownButton: true,
|
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
title: 'Profile',
|
title: 'CRM',
|
||||||
to: 'admin-profile',
|
to: 'dashboards-crm',
|
||||||
icon: {
|
|
||||||
icon: 'ri-group-line',
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Security',
|
title: 'Analytics',
|
||||||
to: 'admin-change-password',
|
to: 'dashboards-analytics',
|
||||||
icon: {
|
|
||||||
icon: 'ri-shield-keyhole-line',
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Site Setting',
|
title: 'eCommerce',
|
||||||
to: 'admin-site-setting',
|
to: 'dashboards-ecommerce',
|
||||||
icon: {
|
|
||||||
icon: 'ri-settings-4-line',
|
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: 'Academy',
|
||||||
|
to: 'dashboards-academy',
|
||||||
},
|
},
|
||||||
]
|
{
|
||||||
|
title: 'Logistics',
|
||||||
},
|
to: 'dashboards-logistics',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
badgeContent: '5',
|
||||||
|
badgeClass: 'bg-error',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: 'Reports',
|
title: 'Front Pages',
|
||||||
icon: { icon: 'ri-file-chart-line' },
|
icon: { icon: 'ri-file-copy-line' },
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
title: 'Provider Reports',
|
title: 'Landing',
|
||||||
to: 'admin-provider-report',
|
to: 'front-pages-landing-page',
|
||||||
icon: {
|
target: '_blank',
|
||||||
icon: 'ri-group-line',
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
{
|
||||||
]
|
title: 'Pricing',
|
||||||
|
to: 'front-pages-pricing',
|
||||||
}
|
target: '_blank',
|
||||||
|
},
|
||||||
// {
|
{
|
||||||
// title: 'Front Pages',
|
title: 'Payment',
|
||||||
// icon: { icon: 'ri-file-copy-line' },
|
to: 'front-pages-payment',
|
||||||
// children: [
|
target: '_blank',
|
||||||
// {
|
},
|
||||||
// title: 'Landing',
|
{
|
||||||
// to: 'front-pages-landing-page',
|
title: 'Checkout',
|
||||||
// target: '_blank',
|
to: 'front-pages-checkout',
|
||||||
// },
|
target: '_blank',
|
||||||
// {
|
},
|
||||||
// title: 'Pricing',
|
{
|
||||||
// to: 'front-pages-pricing',
|
title: 'Help Center',
|
||||||
// target: '_blank',
|
to: 'front-pages-help-center',
|
||||||
// },
|
target: '_blank',
|
||||||
// {
|
},
|
||||||
// title: 'Payment',
|
],
|
||||||
// to: 'front-pages-payment',
|
},
|
||||||
// target: '_blank',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: 'Checkout',
|
|
||||||
// to: 'front-pages-checkout',
|
|
||||||
// target: '_blank',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: 'Help Center',
|
|
||||||
// to: 'front-pages-help-center',
|
|
||||||
// target: '_blank',
|
|
||||||
// },
|
|
||||||
// ],
|
|
||||||
// },
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
// import appsAndPages from './apps-and-pages'
|
import appsAndPages from './apps-and-pages'
|
||||||
// import charts from './charts'
|
import charts from './charts'
|
||||||
import dashboard from './dashboard'
|
import dashboard from './dashboard'
|
||||||
// import forms from './forms'
|
import forms from './forms'
|
||||||
// import others from './others'
|
import others from './others'
|
||||||
// import uiElements from './ui-elements'
|
import uiElements from './ui-elements'
|
||||||
|
|
||||||
export default [...dashboard]
|
export default [...dashboard, ...appsAndPages, ...uiElements, ...forms, ...charts, ...others]
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import mastercard from '@images/logos/mastercard.png';
|
import mastercard from '@images/logos/mastercard.png'
|
||||||
import paypal from '@images/logos/paypal.png';
|
import paypal from '@images/logos/paypal.png'
|
||||||
import { useStore } from 'vuex';
|
|
||||||
|
|
||||||
const store = useStore();
|
|
||||||
const widgetData = ref([
|
const widgetData = ref([
|
||||||
{
|
{
|
||||||
title: 'Pending Payment',
|
title: 'Pending Payment',
|
||||||
@ -134,16 +132,7 @@ const {
|
|||||||
orderBy,
|
orderBy,
|
||||||
},
|
},
|
||||||
}))
|
}))
|
||||||
onMounted(async () => {
|
|
||||||
store.dispatch('updateIsLoading', true);
|
|
||||||
await store.dispatch('orderList');
|
|
||||||
store.dispatch('updateIsLoading', false);
|
|
||||||
|
|
||||||
let list = store.getters.getOrderList;
|
|
||||||
|
|
||||||
console.log(list);
|
|
||||||
|
|
||||||
});
|
|
||||||
const orders = computed(() => ordersData.value.orders)
|
const orders = computed(() => ordersData.value.orders)
|
||||||
const totalOrder = computed(() => ordersData.value.total)
|
const totalOrder = computed(() => ordersData.value.total)
|
||||||
|
|
||||||
|
@ -1,131 +1,55 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import AnalyticsAward from '@/views/dashboards/analytics/AnalyticsAward.vue'
|
import LogisticsCardStatistics from '@/views/apps/logistics/LogisticsCardStatistics.vue'
|
||||||
import AnalyticsDepositWithdraw from '@/views/dashboards/analytics/AnalyticsDepositWithdraw.vue'
|
import LogisticsDeliveryExpectations from '@/views/apps/logistics/LogisticsDeliveryExpectations.vue'
|
||||||
import AnalyticsPerformance from '@/views/dashboards/analytics/AnalyticsPerformance.vue'
|
import LogisticsDeliveryPerformance from '@/views/apps/logistics/LogisticsDeliveryPerformance.vue'
|
||||||
import AnalyticsSalesByCountries from '@/views/dashboards/analytics/AnalyticsSalesByCountries.vue'
|
import LogisticsOrderByCountries from '@/views/apps/logistics/LogisticsOrderByCountries.vue'
|
||||||
import AnalyticsSessionBarCharts from '@/views/dashboards/analytics/AnalyticsSessionsBarCharts.vue'
|
import LogisticsOverviewTable from '@/views/apps/logistics/LogisticsOverviewTable.vue'
|
||||||
import AnalyticsTotalEarning from '@/views/dashboards/analytics/AnalyticsTotalEarning.vue'
|
import LogisticsShipmentStatistics from '@/views/apps/logistics/LogisticsShipmentStatistics.vue'
|
||||||
import AnalyticsTotalProfit from '@/views/dashboards/analytics/AnalyticsTotalProfit.vue'
|
import LogisticsVehicleOverview from '@/views/apps/logistics/LogisticsVehicleOverview.vue'
|
||||||
import AnalyticsTransactions from '@/views/dashboards/analytics/AnalyticsTransactions.vue'
|
|
||||||
import AnalyticsUserTable from '@/views/dashboards/analytics/AnalyticsUserTable.vue'
|
|
||||||
import AnalyticsWeeklyOverview from '@/views/dashboards/analytics/AnalyticsWeeklyOverview.vue'
|
|
||||||
|
|
||||||
const totalProfit = {
|
|
||||||
title: 'Total Profit',
|
|
||||||
color: 'secondary',
|
|
||||||
icon: 'ri-pie-chart-2-line',
|
|
||||||
stats: '$25.6k',
|
|
||||||
change: 42,
|
|
||||||
subtitle: 'Weekly Project',
|
|
||||||
}
|
|
||||||
|
|
||||||
const newProject = {
|
|
||||||
title: 'New Project',
|
|
||||||
color: 'primary',
|
|
||||||
icon: 'ri-file-word-2-line',
|
|
||||||
stats: '862',
|
|
||||||
change: -18,
|
|
||||||
subtitle: 'Yearly Project',
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VRow class="match-height">
|
<VRow class="match-height">
|
||||||
|
<VCol cols="12">
|
||||||
|
<LogisticsCardStatistics />
|
||||||
|
</VCol>
|
||||||
<VCol
|
<VCol
|
||||||
cols="12"
|
cols="12"
|
||||||
md="4"
|
md="6"
|
||||||
>
|
>
|
||||||
<AnalyticsAward />
|
<LogisticsVehicleOverview />
|
||||||
</VCol>
|
</VCol>
|
||||||
|
|
||||||
<VCol
|
<VCol
|
||||||
cols="12"
|
cols="12"
|
||||||
md="8"
|
md="6"
|
||||||
>
|
>
|
||||||
<AnalyticsTransactions />
|
<LogisticsShipmentStatistics />
|
||||||
</VCol>
|
|
||||||
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
md="4"
|
|
||||||
sm="6"
|
|
||||||
>
|
|
||||||
<AnalyticsWeeklyOverview />
|
|
||||||
</VCol>
|
|
||||||
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
md="4"
|
|
||||||
sm="6"
|
|
||||||
>
|
|
||||||
<AnalyticsTotalEarning />
|
|
||||||
</VCol>
|
</VCol>
|
||||||
|
|
||||||
<VCol
|
<VCol
|
||||||
cols="12"
|
cols="12"
|
||||||
md="4"
|
md="4"
|
||||||
>
|
>
|
||||||
<VRow class="match-height">
|
<LogisticsDeliveryPerformance />
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
sm="6"
|
|
||||||
>
|
|
||||||
<AnalyticsTotalProfit />
|
|
||||||
</VCol>
|
|
||||||
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
sm="6"
|
|
||||||
>
|
|
||||||
<CardStatisticsVertical v-bind="totalProfit" />
|
|
||||||
</VCol>
|
|
||||||
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
sm="6"
|
|
||||||
>
|
|
||||||
<CardStatisticsVertical v-bind="newProject" />
|
|
||||||
</VCol>
|
|
||||||
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
sm="6"
|
|
||||||
>
|
|
||||||
<AnalyticsSessionBarCharts />
|
|
||||||
</VCol>
|
|
||||||
</VRow>
|
|
||||||
</VCol>
|
</VCol>
|
||||||
|
|
||||||
<VCol
|
<VCol
|
||||||
cols="12"
|
cols="12"
|
||||||
md="4"
|
md="4"
|
||||||
>
|
>
|
||||||
<AnalyticsPerformance />
|
<LogisticsDeliveryExpectations />
|
||||||
</VCol>
|
|
||||||
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
md="8"
|
|
||||||
>
|
|
||||||
<AnalyticsDepositWithdraw />
|
|
||||||
</VCol>
|
</VCol>
|
||||||
|
|
||||||
<VCol
|
<VCol
|
||||||
cols="12"
|
cols="12"
|
||||||
md="4"
|
md="4"
|
||||||
>
|
>
|
||||||
<AnalyticsSalesByCountries />
|
<LogisticsOrderByCountries />
|
||||||
</VCol>
|
</VCol>
|
||||||
|
|
||||||
<VCol
|
<VCol cols="12">
|
||||||
cols="12"
|
<LogisticsOverviewTable />
|
||||||
md="8"
|
|
||||||
>
|
|
||||||
<AnalyticsUserTable />
|
|
||||||
</VCol>
|
</VCol>
|
||||||
</VRow>
|
</VRow>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
@use "@core-scss/template/libs/apex-chart.scss";
|
|
||||||
</style>
|
|
||||||
|
@ -11,54 +11,34 @@ import CrmUpgradeYourPlan from '@/views/dashboards/crm/CrmUpgradeYourPlan.vue'
|
|||||||
import CrmWeeklySales from '@/views/dashboards/crm/CrmWeeklySales.vue'
|
import CrmWeeklySales from '@/views/dashboards/crm/CrmWeeklySales.vue'
|
||||||
import illustration1 from '@images/cards/illustration-1.png'
|
import illustration1 from '@images/cards/illustration-1.png'
|
||||||
import illustration2 from '@images/cards/illustration-2.png'
|
import illustration2 from '@images/cards/illustration-2.png'
|
||||||
import { useStore } from 'vuex'
|
|
||||||
const store = useStore()
|
|
||||||
const cardStatisticsWithImages = [
|
const cardStatisticsWithImages = [
|
||||||
{
|
{
|
||||||
title: 'Total Meetings',
|
title: 'Ratings',
|
||||||
subtitle: 'Year of 2021',
|
subtitle: 'Year of 2021',
|
||||||
stats: '13k',
|
stats: '13k',
|
||||||
change: 15.6,
|
change: 15.6,
|
||||||
// image: illustration1,
|
image: illustration1,
|
||||||
color: 'primary',
|
color: 'primary',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Orders',
|
title: 'Sessions',
|
||||||
subtitle: 'Year of 2021',
|
|
||||||
stats: '13k',
|
|
||||||
change: 15.6,
|
|
||||||
// image: illustration1,
|
|
||||||
color: 'primary',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'New Patients',
|
|
||||||
subtitle: 'Year of 2021',
|
|
||||||
stats: '13k',
|
|
||||||
change: 15.6,
|
|
||||||
// image: illustration1,
|
|
||||||
color: 'primary',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'New Providers',
|
|
||||||
subtitle: 'Last Week',
|
subtitle: 'Last Week',
|
||||||
stats: '24.5k',
|
stats: '24.5k',
|
||||||
change: -20,
|
change: -20,
|
||||||
// image: illustration2,
|
image: illustration2,
|
||||||
color: 'secondary',
|
color: 'secondary',
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
// const statistic = {
|
const statistic = {
|
||||||
// title: 'New Project',
|
title: 'New Project',
|
||||||
// color: 'primary',
|
color: 'primary',
|
||||||
// icon: 'ri-file-word-2-line',
|
icon: 'ri-file-word-2-line',
|
||||||
// stats: '862',
|
stats: '862',
|
||||||
// change: -18,
|
change: -18,
|
||||||
// subtitle: 'Yearly Project'
|
subtitle: 'Yearly Project',
|
||||||
// }
|
}
|
||||||
// onMounted(() => {
|
|
||||||
// store.dispatch('updateIsLoading', false)
|
|
||||||
// })
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -71,32 +51,97 @@ const cardStatisticsWithImages = [
|
|||||||
cols="12"
|
cols="12"
|
||||||
md="3"
|
md="3"
|
||||||
sm="6"
|
sm="6"
|
||||||
|
|
||||||
>
|
>
|
||||||
<CardStatisticsWithImages v-bind="statistics" />
|
<CardStatisticsWithImages v-bind="statistics" />
|
||||||
</VCol>
|
</VCol>
|
||||||
|
|
||||||
|
<VCol
|
||||||
|
cols="12"
|
||||||
|
md="6"
|
||||||
|
>
|
||||||
|
<CrmTransactions />
|
||||||
|
</VCol>
|
||||||
|
|
||||||
|
<VCol
|
||||||
|
cols="12"
|
||||||
|
sm="6"
|
||||||
|
md="3"
|
||||||
|
>
|
||||||
|
<CrmTotalSales />
|
||||||
|
</VCol>
|
||||||
|
|
||||||
|
<VCol
|
||||||
|
cols="12"
|
||||||
|
sm="6"
|
||||||
|
md="3"
|
||||||
|
>
|
||||||
|
<CrmRevenueReport />
|
||||||
|
</VCol>
|
||||||
|
|
||||||
|
<VCol
|
||||||
|
cols="12"
|
||||||
|
md="6"
|
||||||
|
>
|
||||||
|
<CrmSalesOverview />
|
||||||
|
</VCol>
|
||||||
|
|
||||||
|
<VCol
|
||||||
|
cols="12"
|
||||||
|
md="6"
|
||||||
|
>
|
||||||
|
<CrmActivityTimeline />
|
||||||
|
</VCol>
|
||||||
|
|
||||||
<VCol
|
<VCol
|
||||||
cols="12"
|
cols="12"
|
||||||
sm="8"
|
sm="8"
|
||||||
md="12"
|
md="4"
|
||||||
>
|
>
|
||||||
<CrmWeeklySales />
|
<CrmWeeklySales />
|
||||||
</VCol>
|
</VCol>
|
||||||
|
|
||||||
|
<VCol
|
||||||
|
cols="12"
|
||||||
|
md="2"
|
||||||
|
sm="4"
|
||||||
|
>
|
||||||
|
<VRow class="match-height">
|
||||||
|
<VCol
|
||||||
|
cols="6"
|
||||||
|
sm="12"
|
||||||
|
>
|
||||||
|
<CrmTotalGrowthCharts />
|
||||||
|
</VCol>
|
||||||
|
|
||||||
|
<VCol
|
||||||
|
cols="6"
|
||||||
|
sm="12"
|
||||||
|
>
|
||||||
|
<CardStatisticsVertical v-bind="statistic" />
|
||||||
|
</VCol>
|
||||||
|
</VRow>
|
||||||
|
</VCol>
|
||||||
|
|
||||||
<VCol
|
<VCol
|
||||||
cols="12"
|
cols="12"
|
||||||
md="6"
|
md="4"
|
||||||
style="display: none;"
|
|
||||||
>
|
>
|
||||||
<CrmActivityTimeline />
|
<CrmUpgradeYourPlan />
|
||||||
</VCol>
|
</VCol>
|
||||||
|
|
||||||
<VCol
|
<VCol
|
||||||
cols="12"
|
cols="12"
|
||||||
md="6"
|
md="4"
|
||||||
>
|
>
|
||||||
<CrmMeetingSchedule />
|
<CrmMeetingSchedule />
|
||||||
</VCol>
|
</VCol>
|
||||||
|
|
||||||
|
<VCol
|
||||||
|
cols="12"
|
||||||
|
md="4"
|
||||||
|
>
|
||||||
|
<CrmDeveloperMeetup />
|
||||||
|
</VCol>
|
||||||
</VRow>
|
</VRow>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
@ -1,444 +0,0 @@
|
|||||||
<script setup>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import { useStore } from 'vuex';
|
|
||||||
const store = useStore()
|
|
||||||
const editDialog = ref(false)
|
|
||||||
const deleteDialog = ref(false)
|
|
||||||
const search = ref('')
|
|
||||||
const defaultItem = ref({
|
|
||||||
id: -1,
|
|
||||||
name: '',
|
|
||||||
amount: '',
|
|
||||||
|
|
||||||
})
|
|
||||||
const addDialog = ref(false)
|
|
||||||
const editedItem = ref(defaultItem.value)
|
|
||||||
const editedIndex = ref(-1)
|
|
||||||
const labsKitList = ref([])
|
|
||||||
const isLoading=ref(false)
|
|
||||||
// status options
|
|
||||||
const selectedOptions = [
|
|
||||||
{
|
|
||||||
text: 'Active',
|
|
||||||
value: 1,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: 'InActive',
|
|
||||||
value: 2,
|
|
||||||
},
|
|
||||||
|
|
||||||
]
|
|
||||||
|
|
||||||
const refVForm = ref(null)
|
|
||||||
|
|
||||||
|
|
||||||
const formatPhoneNumber = () => {
|
|
||||||
console.log(editedItem.value)
|
|
||||||
// Remove non-numeric characters from the input
|
|
||||||
const numericValue = editedItem.value.contact_no.replace(/\D/g, '');
|
|
||||||
|
|
||||||
// Apply formatting logic
|
|
||||||
if (numericValue.length <= 10) {
|
|
||||||
editedItem.value.contact_no = numericValue.replace(/(\d{3})(\d{3})(\d{4})/, '($1) $2-$3');
|
|
||||||
} else {
|
|
||||||
// Limit the input to a maximum of 14 characters
|
|
||||||
const truncatedValue = numericValue.slice(0, 10);
|
|
||||||
editedItem.value.contact_no = truncatedValue.replace(/(\d{3})(\d{3})(\d{4})/, '($1) $2-$3');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
// headers
|
|
||||||
const headers = [
|
|
||||||
{
|
|
||||||
title: 'ID',
|
|
||||||
key: 'id',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'NAME',
|
|
||||||
key: 'name',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Amount',
|
|
||||||
key: 'amount',
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
// {
|
|
||||||
// title: 'ACTIONS',
|
|
||||||
// key: 'actions',
|
|
||||||
// },
|
|
||||||
]
|
|
||||||
|
|
||||||
const resolveStatusVariant = status => {
|
|
||||||
if (status === 1)
|
|
||||||
return {
|
|
||||||
color: 'primary',
|
|
||||||
text: 'Current',
|
|
||||||
}
|
|
||||||
else if (status === 2)
|
|
||||||
return {
|
|
||||||
color: 'success',
|
|
||||||
text: 'Professional',
|
|
||||||
}
|
|
||||||
else if (status === 3)
|
|
||||||
return {
|
|
||||||
color: 'error',
|
|
||||||
text: 'Rejected',
|
|
||||||
}
|
|
||||||
else if (status === 4)
|
|
||||||
return {
|
|
||||||
color: 'warning',
|
|
||||||
text: 'Resigned',
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return {
|
|
||||||
color: 'info',
|
|
||||||
text: 'Applied',
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const editItem = item => {
|
|
||||||
editedIndex.value = labsKitList.value.indexOf(item)
|
|
||||||
editedItem.value = { ...item }
|
|
||||||
editDialog.value = true
|
|
||||||
}
|
|
||||||
|
|
||||||
const deleteItem = item => {
|
|
||||||
editedIndex.value = labsKitList.value.indexOf(item)
|
|
||||||
editedItem.value = { ...item }
|
|
||||||
deleteDialog.value = true
|
|
||||||
}
|
|
||||||
|
|
||||||
const close = () => {
|
|
||||||
editDialog.value = false
|
|
||||||
editedIndex.value = -1
|
|
||||||
editedItem.value = { ...defaultItem.value }
|
|
||||||
}
|
|
||||||
const closeAdd = () => {
|
|
||||||
addDialog.value = false
|
|
||||||
}
|
|
||||||
const closeDelete = () => {
|
|
||||||
deleteDialog.value = false
|
|
||||||
editedIndex.value = -1
|
|
||||||
editedItem.value = { ...defaultItem.value }
|
|
||||||
}
|
|
||||||
|
|
||||||
const update = async () => {
|
|
||||||
const { valid } = await refVForm.value.validate()
|
|
||||||
console.log(valid)
|
|
||||||
if (valid) {
|
|
||||||
if (editedIndex.value > -1){
|
|
||||||
await store.dispatch('labKitUpdate',{
|
|
||||||
id: editedItem.value.id,
|
|
||||||
name: editedItem.value.name,
|
|
||||||
amount: editedItem.value.amount,
|
|
||||||
})
|
|
||||||
Object.assign(labsKitList.value[editedIndex.value], editedItem.value)
|
|
||||||
close()
|
|
||||||
} else {
|
|
||||||
await store.dispatch('labKitAdd',{
|
|
||||||
name: defaultItem.value.name,
|
|
||||||
amount: defaultItem.value.amount,
|
|
||||||
})
|
|
||||||
|
|
||||||
defaultItem.value.name = null
|
|
||||||
defaultItem.value.amount=null
|
|
||||||
closeAdd()
|
|
||||||
}
|
|
||||||
await store.dispatch('labsKitList')
|
|
||||||
console.log('getLabsList',store.getters.getLabKitList)
|
|
||||||
let list = store.getters.getLabKitList
|
|
||||||
|
|
||||||
labsKitList.value = list
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
const deleteItemConfirm = async() => {
|
|
||||||
console.log('editedIndex.value',editedIndex.value,editedItem.value.id)
|
|
||||||
await store.dispatch('labKitDelete',{
|
|
||||||
id: editedItem.value.id
|
|
||||||
})
|
|
||||||
labsKitList.value.splice(editedIndex.value, 1)
|
|
||||||
closeDelete()
|
|
||||||
}
|
|
||||||
const getlabsKitList = computed(async () => {
|
|
||||||
store.dispatch('updateIsLoading', true)
|
|
||||||
await store.dispatch('labsKitList')
|
|
||||||
console.log('getLabsList',store.getters.getLabKitList)
|
|
||||||
let list = store.getters.getLabKitList
|
|
||||||
store.dispatch('updateIsLoading', false)
|
|
||||||
labsKitList.value = list
|
|
||||||
return labsKitList.value
|
|
||||||
});
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
|
|
||||||
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<v-row>
|
|
||||||
<v-col cols="12" md="12" v-if="getlabsKitList">
|
|
||||||
<VCard title="Lab Kit">
|
|
||||||
<VCardText >
|
|
||||||
<VRow>
|
|
||||||
|
|
||||||
<VCol cols="12" md="8" class="d-flex align-center" >
|
|
||||||
<VBtn color="primary" prepend-icon="ri-add-line" @click="addDialog = true" style="display: none;">
|
|
||||||
New Lab Kit
|
|
||||||
</VBtn>
|
|
||||||
</VCol>
|
|
||||||
<VCol cols="12" md="4" class="d-flex justify-end">
|
|
||||||
<VTextField
|
|
||||||
v-model="search"
|
|
||||||
label="Search"
|
|
||||||
placeholder="Search ..."
|
|
||||||
append-inner-icon="ri-search-line"
|
|
||||||
single-line
|
|
||||||
hide-details
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
</VRow>
|
|
||||||
</VCardText>
|
|
||||||
<VDataTable
|
|
||||||
:headers="headers"
|
|
||||||
:items="labsKitList"
|
|
||||||
:search="search"
|
|
||||||
:items-per-page="5"
|
|
||||||
class="text-no-wrap"
|
|
||||||
>
|
|
||||||
<!-- full name -->
|
|
||||||
<template #item.name="{ item }">
|
|
||||||
<div class="d-flex align-center">
|
|
||||||
<!-- avatar -->
|
|
||||||
<VAvatar
|
|
||||||
size="32"
|
|
||||||
:color="item.avatar ? '' : 'primary'"
|
|
||||||
:class="item.avatar ? '' : 'v-avatar-light-bg primary--text'"
|
|
||||||
:variant="!item.avatar ? 'tonal' : undefined"
|
|
||||||
>
|
|
||||||
<VImg
|
|
||||||
v-if="item.avatar"
|
|
||||||
:src="item.avatar"
|
|
||||||
/>
|
|
||||||
<span
|
|
||||||
v-else
|
|
||||||
class="text-sm"
|
|
||||||
>{{ avatarText(item.name) }}</span>
|
|
||||||
</VAvatar>
|
|
||||||
|
|
||||||
<div class="d-flex flex-column ms-3">
|
|
||||||
<span class="d-block font-weight-medium text-high-emphasis text-truncate">{{ item.name }}</span>
|
|
||||||
<small>{{ item.post }}</small>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<!-- status -->
|
|
||||||
<template #item.status="{ item }">
|
|
||||||
<VChip
|
|
||||||
:color="resolveStatusVariant(item.status).color"
|
|
||||||
density="comfortable"
|
|
||||||
>
|
|
||||||
{{ resolveStatusVariant(item.status).text }}
|
|
||||||
</VChip>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<!-- Actions -->
|
|
||||||
<template #item.actions="{ item }">
|
|
||||||
<div class="d-flex gap-1">
|
|
||||||
<IconBtn
|
|
||||||
size="small"
|
|
||||||
@click="editItem(item)"
|
|
||||||
>
|
|
||||||
<VIcon icon="ri-pencil-line" />
|
|
||||||
</IconBtn>
|
|
||||||
<IconBtn
|
|
||||||
size="small"
|
|
||||||
@click="deleteItem(item)"
|
|
||||||
>
|
|
||||||
<VIcon icon="ri-delete-bin-line" />
|
|
||||||
</IconBtn>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</VDataTable>
|
|
||||||
</VCard>
|
|
||||||
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<!-- 👉 Edit Dialog -->
|
|
||||||
<VDialog
|
|
||||||
v-model="editDialog"
|
|
||||||
max-width="600px"
|
|
||||||
>
|
|
||||||
<VForm ref="refVForm" >
|
|
||||||
<VCard>
|
|
||||||
<VCardTitle>
|
|
||||||
<span class="headline">Edit Lab Kit</span>
|
|
||||||
</VCardTitle>
|
|
||||||
|
|
||||||
<VCardText>
|
|
||||||
<VContainer >
|
|
||||||
|
|
||||||
<VRow>
|
|
||||||
<!-- fullName -->
|
|
||||||
<VCol cols="12" md="12">
|
|
||||||
<VTextField
|
|
||||||
v-model="editedItem.name"
|
|
||||||
label="Name"
|
|
||||||
:rules="[requiredValidator]"
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
|
|
||||||
<!-- email -->
|
|
||||||
<VCol cols="12" sm="12" md="12">
|
|
||||||
<VTextField
|
|
||||||
v-model="editedItem.amount"
|
|
||||||
label="Amount"
|
|
||||||
:rules="[requiredValidator]"
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- status -->
|
|
||||||
|
|
||||||
</VRow>
|
|
||||||
</VContainer>
|
|
||||||
</VCardText>
|
|
||||||
|
|
||||||
<VCardActions>
|
|
||||||
<VSpacer />
|
|
||||||
|
|
||||||
<VBtn
|
|
||||||
color="error"
|
|
||||||
variant="outlined"
|
|
||||||
@click="close"
|
|
||||||
>
|
|
||||||
Cancel
|
|
||||||
</VBtn>
|
|
||||||
|
|
||||||
<VBtn
|
|
||||||
color="success"
|
|
||||||
variant="elevated"
|
|
||||||
@click="update"
|
|
||||||
>
|
|
||||||
Save
|
|
||||||
</VBtn>
|
|
||||||
|
|
||||||
</VCardActions>
|
|
||||||
</VCard>
|
|
||||||
</VForm>
|
|
||||||
</VDialog>
|
|
||||||
|
|
||||||
<!-- 👉 Delete Dialog -->
|
|
||||||
<VDialog
|
|
||||||
v-model="deleteDialog"
|
|
||||||
max-width="500px"
|
|
||||||
>
|
|
||||||
<VCard>
|
|
||||||
<VCardTitle>
|
|
||||||
Are you sure you want to delete this item?
|
|
||||||
</VCardTitle>
|
|
||||||
|
|
||||||
<VCardActions>
|
|
||||||
<VSpacer />
|
|
||||||
|
|
||||||
<VBtn
|
|
||||||
color="error"
|
|
||||||
variant="outlined"
|
|
||||||
@click="closeDelete"
|
|
||||||
>
|
|
||||||
Cancel
|
|
||||||
</VBtn>
|
|
||||||
|
|
||||||
<VBtn
|
|
||||||
color="success"
|
|
||||||
variant="elevated"
|
|
||||||
@click="deleteItemConfirm"
|
|
||||||
>
|
|
||||||
OK
|
|
||||||
</VBtn>
|
|
||||||
|
|
||||||
<VSpacer />
|
|
||||||
</VCardActions>
|
|
||||||
</VCard>
|
|
||||||
</VDialog>
|
|
||||||
|
|
||||||
<!-- 👉 Add Dialog -->
|
|
||||||
<VDialog
|
|
||||||
v-model="addDialog"
|
|
||||||
max-width="600px"
|
|
||||||
>
|
|
||||||
<VForm ref="refVForm" >
|
|
||||||
<VCard>
|
|
||||||
<VCardTitle>
|
|
||||||
<span class="headline">Add Lab Kit</span>
|
|
||||||
</VCardTitle>
|
|
||||||
|
|
||||||
<VCardText>
|
|
||||||
<VContainer >
|
|
||||||
|
|
||||||
<VRow>
|
|
||||||
<!-- fullName -->
|
|
||||||
<VCol cols="12" md="12">
|
|
||||||
<VTextField
|
|
||||||
v-model="defaultItem.name"
|
|
||||||
label="Name"
|
|
||||||
:rules="[requiredValidator]"
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
|
|
||||||
<!-- email -->
|
|
||||||
<VCol cols="12" sm="12" md="12">
|
|
||||||
<VTextField
|
|
||||||
v-model="defaultItem.amount"
|
|
||||||
label="Amount"
|
|
||||||
:rules="[requiredValidator,requiredAmountFloat]"
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- status -->
|
|
||||||
|
|
||||||
</VRow>
|
|
||||||
</VContainer>
|
|
||||||
</VCardText>
|
|
||||||
|
|
||||||
<VCardActions>
|
|
||||||
<VSpacer />
|
|
||||||
|
|
||||||
<VBtn
|
|
||||||
color="error"
|
|
||||||
variant="outlined"
|
|
||||||
@click="closeAdd"
|
|
||||||
>
|
|
||||||
Cancel
|
|
||||||
</VBtn>
|
|
||||||
|
|
||||||
<VBtn
|
|
||||||
color="success"
|
|
||||||
variant="elevated"
|
|
||||||
@click="update"
|
|
||||||
>
|
|
||||||
Save
|
|
||||||
</VBtn>
|
|
||||||
|
|
||||||
</VCardActions>
|
|
||||||
</VCard>
|
|
||||||
</VForm>
|
|
||||||
</VDialog>
|
|
||||||
</template>
|
|
@ -1,395 +0,0 @@
|
|||||||
<script setup>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import { useStore } from 'vuex';
|
|
||||||
const store = useStore()
|
|
||||||
const editDialog = ref(false)
|
|
||||||
const deleteDialog = ref(false)
|
|
||||||
const search = ref('')
|
|
||||||
const defaultItem = ref({
|
|
||||||
id: -1,
|
|
||||||
avatar: '',
|
|
||||||
name: '',
|
|
||||||
email: '',
|
|
||||||
// dob: '',
|
|
||||||
phone_no: '',
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
const editedItem = ref(defaultItem.value)
|
|
||||||
const editedIndex = ref(-1)
|
|
||||||
const labsList = ref([])
|
|
||||||
const isLoading=ref(false)
|
|
||||||
// status options
|
|
||||||
const selectedOptions = [
|
|
||||||
{
|
|
||||||
text: 'Active',
|
|
||||||
value: 1,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: 'InActive',
|
|
||||||
value: 2,
|
|
||||||
},
|
|
||||||
|
|
||||||
]
|
|
||||||
|
|
||||||
const refVForm = ref(null)
|
|
||||||
|
|
||||||
|
|
||||||
const formatPhoneNumber = () => {
|
|
||||||
console.log(editedItem.value)
|
|
||||||
// Remove non-numeric characters from the input
|
|
||||||
const numericValue = editedItem.value.contact_no.replace(/\D/g, '');
|
|
||||||
|
|
||||||
// Apply formatting logic
|
|
||||||
if (numericValue.length <= 10) {
|
|
||||||
editedItem.value.contact_no = numericValue.replace(/(\d{3})(\d{3})(\d{4})/, '($1) $2-$3');
|
|
||||||
} else {
|
|
||||||
// Limit the input to a maximum of 14 characters
|
|
||||||
const truncatedValue = numericValue.slice(0, 10);
|
|
||||||
editedItem.value.contact_no = truncatedValue.replace(/(\d{3})(\d{3})(\d{4})/, '($1) $2-$3');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
// headers
|
|
||||||
const headers = [
|
|
||||||
{
|
|
||||||
title: 'ID',
|
|
||||||
key: 'id',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'NAME',
|
|
||||||
key: 'name',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'ADDRESS',
|
|
||||||
key: 'address',
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// title: 'Date Of Birth',
|
|
||||||
// key: 'dob',
|
|
||||||
// },
|
|
||||||
{
|
|
||||||
title: 'CONTACT',
|
|
||||||
key: 'contact_no',
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
title: 'ACTIONS',
|
|
||||||
key: 'actions',
|
|
||||||
},
|
|
||||||
]
|
|
||||||
|
|
||||||
const resolveStatusVariant = status => {
|
|
||||||
if (status === 1)
|
|
||||||
return {
|
|
||||||
color: 'primary',
|
|
||||||
text: 'Current',
|
|
||||||
}
|
|
||||||
else if (status === 2)
|
|
||||||
return {
|
|
||||||
color: 'success',
|
|
||||||
text: 'Professional',
|
|
||||||
}
|
|
||||||
else if (status === 3)
|
|
||||||
return {
|
|
||||||
color: 'error',
|
|
||||||
text: 'Rejected',
|
|
||||||
}
|
|
||||||
else if (status === 4)
|
|
||||||
return {
|
|
||||||
color: 'warning',
|
|
||||||
text: 'Resigned',
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return {
|
|
||||||
color: 'info',
|
|
||||||
text: 'Applied',
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const editItem = item => {
|
|
||||||
editedIndex.value = labsList.value.indexOf(item)
|
|
||||||
editedItem.value = { ...item }
|
|
||||||
editDialog.value = true
|
|
||||||
}
|
|
||||||
|
|
||||||
const deleteItem = item => {
|
|
||||||
editedIndex.value = labsList.value.indexOf(item)
|
|
||||||
editedItem.value = { ...item }
|
|
||||||
deleteDialog.value = true
|
|
||||||
}
|
|
||||||
|
|
||||||
const close = () => {
|
|
||||||
editDialog.value = false
|
|
||||||
editedIndex.value = -1
|
|
||||||
editedItem.value = { ...defaultItem.value }
|
|
||||||
}
|
|
||||||
|
|
||||||
const closeDelete = () => {
|
|
||||||
deleteDialog.value = false
|
|
||||||
editedIndex.value = -1
|
|
||||||
editedItem.value = { ...defaultItem.value }
|
|
||||||
}
|
|
||||||
|
|
||||||
const save = async () => {
|
|
||||||
const { valid } = await refVForm.value.validate()
|
|
||||||
console.log(valid)
|
|
||||||
if (valid) {
|
|
||||||
if (editedIndex.value > -1){
|
|
||||||
await store.dispatch('labUpdate',{
|
|
||||||
id: editedItem.value.id,
|
|
||||||
name: editedItem.value.name,
|
|
||||||
address: editedItem.value.address,
|
|
||||||
contact_no: editedItem.value.contact_no,
|
|
||||||
})
|
|
||||||
Object.assign(labsList.value[editedIndex.value], editedItem.value)
|
|
||||||
}else{
|
|
||||||
labsList.value.push(editedItem.value)
|
|
||||||
}
|
|
||||||
close()
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
const deleteItemConfirm = async() => {
|
|
||||||
console.log('editedIndex.value',editedIndex.value,editedItem.value.id)
|
|
||||||
await store.dispatch('labDelete',{
|
|
||||||
id: editedItem.value.id
|
|
||||||
})
|
|
||||||
labsList.value.splice(editedIndex.value, 1)
|
|
||||||
closeDelete()
|
|
||||||
}
|
|
||||||
const getlabsList = computed(async () => {
|
|
||||||
store.dispatch('updateIsLoading', true)
|
|
||||||
await store.dispatch('labsList')
|
|
||||||
console.log('getLabsList',store.getters.getLabsList)
|
|
||||||
let list = store.getters.getLabsList
|
|
||||||
store.dispatch('updateIsLoading', false)
|
|
||||||
labsList.value = list
|
|
||||||
return labsList.value
|
|
||||||
});
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
|
|
||||||
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<v-row>
|
|
||||||
<v-col cols="12" md="12" v-if="getlabsList">
|
|
||||||
<VCard title="Labs">
|
|
||||||
<VCardText >
|
|
||||||
<VRow>
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
offset-md="8"
|
|
||||||
md="4"
|
|
||||||
>
|
|
||||||
<VTextField
|
|
||||||
v-model="search"
|
|
||||||
label="Search"
|
|
||||||
placeholder="Search ..."
|
|
||||||
append-inner-icon="ri-search-line"
|
|
||||||
single-line
|
|
||||||
hide-details
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
</VRow>
|
|
||||||
</VCardText>
|
|
||||||
<VDataTable
|
|
||||||
:headers="headers"
|
|
||||||
:items="labsList"
|
|
||||||
:search="search"
|
|
||||||
:items-per-page="5"
|
|
||||||
class="text-no-wrap"
|
|
||||||
>
|
|
||||||
<!-- full name -->
|
|
||||||
<template #item.name="{ item }">
|
|
||||||
<div class="d-flex align-center">
|
|
||||||
<!-- avatar -->
|
|
||||||
<VAvatar
|
|
||||||
size="32"
|
|
||||||
:color="item.avatar ? '' : 'primary'"
|
|
||||||
:class="item.avatar ? '' : 'v-avatar-light-bg primary--text'"
|
|
||||||
:variant="!item.avatar ? 'tonal' : undefined"
|
|
||||||
>
|
|
||||||
<VImg
|
|
||||||
v-if="item.avatar"
|
|
||||||
:src="item.avatar"
|
|
||||||
/>
|
|
||||||
<span
|
|
||||||
v-else
|
|
||||||
class="text-sm"
|
|
||||||
>{{ avatarText(item.name) }}</span>
|
|
||||||
</VAvatar>
|
|
||||||
|
|
||||||
<div class="d-flex flex-column ms-3">
|
|
||||||
<span class="d-block font-weight-medium text-high-emphasis text-truncate">{{ item.name }}</span>
|
|
||||||
<small>{{ item.post }}</small>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<!-- status -->
|
|
||||||
<template #item.status="{ item }">
|
|
||||||
<VChip
|
|
||||||
:color="resolveStatusVariant(item.status).color"
|
|
||||||
density="comfortable"
|
|
||||||
>
|
|
||||||
{{ resolveStatusVariant(item.status).text }}
|
|
||||||
</VChip>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<!-- Actions -->
|
|
||||||
<template #item.actions="{ item }">
|
|
||||||
<div class="d-flex gap-1">
|
|
||||||
<IconBtn
|
|
||||||
size="small"
|
|
||||||
@click="editItem(item)"
|
|
||||||
>
|
|
||||||
<VIcon icon="ri-pencil-line" />
|
|
||||||
</IconBtn>
|
|
||||||
<IconBtn
|
|
||||||
size="small"
|
|
||||||
@click="deleteItem(item)"
|
|
||||||
>
|
|
||||||
<VIcon icon="ri-delete-bin-line" />
|
|
||||||
</IconBtn>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</VDataTable>
|
|
||||||
</VCard>
|
|
||||||
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<!-- 👉 Edit Dialog -->
|
|
||||||
<VDialog
|
|
||||||
v-model="editDialog"
|
|
||||||
max-width="600px"
|
|
||||||
>
|
|
||||||
<VForm ref="refVForm" >
|
|
||||||
<VCard>
|
|
||||||
<VCardTitle>
|
|
||||||
<span class="headline">Edit Lab</span>
|
|
||||||
</VCardTitle>
|
|
||||||
|
|
||||||
<VCardText>
|
|
||||||
<VContainer >
|
|
||||||
|
|
||||||
<VRow>
|
|
||||||
<!-- fullName -->
|
|
||||||
<VCol cols="12" md="12">
|
|
||||||
<VTextField
|
|
||||||
v-model="editedItem.name"
|
|
||||||
label="Name"
|
|
||||||
:rules="[requiredValidator]"
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
|
|
||||||
<!-- email -->
|
|
||||||
<VCol cols="12" sm="12" md="12">
|
|
||||||
<VTextField
|
|
||||||
v-model="editedItem.address"
|
|
||||||
label="Address"
|
|
||||||
:rules="[requiredValidator]"
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <VCol cols="12" sm="6" md="12">
|
|
||||||
<VTextField
|
|
||||||
v-model="editedItem.dob"
|
|
||||||
label="Date Of Birth"
|
|
||||||
/>
|
|
||||||
</VCol> -->
|
|
||||||
<VCol cols="12" sm="6" md="12">
|
|
||||||
<VTextField v-model="editedItem.contact_no" label="Phone Number" pattern="^\(\d{3}\) \d{3}-\d{4}$"
|
|
||||||
:rules="[requiredPhone, validUSAPhone]" placeholder="i.e. (000) 000-0000"
|
|
||||||
@input="formatPhoneNumber" max="14" density="comfortable" />
|
|
||||||
</VCol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- status -->
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
|
|
||||||
md="12"
|
|
||||||
>
|
|
||||||
<VSelect
|
|
||||||
v-model="editedItem.status"
|
|
||||||
:items="selectedOptions"
|
|
||||||
item-title="text"
|
|
||||||
item-value="value"
|
|
||||||
label="Status"
|
|
||||||
variant="outlined"
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
</VRow>
|
|
||||||
</VContainer>
|
|
||||||
</VCardText>
|
|
||||||
|
|
||||||
<VCardActions>
|
|
||||||
<VSpacer />
|
|
||||||
|
|
||||||
<VBtn
|
|
||||||
color="error"
|
|
||||||
variant="outlined"
|
|
||||||
@click="close"
|
|
||||||
>
|
|
||||||
Cancel
|
|
||||||
</VBtn>
|
|
||||||
|
|
||||||
<VBtn
|
|
||||||
color="success"
|
|
||||||
variant="elevated"
|
|
||||||
@click="save"
|
|
||||||
>
|
|
||||||
Save
|
|
||||||
</VBtn>
|
|
||||||
|
|
||||||
</VCardActions>
|
|
||||||
</VCard>
|
|
||||||
</VForm>
|
|
||||||
</VDialog>
|
|
||||||
|
|
||||||
<!-- 👉 Delete Dialog -->
|
|
||||||
<VDialog
|
|
||||||
v-model="deleteDialog"
|
|
||||||
max-width="500px"
|
|
||||||
>
|
|
||||||
<VCard>
|
|
||||||
<VCardTitle>
|
|
||||||
Are you sure you want to delete this item?
|
|
||||||
</VCardTitle>
|
|
||||||
|
|
||||||
<VCardActions>
|
|
||||||
<VSpacer />
|
|
||||||
|
|
||||||
<VBtn
|
|
||||||
color="error"
|
|
||||||
variant="outlined"
|
|
||||||
@click="closeDelete"
|
|
||||||
>
|
|
||||||
Cancel
|
|
||||||
</VBtn>
|
|
||||||
|
|
||||||
<VBtn
|
|
||||||
color="success"
|
|
||||||
variant="elevated"
|
|
||||||
@click="deleteItemConfirm"
|
|
||||||
>
|
|
||||||
OK
|
|
||||||
</VBtn>
|
|
||||||
|
|
||||||
<VSpacer />
|
|
||||||
</VCardActions>
|
|
||||||
</VCard>
|
|
||||||
</VDialog>
|
|
||||||
</template>
|
|
@ -1,18 +1,14 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import tree1 from '@images/misc/tree1.png';
|
import tree1 from '@images/misc/tree1.png'
|
||||||
import authV2LoginIllustrationBorderedDark from '@images/pages/auth-v2-login-illustration-bordered-dark.png';
|
import authV2LoginIllustrationBorderedDark from '@images/pages/auth-v2-login-illustration-bordered-dark.png'
|
||||||
import authV2LoginIllustrationBorderedLight from '@images/pages/auth-v2-login-illustration-bordered-light.png';
|
import authV2LoginIllustrationBorderedLight from '@images/pages/auth-v2-login-illustration-bordered-light.png'
|
||||||
import authV2LoginIllustrationDark from '@images/pages/auth-v2-login-illustration-dark.png';
|
import authV2LoginIllustrationDark from '@images/pages/auth-v2-login-illustration-dark.png'
|
||||||
import authV2LoginIllustrationLight from '@images/pages/auth-v2-login-illustration-light.png';
|
import authV2LoginIllustrationLight from '@images/pages/auth-v2-login-illustration-light.png'
|
||||||
import authV2MaskDark from '@images/pages/mask-v2-dark.png';
|
import authV2MaskDark from '@images/pages/mask-v2-dark.png'
|
||||||
import authV2MaskLight from '@images/pages/mask-v2-light.png';
|
import authV2MaskLight from '@images/pages/mask-v2-light.png'
|
||||||
import { VNodeRenderer } from '@layouts/components/VNodeRenderer';
|
import { VNodeRenderer } from '@layouts/components/VNodeRenderer'
|
||||||
import { themeConfig } from '@themeConfig';
|
import { themeConfig } from '@themeConfig'
|
||||||
import axios from 'axios';
|
import { VForm } from 'vuetify/components/VForm'
|
||||||
import { VForm } from 'vuetify/components/VForm';
|
|
||||||
import { useStore } from 'vuex';
|
|
||||||
import { ADMIN_LOGIN_API } from '../constants';
|
|
||||||
const store = useStore()
|
|
||||||
|
|
||||||
const authThemeImg = useGenerateImageVariant(authV2LoginIllustrationLight, authV2LoginIllustrationDark, authV2LoginIllustrationBorderedLight, authV2LoginIllustrationBorderedDark, true)
|
const authThemeImg = useGenerateImageVariant(authV2LoginIllustrationLight, authV2LoginIllustrationDark, authV2LoginIllustrationBorderedLight, authV2LoginIllustrationBorderedDark, true)
|
||||||
const authThemeMask = useGenerateImageVariant(authV2MaskLight, authV2MaskDark)
|
const authThemeMask = useGenerateImageVariant(authV2MaskLight, authV2MaskDark)
|
||||||
@ -37,68 +33,37 @@ const errors = ref({
|
|||||||
const refVForm = ref()
|
const refVForm = ref()
|
||||||
|
|
||||||
const credentials = ref({
|
const credentials = ref({
|
||||||
email: '',
|
email: 'admin@demo.com',
|
||||||
password: '',
|
password: 'admin',
|
||||||
})
|
})
|
||||||
|
|
||||||
const isLoading = ref(false)
|
|
||||||
const rememberMe = ref(false)
|
const rememberMe = ref(false)
|
||||||
|
|
||||||
const login = async () => {
|
const login = async () => {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
store.dispatch('updateIsLoading', true)
|
const res = await $api('/auth/login', {
|
||||||
// isLoading.value = true
|
method: 'POST',
|
||||||
const response = await axios.post(ADMIN_LOGIN_API, {
|
body: {
|
||||||
email: credentials.value.email,
|
email: credentials.value.email,
|
||||||
password: credentials.value.password,
|
password: credentials.value.password,
|
||||||
});
|
},
|
||||||
|
onResponseError({ response }) {
|
||||||
|
errors.value = response._data.errors
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
console.log("Response", response.data);
|
const { accessToken, userData, userAbilityRules } = res
|
||||||
response.data.userData.avatar = "/images/avatars/avatar-1.png";
|
|
||||||
console.log("Response 2", response.data);
|
|
||||||
|
|
||||||
const { accessToken, userData, userAbilityRules } = response.data;
|
|
||||||
useCookie('userAbilityRules').value = userAbilityRules;
|
|
||||||
ability.update(userAbilityRules);
|
|
||||||
useCookie('userData').value = userData;
|
|
||||||
useCookie('accessToken').value = accessToken;
|
|
||||||
localStorage.setItem('admin_access_token',accessToken)
|
|
||||||
|
|
||||||
|
useCookie('userAbilityRules').value = userAbilityRules
|
||||||
|
ability.update(userAbilityRules)
|
||||||
|
useCookie('userData').value = userData
|
||||||
|
useCookie('accessToken').value = accessToken
|
||||||
await nextTick(() => {
|
await nextTick(() => {
|
||||||
router.replace(route.query.to ? String(route.query.to) : '/');
|
router.replace(route.query.to ? String(route.query.to) : '/')
|
||||||
});
|
})
|
||||||
store.dispatch('updateIsLoading', false)
|
} catch (err) {
|
||||||
} catch (error) {
|
console.error(err)
|
||||||
store.dispatch('updateIsLoading', false)
|
|
||||||
errors.value.email = error.response.data.error
|
|
||||||
// isLoading.value = false
|
|
||||||
console.error(error);
|
|
||||||
}
|
}
|
||||||
// try {
|
|
||||||
// const res = await $api('/auth/login', {
|
|
||||||
// method: 'POST',
|
|
||||||
// body: {
|
|
||||||
// email: credentials.value.email,
|
|
||||||
// password: credentials.value.password,
|
|
||||||
// },
|
|
||||||
// onResponseError({ response }) {
|
|
||||||
// errors.value = response._data.errors
|
|
||||||
// },
|
|
||||||
// })
|
|
||||||
|
|
||||||
// const { accessToken, userData, userAbilityRules } = res
|
|
||||||
|
|
||||||
// useCookie('userAbilityRules').value = userAbilityRules
|
|
||||||
// ability.update(userAbilityRules)
|
|
||||||
// useCookie('userData').value = userData
|
|
||||||
// useCookie('accessToken').value = accessToken
|
|
||||||
// await nextTick(() => {
|
|
||||||
// router.replace(route.query.to ? String(route.query.to) : '/')
|
|
||||||
// })
|
|
||||||
// } catch (err) {
|
|
||||||
// console.error(err)
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const onSubmit = () => {
|
const onSubmit = () => {
|
||||||
@ -110,13 +75,6 @@ const onSubmit = () => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VDialog v-model="isLoading" width="110" height="150" color="primary">
|
|
||||||
<VCardText class="" style="color: white !important;">
|
|
||||||
<div class="demo-space-x">
|
|
||||||
<VProgressCircular :size="40" color="primary" indeterminate />
|
|
||||||
</div>
|
|
||||||
</VCardText>
|
|
||||||
</VDialog>
|
|
||||||
<RouterLink to="/">
|
<RouterLink to="/">
|
||||||
<div class="auth-logo d-flex align-center gap-x-3">
|
<div class="auth-logo d-flex align-center gap-x-3">
|
||||||
<VNodeRenderer :nodes="themeConfig.app.logo" />
|
<VNodeRenderer :nodes="themeConfig.app.logo" />
|
||||||
@ -170,13 +128,13 @@ const onSubmit = () => {
|
|||||||
>
|
>
|
||||||
<VCardText>
|
<VCardText>
|
||||||
<h4 class="text-h4 mb-1">
|
<h4 class="text-h4 mb-1">
|
||||||
Welcome to <span class="text-capitalize">{{ themeConfig.app.title }}!</span>
|
Welcome to <span class="text-capitalize">{{ themeConfig.app.title }}!</span> 👋🏻
|
||||||
</h4>
|
</h4>
|
||||||
<p class="mb-0">
|
<p class="mb-0">
|
||||||
Please sign-in to your account and start the adventure
|
Please sign-in to your account and start the adventure
|
||||||
</p>
|
</p>
|
||||||
</VCardText>
|
</VCardText>
|
||||||
<!-- <VCardText>
|
<VCardText>
|
||||||
<VAlert
|
<VAlert
|
||||||
color="primary"
|
color="primary"
|
||||||
variant="tonal"
|
variant="tonal"
|
||||||
@ -188,7 +146,7 @@ const onSubmit = () => {
|
|||||||
Client Email: <strong>client@demo.com</strong> / Pass: <strong>client</strong>
|
Client Email: <strong>client@demo.com</strong> / Pass: <strong>client</strong>
|
||||||
</p>
|
</p>
|
||||||
</VAlert>
|
</VAlert>
|
||||||
</VCardText> -->
|
</VCardText>
|
||||||
|
|
||||||
<VCardText>
|
<VCardText>
|
||||||
<VForm
|
<VForm
|
||||||
|
@ -4,7 +4,7 @@ import AccountSettingsBillingAndPlans from '@/views/pages/account-settings/Accou
|
|||||||
import AccountSettingsConnections from '@/views/pages/account-settings/AccountSettingsConnections.vue'
|
import AccountSettingsConnections from '@/views/pages/account-settings/AccountSettingsConnections.vue'
|
||||||
import AccountSettingsNotification from '@/views/pages/account-settings/AccountSettingsNotification.vue'
|
import AccountSettingsNotification from '@/views/pages/account-settings/AccountSettingsNotification.vue'
|
||||||
import AccountSettingsSecurity from '@/views/pages/account-settings/AccountSettingsSecurity.vue'
|
import AccountSettingsSecurity from '@/views/pages/account-settings/AccountSettingsSecurity.vue'
|
||||||
import WebsiteSettings from '@/views/pages/account-settings/WebsiteSettings.vue'
|
|
||||||
const route = useRoute('pages-account-settings-tab')
|
const route = useRoute('pages-account-settings-tab')
|
||||||
|
|
||||||
const activeTab = computed({
|
const activeTab = computed({
|
||||||
@ -24,13 +24,21 @@ const tabs = [
|
|||||||
icon: 'ri-lock-line',
|
icon: 'ri-lock-line',
|
||||||
tab: 'security',
|
tab: 'security',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Site Setting',
|
title: 'Billing & Plans',
|
||||||
icon: 'ri-link',
|
icon: 'ri-bookmark-line',
|
||||||
tab: 'site-settings',
|
tab: 'billing-plans',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Notifications',
|
||||||
|
icon: 'ri-notification-3-line',
|
||||||
|
tab: 'notification',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Connections',
|
||||||
|
icon: 'ri-link',
|
||||||
|
tab: 'connection',
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
definePage({ meta: { navActiveLink: 'pages-account-settings-tab' } })
|
definePage({ meta: { navActiveLink: 'pages-account-settings-tab' } })
|
||||||
@ -70,10 +78,7 @@ definePage({ meta: { navActiveLink: 'pages-account-settings-tab' } })
|
|||||||
<VWindowItem value="security">
|
<VWindowItem value="security">
|
||||||
<AccountSettingsSecurity />
|
<AccountSettingsSecurity />
|
||||||
</VWindowItem>
|
</VWindowItem>
|
||||||
<!-- site setting -->
|
|
||||||
<VWindowItem value="site-settings">
|
|
||||||
<WebsiteSettings />
|
|
||||||
</VWindowItem>
|
|
||||||
<!-- Billing -->
|
<!-- Billing -->
|
||||||
<VWindowItem value="billing-plans">
|
<VWindowItem value="billing-plans">
|
||||||
<AccountSettingsBillingAndPlans />
|
<AccountSettingsBillingAndPlans />
|
||||||
|
@ -1,199 +0,0 @@
|
|||||||
<script setup>
|
|
||||||
import { onBeforeMount, onMounted, onUnmounted } from 'vue';
|
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
|
||||||
import { useStore } from 'vuex';
|
|
||||||
const store = useStore()
|
|
||||||
const route = useRoute()
|
|
||||||
const router = useRouter()
|
|
||||||
const patientId = route.params.patient_id;
|
|
||||||
const search = ref('')
|
|
||||||
const getSelectedCart = ref('');
|
|
||||||
const patientLabKitList = ref([])
|
|
||||||
const getIsTonalSnackbarVisible = ref(false);
|
|
||||||
const labkitStatus = ref('');
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
onBeforeMount(async () => {});
|
|
||||||
onMounted(async () => {
|
|
||||||
store.dispatch('updateIsLoading', true)
|
|
||||||
await store.dispatch('patientLabKitList', {
|
|
||||||
patient_id : patientId
|
|
||||||
})
|
|
||||||
console.log('patientLabKitList',store.getters.getPatientLabKitList.cart)
|
|
||||||
store.dispatch('updateIsLoading', false)
|
|
||||||
|
|
||||||
});
|
|
||||||
const getPatientLabKitList = computed(async () => {
|
|
||||||
patientLabKitList.value = store.getters.getPatientLabKitList.cart;
|
|
||||||
|
|
||||||
return patientLabKitList.value;
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
const onChange = (id)=> {
|
|
||||||
getSelectedCart.value = id;
|
|
||||||
|
|
||||||
}
|
|
||||||
const onStatusChange = async(status) => {
|
|
||||||
console.log('Selected status:', status, getSelectedCart.value);
|
|
||||||
store.dispatch('updateIsLoading', true)
|
|
||||||
await store.dispatch('updateLabkitListStatus', {
|
|
||||||
cart_id : getSelectedCart.value,
|
|
||||||
status: status
|
|
||||||
})
|
|
||||||
labkitStatus.value = store.getters.getPatientLabKitStatus.status;
|
|
||||||
getIsTonalSnackbarVisible.value = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
onUnmounted(async () => {});
|
|
||||||
const headers = [
|
|
||||||
{
|
|
||||||
title: 'NAME',
|
|
||||||
key: 'first_name',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Address',
|
|
||||||
key: 'shipping_address1',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Amount',
|
|
||||||
key: 'shipping_amount',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Status',
|
|
||||||
key: 'status',
|
|
||||||
},
|
|
||||||
]
|
|
||||||
const breadcrums = [
|
|
||||||
{
|
|
||||||
title: 'Patient',
|
|
||||||
disabled: false,
|
|
||||||
to: '/admin/patients',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Labkit',
|
|
||||||
disabled: false,
|
|
||||||
}
|
|
||||||
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<v-breadcrumbs :items="breadcrums" class="text-primary pt-0 pb-0 mb-5">
|
|
||||||
<template v-slot:divider style="padding-top:0px; padding-bottom:0px">
|
|
||||||
>
|
|
||||||
</template>
|
|
||||||
</v-breadcrumbs>
|
|
||||||
<v-row>
|
|
||||||
<VSnackbar class="pl-0" v-model="getIsTonalSnackbarVisible" :timeout="50000" location="top end" variant="flat"
|
|
||||||
color="success">
|
|
||||||
<VIcon
|
|
||||||
class="ri-success-line success-icon pl-0"
|
|
||||||
/> {{labkitStatus }}
|
|
||||||
</VSnackbar>
|
|
||||||
<v-col cols="12" md="12" v-if="getPatientLabKitList">
|
|
||||||
<v-card title="LabKits">
|
|
||||||
<VCardText >
|
|
||||||
<VRow>
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
offset-md="8"
|
|
||||||
md="4"
|
|
||||||
>
|
|
||||||
<VTextField
|
|
||||||
v-model="search"
|
|
||||||
label="Search"
|
|
||||||
placeholder="Search ..."
|
|
||||||
append-inner-icon="ri-search-line"
|
|
||||||
single-line
|
|
||||||
hide-details
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
</VRow>
|
|
||||||
</VCardText>
|
|
||||||
<VDataTable
|
|
||||||
:headers="headers"
|
|
||||||
:items="patientLabKitList"
|
|
||||||
:search="search"
|
|
||||||
:items-per-page="5"
|
|
||||||
class="text-no-wrap"
|
|
||||||
>
|
|
||||||
<template #item.id="{ item }">
|
|
||||||
{{ item.id }}
|
|
||||||
</template>
|
|
||||||
<!-- full name -->
|
|
||||||
<template #item.first_name="{ item }">
|
|
||||||
<div class="d-flex align-center">
|
|
||||||
<!-- avatar -->
|
|
||||||
<VAvatar
|
|
||||||
size="32"
|
|
||||||
:color="item.avatar ? '' : 'primary'"
|
|
||||||
:class="item.avatar ? '' : 'v-avatar-light-bg primary--text'"
|
|
||||||
:variant="!item.avatar ? 'tonal' : undefined"
|
|
||||||
>
|
|
||||||
<VImg
|
|
||||||
v-if="item.avatar"
|
|
||||||
:src="item.avatar"
|
|
||||||
/>
|
|
||||||
<span
|
|
||||||
v-else
|
|
||||||
class="text-sm"
|
|
||||||
>{{ avatarText(item.first_name) }}</span>
|
|
||||||
</VAvatar>
|
|
||||||
|
|
||||||
<div class="d-flex flex-column ms-3">
|
|
||||||
<span class="d-block font-weight-medium text-high-emphasis text-truncate">{{ item.first_name }} {{ item.last_name }}</span>
|
|
||||||
<!-- <small>{{ item.post }}</small> -->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<!-- <template #item.first_name="{ item }">
|
|
||||||
<div class="d-flex align-center">
|
|
||||||
<span>{{ item.first_name }} {{ item.last_name }}</span>
|
|
||||||
</div>
|
|
||||||
</template> -->
|
|
||||||
<template #item.shipping_address1="{ item }">
|
|
||||||
<div class="d-flex align-center">
|
|
||||||
|
|
||||||
|
|
||||||
<span>{{ item.shipping_address1 }},
|
|
||||||
{{ item.shipping_address2 }},
|
|
||||||
{{ item.shipping_city }},
|
|
||||||
{{item.shipping_state}},
|
|
||||||
{{ item.shipping_zipcode}},
|
|
||||||
{{ item.shipping_country }}
|
|
||||||
</span>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- status -->
|
|
||||||
<template #item.status="{ item }">
|
|
||||||
<VSelect
|
|
||||||
v-model="item.status"
|
|
||||||
placeholder="Status"
|
|
||||||
density="comfortable"
|
|
||||||
:items="['Pending', 'Shipped', 'Delivered', 'Transit', 'Recevied', 'Result']"
|
|
||||||
@update:model-value="onStatusChange"
|
|
||||||
@click="onChange(item.id)"
|
|
||||||
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</VDataTable>
|
|
||||||
</v-card>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
</template>
|
|
||||||
<style scoped>
|
|
||||||
.v-snackbar__content{
|
|
||||||
padding: 0px !important;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,150 +0,0 @@
|
|||||||
<script setup>
|
|
||||||
import { onMounted, ref } from 'vue';
|
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
|
||||||
import { useStore } from 'vuex';
|
|
||||||
const store = useStore();
|
|
||||||
const router = useRouter();
|
|
||||||
const route = useRoute();
|
|
||||||
const patientId = route.params.patient_id;
|
|
||||||
const appointmentId = route.params.id;
|
|
||||||
const notes = ref([]);
|
|
||||||
|
|
||||||
const loadHistoryNotes = async () => {
|
|
||||||
console.log('Calling loadHistoryNotes');
|
|
||||||
store.dispatch('updateIsLoading', true);
|
|
||||||
console.log('Dispatching getHistoryPatientNotes action with', { patient_id: patientId, appointment_id: appointmentId });
|
|
||||||
// try {
|
|
||||||
// console.log('Dispatching getHistoryPatientNotes action with', { patient_id: patientId, appointment_id: appointmentId });
|
|
||||||
await store.dispatch('getHistoryPatientNotes', {
|
|
||||||
patient_id: patientId,
|
|
||||||
appointment_id: appointmentId,
|
|
||||||
});
|
|
||||||
let notesData = store.getters.getPatientNotes;
|
|
||||||
if (Array.isArray(notesData)) {
|
|
||||||
console.log('Fetched notesData:', notesData);
|
|
||||||
const formattedNotes = notesData
|
|
||||||
.filter(data => data.note_type === 'Notes')
|
|
||||||
.map(data => ({
|
|
||||||
file_url: data.file_url,
|
|
||||||
note: data.note,
|
|
||||||
doctor: data.telemedPro.name,
|
|
||||||
date: formatDateDate(data.created_at),
|
|
||||||
id: data.id,
|
|
||||||
}))
|
|
||||||
.sort((a, b) => b.id - a.id);
|
|
||||||
notes.value = formattedNotes;
|
|
||||||
} else {
|
|
||||||
console.error("getPatientNotes did not return an array", notesData);
|
|
||||||
}
|
|
||||||
// } catch (error) {
|
|
||||||
// console.error("Error loading patient notes:", error);
|
|
||||||
// } finally {
|
|
||||||
// store.dispatch('updateIsLoading', false);
|
|
||||||
// }
|
|
||||||
};
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
loadHistoryNotes();
|
|
||||||
});
|
|
||||||
|
|
||||||
const formatDateDate = (date) => {
|
|
||||||
const messageDate = new Date(date);
|
|
||||||
const options = {
|
|
||||||
year: 'numeric',
|
|
||||||
month: 'long',
|
|
||||||
day: 'numeric',
|
|
||||||
hour: '2-digit',
|
|
||||||
minute: '2-digit',
|
|
||||||
};
|
|
||||||
return messageDate.toLocaleDateString('en-US', options).replace(/\//g, '-');
|
|
||||||
};
|
|
||||||
const breadcrums = [
|
|
||||||
{
|
|
||||||
title: 'Meeting',
|
|
||||||
disabled: false,
|
|
||||||
to: '/admin/patient/meetings/'+patientId,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Notes',
|
|
||||||
disabled: false,
|
|
||||||
}
|
|
||||||
|
|
||||||
];
|
|
||||||
const downloadFile = (fileUrl) => {
|
|
||||||
const link = document.createElement('a');
|
|
||||||
link.href = fileUrl;
|
|
||||||
link.download = 'noteFile.png';
|
|
||||||
document.body.appendChild(link);
|
|
||||||
link.click();
|
|
||||||
document.body.removeChild(link);
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<v-breadcrumbs :items="breadcrums" class="text-primary pt-0 pb-0 mb-5">
|
|
||||||
<template v-slot:divider style="padding-top:0px; padding-bottom:0px">
|
|
||||||
>
|
|
||||||
</template>
|
|
||||||
</v-breadcrumbs>
|
|
||||||
|
|
||||||
<VCard title="Notes">
|
|
||||||
<VCardText>
|
|
||||||
<VTimeline
|
|
||||||
side="end"
|
|
||||||
align="start"
|
|
||||||
line-inset="8"
|
|
||||||
truncate-line="both"
|
|
||||||
density="compact"
|
|
||||||
>
|
|
||||||
|
|
||||||
<!-- SECTION Timeline Item: Flight -->
|
|
||||||
<template v-for="(p_note, index) in notes" :key="index">
|
|
||||||
<VTimelineItem
|
|
||||||
dot-color="primary"
|
|
||||||
size="x-small"
|
|
||||||
>
|
|
||||||
<!-- 👉 Header -->
|
|
||||||
<div class="d-flex justify-space-between align-center gap-2 flex-wrap">
|
|
||||||
<span class="app-timeline-title">
|
|
||||||
{{p_note.note}}
|
|
||||||
</span>
|
|
||||||
<span class="app-timeline-meta">{{ p_note.date }}</span>
|
|
||||||
<!-- <span></span> -->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 👉 Content -->
|
|
||||||
<div class="app-timeline-text mb-1">
|
|
||||||
<span>{{ p_note.doctor }}</span>
|
|
||||||
<VIcon
|
|
||||||
size="20"
|
|
||||||
icon="tabler-arrow-right"
|
|
||||||
class="mx-2 flip-in-rtl"
|
|
||||||
/>
|
|
||||||
<!-- <span>Heathrow Airport, London</span> -->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- <p class="app-timeline-meta mb-2">
|
|
||||||
6:30 AM
|
|
||||||
</p> -->
|
|
||||||
|
|
||||||
<!-- <div class="app-timeline-text d-flex align-center gap-2">
|
|
||||||
<div>
|
|
||||||
<VImg
|
|
||||||
:src="pdf"
|
|
||||||
:width="22"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<span>booking-card.pdf</span>
|
|
||||||
</div> -->
|
|
||||||
</VTimelineItem>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- !SECTION -->
|
|
||||||
|
|
||||||
<!-- !SECTION -->
|
|
||||||
</VTimeline>
|
|
||||||
</VCardText>
|
|
||||||
</VCard>
|
|
||||||
</template>
|
|
@ -1,421 +0,0 @@
|
|||||||
<script setup>
|
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
|
||||||
import { useStore } from 'vuex';
|
|
||||||
const store = useStore();
|
|
||||||
const router = useRouter()
|
|
||||||
const route = useRoute()
|
|
||||||
const itemsPrescriptions = ref([]);
|
|
||||||
const patientId = route.params.patient_id;
|
|
||||||
const appointmentId = route.params.id;
|
|
||||||
const prescription = computed(async () => {
|
|
||||||
// console.log('computed=====')
|
|
||||||
await getprescriptionList()
|
|
||||||
// await store.dispatch('getHistoryPrescription')
|
|
||||||
// notes.value = store.getters.getHistoryPrescription;
|
|
||||||
// console.log("getHistoryPrescription", notes.value);
|
|
||||||
// store.dispatch('updateIsLoading', false)
|
|
||||||
});
|
|
||||||
|
|
||||||
const getprescriptionList = async () => {
|
|
||||||
await store.dispatch('getPrescriptions', {
|
|
||||||
patient_id: patientId,
|
|
||||||
appointment_id: appointmentId,
|
|
||||||
})
|
|
||||||
let prescriptions = store.getters.getPrescriptionList
|
|
||||||
// console.log("BeforeOverviewItem", prescriptions);
|
|
||||||
// itemsPrescriptions.value = store.getters.getPrescriptionList
|
|
||||||
for (let data of prescriptions) {
|
|
||||||
let dataObject = {}
|
|
||||||
dataObject.brand = data.brand
|
|
||||||
dataObject.direction_one = data.direction_one
|
|
||||||
dataObject.direction_quantity = data.direction_quantity
|
|
||||||
dataObject.direction_two = data.direction_two
|
|
||||||
dataObject.date = formatDateDate(data.date)
|
|
||||||
dataObject.dosage = data.dosage
|
|
||||||
dataObject.from = data.from
|
|
||||||
dataObject.name = data.name
|
|
||||||
dataObject.quantity = data.quantity
|
|
||||||
dataObject.id = data.id
|
|
||||||
dataObject.doctor = data.doctor.name
|
|
||||||
dataObject.refill_quantity = data.refill_quantity
|
|
||||||
dataObject.status = data.status
|
|
||||||
dataObject.comments = data.comments
|
|
||||||
itemsPrescriptions.value.push(dataObject)
|
|
||||||
}
|
|
||||||
itemsPrescriptions.value.sort((a, b) => {
|
|
||||||
return b.id - a.id;
|
|
||||||
});
|
|
||||||
console.log("OverviewItem", itemsPrescriptions.value);
|
|
||||||
};
|
|
||||||
const formatDateDate = (date) => {
|
|
||||||
const messageDate = new Date(date);
|
|
||||||
const options = {
|
|
||||||
year: 'numeric',
|
|
||||||
month: 'long',
|
|
||||||
day: 'numeric',
|
|
||||||
hour: '2-digit',
|
|
||||||
minute: '2-digit'
|
|
||||||
};
|
|
||||||
return messageDate.toLocaleDateString('en-US', options).replace(/\//g, '-');
|
|
||||||
};
|
|
||||||
const getStatusColor = (status) => {
|
|
||||||
switch (status) {
|
|
||||||
case 'pending':
|
|
||||||
return 'warning'; // Use Vuetify's warning color (typically yellow)
|
|
||||||
case 'shipped':
|
|
||||||
return '#45B8AC'; // Use Vuetify's primary color (typically blue)
|
|
||||||
case 'delivered':
|
|
||||||
return 'success';
|
|
||||||
case 'returned':
|
|
||||||
return 'red';
|
|
||||||
case 'results':
|
|
||||||
return 'blue';
|
|
||||||
default:
|
|
||||||
return 'grey'; // Use Vuetify's grey color for any other status
|
|
||||||
}
|
|
||||||
};
|
|
||||||
const resolveStatusVariant = status => {
|
|
||||||
if (status === 1)
|
|
||||||
return {
|
|
||||||
color: 'primary',
|
|
||||||
text: 'Current',
|
|
||||||
}
|
|
||||||
else if (status === 2)
|
|
||||||
return {
|
|
||||||
color: 'success',
|
|
||||||
text: 'Professional',
|
|
||||||
}
|
|
||||||
else if (status === 3)
|
|
||||||
return {
|
|
||||||
color: 'error',
|
|
||||||
text: 'Rejected',
|
|
||||||
}
|
|
||||||
else if (status === 4)
|
|
||||||
return {
|
|
||||||
color: 'warning',
|
|
||||||
text: 'Resigned',
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return {
|
|
||||||
color: 'info',
|
|
||||||
text: 'Applied',
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const headers = [
|
|
||||||
{
|
|
||||||
title: '',
|
|
||||||
key: 'id',
|
|
||||||
sortable: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Name',
|
|
||||||
key: 'name',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Date',
|
|
||||||
key: 'date',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Status',
|
|
||||||
key: 'status',
|
|
||||||
},
|
|
||||||
]
|
|
||||||
const prescriptionIndex = ref([]);
|
|
||||||
const prescriptionItem = ref(-1)
|
|
||||||
const prescriptionDialog = ref(false)
|
|
||||||
const getSelectedCart = ref('');
|
|
||||||
const getIsTonalSnackbarVisible = ref(false);
|
|
||||||
const prescriptionStatus = ref('');
|
|
||||||
const selectedItem = ref(null);
|
|
||||||
const showDetail = item => {
|
|
||||||
// console.log("id",item);
|
|
||||||
prescriptionIndex.value = item
|
|
||||||
selectedItem.value = item;
|
|
||||||
// console.log("index",prescriptionIndex.value);
|
|
||||||
// prescriptionItem.value = { ...item }
|
|
||||||
prescriptionDialog.value = true
|
|
||||||
}
|
|
||||||
const close = () => {
|
|
||||||
prescriptionDialog.value = false
|
|
||||||
prescriptionIndex.value = -1
|
|
||||||
prescriptionItem.value = { ...defaultItem.value }
|
|
||||||
}
|
|
||||||
const breadcrums = [
|
|
||||||
{
|
|
||||||
title: 'Meeting',
|
|
||||||
disabled: false,
|
|
||||||
to: '/admin/patient/meetings/'+patientId,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Prescription',
|
|
||||||
disabled: false,
|
|
||||||
}
|
|
||||||
|
|
||||||
];
|
|
||||||
|
|
||||||
const onChange = (id)=> {
|
|
||||||
getSelectedCart.value = id;
|
|
||||||
|
|
||||||
}
|
|
||||||
const onStatusChange = async(status) => {
|
|
||||||
console.log('Selected status:', status, getSelectedCart.value);
|
|
||||||
store.dispatch('updateIsLoading', true)
|
|
||||||
await store.dispatch('updatePrescriptionStatus', {
|
|
||||||
prescription_id : getSelectedCart.value,
|
|
||||||
status: status
|
|
||||||
})
|
|
||||||
console.log('Selected:', store.getters.getPatientPrescriptionStatus);
|
|
||||||
prescriptionStatus.value = store.getters.getPatientPrescriptionStatus.status;
|
|
||||||
getIsTonalSnackbarVisible.value = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
</script>
|
|
||||||
<template>
|
|
||||||
<v-breadcrumbs :items="breadcrums" class="text-primary pt-0 pb-0 mb-5">
|
|
||||||
<template v-slot:divider style=" padding-block:0 0">
|
|
||||||
>
|
|
||||||
</template>
|
|
||||||
</v-breadcrumbs>
|
|
||||||
<VSnackbar class="pl-0" v-model="getIsTonalSnackbarVisible" :timeout="50000" location="top end" variant="flat"
|
|
||||||
color="success">
|
|
||||||
<VIcon
|
|
||||||
class="ri-success-line success-icon pl-0"
|
|
||||||
/> {{prescriptionStatus }}
|
|
||||||
</VSnackbar>
|
|
||||||
<v-row>
|
|
||||||
<v-col cols="12" md="12" v-if="itemsPrescriptions">
|
|
||||||
<v-card title="Prescriptions" v-if="prescription">
|
|
||||||
<VCardText >
|
|
||||||
<VRow>
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
offset-md="8"
|
|
||||||
md="4"
|
|
||||||
>
|
|
||||||
<VTextField
|
|
||||||
v-model="search"
|
|
||||||
label="Search"
|
|
||||||
placeholder="Search ..."
|
|
||||||
append-inner-icon="ri-search-line"
|
|
||||||
single-line
|
|
||||||
hide-details
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
</VRow>
|
|
||||||
</VCardText>
|
|
||||||
<VDataTable
|
|
||||||
:headers="headers"
|
|
||||||
:items="itemsPrescriptions"
|
|
||||||
:search="search"
|
|
||||||
:items-per-page="5"
|
|
||||||
class="text-no-wrap"
|
|
||||||
>
|
|
||||||
<!-- <template #item.id="{ item }">
|
|
||||||
{{ item.id }}
|
|
||||||
</template> -->
|
|
||||||
<!-- full name -->
|
|
||||||
<!-- status -->
|
|
||||||
<template #item.status="{ item }">
|
|
||||||
<VSelect
|
|
||||||
v-model="item.status"
|
|
||||||
placeholder="Status"
|
|
||||||
density="comfortable"
|
|
||||||
:items="['Pending', 'Shipped', 'Delivered', 'Transit', 'Recevied', 'Result']"
|
|
||||||
@update:model-value="onStatusChange"
|
|
||||||
@click="onChange(item.id)"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<!-- <template #item.status="{ item }">
|
|
||||||
<VChip
|
|
||||||
:color="getStatusColor(item.status)"
|
|
||||||
density="comfortable"
|
|
||||||
>
|
|
||||||
{{ getStatusColor(item.status) }}
|
|
||||||
</VChip>
|
|
||||||
</template> -->
|
|
||||||
|
|
||||||
<!-- Actions -->
|
|
||||||
<template #item.id="{ item }">
|
|
||||||
<div class="gap-1 details cursor-pointer" @click=showDetail(item)> +
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</VDataTable>
|
|
||||||
</v-card>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<VDialog
|
|
||||||
v-model="prescriptionDialog"
|
|
||||||
max-width="600px"
|
|
||||||
>
|
|
||||||
<VCard :title=prescriptionIndex.name>
|
|
||||||
<DialogCloseBtn
|
|
||||||
variant="text"
|
|
||||||
size="default"
|
|
||||||
@click="[prescriptionDialog = false,selectedItem = '']"
|
|
||||||
/>
|
|
||||||
<VCardText>
|
|
||||||
<v-row class='mt-0'>
|
|
||||||
<v-col cols="12" md="4" sm="6">
|
|
||||||
<p class='heading mb-0 text-right'><b>Brand:</b></p>
|
|
||||||
</v-col>
|
|
||||||
<v-col cols="12" md="4" sm="6">
|
|
||||||
<p>{{ prescriptionIndex.brand }}</p>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<VDivider></VDivider>
|
|
||||||
<v-row class='mt-1'>
|
|
||||||
<v-col cols="12" md="4" sm="6">
|
|
||||||
<p class='heading mb-0 text-right'><b>From:</b></p>
|
|
||||||
</v-col>
|
|
||||||
<v-col cols="12" md="4" sm="6">
|
|
||||||
<p>{{ prescriptionIndex.from }}</p>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<VDivider></VDivider>
|
|
||||||
<v-row class='mt-1'>
|
|
||||||
<v-col cols="12" md="4" sm="6">
|
|
||||||
<p class='heading mb-0 text-right'><b>Dosage:</b></p>
|
|
||||||
</v-col>
|
|
||||||
<v-col cols="12" md="4" sm="6">
|
|
||||||
<p>{{ prescriptionIndex.dosage }}</p>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<VDivider></VDivider>
|
|
||||||
<v-row class='mt-1'>
|
|
||||||
<v-col cols="12" md="4" sm="6">
|
|
||||||
<p class='heading mb-0 text-right'><b>Quantity:</b></p>
|
|
||||||
</v-col>
|
|
||||||
<v-col cols="12" md="4" sm="6">
|
|
||||||
<p>{{ prescriptionIndex.quantity }}</p>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<VDivider></VDivider>
|
|
||||||
<v-row class='mt-1'>
|
|
||||||
<v-col cols="12" md="4" sm="6">
|
|
||||||
<p class='heading mb-0 text-right'><b>Direction Quantity:</b></p>
|
|
||||||
</v-col>
|
|
||||||
<v-col cols="12" md="8" sm="6">
|
|
||||||
<p>{{ prescriptionIndex.direction_quantity }}</p>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<VDivider></VDivider>
|
|
||||||
<v-row class='mt-1'>
|
|
||||||
<v-col cols="12" md="4" sm="6">
|
|
||||||
<p class='heading mb-0 text-right'><b>Direction One:</b></p>
|
|
||||||
</v-col>
|
|
||||||
<v-col cols="12" md="8" sm="6">
|
|
||||||
<p>{{ prescriptionIndex.direction_one }} </p>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<VDivider></VDivider>
|
|
||||||
<v-row class='mt-1'>
|
|
||||||
<v-col cols="12" md="4" sm="6">
|
|
||||||
<p class='heading mb-0 text-right'><b>Direction Two:</b></p>
|
|
||||||
</v-col>
|
|
||||||
<v-col cols="12" md="8" sm="6">
|
|
||||||
<p>{{ prescriptionIndex.direction_two }} </p>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<VDivider></VDivider>
|
|
||||||
<v-row class='mt-1'>
|
|
||||||
<v-col cols="12" md="4" sm="6">
|
|
||||||
<p class='heading mb-0 text-right'><b>Refill Quantity:</b></p>
|
|
||||||
</v-col>
|
|
||||||
<v-col cols="12" md="8" sm="6">
|
|
||||||
<p>{{ prescriptionIndex.refill_quantity }}</p>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
</v-row>
|
|
||||||
<VDivider></VDivider>
|
|
||||||
<v-row class='mt-1'>
|
|
||||||
<v-col cols="12" md="4" sm="6">
|
|
||||||
<p class='heading mb-0 text-right'><b>Status:</b></p>
|
|
||||||
</v-col>
|
|
||||||
<v-col cols="12" md="8" sm="6">
|
|
||||||
<p v-if="prescriptionIndex.status == null" class="text-warning">Pending</p>
|
|
||||||
<p v-else>{{ prescriptionIndex.status }}</p>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<VDivider></VDivider>
|
|
||||||
<v-row class='mt-1 pb-0'>
|
|
||||||
<v-col cols="12" md="4" sm="6">
|
|
||||||
<p class='heading mb-0 text-right'><b>Comments:</b></p>
|
|
||||||
</v-col>
|
|
||||||
<v-col cols="12" md="8" sm="8">
|
|
||||||
<p>{{ prescriptionIndex.comments }} </p>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
</v-row>
|
|
||||||
|
|
||||||
</VCardText>
|
|
||||||
</VCard>
|
|
||||||
|
|
||||||
</VDialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
button.v-expansion-panel-title {
|
|
||||||
background-color: #003152 !important;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
button.v-expansion-panel-title.bg-secondary {
|
|
||||||
background-color: #003152 !important;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
button.v-expansion-panel-title {
|
|
||||||
background-color: #003152 !important;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
span.v-expansion-panel-title__icon {
|
|
||||||
color: #fff
|
|
||||||
}
|
|
||||||
|
|
||||||
// button.v-expansion-panel-title.bg-secondary {
|
|
||||||
// background-color: rgba(var(--v-theme-primary), var(--v-activated-opacity)) !important;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// button.v-expansion-panel-title {
|
|
||||||
// background-color: rgba(var(--v-theme-primary), var(--v-activated-opacity)) !important;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// button.v-expansion-panel-title.v-expansion-panel-title--active {
|
|
||||||
// background-color: rgba(var(--v-theme-primary), var(--v-activated-opacity)) !important;
|
|
||||||
// }
|
|
||||||
|
|
||||||
.v-expansion-panel {
|
|
||||||
overflow: hidden;
|
|
||||||
border-radius: 16px;
|
|
||||||
background-color: #fff;
|
|
||||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 10%);
|
|
||||||
margin-block-end: 10px;
|
|
||||||
transition: box-shadow 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.details {
|
|
||||||
position: relative;
|
|
||||||
box-sizing: content-box;
|
|
||||||
border: 2px solid #fff;
|
|
||||||
border-radius: 1em;
|
|
||||||
background-color: #696cff;
|
|
||||||
block-size: 0.85em;
|
|
||||||
box-shadow: 0 0 3px rgba(67, 89, 113, 80%);
|
|
||||||
color: #fff;
|
|
||||||
content: "+";
|
|
||||||
font-family: "Courier New", Courier, monospace;
|
|
||||||
font-weight: 500;
|
|
||||||
inline-size: 0.85em;
|
|
||||||
inset-block-start: 50%;
|
|
||||||
inset-block-start: 0.7em;
|
|
||||||
inset-inline-start: 50%;
|
|
||||||
line-height: 0.9em;
|
|
||||||
text-align: center;
|
|
||||||
transform: translate(-50%, -50%);
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,209 +0,0 @@
|
|||||||
<script setup>
|
|
||||||
const props = defineProps({
|
|
||||||
userData: {
|
|
||||||
type: Object,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
import moment from 'moment';
|
|
||||||
import { onBeforeMount, onMounted, onUnmounted, ref } from 'vue';
|
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
|
||||||
import { useStore } from 'vuex';
|
|
||||||
|
|
||||||
const store = useStore();
|
|
||||||
const router = useRouter();
|
|
||||||
const route = useRoute();
|
|
||||||
const editDialog = ref(false);
|
|
||||||
const deleteDialog = ref(false);
|
|
||||||
const search = ref('');
|
|
||||||
const appointmentId = ref('');
|
|
||||||
const defaultItem = ref({
|
|
||||||
id: -1,
|
|
||||||
avatar: '',
|
|
||||||
name: '',
|
|
||||||
email: '',
|
|
||||||
dob: '',
|
|
||||||
phone_no: '',
|
|
||||||
});
|
|
||||||
|
|
||||||
const editedItem = ref({ ...defaultItem.value });
|
|
||||||
const editedIndex = ref(-1);
|
|
||||||
const patientMeetingList = ref([]);
|
|
||||||
const isLoading = ref(false);
|
|
||||||
|
|
||||||
// Status options
|
|
||||||
const selectedOptions = [
|
|
||||||
{ text: 'Active', value: 1 },
|
|
||||||
{ text: 'InActive', value: 2 },
|
|
||||||
];
|
|
||||||
|
|
||||||
const refVForm = ref(null);
|
|
||||||
|
|
||||||
// Headers
|
|
||||||
const headers = [
|
|
||||||
// { title: 'Appointment Id', key: 'id' },
|
|
||||||
{ title: 'Provider Name', key: 'provider_name' },
|
|
||||||
// { key: 'appointment_date', sortable: false, title: 'Date' },
|
|
||||||
{ key: 'start_time', title: 'Start Time' },
|
|
||||||
{ key: 'end_time', title: 'End Time' },
|
|
||||||
{ key: 'duration', title: 'Duration' },
|
|
||||||
// { title: 'ACTIONS', key: 'actions' },
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function totalCallDuration(start_time, end_time) {
|
|
||||||
const startMoment = moment(start_time);
|
|
||||||
const endMoment = moment(end_time);
|
|
||||||
const duration = moment.duration(endMoment.diff(startMoment));
|
|
||||||
const hours = String(duration.hours()).padStart(2, '0');
|
|
||||||
const minutes = String(duration.minutes()).padStart(2, '0');
|
|
||||||
const seconds = String(duration.seconds()).padStart(2, '0');
|
|
||||||
|
|
||||||
if (hours === '00' && minutes === '00') {
|
|
||||||
return `00:00:${seconds}`;
|
|
||||||
} else if (hours === '00') {
|
|
||||||
return `00:${minutes}`;
|
|
||||||
} else {
|
|
||||||
return `${hours}:${minutes}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const formatDate = (date) => {
|
|
||||||
const messageDate = new Date(date);
|
|
||||||
const options = {
|
|
||||||
year: 'numeric',
|
|
||||||
month: 'numeric',
|
|
||||||
day: 'numeric',
|
|
||||||
hour: 'numeric', // Change from '2-digit' to 'numeric'
|
|
||||||
minute: '2-digit',
|
|
||||||
hour12: true, // Add hour12: true to get 12-hour format with AM/PM
|
|
||||||
};
|
|
||||||
const formattedDate = messageDate.toLocaleString('en-US', options).replace(/\//g, '-');
|
|
||||||
return `${formattedDate} `;
|
|
||||||
};
|
|
||||||
// Fetch and process the patient meeting list
|
|
||||||
const getPatientMeetingList = async () => {
|
|
||||||
//store.dispatch('updateIsLoading', true);
|
|
||||||
//await store.dispatch('patientMeetingList', { id: route.params.id });
|
|
||||||
// store.dispatch('updateIsLoading', false);
|
|
||||||
|
|
||||||
let list = props.userData.completed_meetings;
|
|
||||||
|
|
||||||
patientMeetingList.value = list.map(history => ({
|
|
||||||
...history,
|
|
||||||
appointment_date: formatDate(history.appointment_date),
|
|
||||||
start_time: formatDate(history.start_time),
|
|
||||||
end_time: formatDate(history.end_time),
|
|
||||||
duration: totalCallDuration(history.start_time, history.end_time),
|
|
||||||
}));
|
|
||||||
console.log(list);
|
|
||||||
};
|
|
||||||
|
|
||||||
// Lifecycle hooks
|
|
||||||
onBeforeMount(() => {});
|
|
||||||
onMounted(async () => {
|
|
||||||
await getPatientMeetingList();
|
|
||||||
|
|
||||||
});
|
|
||||||
onUnmounted(() => {});
|
|
||||||
const historyDetail = (item, value) => {
|
|
||||||
console.log('item',item.id ,value)
|
|
||||||
if(value == 'notes')
|
|
||||||
router.push('/admin/patient/meeting/notes/' + route.params.id + '/' + item.id);
|
|
||||||
if(value == 'prescription')
|
|
||||||
router.push('/admin/patient/meeting/prescription/' + route.params.id + '/' + item.id);
|
|
||||||
}
|
|
||||||
const menusVariant = [
|
|
||||||
'primary'
|
|
||||||
];
|
|
||||||
const options = [
|
|
||||||
{
|
|
||||||
title: 'Notes',
|
|
||||||
key: 'notes',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Prescription',
|
|
||||||
key: 'prescription',
|
|
||||||
},
|
|
||||||
|
|
||||||
]
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
|
|
||||||
<v-row>
|
|
||||||
<v-col cols="12" md="12">
|
|
||||||
<v-card title="Completed Meetings">
|
|
||||||
<v-card-text>
|
|
||||||
<v-row>
|
|
||||||
<v-col cols="12" offset-md="8" md="4">
|
|
||||||
<v-text-field
|
|
||||||
v-model="search"
|
|
||||||
label="Search"
|
|
||||||
placeholder="Search ..."
|
|
||||||
append-inner-icon="ri-search-line"
|
|
||||||
single-line
|
|
||||||
hide-details
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
/>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
</v-card-text>
|
|
||||||
<v-data-table
|
|
||||||
:headers="headers"
|
|
||||||
:items="patientMeetingList"
|
|
||||||
:search="search"
|
|
||||||
:items-per-page="5"
|
|
||||||
class="text-no-wrap"
|
|
||||||
>
|
|
||||||
<template #item.id="{ item }">{{ item.id }}</template>
|
|
||||||
<template #item.provider_name="{ item }">
|
|
||||||
<div class="d-flex flex-column ms-3">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'admin-provider-profile', params: { id: item.provider_id } }"
|
|
||||||
class="highlighted"
|
|
||||||
>
|
|
||||||
<span class="d-block font-weight-medium text-truncate">{{ item.provider_name }}</span>
|
|
||||||
</router-link>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<template #item.duration="{ item }">{{ item.duration }}</template>
|
|
||||||
<!-- Actions -->
|
|
||||||
<template #item.actions="{ item }">
|
|
||||||
<div class="demo-space-x">
|
|
||||||
<VMenu
|
|
||||||
v-for="menu in menusVariant"
|
|
||||||
:key="menu"
|
|
||||||
>
|
|
||||||
<template #activator="{ props }">
|
|
||||||
|
|
||||||
<i class="ri-more-2-line cursor-pointer" style="font-size: 32px;" v-bind="props"></i>
|
|
||||||
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<v-list>
|
|
||||||
<v-list-item
|
|
||||||
v-for="opt in options"
|
|
||||||
:key="opt.value"
|
|
||||||
@click="historyDetail(item, opt.key)"
|
|
||||||
>
|
|
||||||
{{ opt.title }}
|
|
||||||
</v-list-item>
|
|
||||||
</v-list>
|
|
||||||
</VMenu>
|
|
||||||
</div>
|
|
||||||
<!-- <div class="d-flex gap-1">
|
|
||||||
<VBtn class="text-capitalize text-white" @click="historyDetail(item)"> Detail
|
|
||||||
</VBtn>
|
|
||||||
</div> -->
|
|
||||||
</template>
|
|
||||||
</v-data-table>
|
|
||||||
</v-card>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
</template>
|
|
@ -1,128 +0,0 @@
|
|||||||
<script setup>
|
|
||||||
import { ref } from 'vue';
|
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
|
||||||
import { useStore } from 'vuex';
|
|
||||||
const store = useStore();
|
|
||||||
const router = useRouter();
|
|
||||||
const route = useRoute();
|
|
||||||
const patientId = route.params.patient_id;
|
|
||||||
const appointmentId = route.params.id;
|
|
||||||
const notes = ref([]);
|
|
||||||
const props = defineProps({
|
|
||||||
notesData: {
|
|
||||||
type: Object,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
const formatDateDate = (date) => {
|
|
||||||
const messageDate = new Date(date);
|
|
||||||
const options = {
|
|
||||||
year: 'numeric',
|
|
||||||
month: 'long',
|
|
||||||
day: 'numeric',
|
|
||||||
hour: '2-digit',
|
|
||||||
minute: '2-digit',
|
|
||||||
};
|
|
||||||
return messageDate.toLocaleDateString('en-US', options).replace(/\//g, '-');
|
|
||||||
};
|
|
||||||
|
|
||||||
const downloadFile = async (fileUrl, fileName = 'downloadedFile.png') => {
|
|
||||||
try {
|
|
||||||
const response = await fetch(fileUrl);
|
|
||||||
if (!response.ok) throw new Error('Network response was not ok');
|
|
||||||
const blob = await response.blob();
|
|
||||||
const link = document.createElement('a');
|
|
||||||
const url = window.URL.createObjectURL(blob);
|
|
||||||
link.href = url;
|
|
||||||
link.download = fileName;
|
|
||||||
document.body.appendChild(link);
|
|
||||||
link.click();
|
|
||||||
window.URL.revokeObjectURL(url);
|
|
||||||
document.body.removeChild(link);
|
|
||||||
} catch (error) {
|
|
||||||
console.error('Download failed', error);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
|
|
||||||
|
|
||||||
<VCard title="Notes">
|
|
||||||
<VCardText>
|
|
||||||
<VTimeline
|
|
||||||
side="end"
|
|
||||||
align="start"
|
|
||||||
line-inset="8"
|
|
||||||
truncate-line="both"
|
|
||||||
density="compact"
|
|
||||||
>
|
|
||||||
|
|
||||||
<!-- SECTION Timeline Item: Flight -->
|
|
||||||
|
|
||||||
<template v-for="(p_note, index) in props.notesData.patientNotes" :key="index" v-if="props.notesData.patientNotes.length>0">
|
|
||||||
<VTimelineItem
|
|
||||||
dot-color="primary"
|
|
||||||
size="x-small"
|
|
||||||
>
|
|
||||||
<!-- 👉 Header -->
|
|
||||||
<div class="d-flex justify-space-between align-center gap-2 flex-wrap">
|
|
||||||
<span class="app-timeline-title" v-if="p_note.note_type=='Notes'">
|
|
||||||
{{p_note.note}}
|
|
||||||
</span>
|
|
||||||
<span class="app-timeline-title" v-if="p_note.note_type == 'file'">
|
|
||||||
|
|
||||||
<VIcon>ri-attachment-2</VIcon> <button @click="downloadFile(p_note.note,'noteFile.png')">Download Image</button>
|
|
||||||
|
|
||||||
</span>
|
|
||||||
<span class="app-timeline-meta">{{ formatDateDate(p_note.created_at) }}</span>
|
|
||||||
<!-- <span></span> -->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 👉 Content -->
|
|
||||||
<div class="app-timeline-text mb-1">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'admin-provider-profile', params: { id: p_note.provider_id } }"
|
|
||||||
class=""
|
|
||||||
>
|
|
||||||
<span class="">{{ p_note.provider_name }}</span>
|
|
||||||
</router-link>
|
|
||||||
|
|
||||||
<VIcon
|
|
||||||
size="20"
|
|
||||||
icon="tabler-arrow-right"
|
|
||||||
class="mx-2 flip-in-rtl"
|
|
||||||
/>
|
|
||||||
<!-- <span>Heathrow Airport, London</span> -->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- <p class="app-timeline-meta mb-2">
|
|
||||||
6:30 AM
|
|
||||||
</p> -->
|
|
||||||
|
|
||||||
<!-- <div class="app-timeline-text d-flex align-center gap-2">
|
|
||||||
<div>
|
|
||||||
<VImg
|
|
||||||
:src="pdf"
|
|
||||||
:width="22"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<span>booking-card.pdf</span>
|
|
||||||
</div> -->
|
|
||||||
</VTimelineItem>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- !SECTION -->
|
|
||||||
|
|
||||||
<!-- !SECTION -->
|
|
||||||
</VTimeline>
|
|
||||||
</VCardText>
|
|
||||||
</VCard>
|
|
||||||
</template>
|
|
@ -1,199 +0,0 @@
|
|||||||
<script setup>
|
|
||||||
const props = defineProps({
|
|
||||||
userData: {
|
|
||||||
type: Object,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
import CompletedMeetingTab from '@/pages/patients/CompletedMeetingTab.vue';
|
|
||||||
import moment from 'moment';
|
|
||||||
import { onBeforeMount, onMounted, onUnmounted, ref } from 'vue';
|
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
|
||||||
import { useStore } from 'vuex';
|
|
||||||
const store = useStore();
|
|
||||||
const router = useRouter();
|
|
||||||
const route = useRoute();
|
|
||||||
const editDialog = ref(false);
|
|
||||||
const deleteDialog = ref(false);
|
|
||||||
const search = ref('');
|
|
||||||
const appointmentId = ref('');
|
|
||||||
const defaultItem = ref({
|
|
||||||
id: -1,
|
|
||||||
avatar: '',
|
|
||||||
name: '',
|
|
||||||
email: '',
|
|
||||||
dob: '',
|
|
||||||
phone_no: '',
|
|
||||||
});
|
|
||||||
|
|
||||||
const editedItem = ref({ ...defaultItem.value });
|
|
||||||
const editedIndex = ref(-1);
|
|
||||||
const patientMeetingList = ref([]);
|
|
||||||
const isLoading = ref(false);
|
|
||||||
|
|
||||||
// Status options
|
|
||||||
const selectedOptions = [
|
|
||||||
{ text: 'Active', value: 1 },
|
|
||||||
{ text: 'InActive', value: 2 },
|
|
||||||
];
|
|
||||||
|
|
||||||
const refVForm = ref(null);
|
|
||||||
|
|
||||||
// Headers
|
|
||||||
const headers = [
|
|
||||||
// { title: 'Appointment Id', key: 'id' },
|
|
||||||
{ title: 'Provider', key: 'provider_name' },
|
|
||||||
{ key: 'appointment_date', sortable: false, title: 'Date' },
|
|
||||||
//{ key: 'start_time', title: 'Start Time' },
|
|
||||||
// { key: 'end_time', title: 'End Time' },
|
|
||||||
//{ key: 'duration', title: 'Duration' },
|
|
||||||
//{ title: 'ACTIONS', key: 'actions' },
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function totalCallDuration(start_time, end_time) {
|
|
||||||
const startMoment = moment(start_time);
|
|
||||||
const endMoment = moment(end_time);
|
|
||||||
const duration = moment.duration(endMoment.diff(startMoment));
|
|
||||||
const hours = String(duration.hours()).padStart(2, '0');
|
|
||||||
const minutes = String(duration.minutes()).padStart(2, '0');
|
|
||||||
const seconds = String(duration.seconds()).padStart(2, '0');
|
|
||||||
|
|
||||||
if (hours === '00' && minutes === '00') {
|
|
||||||
return `00:00:${seconds}`;
|
|
||||||
} else if (hours === '00') {
|
|
||||||
return `00:${minutes}`;
|
|
||||||
} else {
|
|
||||||
return `${hours}:${minutes}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const formatDate = (date) => {
|
|
||||||
const messageDate = new Date(date);
|
|
||||||
const options = {
|
|
||||||
year: 'numeric',
|
|
||||||
month: 'numeric',
|
|
||||||
day: 'numeric',
|
|
||||||
hour: 'numeric', // Change from '2-digit' to 'numeric'
|
|
||||||
minute: '2-digit',
|
|
||||||
hour12: true, // Add hour12: true to get 12-hour format with AM/PM
|
|
||||||
};
|
|
||||||
const formattedDate = messageDate.toLocaleString('en-US', options).replace(/\//g, '-');
|
|
||||||
return `${formattedDate} `;
|
|
||||||
};
|
|
||||||
// Fetch and process the patient meeting list
|
|
||||||
const getPatientMeetingList = async () => {
|
|
||||||
//store.dispatch('updateIsLoading', true);
|
|
||||||
//await store.dispatch('patientMeetingList', { id: route.params.id });
|
|
||||||
// store.dispatch('updateIsLoading', false);
|
|
||||||
|
|
||||||
let list = props.userData.upcomingMeetings;
|
|
||||||
|
|
||||||
patientMeetingList.value = list.map(history => ({
|
|
||||||
...history,
|
|
||||||
appointment_date: formatDate(history.appointment_date+' '+history.appointment_time),
|
|
||||||
start_time: formatDate(history.start_time),
|
|
||||||
end_time: formatDate(history.end_time),
|
|
||||||
duration: totalCallDuration(history.start_time, history.end_time),
|
|
||||||
}));
|
|
||||||
console.log(list);
|
|
||||||
};
|
|
||||||
|
|
||||||
// Lifecycle hooks
|
|
||||||
onBeforeMount(() => {});
|
|
||||||
onMounted(async () => {
|
|
||||||
await getPatientMeetingList();
|
|
||||||
|
|
||||||
});
|
|
||||||
onUnmounted(() => {});
|
|
||||||
const historyDetail = (item, value) => {
|
|
||||||
console.log('item',item.id ,value)
|
|
||||||
if(value == 'notes')
|
|
||||||
router.push('/admin/patient/meeting/notes/' + route.params.id + '/' + item.id);
|
|
||||||
if(value == 'prescription')
|
|
||||||
router.push('/admin/patient/meeting/prescription/' + route.params.id + '/' + item.id);
|
|
||||||
}
|
|
||||||
const menusVariant = [
|
|
||||||
'primary'
|
|
||||||
];
|
|
||||||
const options = [
|
|
||||||
{
|
|
||||||
title: 'Notes',
|
|
||||||
key: 'notes',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Prescription',
|
|
||||||
key: 'prescription',
|
|
||||||
},
|
|
||||||
|
|
||||||
]
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
|
|
||||||
<v-row>
|
|
||||||
<v-col cols="12" md="12">
|
|
||||||
<v-card title="UpComming Meetings">
|
|
||||||
<v-card-text>
|
|
||||||
<v-row>
|
|
||||||
<v-col cols="12" offset-md="8" md="4">
|
|
||||||
<v-text-field
|
|
||||||
v-model="search"
|
|
||||||
label="Search"
|
|
||||||
placeholder="Search ..."
|
|
||||||
append-inner-icon="ri-search-line"
|
|
||||||
single-line
|
|
||||||
hide-details
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
/>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
</v-card-text>
|
|
||||||
<v-data-table
|
|
||||||
:headers="headers"
|
|
||||||
:items="patientMeetingList"
|
|
||||||
:search="search"
|
|
||||||
:items-per-page="5"
|
|
||||||
class="text-no-wrap"
|
|
||||||
>
|
|
||||||
<template #item.id="{ item }">{{ item.id }}</template>
|
|
||||||
<template #item.duration="{ item }">{{ item.duration }}</template>
|
|
||||||
<!-- Actions -->
|
|
||||||
<template #item.actions="{ item }">
|
|
||||||
<div class="demo-space-x">
|
|
||||||
<VMenu
|
|
||||||
v-for="menu in menusVariant"
|
|
||||||
:key="menu"
|
|
||||||
>
|
|
||||||
<template #activator="{ props }">
|
|
||||||
|
|
||||||
<i class="ri-more-2-line cursor-pointer" style="font-size: 32px;" v-bind="props"></i>
|
|
||||||
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<v-list>
|
|
||||||
<v-list-item
|
|
||||||
v-for="opt in options"
|
|
||||||
:key="opt.value"
|
|
||||||
@click="historyDetail(item, opt.key)"
|
|
||||||
>
|
|
||||||
{{ opt.title }}
|
|
||||||
</v-list-item>
|
|
||||||
</v-list>
|
|
||||||
</VMenu>
|
|
||||||
</div>
|
|
||||||
<!-- <div class="d-flex gap-1">
|
|
||||||
<VBtn class="text-capitalize text-white" @click="historyDetail(item)"> Detail
|
|
||||||
</VBtn>
|
|
||||||
</div> -->
|
|
||||||
</template>
|
|
||||||
</v-data-table>
|
|
||||||
</v-card>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<CompletedMeetingTab :user-data="props.userData"/>
|
|
||||||
</template>
|
|
@ -1,325 +0,0 @@
|
|||||||
<script setup>
|
|
||||||
const profile = ref(0)
|
|
||||||
const color = ref(null)
|
|
||||||
const props = defineProps({
|
|
||||||
userData: {
|
|
||||||
type: Object,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
const standardPlan = {
|
|
||||||
plan: 'Standard',
|
|
||||||
price: 99,
|
|
||||||
benefits: [
|
|
||||||
'10 Users',
|
|
||||||
'Up to 10GB storage',
|
|
||||||
'Basic Support',
|
|
||||||
],
|
|
||||||
}
|
|
||||||
|
|
||||||
const isUserInfoEditDialogVisible = ref(false)
|
|
||||||
const isUpgradePlanDialogVisible = ref(false)
|
|
||||||
|
|
||||||
const resolveUserStatusVariant = stat => {
|
|
||||||
if (stat === 'pending')
|
|
||||||
return 'warning'
|
|
||||||
if (stat === 'active')
|
|
||||||
return 'success'
|
|
||||||
if (stat === 'inactive')
|
|
||||||
return 'secondary'
|
|
||||||
|
|
||||||
return 'primary'
|
|
||||||
}
|
|
||||||
|
|
||||||
const resolveUserRoleVariant = role => {
|
|
||||||
if (role === 'subscriber')
|
|
||||||
return {
|
|
||||||
color: 'primary',
|
|
||||||
icon: 'ri-user-line',
|
|
||||||
}
|
|
||||||
if (role === 'author')
|
|
||||||
return {
|
|
||||||
color: 'warning',
|
|
||||||
icon: 'ri-settings-2-line',
|
|
||||||
}
|
|
||||||
if (role === 'maintainer')
|
|
||||||
return {
|
|
||||||
color: 'success',
|
|
||||||
icon: 'ri-database-2-line',
|
|
||||||
}
|
|
||||||
if (role === 'editor')
|
|
||||||
return {
|
|
||||||
color: 'info',
|
|
||||||
icon: 'ri-pencil-line',
|
|
||||||
}
|
|
||||||
if (role === 'admin')
|
|
||||||
return {
|
|
||||||
color: 'error',
|
|
||||||
icon: 'ri-server-line',
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
color: 'primary',
|
|
||||||
icon: 'ri-user-line',
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const firstThreeLines = computed(() => {
|
|
||||||
const lines = props.userData.plans.list_two_title.split(',')
|
|
||||||
return lines.slice(0, 3)
|
|
||||||
})
|
|
||||||
onMounted(async () => {
|
|
||||||
profile.value = props.userData.patient.profile_completion_Percentage
|
|
||||||
if (profile.value <= 50) {
|
|
||||||
color.value="rgb(var(--v-theme-error))"
|
|
||||||
}
|
|
||||||
if (profile.value >= 80) {
|
|
||||||
color.value="rgb(var(--v-theme-success))"
|
|
||||||
}
|
|
||||||
if (profile.value > 50 && profile.value < 80) {
|
|
||||||
color.value="rgb(var(--v-theme-warning))"
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<VRow>
|
|
||||||
<!-- SECTION User Details -->
|
|
||||||
<VCol cols="12">
|
|
||||||
<VCard v-if="props.userData">
|
|
||||||
<VCardText class="text-center pt-12 pb-6">
|
|
||||||
<!-- 👉 Avatar -->
|
|
||||||
<VAvatar
|
|
||||||
rounded
|
|
||||||
:size="120"
|
|
||||||
:color="!props.userData.patient.avatar ? 'primary' : undefined"
|
|
||||||
:variant="!props.userData.patient.avatar ? 'tonal' : undefined"
|
|
||||||
>
|
|
||||||
<VImg
|
|
||||||
v-if="props.userData.patient.avatar"
|
|
||||||
:src="props.userData.patient.avatar"
|
|
||||||
/>
|
|
||||||
<span
|
|
||||||
v-else
|
|
||||||
class="text-5xl font-weight-medium"
|
|
||||||
>
|
|
||||||
{{ avatarText(props.userData.patient.first_name) }}
|
|
||||||
</span>
|
|
||||||
</VAvatar>
|
|
||||||
|
|
||||||
<!-- 👉 User fullName -->
|
|
||||||
<h5 class="text-h5 mt-4">
|
|
||||||
{{ props.userData.patient.first_name }} {{ props.userData.patient.last_name }}
|
|
||||||
</h5>
|
|
||||||
|
|
||||||
<!-- 👉 Role chip -->
|
|
||||||
|
|
||||||
|
|
||||||
<div class="mt-3">
|
|
||||||
<span class="font-weight-medium" style="float: left;">
|
|
||||||
Profile Status:
|
|
||||||
</span>
|
|
||||||
<VProgressLinear
|
|
||||||
v-model="profile"
|
|
||||||
:color="color"
|
|
||||||
height="14"
|
|
||||||
striped
|
|
||||||
>
|
|
||||||
<template #default="{ value }">
|
|
||||||
<span>{{ Math.ceil(value) }}%</span>
|
|
||||||
</template>
|
|
||||||
</VProgressLinear>
|
|
||||||
</div>
|
|
||||||
</VCardText>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- 👉 Details -->
|
|
||||||
|
|
||||||
<VCardText class="pb-6">
|
|
||||||
<h5 class="text-h5">
|
|
||||||
Details
|
|
||||||
</h5>
|
|
||||||
|
|
||||||
<VDivider class="my-4" />
|
|
||||||
|
|
||||||
<!-- 👉 User Details list -->
|
|
||||||
<VList class="card-list">
|
|
||||||
<VListItem>
|
|
||||||
<VListItemTitle class="text-sm">
|
|
||||||
<span class="font-weight-medium">
|
|
||||||
Email:
|
|
||||||
</span>
|
|
||||||
<span class="text-body-1">{{ props.userData.patient.email }}</span>
|
|
||||||
</VListItemTitle>
|
|
||||||
</VListItem>
|
|
||||||
|
|
||||||
<VListItem>
|
|
||||||
<VListItemTitle class="text-sm">
|
|
||||||
<span class="font-weight-medium">
|
|
||||||
Address:
|
|
||||||
</span>
|
|
||||||
<span class="text-body-1">{{ props.userData.patient.address }} ,{{ props.userData.patient.city }},{{ props.userData.patient.state }} {{ props.userData.patient.zip_code }}</span>
|
|
||||||
</VListItemTitle>
|
|
||||||
</VListItem>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<VListItem>
|
|
||||||
<VListItemTitle class="text-sm">
|
|
||||||
<span class="font-weight-medium">
|
|
||||||
Contact:
|
|
||||||
</span>
|
|
||||||
<span class="text-body-1">{{ props.userData.patient.phone_no }}</span>
|
|
||||||
</VListItemTitle>
|
|
||||||
</VListItem>
|
|
||||||
|
|
||||||
|
|
||||||
</VList>
|
|
||||||
</VCardText>
|
|
||||||
|
|
||||||
<!-- 👉 Edit and Suspend button -->
|
|
||||||
<VCardText class="d-flex justify-center" >
|
|
||||||
<VBtn
|
|
||||||
variant="elevated"
|
|
||||||
class="me-4"
|
|
||||||
@click="isUserInfoEditDialogVisible = true"
|
|
||||||
style="display: none;"
|
|
||||||
>
|
|
||||||
Edit
|
|
||||||
</VBtn>
|
|
||||||
<VBtn
|
|
||||||
variant="outlined"
|
|
||||||
color="error"
|
|
||||||
style="display: none;"
|
|
||||||
>
|
|
||||||
Suspend
|
|
||||||
</VBtn>
|
|
||||||
</VCardText>
|
|
||||||
</VCard>
|
|
||||||
</VCol>
|
|
||||||
<!-- !SECTION -->
|
|
||||||
|
|
||||||
<!-- SECTION Current Plan -->
|
|
||||||
<VCol cols="12" v-if="props.userData.plans">
|
|
||||||
<VCard
|
|
||||||
flat
|
|
||||||
class="current-plan"
|
|
||||||
|
|
||||||
>
|
|
||||||
<VCardText class="d-flex">
|
|
||||||
<!-- 👉 Standard Chip -->
|
|
||||||
<VChip
|
|
||||||
color="primary"
|
|
||||||
size="small"
|
|
||||||
>
|
|
||||||
{{ props.userData.plans.title }}
|
|
||||||
</VChip>
|
|
||||||
|
|
||||||
<VSpacer />
|
|
||||||
|
|
||||||
<!-- 👉 Current Price -->
|
|
||||||
<div class="d-flex align-center">
|
|
||||||
<sup class="text-primary text-lg font-weight-medium"> {{ props.userData.plans.currency }}</sup>
|
|
||||||
<h1 class="text-h1 text-primary">
|
|
||||||
{{ props.userData.plans.price }}
|
|
||||||
</h1>
|
|
||||||
<sub class="mt-3"><h6 class="text-h6 font-weight-regular">month</h6></sub>
|
|
||||||
</div>
|
|
||||||
</VCardText>
|
|
||||||
|
|
||||||
<VCardText>
|
|
||||||
<!-- 👉 Price Benefits -->
|
|
||||||
<VList class="card-list">
|
|
||||||
<VListItem
|
|
||||||
>
|
|
||||||
<div class="d-flex align-center">
|
|
||||||
<VIcon
|
|
||||||
size="10"
|
|
||||||
color="medium-emphasis"
|
|
||||||
class="me-2"
|
|
||||||
icon="ri-circle-fill"
|
|
||||||
/>
|
|
||||||
<div class="text-medium-emphasis">
|
|
||||||
{{ props.userData.plans.list_one_title }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</VListItem>
|
|
||||||
<VListItem
|
|
||||||
>
|
|
||||||
<div class="d-flex align-center">
|
|
||||||
<VIcon
|
|
||||||
size="10"
|
|
||||||
color="medium-emphasis"
|
|
||||||
class="me-2"
|
|
||||||
icon="ri-circle-fill"
|
|
||||||
/>
|
|
||||||
<div class="text-medium-emphasis">
|
|
||||||
{{ props.userData.plans.list_sub_title }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</VListItem>
|
|
||||||
|
|
||||||
<VListItem
|
|
||||||
>
|
|
||||||
<div class="d-flex align-center">
|
|
||||||
<VIcon
|
|
||||||
size="10"
|
|
||||||
color="medium-emphasis"
|
|
||||||
class="me-2"
|
|
||||||
icon="ri-circle-fill"
|
|
||||||
/>
|
|
||||||
<div class="text-medium-emphasis">
|
|
||||||
<span v-for="(line, index) in firstThreeLines" :key="index">
|
|
||||||
{{ line }}
|
|
||||||
<br v-if="index !== firstThreeLines.length - 1" />
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</VListItem>
|
|
||||||
</VList>
|
|
||||||
|
|
||||||
<!-- 👉 Days -->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- 👉 Upgrade Plan -->
|
|
||||||
<VBtn
|
|
||||||
block
|
|
||||||
@click="isUpgradePlanDialogVisible = true"
|
|
||||||
>
|
|
||||||
Upgrade Plan
|
|
||||||
</VBtn>
|
|
||||||
</VCardText>
|
|
||||||
</VCard>
|
|
||||||
</VCol>
|
|
||||||
<!-- !SECTION -->
|
|
||||||
</VRow>
|
|
||||||
|
|
||||||
<!-- 👉 Edit user info dialog -->
|
|
||||||
<UserInfoEditDialog
|
|
||||||
v-model:isDialogVisible="isUserInfoEditDialogVisible"
|
|
||||||
:user-data="props.userData"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 👉 Upgrade plan dialog -->
|
|
||||||
<UserUpgradePlanDialog v-model:isDialogVisible="isUpgradePlanDialogVisible" />
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.card-list {
|
|
||||||
--v-card-list-gap: .5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.current-plan {
|
|
||||||
border: 2px solid rgb(var(--v-theme-primary));
|
|
||||||
}
|
|
||||||
|
|
||||||
.text-capitalize {
|
|
||||||
text-transform: capitalize !important;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,211 +0,0 @@
|
|||||||
<script setup>
|
|
||||||
const props = defineProps({
|
|
||||||
userData: {
|
|
||||||
type: Object,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
import { onBeforeMount, onMounted, onUnmounted, ref } from 'vue';
|
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
|
||||||
import { useStore } from 'vuex';
|
|
||||||
|
|
||||||
const store = useStore();
|
|
||||||
const router = useRouter();
|
|
||||||
const route = useRoute();
|
|
||||||
const editDialog = ref(false);
|
|
||||||
const deleteDialog = ref(false);
|
|
||||||
const search = ref('');
|
|
||||||
const appointmentId = ref('');
|
|
||||||
const defaultItem = ref({
|
|
||||||
id: -1,
|
|
||||||
avatar: '',
|
|
||||||
name: '',
|
|
||||||
email: '',
|
|
||||||
dob: '',
|
|
||||||
phone_no: '',
|
|
||||||
});
|
|
||||||
|
|
||||||
const editedItem = ref({ ...defaultItem.value });
|
|
||||||
const editedIndex = ref(-1);
|
|
||||||
const patientLabList = ref([]);
|
|
||||||
const isLoading = ref(false);
|
|
||||||
|
|
||||||
// Status options
|
|
||||||
const selectedOptions = [
|
|
||||||
{ text: 'Active', value: 1 },
|
|
||||||
{ text: 'InActive', value: 2 },
|
|
||||||
];
|
|
||||||
|
|
||||||
const refVForm = ref(null);
|
|
||||||
|
|
||||||
// Headers
|
|
||||||
const headers = [
|
|
||||||
// { title: 'Appointment Id', key: 'id' },
|
|
||||||
|
|
||||||
{ title: 'Lab Kit Name', key: 'name' },
|
|
||||||
// { key: 'appointment_date', sortable: false, title: 'Date' },
|
|
||||||
{ key: 'address', title: 'Address' },
|
|
||||||
{ key: 'amount', title: 'Amount' },
|
|
||||||
{ key: 'status', title: 'Status' },
|
|
||||||
// { title: 'ACTIONS', key: 'actions' },
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const formatDate = (date) => {
|
|
||||||
const messageDate = new Date(date);
|
|
||||||
const options = {
|
|
||||||
year: 'numeric',
|
|
||||||
month: 'numeric',
|
|
||||||
day: 'numeric',
|
|
||||||
hour: 'numeric', // Change from '2-digit' to 'numeric'
|
|
||||||
minute: '2-digit',
|
|
||||||
hour12: true, // Add hour12: true to get 12-hour format with AM/PM
|
|
||||||
};
|
|
||||||
const formattedDate = messageDate.toLocaleString('en-US', options).replace(/\//g, '-');
|
|
||||||
return `${formattedDate} `;
|
|
||||||
};
|
|
||||||
// Fetch and process the patient meeting list
|
|
||||||
const getPatientLabList = async () => {
|
|
||||||
//store.dispatch('updateIsLoading', true);
|
|
||||||
//await store.dispatch('patientMeetingList', { id: route.params.id });
|
|
||||||
// store.dispatch('updateIsLoading', false);
|
|
||||||
|
|
||||||
let list = props.userData.labkit;
|
|
||||||
|
|
||||||
patientLabList.value = list
|
|
||||||
console.log(list);
|
|
||||||
};
|
|
||||||
|
|
||||||
// Lifecycle hooks
|
|
||||||
onBeforeMount(() => {});
|
|
||||||
onMounted(async () => {
|
|
||||||
await getPatientLabList();
|
|
||||||
|
|
||||||
});
|
|
||||||
onUnmounted(() => {});
|
|
||||||
const historyDetail = (item, value) => {
|
|
||||||
console.log('item',item.id ,value)
|
|
||||||
if(value == 'notes')
|
|
||||||
router.push('/admin/patient/meeting/notes/' + route.params.id + '/' + item.id);
|
|
||||||
if(value == 'prescription')
|
|
||||||
router.push('/admin/patient/meeting/prescription/' + route.params.id + '/' + item.id);
|
|
||||||
}
|
|
||||||
const menusVariant = [
|
|
||||||
'primary'
|
|
||||||
];
|
|
||||||
const options = [
|
|
||||||
{
|
|
||||||
title: 'Notes',
|
|
||||||
key: 'notes',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Prescription',
|
|
||||||
key: 'prescription',
|
|
||||||
},
|
|
||||||
|
|
||||||
]
|
|
||||||
const getStatusColor = (status) => {
|
|
||||||
switch (status) {
|
|
||||||
case 'pending':
|
|
||||||
return 'warning'; // Use Vuetify's warning color (typically yellow)
|
|
||||||
case 'shipped':
|
|
||||||
return '#45B8AC'; // Use Vuetify's primary color (typically blue)
|
|
||||||
case 'delivered':
|
|
||||||
return 'success';
|
|
||||||
case 'returned':
|
|
||||||
return 'red';
|
|
||||||
case 'results':
|
|
||||||
return 'blue';
|
|
||||||
default:
|
|
||||||
return 'grey'; // Use Vuetify's grey color for any other status
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
|
|
||||||
<v-row>
|
|
||||||
<v-col cols="12" md="12" >
|
|
||||||
<v-card title="Lab Kits">
|
|
||||||
<v-card-text>
|
|
||||||
<v-row>
|
|
||||||
<v-col cols="12" offset-md="8" md="4">
|
|
||||||
<v-text-field
|
|
||||||
v-model="search"
|
|
||||||
label="Search"
|
|
||||||
placeholder="Search ..."
|
|
||||||
append-inner-icon="ri-search-line"
|
|
||||||
single-line
|
|
||||||
hide-details
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
/>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
</v-card-text>
|
|
||||||
<v-data-table
|
|
||||||
:headers="headers"
|
|
||||||
:items="patientLabList"
|
|
||||||
:search="search"
|
|
||||||
:items-per-page="5"
|
|
||||||
class="text-no-wrap"
|
|
||||||
>
|
|
||||||
<template #item.id="{ item }">{{ item.id }}</template>
|
|
||||||
<template #item.provider_name="{ item }">
|
|
||||||
<div class="d-flex flex-column ms-3">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'admin-provider-profile', params: { id: item.provider_id } }"
|
|
||||||
class="highlighted"
|
|
||||||
>
|
|
||||||
<span class="d-block font-weight-medium text-truncate">{{ item.provider_name }}</span>
|
|
||||||
</router-link>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<template #item.status="{ item }">
|
|
||||||
<VChip
|
|
||||||
:color="getStatusColor(item.status)"
|
|
||||||
density="comfortable"
|
|
||||||
>
|
|
||||||
{{ item.status}}
|
|
||||||
</VChip>
|
|
||||||
</template>
|
|
||||||
<template #item.address="{ item }">{{ item.shipping_address1 }} <br/>{{ item.shipping_city }} {{ item.shipping_state }} {{ item.shipping_zipcode }}</template>
|
|
||||||
<!-- Actions -->
|
|
||||||
<template #item.actions="{ item }">
|
|
||||||
<div class="demo-space-x">
|
|
||||||
<VMenu
|
|
||||||
v-for="menu in menusVariant"
|
|
||||||
:key="menu"
|
|
||||||
>
|
|
||||||
<template #activator="{ props }">
|
|
||||||
|
|
||||||
<i class="ri-more-2-line cursor-pointer" style="font-size: 32px;" v-bind="props"></i>
|
|
||||||
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<v-list>
|
|
||||||
<v-list-item
|
|
||||||
v-for="opt in options"
|
|
||||||
:key="opt.value"
|
|
||||||
@click="historyDetail(item, opt.key)"
|
|
||||||
>
|
|
||||||
{{ opt.title }}
|
|
||||||
</v-list-item>
|
|
||||||
</v-list>
|
|
||||||
</VMenu>
|
|
||||||
</div>
|
|
||||||
<!-- <div class="d-flex gap-1">
|
|
||||||
<VBtn class="text-capitalize text-white" @click="historyDetail(item)"> Detail
|
|
||||||
</VBtn>
|
|
||||||
</div> -->
|
|
||||||
</template>
|
|
||||||
</v-data-table>
|
|
||||||
</v-card>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
</template>
|
|
@ -1,525 +0,0 @@
|
|||||||
<script setup>
|
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
|
||||||
import { useStore } from 'vuex';
|
|
||||||
import QuestionProgressBar from '../patients/QuestionProgressBar.vue';
|
|
||||||
import questionsJson from '../patients/questions_parse.json';
|
|
||||||
const router = useRouter()
|
|
||||||
const route = useRoute();
|
|
||||||
const store = useStore()
|
|
||||||
const questionsJsonData = ref(questionsJson)
|
|
||||||
const answers = ref(null)
|
|
||||||
const QuestionsAnswers = ref([]);
|
|
||||||
const username = ref(null);
|
|
||||||
const email = ref(null);
|
|
||||||
const phone = ref(null);
|
|
||||||
const address1 = ref(null);
|
|
||||||
const dob = ref(null);
|
|
||||||
const agePatient = ref(null);
|
|
||||||
const isMobile = ref(window.innerWidth <= 768);
|
|
||||||
const patientId = route.params.id
|
|
||||||
|
|
||||||
onMounted(async () => {
|
|
||||||
// console.log('patient id',props.patient_id)
|
|
||||||
const navbar = document.querySelector('.layout-navbar');
|
|
||||||
const callDiv = document.querySelector('.layout-page-content');
|
|
||||||
if (navbar) {
|
|
||||||
navbar.style.display = 'block';
|
|
||||||
}
|
|
||||||
if (callDiv)
|
|
||||||
callDiv.style.padding = '1.5rem';
|
|
||||||
store.dispatch('updateIsLoading', true)
|
|
||||||
await store.dispatch('patientDetial',{id:patientId})
|
|
||||||
await store.dispatch('getAgentQuestionsAnswers',{patient_id:patientId})
|
|
||||||
username.value = store.getters.getPatientDetail.patient.first_name + ' ' + store.getters.getPatientDetail.patient.last_name;
|
|
||||||
email.value = store.getters.getPatientDetail.patient.email
|
|
||||||
phone.value = store.getters.getPatientDetail.patient.phone_no
|
|
||||||
dob.value = changeFormat(store.getters.getPatientDetail.patient.dob)
|
|
||||||
agePatient.value = calculateAge(store.getters.getPatientDetail.patient.dob) + " Year"
|
|
||||||
address1.value = store.getters.getPatientDetail.patient.address + ' ' +
|
|
||||||
store.getters.getPatientDetail.patient.city + ' ' +
|
|
||||||
store.getters.getPatientDetail.patient.state + ' ' +
|
|
||||||
store.getters.getPatientDetail.patient.country;
|
|
||||||
|
|
||||||
// address.value = patient_address;
|
|
||||||
|
|
||||||
answers.value = store.getters.getPatientAnswers
|
|
||||||
// console.log('questionsJsonData', questionsJsonData.value)
|
|
||||||
// console.log('API Answers', answers.value)
|
|
||||||
createFinalArray();
|
|
||||||
store.dispatch('updateIsLoading', false)
|
|
||||||
window.addEventListener('resize', checkMobile);
|
|
||||||
});
|
|
||||||
|
|
||||||
function changeFormat(dateFormat) {
|
|
||||||
const dateParts = dateFormat.split('-'); // Assuming date is in yyyy-mm-dd format
|
|
||||||
const year = parseInt(dateParts[0]);
|
|
||||||
const month = parseInt(dateParts[1]); // No need for padding
|
|
||||||
const day = parseInt(dateParts[2]); // No need for padding
|
|
||||||
|
|
||||||
// Create a new Date object with the parsed values
|
|
||||||
const date = new Date(year, month - 1, day); // Month is zero-based in JavaScript Date object
|
|
||||||
|
|
||||||
// Format the date as mm-dd-yyyy
|
|
||||||
const formattedDate = month + '-' + day + '-' + date.getFullYear();
|
|
||||||
|
|
||||||
return formattedDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
// function changeFormat(dateFormat) {
|
|
||||||
// const dateParts = dateFormat.split('-'); // Assuming date is in yyyy-mm-dd format
|
|
||||||
// const year = parseInt(dateParts[0]);
|
|
||||||
// const month = String(dateParts[1]).padStart(2, '0'); // Pad single-digit months with leading zero
|
|
||||||
// const day = String(dateParts[2]).padStart(2, '0'); // Pad single-digit days with leading zero
|
|
||||||
|
|
||||||
// // Create a new Date object with the parsed values
|
|
||||||
// const date = new Date(year, month - 1, day); // Month is zero-based in JavaScript Date object
|
|
||||||
|
|
||||||
// // Format the date as mm-dd-yyyy
|
|
||||||
// const formattedDate = month + '-' + day + '-' + date.getFullYear();
|
|
||||||
|
|
||||||
// return formattedDate;
|
|
||||||
// }
|
|
||||||
const createFinalArray = () => {
|
|
||||||
questionsJsonData.value.forEach(question => {
|
|
||||||
const { label, key, type } = question;
|
|
||||||
if (answers.value.hasOwnProperty(key)) {
|
|
||||||
QuestionsAnswers.value.push({
|
|
||||||
label,
|
|
||||||
key,
|
|
||||||
type,
|
|
||||||
value: answers.value[key]
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
// console.log('------finalArray ', QuestionsAnswers.value)
|
|
||||||
};
|
|
||||||
|
|
||||||
const checkMobile = () => {
|
|
||||||
isMobile.value = window.innerWidth <= 768;
|
|
||||||
};
|
|
||||||
const calculateAge = (dateOfBirth) => {
|
|
||||||
const today = new Date();
|
|
||||||
const birthDate = new Date(dateOfBirth);
|
|
||||||
let age = today.getFullYear() - birthDate.getFullYear();
|
|
||||||
const monthDiff = today.getMonth() - birthDate.getMonth();
|
|
||||||
|
|
||||||
if (
|
|
||||||
monthDiff < 0 ||
|
|
||||||
(monthDiff === 0 && today.getDate() < birthDate.getDate())
|
|
||||||
) {
|
|
||||||
age--;
|
|
||||||
}
|
|
||||||
|
|
||||||
return age;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<v-row class='mb-2'>
|
|
||||||
<!-- <VCol cols="12" md="12" class="mb-4 " v-if="username || phone" style="font-size: 16px;">
|
|
||||||
<VCard>
|
|
||||||
<VCardText>
|
|
||||||
<h3 class="mb-2"> {{ username }}</h3>
|
|
||||||
<div class="mb-1">
|
|
||||||
<VTooltip location="left" activator="parent" transition="scroll-x-transition">
|
|
||||||
Email
|
|
||||||
</VTooltip>
|
|
||||||
<VIcon icon="ri-mail-line" size="20" class="me-2" />{{ email }}
|
|
||||||
</div>
|
|
||||||
<div class="mb-2">
|
|
||||||
<VTooltip location="left" activator="parent" transition="scroll-x-transition">
|
|
||||||
Age
|
|
||||||
</VTooltip>
|
|
||||||
<VIcon icon="ri-calendar-event-line" title="Age" size="20" class="me-2" />{{ agePatient }}
|
|
||||||
</div>
|
|
||||||
<div class="mb-2">
|
|
||||||
<VTooltip location="left" activator="parent" transition="scroll-x-transition">
|
|
||||||
Date of Birth
|
|
||||||
</VTooltip>
|
|
||||||
<VIcon icon="ri-calendar-line" size="20" class="me-2" />{{ dob }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mb-2">
|
|
||||||
<VTooltip location="left" activator="parent" transition="scroll-x-transition">
|
|
||||||
Address
|
|
||||||
</VTooltip>
|
|
||||||
<VIcon icon="ri-map-pin-line" size="20" class="me-2" />{{ address1 }}
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<VTooltip location="left" activator="parent" transition="scroll-x-transition">
|
|
||||||
Contact Number
|
|
||||||
</VTooltip>
|
|
||||||
<VIcon icon="ri-phone-line" size="20" class="me-2" />{{ phone }}
|
|
||||||
</div>
|
|
||||||
</VCardText>
|
|
||||||
</VCard>
|
|
||||||
</VCol> -->
|
|
||||||
<v-col cols="12" md="12">
|
|
||||||
<VList class="">
|
|
||||||
<VListItem class="">
|
|
||||||
<VListItemTitle class="d-flex align-center justify-space-between bg-dark mt-1"
|
|
||||||
style="padding: 5px;">
|
|
||||||
<div :class="isMobile ? '' : 'w-40'">
|
|
||||||
<p class="mb-0" :class="isMobile ? 'heading-text-m' : 'heading-text-d'"><b>SYMPTOM
|
|
||||||
CHECKLIST</b></p>
|
|
||||||
</div>
|
|
||||||
<div class="d-flex align-center" :class="isMobile ? 'heading-text-m' : 'heading-text-d'">
|
|
||||||
<p class="mb-0"><b>MILD</b>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="d-flex align-center" :class="isMobile ? 'heading-text-m' : 'heading-text-d'">
|
|
||||||
<p class="mb-0"><b>MODERATE</b>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="d-flex align-center" :class="isMobile ? 'heading-text-m' : 'heading-text-d'">
|
|
||||||
<p class="mb-0"><b>SEVERE</b>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</VListItemTitle>
|
|
||||||
</VListItem>
|
|
||||||
<!-- Move the second list item inside the loop -->
|
|
||||||
<VListItem class="pt-0 pb-0 ht-li" v-for="(item, index) of QuestionsAnswers" :key="index">
|
|
||||||
<VListItemTitle class="d-flex align-center justify-space-between">
|
|
||||||
<div class="border-right"
|
|
||||||
:class="{ 'bg-silver': (index + 1) % 2 === 0, 'w-custom-m': isMobile, 'w-40': !isMobile }"
|
|
||||||
style="padding-left: 5px;">
|
|
||||||
|
|
||||||
<p class="text-wrap mb-0" :class="isMobile ? 'heading-text-m' : 'heading-text-d'">{{
|
|
||||||
item.label
|
|
||||||
}}</p>
|
|
||||||
</div>
|
|
||||||
<div class="d-flex align-center" :class="isMobile ? 'w-custom-d' : 'w-60'">
|
|
||||||
<QuestionProgressBar :type="item.type" :value="item.value"></QuestionProgressBar>
|
|
||||||
</div>
|
|
||||||
</VListItemTitle>
|
|
||||||
</VListItem>
|
|
||||||
</VList>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <v-table density="compact" fixed-header>
|
|
||||||
<thead>
|
|
||||||
<tr class="text-right">
|
|
||||||
<th class="bg-dark">
|
|
||||||
<b>SYMPTOM CHECKLIST</b>
|
|
||||||
</th>
|
|
||||||
<th class="text-right bg-dark">
|
|
||||||
<b>MILD</b>
|
|
||||||
<VIcon icon="mdi-menu-down"></VIcon>
|
|
||||||
</th>
|
|
||||||
<th class="text-right bg-dark">
|
|
||||||
<b>MODERATE</b>
|
|
||||||
<VIcon icon="mdi-menu-down"></VIcon>
|
|
||||||
</th>
|
|
||||||
<th class="text-right bg-dark">
|
|
||||||
<b>SEVERE</b>
|
|
||||||
<VIcon icon="mdi-menu-down"></VIcon>
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr v-for="(item, index) of QuestionsAnswers" :key="index">
|
|
||||||
<td class="border-right" v-if="!isMobile">{{ item.label }}</td>
|
|
||||||
<td :colspan="isMobile ? '4' : '3'">
|
|
||||||
<p v-if="isMobile" class="mb-0">{{ item.label }}</p>
|
|
||||||
<QuestionProgressBar :type="item.type" :value="item.value"></QuestionProgressBar>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</v-table> -->
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.mdi-email {
|
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ht-li {
|
|
||||||
min-height: 20px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bg-silver {
|
|
||||||
background-color: silver;
|
|
||||||
}
|
|
||||||
|
|
||||||
.text-wrap {
|
|
||||||
text-wrap: balance;
|
|
||||||
}
|
|
||||||
|
|
||||||
.w-40 {
|
|
||||||
width: 40%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.w-custom-m {
|
|
||||||
width: 36%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.w-60 {
|
|
||||||
width: 60%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.w-custom-d {
|
|
||||||
width: 65%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.v-list-item--density-default.v-list-item--one-line {
|
|
||||||
min-height: 40px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.heading-text-m {
|
|
||||||
font-size: 9px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.heading-text-d {
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bg-dark {
|
|
||||||
background-color: #808080b3 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.text-right {
|
|
||||||
text-align: right !important;
|
|
||||||
width: 23%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.border-right {
|
|
||||||
border-right: 1.5px solid black;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hidden-component {
|
|
||||||
display: none
|
|
||||||
}
|
|
||||||
|
|
||||||
.meta-key {
|
|
||||||
border: thin solid rgba(var(--v-border-color), var(--v-border-opacity));
|
|
||||||
border-radius: 6px;
|
|
||||||
block-size: 1.5625rem;
|
|
||||||
line-height: 1.3125rem;
|
|
||||||
padding-block: 0.125rem;
|
|
||||||
padding-inline: 0.25rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
::v-deep .custom-menu {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
::v-deep .custom-menu::before {
|
|
||||||
content: "" !important;
|
|
||||||
position: absolute !important;
|
|
||||||
transform: translateY(-50%);
|
|
||||||
top: 50% !important;
|
|
||||||
left: -8px !important;
|
|
||||||
border-left: 8px solid transparent !important;
|
|
||||||
border-right: 8px solid transparent !important;
|
|
||||||
border-bottom: 8px solid #fff !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Styles for the VList component
|
|
||||||
|
|
||||||
|
|
||||||
.more .v-list-item-title {
|
|
||||||
color: rgb(106 109 255);
|
|
||||||
}
|
|
||||||
|
|
||||||
.more .menu-item:hover {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.slide-enter-active,
|
|
||||||
.slide-leave-active {
|
|
||||||
transition: transform 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.slide-enter,
|
|
||||||
.slide-leave-to {
|
|
||||||
transform: translateX(-100%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.start-call-btn {
|
|
||||||
opacity: 0;
|
|
||||||
display: none;
|
|
||||||
transition: opacity 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.button_margin {
|
|
||||||
margin: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dialog_padding {
|
|
||||||
padding: 5px;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.custom-menu .v-menu__content {
|
|
||||||
background-color: #333;
|
|
||||||
color: #fff;
|
|
||||||
border-radius: 4px;
|
|
||||||
padding: 8px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.user-info {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
transition: opacity 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.list-item-hover {
|
|
||||||
transition: background-color 0.3s ease;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
background-color: rgba(var(--v-theme-primary), 0.1);
|
|
||||||
|
|
||||||
.start-call-btn {
|
|
||||||
opacity: 1;
|
|
||||||
display: block;
|
|
||||||
position: relative;
|
|
||||||
left: -35px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.user-info {
|
|
||||||
opacity: 0;
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.pop_card {
|
|
||||||
|
|
||||||
overflow: hidden !important;
|
|
||||||
padding: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.v-overlay__content {
|
|
||||||
|
|
||||||
max-height: 706.4px;
|
|
||||||
max-width: 941.6px;
|
|
||||||
min-width: 24px;
|
|
||||||
--v-overlay-anchor-origin: bottom left;
|
|
||||||
transform-origin: left top;
|
|
||||||
top: 154.4px !important;
|
|
||||||
left: 204px !important;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.button_margin {
|
|
||||||
margin-top: 10px;
|
|
||||||
font-size: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Responsive Styles */
|
|
||||||
@media screen and (max-width: 768px) {
|
|
||||||
.pop_card {
|
|
||||||
max-width: 100%;
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.container_img {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
width: 100%;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.image {
|
|
||||||
order: 2;
|
|
||||||
/* Change the order to 2 in mobile view */
|
|
||||||
}
|
|
||||||
|
|
||||||
.text {
|
|
||||||
order: 1;
|
|
||||||
/* Change the order to 1 in mobile view */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Media query for mobile view */
|
|
||||||
@media (max-width: 768px) {
|
|
||||||
.container_img {
|
|
||||||
flex-direction: row;
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.button_margin_mobile {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.image {
|
|
||||||
width: 20%;
|
|
||||||
padding: 0 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.text {
|
|
||||||
width: 80%;
|
|
||||||
/* Each takes 50% width */
|
|
||||||
padding: 0 10px;
|
|
||||||
/* Optional padding */
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
::-webkit-scrollbar {
|
|
||||||
width: 10px;
|
|
||||||
/* Width of the scrollbar */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Track */
|
|
||||||
::-webkit-scrollbar-track {
|
|
||||||
background: #f1f1f1;
|
|
||||||
/* Color of the track */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Handle */
|
|
||||||
::-webkit-scrollbar-thumb {
|
|
||||||
background: #888;
|
|
||||||
/* Color of the handle */
|
|
||||||
border-radius: 5px;
|
|
||||||
/* Roundness of the handle */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Handle on hover */
|
|
||||||
::-webkit-scrollbar-thumb:hover {
|
|
||||||
background: #555;
|
|
||||||
/* Color of the handle on hover */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Container for the content */
|
|
||||||
.scroll-container {
|
|
||||||
max-height: 191px;
|
|
||||||
/* Maximum height of the scrollable content */
|
|
||||||
overflow-y: scroll;
|
|
||||||
/* Enable vertical scrolling */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Content within the scroll container */
|
|
||||||
.scroll-content {
|
|
||||||
padding: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Example of additional styling for content */
|
|
||||||
.scroll-content p {
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cross button {
|
|
||||||
|
|
||||||
padding: 0px;
|
|
||||||
margin: 0px;
|
|
||||||
/* font-size: 10px; */
|
|
||||||
background: none;
|
|
||||||
border: none;
|
|
||||||
box-shadow: none;
|
|
||||||
height: 23px;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.v-data-table-header {
|
|
||||||
display: table-header-group;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,353 +0,0 @@
|
|||||||
<script setup>
|
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
|
||||||
import { useStore } from 'vuex';
|
|
||||||
|
|
||||||
const store = useStore();
|
|
||||||
const router = useRouter()
|
|
||||||
const route = useRoute()
|
|
||||||
const itemsPrescriptions = ref([]);
|
|
||||||
const patientId = route.params.patient_id;
|
|
||||||
const props = defineProps({
|
|
||||||
prescriptionData: {
|
|
||||||
type: Object,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
const prescription = computed(async () => {
|
|
||||||
console.log('computed=====')
|
|
||||||
await getprescriptionList()
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
const getprescriptionList = async () => {
|
|
||||||
|
|
||||||
let prescriptions = props.prescriptionData.prescriptionData
|
|
||||||
console.log("BeforeOverviewItem", prescriptions);
|
|
||||||
// itemsPrescriptions.value = store.getters.getPrescriptionList
|
|
||||||
for (let data of prescriptions) {
|
|
||||||
let dataObject = {}
|
|
||||||
dataObject.name = data.name
|
|
||||||
dataObject.brand = data.brand
|
|
||||||
dataObject.from = data.from
|
|
||||||
dataObject.direction_quantity = data.direction_quantity
|
|
||||||
dataObject.dosage = data.dosage
|
|
||||||
dataObject.quantity = data.quantity
|
|
||||||
dataObject.refill_quantity = data.refill_quantity
|
|
||||||
dataObject.actions = ''
|
|
||||||
dataObject.id = data.id
|
|
||||||
dataObject.comments = data.comments
|
|
||||||
dataObject.direction_one = data.direction_one
|
|
||||||
dataObject.direction_two= data.direction_two
|
|
||||||
dataObject.status = data.status
|
|
||||||
|
|
||||||
dataObject.date = formatDateDate(data.created_at)
|
|
||||||
|
|
||||||
itemsPrescriptions.value.push(dataObject)
|
|
||||||
}
|
|
||||||
console.log(itemsPrescriptions.value)
|
|
||||||
itemsPrescriptions.value.sort((a, b) => {
|
|
||||||
return b.id - a.id;
|
|
||||||
});
|
|
||||||
console.log("OverviewItem", itemsPrescriptions.value);
|
|
||||||
};
|
|
||||||
const formatDateDate = (date) => {
|
|
||||||
const messageDate = new Date(date);
|
|
||||||
const options = {
|
|
||||||
year: 'numeric',
|
|
||||||
month: 'long',
|
|
||||||
day: 'numeric',
|
|
||||||
hour: '2-digit',
|
|
||||||
minute: '2-digit'
|
|
||||||
};
|
|
||||||
return messageDate.toLocaleDateString('en-US', options).replace(/\//g, '-');
|
|
||||||
};
|
|
||||||
const getStatusColor = (status) => {
|
|
||||||
switch (status) {
|
|
||||||
case 'pending':
|
|
||||||
return 'warning'; // Use Vuetify's warning color (typically yellow)
|
|
||||||
case 'shipped':
|
|
||||||
return '#45B8AC'; // Use Vuetify's primary color (typically blue)
|
|
||||||
case 'delivered':
|
|
||||||
return 'success';
|
|
||||||
case 'returned':
|
|
||||||
return 'red';
|
|
||||||
case 'results':
|
|
||||||
return 'blue';
|
|
||||||
default:
|
|
||||||
return 'grey'; // Use Vuetify's grey color for any other status
|
|
||||||
}
|
|
||||||
};
|
|
||||||
const resolveStatusVariant = status => {
|
|
||||||
if (status === 1)
|
|
||||||
return {
|
|
||||||
color: 'primary',
|
|
||||||
text: 'Current',
|
|
||||||
}
|
|
||||||
else if (status === 2)
|
|
||||||
return {
|
|
||||||
color: 'success',
|
|
||||||
text: 'Professional',
|
|
||||||
}
|
|
||||||
else if (status === 3)
|
|
||||||
return {
|
|
||||||
color: 'error',
|
|
||||||
text: 'Rejected',
|
|
||||||
}
|
|
||||||
else if (status === 4)
|
|
||||||
return {
|
|
||||||
color: 'warning',
|
|
||||||
text: 'Resigned',
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return {
|
|
||||||
color: 'info',
|
|
||||||
text: 'Applied',
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const headers = [
|
|
||||||
|
|
||||||
{
|
|
||||||
title: 'Name',
|
|
||||||
key: 'name',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Date',
|
|
||||||
key: 'date',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Status',
|
|
||||||
key: 'status',
|
|
||||||
},
|
|
||||||
]
|
|
||||||
const prescriptionIndex = ref([]);
|
|
||||||
const prescriptionItem = ref(-1)
|
|
||||||
const prescriptionDialog = ref(false)
|
|
||||||
const selectedItem = ref(null);
|
|
||||||
const showDetail = item => {
|
|
||||||
// console.log("id",item);
|
|
||||||
prescriptionIndex.value = item
|
|
||||||
selectedItem.value = item;
|
|
||||||
// console.log("index",prescriptionIndex.value);
|
|
||||||
// prescriptionItem.value = { ...item }
|
|
||||||
prescriptionDialog.value = true
|
|
||||||
}
|
|
||||||
const close = () => {
|
|
||||||
prescriptionDialog.value = false
|
|
||||||
prescriptionIndex.value = -1
|
|
||||||
prescriptionItem.value = { ...defaultItem.value }
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
|
||||||
<template>
|
|
||||||
|
|
||||||
<v-row>
|
|
||||||
<v-col cols="12" md="12" v-if="itemsPrescriptions">
|
|
||||||
<v-card title="Prescriptions" v-if="prescription">
|
|
||||||
<VCardText >
|
|
||||||
|
|
||||||
</VCardText>
|
|
||||||
<VDataTable
|
|
||||||
:headers="headers"
|
|
||||||
:items="itemsPrescriptions"
|
|
||||||
:items-per-page="5"
|
|
||||||
class="text-no-wrap"
|
|
||||||
>
|
|
||||||
|
|
||||||
<!-- full name -->
|
|
||||||
<!-- status -->
|
|
||||||
<template #item.status="{ item }">
|
|
||||||
<VChip
|
|
||||||
:color="getStatusColor(item.status)"
|
|
||||||
density="comfortable"
|
|
||||||
>
|
|
||||||
{{ item.status}}
|
|
||||||
</VChip>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<!-- Actions -->
|
|
||||||
<template #item.name="{ item }">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'admin-patient-profile', params: { id: item.id } }"
|
|
||||||
class="text-high-emphasis "
|
|
||||||
@click.prevent=showDetail(item)
|
|
||||||
>
|
|
||||||
{{ item.name }}
|
|
||||||
</router-link>
|
|
||||||
|
|
||||||
</template>
|
|
||||||
</VDataTable>
|
|
||||||
</v-card>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<VDialog
|
|
||||||
v-model="prescriptionDialog"
|
|
||||||
max-width="600px"
|
|
||||||
>
|
|
||||||
<VCard :title=prescriptionIndex.name>
|
|
||||||
<DialogCloseBtn
|
|
||||||
variant="text"
|
|
||||||
size="default"
|
|
||||||
@click="[prescriptionDialog = false,selectedItem = '']"
|
|
||||||
/>
|
|
||||||
<VCardText>
|
|
||||||
<v-row class='mt-0'>
|
|
||||||
<v-col cols="12" md="4" sm="6">
|
|
||||||
<p class='heading mb-0 text-right'><b>Brand:</b></p>
|
|
||||||
</v-col>
|
|
||||||
<v-col cols="12" md="4" sm="6">
|
|
||||||
<p>{{ prescriptionIndex.brand }}</p>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<VDivider></VDivider>
|
|
||||||
<v-row class='mt-1'>
|
|
||||||
<v-col cols="12" md="4" sm="6">
|
|
||||||
<p class='heading mb-0 text-right'><b>From:</b></p>
|
|
||||||
</v-col>
|
|
||||||
<v-col cols="12" md="4" sm="6">
|
|
||||||
<p>{{ prescriptionIndex.from }}</p>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<VDivider></VDivider>
|
|
||||||
<v-row class='mt-1'>
|
|
||||||
<v-col cols="12" md="4" sm="6">
|
|
||||||
<p class='heading mb-0 text-right'><b>Dosage:</b></p>
|
|
||||||
</v-col>
|
|
||||||
<v-col cols="12" md="4" sm="6">
|
|
||||||
<p>{{ prescriptionIndex.dosage }}</p>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<VDivider></VDivider>
|
|
||||||
<v-row class='mt-1'>
|
|
||||||
<v-col cols="12" md="4" sm="6">
|
|
||||||
<p class='heading mb-0 text-right'><b>Quantity:</b></p>
|
|
||||||
</v-col>
|
|
||||||
<v-col cols="12" md="4" sm="6">
|
|
||||||
<p>{{ prescriptionIndex.quantity }}</p>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<VDivider></VDivider>
|
|
||||||
<v-row class='mt-1'>
|
|
||||||
<v-col cols="12" md="4" sm="6">
|
|
||||||
<p class='heading mb-0 text-right'><b>Direction Quantity:</b></p>
|
|
||||||
</v-col>
|
|
||||||
<v-col cols="12" md="8" sm="6">
|
|
||||||
<p>{{ prescriptionIndex.direction_quantity }}</p>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<VDivider></VDivider>
|
|
||||||
<v-row class='mt-1'>
|
|
||||||
<v-col cols="12" md="4" sm="6">
|
|
||||||
<p class='heading mb-0 text-right'><b>Direction One:</b></p>
|
|
||||||
</v-col>
|
|
||||||
<v-col cols="12" md="8" sm="6">
|
|
||||||
<p>{{ prescriptionIndex.direction_one }} </p>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<VDivider></VDivider>
|
|
||||||
<v-row class='mt-1'>
|
|
||||||
<v-col cols="12" md="4" sm="6">
|
|
||||||
<p class='heading mb-0 text-right'><b>Direction Two:</b></p>
|
|
||||||
</v-col>
|
|
||||||
<v-col cols="12" md="8" sm="6">
|
|
||||||
<p>{{ prescriptionIndex.direction_two }} </p>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<VDivider></VDivider>
|
|
||||||
<v-row class='mt-1'>
|
|
||||||
<v-col cols="12" md="4" sm="6">
|
|
||||||
<p class='heading mb-0 text-right'><b>Refill Quantity:</b></p>
|
|
||||||
</v-col>
|
|
||||||
<v-col cols="12" md="8" sm="6">
|
|
||||||
<p>{{ prescriptionIndex.refill_quantity }}</p>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
</v-row>
|
|
||||||
<VDivider></VDivider>
|
|
||||||
<v-row class='mt-1'>
|
|
||||||
<v-col cols="12" md="4" sm="6">
|
|
||||||
<p class='heading mb-0 text-right'><b>Status:</b></p>
|
|
||||||
</v-col>
|
|
||||||
<v-col cols="12" md="8" sm="6">
|
|
||||||
<p v-if="prescriptionIndex.status == null" class="text-warning">Pending</p>
|
|
||||||
<p v-else>{{ prescriptionIndex.status }}</p>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<VDivider></VDivider>
|
|
||||||
<v-row class='mt-1 pb-0'>
|
|
||||||
<v-col cols="12" md="4" sm="6">
|
|
||||||
<p class='heading mb-0 text-right'><b>Comments:</b></p>
|
|
||||||
</v-col>
|
|
||||||
<v-col cols="12" md="8" sm="8">
|
|
||||||
<p>{{ prescriptionIndex.comments }} </p>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
</v-row>
|
|
||||||
|
|
||||||
</VCardText>
|
|
||||||
</VCard>
|
|
||||||
|
|
||||||
</VDialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
button.v-expansion-panel-title {
|
|
||||||
background-color: #003152 !important;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
button.v-expansion-panel-title.bg-secondary {
|
|
||||||
background-color: #003152 !important;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
button.v-expansion-panel-title {
|
|
||||||
background-color: #003152 !important;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
span.v-expansion-panel-title__icon {
|
|
||||||
color: #fff
|
|
||||||
}
|
|
||||||
|
|
||||||
// button.v-expansion-panel-title.bg-secondary {
|
|
||||||
// background-color: rgba(var(--v-theme-primary), var(--v-activated-opacity)) !important;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// button.v-expansion-panel-title {
|
|
||||||
// background-color: rgba(var(--v-theme-primary), var(--v-activated-opacity)) !important;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// button.v-expansion-panel-title.v-expansion-panel-title--active {
|
|
||||||
// background-color: rgba(var(--v-theme-primary), var(--v-activated-opacity)) !important;
|
|
||||||
// }
|
|
||||||
|
|
||||||
.v-expansion-panel {
|
|
||||||
overflow: hidden;
|
|
||||||
border-radius: 16px;
|
|
||||||
background-color: #fff;
|
|
||||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 10%);
|
|
||||||
margin-block-end: 10px;
|
|
||||||
transition: box-shadow 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.details {
|
|
||||||
position: relative;
|
|
||||||
box-sizing: content-box;
|
|
||||||
border: 2px solid #fff;
|
|
||||||
border-radius: 1em;
|
|
||||||
background-color: #696cff;
|
|
||||||
block-size: 0.85em;
|
|
||||||
box-shadow: 0 0 3px rgba(67, 89, 113, 80%);
|
|
||||||
color: #fff;
|
|
||||||
content: "+";
|
|
||||||
font-family: "Courier New", Courier, monospace;
|
|
||||||
font-weight: 500;
|
|
||||||
inline-size: 0.85em;
|
|
||||||
inset-block-start: 50%;
|
|
||||||
inset-block-start: 0.7em;
|
|
||||||
inset-inline-start: 50%;
|
|
||||||
line-height: 0.9em;
|
|
||||||
text-align: center;
|
|
||||||
transform: translate(-50%, -50%);
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,66 +0,0 @@
|
|||||||
<script setup>
|
|
||||||
import { computed, defineProps, onBeforeMount, ref } from 'vue';
|
|
||||||
import typeJson from '../patients/type_parse.json';
|
|
||||||
|
|
||||||
const allTypes = ref(typeJson);
|
|
||||||
const props = defineProps({
|
|
||||||
type: {
|
|
||||||
type: String,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
value: {
|
|
||||||
type: String,
|
|
||||||
required: false,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
const bgColor = ref(null)
|
|
||||||
const operator = {
|
|
||||||
c(obj, value) {
|
|
||||||
let keys = Object.keys(obj.values)
|
|
||||||
let prev = 0;
|
|
||||||
for (let key of keys) {
|
|
||||||
if (key > prev && key <= value) {
|
|
||||||
prev = key
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return obj.values[prev]
|
|
||||||
},
|
|
||||||
e(obj, value) {
|
|
||||||
|
|
||||||
return obj.values[value]
|
|
||||||
},
|
|
||||||
}
|
|
||||||
const progressValue = ref(0); // Initialize progress value with 0
|
|
||||||
const finalValue = computed(() => {
|
|
||||||
const singleObject = allTypes.value[props.type];
|
|
||||||
// console.log('singleObject', singleObject)
|
|
||||||
if (operator[singleObject.type](singleObject, props.value) > 0 && operator[singleObject.type](singleObject, props.value) <= 33) {
|
|
||||||
bgColor.value = 'success'
|
|
||||||
}
|
|
||||||
if (operator[singleObject.type](singleObject, props.value) > 33 && operator[singleObject.type](singleObject, props.value) <= 50) {
|
|
||||||
bgColor.value = 'yellow'
|
|
||||||
}
|
|
||||||
if (operator[singleObject.type](singleObject, props.value) > 50 && operator[singleObject.type](singleObject, props.value) <= 80) {
|
|
||||||
bgColor.value = 'warning'
|
|
||||||
}
|
|
||||||
if (operator[singleObject.type](singleObject, props.value) > 80 && operator[singleObject.type](singleObject, props.value) <= 100) {
|
|
||||||
bgColor.value = 'error'
|
|
||||||
}
|
|
||||||
return operator[singleObject.type](singleObject, props.value)
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
onBeforeMount(async () => {
|
|
||||||
await new Promise(resolve => {
|
|
||||||
setTimeout(() => {
|
|
||||||
progressValue.value = finalValue.value;
|
|
||||||
resolve();
|
|
||||||
}, 500); // Simulating some delay, you can replace this with your actual async logic
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<v-progress-linear :model-value="progressValue" :height="22" :color="bgColor"></v-progress-linear>
|
|
||||||
</template>
|
|
@ -1,79 +0,0 @@
|
|||||||
<script setup>
|
|
||||||
import Notes from '@/pages/pages/patient-meetings/notes.vue';
|
|
||||||
import Prescription from '@/pages/pages/patient-meetings/prescription.vue';
|
|
||||||
import moment from 'moment';
|
|
||||||
import { onMounted, ref } from 'vue';
|
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
|
||||||
import { useStore } from 'vuex';
|
|
||||||
const store = useStore();
|
|
||||||
const router = useRouter();
|
|
||||||
const route = useRoute();
|
|
||||||
const patientId = route.params.patient_id;
|
|
||||||
const appointmentId = route.params.id;
|
|
||||||
const currentTab = ref(0);
|
|
||||||
const appointmentID = ref();
|
|
||||||
const doctorName = ref();
|
|
||||||
const startTime = ref();
|
|
||||||
const endTime = ref();
|
|
||||||
const duration = ref();
|
|
||||||
const appointmentData = ref(null);
|
|
||||||
|
|
||||||
onMounted(async () => {
|
|
||||||
store.dispatch('updateIsLoading', true);
|
|
||||||
await store.dispatch('getAppointmentByIdAgent', {
|
|
||||||
patient_id: patientId,
|
|
||||||
appointment_id: appointmentId,
|
|
||||||
});
|
|
||||||
appointmentData.value = store.getters.getSinglePatientAppointment;
|
|
||||||
appointmentID.value = appointmentId;
|
|
||||||
doctorName.value = appointmentData.value.agent_name;
|
|
||||||
startTime.value = appointmentData.value.start_time;
|
|
||||||
endTime.value = appointmentData.value.end_time;
|
|
||||||
duration.value = totalCallDuration(startTime.value, endTime.value);
|
|
||||||
localStorage.setItem('meetingPatientAppointmentId', appointmentID.value);
|
|
||||||
store.dispatch('updateIsLoading', false);
|
|
||||||
});
|
|
||||||
|
|
||||||
const totalCallDuration = (start_time, end_time) => {
|
|
||||||
const startMoment = moment(start_time);
|
|
||||||
const endMoment = moment(end_time);
|
|
||||||
const duration = moment.duration(endMoment.diff(startMoment));
|
|
||||||
const hours = duration.hours();
|
|
||||||
const minutes = duration.minutes();
|
|
||||||
const seconds = duration.seconds();
|
|
||||||
return `${String(hours).padStart(2, '0')}:${String(minutes).padStart(2, '0')}:${String(seconds).padStart(2, '0')}`;
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<VCard>
|
|
||||||
<VCardText>
|
|
||||||
<h3 v-if="appointmentID"> #{{ appointmentID }} By {{ doctorName }} </h3>
|
|
||||||
<span> Meeting duration: <b>{{ duration }}</b></span>
|
|
||||||
</VCardText>
|
|
||||||
<div class="d-flex">
|
|
||||||
<div>
|
|
||||||
<VTabs v-model="currentTab" direction="vertical">
|
|
||||||
<VTab>
|
|
||||||
<VIcon start icon="tabler-edit" />
|
|
||||||
Notes
|
|
||||||
</VTab>
|
|
||||||
<VTab>
|
|
||||||
<VIcon start icon="tabler-lock" />
|
|
||||||
Prescriptions
|
|
||||||
</VTab>
|
|
||||||
</VTabs>
|
|
||||||
</div>
|
|
||||||
<VCardText>
|
|
||||||
<VWindow v-model="currentTab" class="ms-3">
|
|
||||||
<VWindowItem>
|
|
||||||
<Notes />
|
|
||||||
</VWindowItem>
|
|
||||||
<VWindowItem>
|
|
||||||
<Prescription />
|
|
||||||
</VWindowItem>
|
|
||||||
</VWindow>
|
|
||||||
</VCardText>
|
|
||||||
</div>
|
|
||||||
</VCard>
|
|
||||||
</template>
|
|
@ -1,206 +0,0 @@
|
|||||||
<script setup>
|
|
||||||
import moment from 'moment';
|
|
||||||
import { onBeforeMount, onMounted, onUnmounted, ref } from 'vue';
|
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
|
||||||
import { useStore } from 'vuex';
|
|
||||||
|
|
||||||
const store = useStore();
|
|
||||||
const router = useRouter();
|
|
||||||
const route = useRoute();
|
|
||||||
const editDialog = ref(false);
|
|
||||||
const deleteDialog = ref(false);
|
|
||||||
const search = ref('');
|
|
||||||
const appointmentId = ref('');
|
|
||||||
const defaultItem = ref({
|
|
||||||
id: -1,
|
|
||||||
avatar: '',
|
|
||||||
name: '',
|
|
||||||
email: '',
|
|
||||||
dob: '',
|
|
||||||
phone_no: '',
|
|
||||||
});
|
|
||||||
|
|
||||||
const editedItem = ref({ ...defaultItem.value });
|
|
||||||
const editedIndex = ref(-1);
|
|
||||||
const patientMeetingList = ref([]);
|
|
||||||
const isLoading = ref(false);
|
|
||||||
|
|
||||||
// Status options
|
|
||||||
const selectedOptions = [
|
|
||||||
{ text: 'Active', value: 1 },
|
|
||||||
{ text: 'InActive', value: 2 },
|
|
||||||
];
|
|
||||||
|
|
||||||
const refVForm = ref(null);
|
|
||||||
|
|
||||||
// Headers
|
|
||||||
const headers = [
|
|
||||||
// { title: 'Appointment Id', key: 'id' },
|
|
||||||
{ title: 'Patient', key: 'patient_name' },
|
|
||||||
// { key: 'appointment_date', sortable: false, title: 'Date' },
|
|
||||||
{ key: 'start_time', title: 'Start Time' },
|
|
||||||
{ key: 'end_time', title: 'End Time' },
|
|
||||||
{ key: 'duration', title: 'Duration' },
|
|
||||||
{ title: 'ACTIONS', key: 'actions' },
|
|
||||||
];
|
|
||||||
|
|
||||||
// Utility functions
|
|
||||||
function changeDateFormat(dateFormat) {
|
|
||||||
if (dateFormat) {
|
|
||||||
const [datePart, timePart] = dateFormat.split(' ');
|
|
||||||
const [year, month, day] = datePart.split('-');
|
|
||||||
// const formattedDate = `${parseInt(month)}-${parseInt(day)}-${year}`;
|
|
||||||
return `${formattedDate} ${timePart}`;
|
|
||||||
}
|
|
||||||
return dateFormat;
|
|
||||||
}
|
|
||||||
|
|
||||||
function changeFormat(dateFormat) {
|
|
||||||
const [year, month, day] = dateFormat.split('-');
|
|
||||||
return `${parseInt(month)}-${parseInt(day)}-${year}`;
|
|
||||||
}
|
|
||||||
|
|
||||||
function totalCallDuration(start_time, end_time) {
|
|
||||||
const startMoment = moment(start_time);
|
|
||||||
const endMoment = moment(end_time);
|
|
||||||
const duration = moment.duration(endMoment.diff(startMoment));
|
|
||||||
const hours = String(duration.hours()).padStart(2, '0');
|
|
||||||
const minutes = String(duration.minutes()).padStart(2, '0');
|
|
||||||
const seconds = String(duration.seconds()).padStart(2, '0');
|
|
||||||
|
|
||||||
if (hours === '00' && minutes === '00') {
|
|
||||||
return `00:00:${seconds}`;
|
|
||||||
} else if (hours === '00') {
|
|
||||||
return `00:${minutes}:${seconds}`;
|
|
||||||
} else {
|
|
||||||
return `${hours}:${minutes}:${seconds}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fetch and process the patient meeting list
|
|
||||||
const getPatientMeetingList = async () => {
|
|
||||||
store.dispatch('updateIsLoading', true);
|
|
||||||
await store.dispatch('patientMeetingList', { id: route.params.id });
|
|
||||||
store.dispatch('updateIsLoading', false);
|
|
||||||
|
|
||||||
let list = store.getters.getPatientMeetingList;
|
|
||||||
patientMeetingList.value = list.map(history => ({
|
|
||||||
...history,
|
|
||||||
appointment_date: changeFormat(history.appointment_date),
|
|
||||||
start_time: changeDateFormat(history.start_time),
|
|
||||||
end_time: changeDateFormat(history.end_time),
|
|
||||||
duration: totalCallDuration(history.start_time, history.end_time),
|
|
||||||
}));
|
|
||||||
console.log(list);
|
|
||||||
};
|
|
||||||
|
|
||||||
// Lifecycle hooks
|
|
||||||
onBeforeMount(() => {});
|
|
||||||
onMounted(async () => {
|
|
||||||
await getPatientMeetingList();
|
|
||||||
|
|
||||||
});
|
|
||||||
onUnmounted(() => {});
|
|
||||||
const historyDetail = (item, value) => {
|
|
||||||
console.log('item',item.id ,value)
|
|
||||||
if(value == 'notes')
|
|
||||||
router.push('/admin/patient/meeting/notes/' + route.params.id + '/' + item.id);
|
|
||||||
if(value == 'prescription')
|
|
||||||
router.push('/admin/patient/meeting/prescription/' + route.params.id + '/' + item.id);
|
|
||||||
}
|
|
||||||
const menusVariant = [
|
|
||||||
'primary'
|
|
||||||
];
|
|
||||||
const options = [
|
|
||||||
{
|
|
||||||
title: 'Notes',
|
|
||||||
key: 'notes',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Prescription',
|
|
||||||
key: 'prescription',
|
|
||||||
},
|
|
||||||
|
|
||||||
]
|
|
||||||
const breadcrums = [
|
|
||||||
{
|
|
||||||
title: 'Patient',
|
|
||||||
disabled: false,
|
|
||||||
to: '/admin/patients',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Meetings',
|
|
||||||
disabled: false,
|
|
||||||
}
|
|
||||||
|
|
||||||
];
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<v-breadcrumbs :items="breadcrums" class="text-primary pt-0 pb-0 mb-5">
|
|
||||||
<template v-slot:divider style="padding-top:0px; padding-bottom:0px">
|
|
||||||
>
|
|
||||||
</template>
|
|
||||||
</v-breadcrumbs>
|
|
||||||
<v-row>
|
|
||||||
<v-col cols="12" md="12">
|
|
||||||
<v-card title="Meetings">
|
|
||||||
<v-card-text>
|
|
||||||
<v-row>
|
|
||||||
<v-col cols="12" offset-md="8" md="4">
|
|
||||||
<v-text-field
|
|
||||||
v-model="search"
|
|
||||||
label="Search"
|
|
||||||
placeholder="Search ..."
|
|
||||||
append-inner-icon="ri-search-line"
|
|
||||||
single-line
|
|
||||||
hide-details
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
/>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
</v-card-text>
|
|
||||||
<v-data-table
|
|
||||||
:headers="headers"
|
|
||||||
:items="patientMeetingList"
|
|
||||||
:search="search"
|
|
||||||
:items-per-page="5"
|
|
||||||
class="text-no-wrap"
|
|
||||||
>
|
|
||||||
<template #item.id="{ item }">{{ item.id }}</template>
|
|
||||||
<template #item.duration="{ item }">{{ item.duration }}</template>
|
|
||||||
<!-- Actions -->
|
|
||||||
<template #item.actions="{ item }">
|
|
||||||
<div class="demo-space-x">
|
|
||||||
<VMenu
|
|
||||||
v-for="menu in menusVariant"
|
|
||||||
:key="menu"
|
|
||||||
>
|
|
||||||
<template #activator="{ props }">
|
|
||||||
|
|
||||||
<i class="ri-more-2-line cursor-pointer" style="font-size: 32px;" v-bind="props"></i>
|
|
||||||
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<v-list>
|
|
||||||
<v-list-item
|
|
||||||
v-for="opt in options"
|
|
||||||
:key="opt.value"
|
|
||||||
@click="historyDetail(item, opt.key)"
|
|
||||||
>
|
|
||||||
{{ opt.title }}
|
|
||||||
</v-list-item>
|
|
||||||
</v-list>
|
|
||||||
</VMenu>
|
|
||||||
</div>
|
|
||||||
<!-- <div class="d-flex gap-1">
|
|
||||||
<VBtn class="text-capitalize text-white" @click="historyDetail(item)"> Detail
|
|
||||||
</VBtn>
|
|
||||||
</div> -->
|
|
||||||
</template>
|
|
||||||
</v-data-table>
|
|
||||||
</v-card>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
</template>
|
|
@ -1,123 +0,0 @@
|
|||||||
<script setup>
|
|
||||||
import NotesPanel from '@/pages/patients/NotesPanel.vue'
|
|
||||||
import PatienTabOverview from '@/pages/patients/PatienTabOverview.vue'
|
|
||||||
import PatientBioPanel from '@/pages/patients/PatientBioPanel.vue'
|
|
||||||
import PatientLabTest from '@/pages/patients/PatientLabTest.vue'
|
|
||||||
import PatientQuestionProfile from '@/pages/patients/PatientQuestionProfile.vue'
|
|
||||||
import PrescriptionPanel from '@/pages/patients/PrescriptionPanel.vue'
|
|
||||||
|
|
||||||
import { useStore } from 'vuex'
|
|
||||||
const patientDtail = ref(null);
|
|
||||||
|
|
||||||
const store = useStore();
|
|
||||||
const route = useRoute('apps-user-view-id')
|
|
||||||
const userTab = ref(null)
|
|
||||||
|
|
||||||
const tabs = [
|
|
||||||
{
|
|
||||||
icon: 'ri-group-line',
|
|
||||||
title: 'Overview',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: 'ri-lock-2-line',
|
|
||||||
title: 'Notes',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: 'ri-bookmark-line',
|
|
||||||
title: 'Prescriptions',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: 'ri-flask-line',
|
|
||||||
title: 'Lab Test',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: 'ri-survey-line',
|
|
||||||
title: 'Profile',
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// icon: 'ri-link-m',
|
|
||||||
// title: 'Connections',
|
|
||||||
// },
|
|
||||||
]
|
|
||||||
const getPatientDeatail = async () => {
|
|
||||||
store.dispatch('updateIsLoading', true);
|
|
||||||
await store.dispatch('patientDetial', { id: route.params.id });
|
|
||||||
store.dispatch('updateIsLoading', false);
|
|
||||||
|
|
||||||
let list = store.getters.getPatientDetail;
|
|
||||||
patientDtail.value=list
|
|
||||||
console.log(list.patient);
|
|
||||||
};
|
|
||||||
onMounted(async () => {
|
|
||||||
await getPatientDeatail();
|
|
||||||
|
|
||||||
});
|
|
||||||
//const { data: userData } = await useApi(`/apps/users/${ route.params.id }`)
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<VRow v-if="patientDtail">
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
md="5"
|
|
||||||
lg="4"
|
|
||||||
>
|
|
||||||
<PatientBioPanel :user-data="patientDtail" />
|
|
||||||
</VCol>
|
|
||||||
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
md="7"
|
|
||||||
lg="8"
|
|
||||||
>
|
|
||||||
<VTabs
|
|
||||||
v-model="userTab"
|
|
||||||
class="v-tabs-pill"
|
|
||||||
>
|
|
||||||
<VTab
|
|
||||||
v-for="tab in tabs"
|
|
||||||
:key="tab.icon"
|
|
||||||
>
|
|
||||||
<VIcon
|
|
||||||
start
|
|
||||||
:icon="tab.icon"
|
|
||||||
/>
|
|
||||||
<span>{{ tab.title }}</span>
|
|
||||||
</VTab>
|
|
||||||
</VTabs>
|
|
||||||
|
|
||||||
<VWindow
|
|
||||||
v-model="userTab"
|
|
||||||
class="mt-6 disable-tab-transition"
|
|
||||||
:touch="false"
|
|
||||||
>
|
|
||||||
<VWindowItem>
|
|
||||||
<PatienTabOverview :user-data="patientDtail"/>
|
|
||||||
</VWindowItem>
|
|
||||||
|
|
||||||
<VWindowItem>
|
|
||||||
<NotesPanel :notes-data="patientDtail"/>
|
|
||||||
</VWindowItem>
|
|
||||||
|
|
||||||
<VWindowItem>
|
|
||||||
<PrescriptionPanel :prescription-data="patientDtail"/>
|
|
||||||
</VWindowItem>
|
|
||||||
|
|
||||||
<VWindowItem>
|
|
||||||
<PatientLabTest :user-data="patientDtail"/>
|
|
||||||
</VWindowItem>
|
|
||||||
|
|
||||||
<VWindowItem>
|
|
||||||
<PatientQuestionProfile />
|
|
||||||
</VWindowItem>
|
|
||||||
|
|
||||||
|
|
||||||
</VWindow>
|
|
||||||
</VCol>
|
|
||||||
</VRow>
|
|
||||||
<VCard v-else>
|
|
||||||
<VCardTitle class="text-center">
|
|
||||||
No User Found
|
|
||||||
</VCardTitle>
|
|
||||||
</VCard>
|
|
||||||
</template>
|
|
@ -1,662 +0,0 @@
|
|||||||
<script setup>
|
|
||||||
import { onBeforeMount, onMounted, onUnmounted } from 'vue';
|
|
||||||
import { useRouter } from 'vue-router';
|
|
||||||
import { useStore } from 'vuex';
|
|
||||||
const store = useStore()
|
|
||||||
// const route = useRoute()
|
|
||||||
const router = useRouter()
|
|
||||||
const editDialog = ref(false)
|
|
||||||
const deleteDialog = ref(false)
|
|
||||||
const search = ref('')
|
|
||||||
const defaultItem = ref({
|
|
||||||
id: -1,
|
|
||||||
avatar: '',
|
|
||||||
name: '',
|
|
||||||
email: '',
|
|
||||||
dob: '',
|
|
||||||
phone_no: '',
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
const editedItem = ref(defaultItem.value)
|
|
||||||
const editedIndex = ref(-1)
|
|
||||||
const patientList = ref([])
|
|
||||||
const subcriptionLists = ref(['All'])
|
|
||||||
const isLoading=ref(false)
|
|
||||||
|
|
||||||
const filter = ref({
|
|
||||||
gender: 'All',
|
|
||||||
state: 'all',
|
|
||||||
plan: 'all',
|
|
||||||
})
|
|
||||||
// const gender =ref();
|
|
||||||
// const city =ref();
|
|
||||||
// const plan =ref();
|
|
||||||
// status options
|
|
||||||
const selectedOptions = [
|
|
||||||
{
|
|
||||||
text: 'Active',
|
|
||||||
value: 1,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: 'InActive',
|
|
||||||
value: 2,
|
|
||||||
},
|
|
||||||
|
|
||||||
]
|
|
||||||
|
|
||||||
const refVForm = ref(null)
|
|
||||||
|
|
||||||
onBeforeMount(async () => {});
|
|
||||||
onMounted(async () => {
|
|
||||||
store.dispatch('updateIsLoading', true)
|
|
||||||
await store.dispatch('getSubcriptions')
|
|
||||||
await store.dispatch('patientList')
|
|
||||||
// console.log('patientList',store.getters.getPatientList)
|
|
||||||
// patientList.value = store.getters.getPatientList
|
|
||||||
store.dispatch('updateIsLoading', false)
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
const getPatientFilter = async() => {
|
|
||||||
console.log("filter", filter.value.plan, filter.value.gender, filter.value.state);
|
|
||||||
|
|
||||||
|
|
||||||
await store.dispatch('PatientFilter', {
|
|
||||||
plan: filter.value.plan,
|
|
||||||
gender: filter.value.gender.toLowerCase(),
|
|
||||||
state: filter.value.state,
|
|
||||||
})
|
|
||||||
store.dispatch('updateIsLoading', false)
|
|
||||||
}
|
|
||||||
|
|
||||||
const getPatientList = computed(async () => {
|
|
||||||
subcriptionLists.value = [];
|
|
||||||
patientList.value = [];
|
|
||||||
subcriptionLists.value = store.getters.getSubcriptions;
|
|
||||||
const allIndex = subcriptionLists.value.findIndex(sub => sub.title.toLowerCase() === 'all');
|
|
||||||
|
|
||||||
// If "All" exists, move it to the beginning
|
|
||||||
if (allIndex !== -1) {
|
|
||||||
const all = subcriptionLists.value.splice(allIndex, 1)[0];
|
|
||||||
subcriptionLists.value.unshift(all);
|
|
||||||
} else {
|
|
||||||
// If "All" doesn't exist, create it and prepend it
|
|
||||||
subcriptionLists.value.unshift({ title: 'All', slug: 'all' });
|
|
||||||
}
|
|
||||||
console.log("subcriptin",subcriptionLists.value);
|
|
||||||
patientList.value = store.getters.getPatientList.map(history => ({
|
|
||||||
...history,
|
|
||||||
dob: changeFormat(history.dob),
|
|
||||||
}));
|
|
||||||
return patientList.value
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
onUnmounted(async () => {});
|
|
||||||
const formatPhoneNumber = () => {
|
|
||||||
console.log(editedItem.value)
|
|
||||||
// Remove non-numeric characters from the input
|
|
||||||
const numericValue = editedItem.value.phone_no.replace(/\D/g, '');
|
|
||||||
|
|
||||||
// Apply formatting logic
|
|
||||||
if (numericValue.length <= 10) {
|
|
||||||
editedItem.value.phone_no = numericValue.replace(/(\d{3})(\d{3})(\d{4})/, '($1) $2-$3');
|
|
||||||
} else {
|
|
||||||
// Limit the input to a maximum of 14 characters
|
|
||||||
const truncatedValue = numericValue.slice(0, 10);
|
|
||||||
editedItem.value.phone_no = truncatedValue.replace(/(\d{3})(\d{3})(\d{4})/, '($1) $2-$3');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
// headers
|
|
||||||
const headers = [
|
|
||||||
{
|
|
||||||
title: 'ID',
|
|
||||||
key: 'id',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'NAME',
|
|
||||||
key: 'name',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'EMAIL',
|
|
||||||
key: 'email',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 'dob',
|
|
||||||
title: 'Date Of Birth'
|
|
||||||
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Phone',
|
|
||||||
key: 'phone_no',
|
|
||||||
},
|
|
||||||
|
|
||||||
// {
|
|
||||||
// title: 'Lab Kit',
|
|
||||||
// key: 'labkit',
|
|
||||||
// },
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// {
|
|
||||||
// title: 'ACTIONS',
|
|
||||||
// key: 'actions',
|
|
||||||
// },
|
|
||||||
]
|
|
||||||
|
|
||||||
const resolveStatusVariant = status => {
|
|
||||||
if (status === 1)
|
|
||||||
return {
|
|
||||||
color: 'primary',
|
|
||||||
text: 'Current',
|
|
||||||
}
|
|
||||||
else if (status === 2)
|
|
||||||
return {
|
|
||||||
color: 'success',
|
|
||||||
text: 'Professional',
|
|
||||||
}
|
|
||||||
else if (status === 3)
|
|
||||||
return {
|
|
||||||
color: 'error',
|
|
||||||
text: 'Rejected',
|
|
||||||
}
|
|
||||||
else if (status === 4)
|
|
||||||
return {
|
|
||||||
color: 'warning',
|
|
||||||
text: 'Resigned',
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return {
|
|
||||||
color: 'info',
|
|
||||||
text: 'Applied',
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const editItem = item => {
|
|
||||||
editedIndex.value = patientList.value.indexOf(item)
|
|
||||||
editedItem.value = { ...item }
|
|
||||||
editDialog.value = true
|
|
||||||
}
|
|
||||||
|
|
||||||
const deleteItem = item => {
|
|
||||||
console.log('del',item)
|
|
||||||
editedIndex.value = patientList.value.indexOf(item)
|
|
||||||
editedItem.value = { ...item }
|
|
||||||
deleteDialog.value = true
|
|
||||||
}
|
|
||||||
|
|
||||||
const close = () => {
|
|
||||||
editDialog.value = false
|
|
||||||
editedIndex.value = -1
|
|
||||||
editedItem.value = { ...defaultItem.value }
|
|
||||||
}
|
|
||||||
|
|
||||||
const closeDelete = () => {
|
|
||||||
deleteDialog.value = false
|
|
||||||
editedIndex.value = -1
|
|
||||||
editedItem.value = { ...defaultItem.value }
|
|
||||||
}
|
|
||||||
|
|
||||||
const getMettings = (Item) => {
|
|
||||||
router.push('/admin/patient/meetings/'+Item.id);
|
|
||||||
}
|
|
||||||
|
|
||||||
const save = async () => {
|
|
||||||
const { valid } = await refVForm.value.validate()
|
|
||||||
console.log(valid)
|
|
||||||
if (valid) {
|
|
||||||
console.log('editedItem.value',editedItem.value);
|
|
||||||
if (editedIndex.value > -1)
|
|
||||||
{
|
|
||||||
await store.dispatch('patientUpdate',{
|
|
||||||
id: editedItem.value.id,
|
|
||||||
first_name: editedItem.value.first_name,
|
|
||||||
last_name: editedItem.value.last_name,
|
|
||||||
email: editedItem.value.email,
|
|
||||||
phone_no: editedItem.value.phone_no,
|
|
||||||
dob: editedItem.value.dob,
|
|
||||||
})
|
|
||||||
Object.assign(patientList.value[editedIndex.value], editedItem.value)
|
|
||||||
}else{
|
|
||||||
patientList.value.push(editedItem.value)
|
|
||||||
}
|
|
||||||
close()
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
const states = ref([
|
|
||||||
{ name: 'Alabama', abbreviation: 'AL' },
|
|
||||||
{ name: 'Alaska', abbreviation: 'AK' },
|
|
||||||
{ name: 'Arizona', abbreviation: 'AZ' },
|
|
||||||
{ name: 'Arkansas', abbreviation: 'AR' },
|
|
||||||
{ name: 'Howland Island', abbreviation: 'UM-84' },
|
|
||||||
{ name: 'Delaware', abbreviation: 'DE' },
|
|
||||||
{ name: 'Maryland', abbreviation: 'MD' },
|
|
||||||
{ name: 'Baker Island', abbreviation: 'UM-81' },
|
|
||||||
{ name: 'Kingman Reef', abbreviation: 'UM-89' },
|
|
||||||
{ name: 'New Hampshire', abbreviation: 'NH' },
|
|
||||||
{ name: 'Wake Island', abbreviation: 'UM-79' },
|
|
||||||
{ name: 'Kansas', abbreviation: 'KS' },
|
|
||||||
{ name: 'Texas', abbreviation: 'TX' },
|
|
||||||
{ name: 'Nebraska', abbreviation: 'NE' },
|
|
||||||
{ name: 'Vermont', abbreviation: 'VT' },
|
|
||||||
{ name: 'Jarvis Island', abbreviation: 'UM-86' },
|
|
||||||
{ name: 'Hawaii', abbreviation: 'HI' },
|
|
||||||
{ name: 'Guam', abbreviation: 'GU' },
|
|
||||||
{ name: 'United States Virgin Islands', abbreviation: 'VI' },
|
|
||||||
{ name: 'Utah', abbreviation: 'UT' },
|
|
||||||
{ name: 'Oregon', abbreviation: 'OR' },
|
|
||||||
{ name: 'California', abbreviation: 'CA' },
|
|
||||||
{ name: 'New Jersey', abbreviation: 'NJ' },
|
|
||||||
{ name: 'North Dakota', abbreviation: 'ND' },
|
|
||||||
{ name: 'Kentucky', abbreviation: 'KY' },
|
|
||||||
{ name: 'Minnesota', abbreviation: 'MN' },
|
|
||||||
{ name: 'Oklahoma', abbreviation: 'OK' },
|
|
||||||
{ name: 'Pennsylvania', abbreviation: 'PA' },
|
|
||||||
{ name: 'New Mexico', abbreviation: 'NM' },
|
|
||||||
{ name: 'American Samoa', abbreviation: 'AS' },
|
|
||||||
{ name: 'Illinois', abbreviation: 'IL' },
|
|
||||||
{ name: 'Michigan', abbreviation: 'MI' },
|
|
||||||
{ name: 'Virginia', abbreviation: 'VA' },
|
|
||||||
{ name: 'Johnston Atoll', abbreviation: 'UM-67' },
|
|
||||||
{ name: 'West Virginia', abbreviation: 'WV' },
|
|
||||||
{ name: 'Mississippi', abbreviation: 'MS' },
|
|
||||||
{ name: 'Northern Mariana Islands', abbreviation: 'MP' },
|
|
||||||
{ name: 'United States Minor Outlying Islands', abbreviation: 'UM' },
|
|
||||||
{ name: 'Massachusetts', abbreviation: 'MA' },
|
|
||||||
{ name: 'Connecticut', abbreviation: 'CT' },
|
|
||||||
{ name: 'Florida', abbreviation: 'FL' },
|
|
||||||
{ name: 'District of Columbia', abbreviation: 'DC' },
|
|
||||||
{ name: 'Midway Atoll', abbreviation: 'UM-71' },
|
|
||||||
{ name: 'Navassa Island', abbreviation: 'UM-76' },
|
|
||||||
{ name: 'Indiana', abbreviation: 'IN' },
|
|
||||||
{ name: 'Wisconsin', abbreviation: 'WI' },
|
|
||||||
{ name: 'Wyoming', abbreviation: 'WY' },
|
|
||||||
{ name: 'South Carolina', abbreviation: 'SC' },
|
|
||||||
{ name: 'Arkansas', abbreviation: 'AR' },
|
|
||||||
{ name: 'South Dakota', abbreviation: 'SD' },
|
|
||||||
{ name: 'Montana', abbreviation: 'MT' },
|
|
||||||
{ name: 'North Carolina', abbreviation: 'NC' },
|
|
||||||
{ name: 'Palmyra Atoll', abbreviation: 'UM-95' },
|
|
||||||
{ name: 'Puerto Rico', abbreviation: 'PR' },
|
|
||||||
{ name: 'Colorado', abbreviation: 'CO' },
|
|
||||||
{ name: 'Missouri', abbreviation: 'MO' },
|
|
||||||
{ name: 'New York', abbreviation: 'NY' },
|
|
||||||
{ name: 'Maine', abbreviation: 'ME' },
|
|
||||||
{ name: 'Tennessee', abbreviation: 'TN' },
|
|
||||||
{ name: 'Georgia', abbreviation: 'GA' },
|
|
||||||
{ name: 'Louisiana', abbreviation: 'LA' },
|
|
||||||
{ name: 'Nevada', abbreviation: 'NV' },
|
|
||||||
{ name: 'Iowa', abbreviation: 'IA' },
|
|
||||||
{ name: 'Idaho', abbreviation: 'ID' },
|
|
||||||
{ name: 'Rhode Island', abbreviation: 'RI' },
|
|
||||||
{ name: 'Washington', abbreviation: 'WA' },
|
|
||||||
{ name: 'Ohio', abbreviation: 'OH' },
|
|
||||||
{ name: 'All', abbreviation: 'all' },
|
|
||||||
// ... (add the rest of the states)
|
|
||||||
]);
|
|
||||||
|
|
||||||
const sortedStates = computed(() => {
|
|
||||||
const sorted = states.value.slice().sort((a, b) => {
|
|
||||||
// Move "All" to the beginning
|
|
||||||
if (a.name === 'All') return -1;
|
|
||||||
if (b.name === 'all') return 1;
|
|
||||||
// Sort other states alphabetically
|
|
||||||
return a.name.localeCompare(b.name);
|
|
||||||
});
|
|
||||||
return sorted;
|
|
||||||
});
|
|
||||||
|
|
||||||
const deleteItemConfirm = async () => {
|
|
||||||
console.log('editedIndex.value',editedIndex.value,editedItem.value.id)
|
|
||||||
await store.dispatch('patientDelete',{
|
|
||||||
id: editedItem.value.id
|
|
||||||
})
|
|
||||||
patientList.value.splice(editedIndex.value, 1)
|
|
||||||
closeDelete()
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function changeFormat(dateFormat) {
|
|
||||||
const dateParts = dateFormat.split('-'); // Assuming date is in yyyy-mm-dd format
|
|
||||||
const year = parseInt(dateParts[0]);
|
|
||||||
const month = parseInt(dateParts[1]); // No need for padding
|
|
||||||
const day = parseInt(dateParts[2]); // No need for padding
|
|
||||||
|
|
||||||
// Create a new Date object with the parsed values
|
|
||||||
const date = new Date(year, month - 1, day); // Month is zero-based in JavaScript Date object
|
|
||||||
|
|
||||||
// Format the date as mm-dd-yyyy
|
|
||||||
const formattedDate = month + '-' + day + '-' + date.getFullYear();
|
|
||||||
// console.log("formattedDate",formattedDate)
|
|
||||||
return formattedDate;
|
|
||||||
}
|
|
||||||
const LabKit = (item)=> {
|
|
||||||
router.push('/admin/patients/labkit/'+item.id);
|
|
||||||
}
|
|
||||||
|
|
||||||
const onSubcriptionChange = async(newvalue)=> {
|
|
||||||
filter.value.plan = newvalue;
|
|
||||||
console.log("Plan",filter.value.plan );
|
|
||||||
await getPatientFilter();
|
|
||||||
|
|
||||||
}
|
|
||||||
const onGenderChange = async(newvalue)=> {
|
|
||||||
filter.value.gender = newvalue;
|
|
||||||
console.log("gender",filter.value.gender);
|
|
||||||
await getPatientFilter();
|
|
||||||
|
|
||||||
}
|
|
||||||
const onStateChange = async(newvalue)=> {
|
|
||||||
filter.value.state = newvalue;
|
|
||||||
console.log("state",filter.value.state);
|
|
||||||
await getPatientFilter();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<v-row>
|
|
||||||
<v-col cols="12" md="12" v-if="getPatientList">
|
|
||||||
<v-card title="Patients">
|
|
||||||
<VCardText >
|
|
||||||
<VRow>
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
|
|
||||||
md="3"
|
|
||||||
>
|
|
||||||
<VSelect
|
|
||||||
v-model="filter.plan"
|
|
||||||
label="Subcription"
|
|
||||||
placeholder="Subcription"
|
|
||||||
density="comfortable"
|
|
||||||
:items="subcriptionLists"
|
|
||||||
item-title="title"
|
|
||||||
item-value="slug"
|
|
||||||
@update:model-value="onSubcriptionChange"
|
|
||||||
/>
|
|
||||||
|
|
||||||
|
|
||||||
</VCol>
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
|
|
||||||
md="3"
|
|
||||||
>
|
|
||||||
|
|
||||||
<VSelect
|
|
||||||
v-model="filter.gender"
|
|
||||||
label="Gender"
|
|
||||||
placeholder="Gender"
|
|
||||||
density="comfortable"
|
|
||||||
:items="['All','Male', 'Female']"
|
|
||||||
@update:model-value="onGenderChange"
|
|
||||||
|
|
||||||
/>
|
|
||||||
|
|
||||||
</VCol>
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
|
|
||||||
md="3"
|
|
||||||
>
|
|
||||||
<VSelect
|
|
||||||
v-model="filter.state"
|
|
||||||
label="State"
|
|
||||||
density="comfortable"
|
|
||||||
:items="sortedStates"
|
|
||||||
item-title="name"
|
|
||||||
item-value="abbreviation"
|
|
||||||
@update:model-value="onStateChange"
|
|
||||||
|
|
||||||
/>
|
|
||||||
|
|
||||||
</VCol>
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
|
|
||||||
md="3"
|
|
||||||
>
|
|
||||||
<VTextField
|
|
||||||
v-model="search"
|
|
||||||
label="Search"
|
|
||||||
placeholder="Search ..."
|
|
||||||
append-inner-icon="ri-search-line"
|
|
||||||
single-line
|
|
||||||
hide-details
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
</VRow>
|
|
||||||
</VCardText>
|
|
||||||
<VDataTable
|
|
||||||
:headers="headers"
|
|
||||||
:items="patientList"
|
|
||||||
:search="search"
|
|
||||||
:items-per-page="5"
|
|
||||||
class="text-no-wrap"
|
|
||||||
>
|
|
||||||
<template #item.id="{ item }">
|
|
||||||
{{ item.id }}
|
|
||||||
</template>
|
|
||||||
<!-- full name -->
|
|
||||||
<template #item.name="{ item }">
|
|
||||||
<div class="d-flex align-center">
|
|
||||||
<!-- avatar -->
|
|
||||||
<VAvatar
|
|
||||||
size="32"
|
|
||||||
:color="item.avatar ? '' : 'primary'"
|
|
||||||
:class="item.avatar ? '' : 'v-avatar-light-bg primary--text'"
|
|
||||||
:variant="!item.avatar ? 'tonal' : undefined"
|
|
||||||
>
|
|
||||||
<VImg
|
|
||||||
v-if="item.avatar"
|
|
||||||
:src="item.avatar"
|
|
||||||
/>
|
|
||||||
<span
|
|
||||||
v-else
|
|
||||||
class="text-sm"
|
|
||||||
>{{ avatarText(item.name) }}</span>
|
|
||||||
</VAvatar>
|
|
||||||
|
|
||||||
<div class="d-flex flex-column ms-3">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'admin-patient-profile', params: { id: item.id } }"
|
|
||||||
class="highlighted"
|
|
||||||
>
|
|
||||||
<span class="d-block font-weight-medium text-truncate">{{ item.name }}</span>
|
|
||||||
</router-link>
|
|
||||||
<small>{{ item.post }}</small>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- status -->
|
|
||||||
<template #item.status="{ item }">
|
|
||||||
<VChip
|
|
||||||
:color="resolveStatusVariant(item.status).color"
|
|
||||||
density="comfortable"
|
|
||||||
>
|
|
||||||
{{ resolveStatusVariant(item.status).text }}
|
|
||||||
</VChip>
|
|
||||||
</template>
|
|
||||||
<template #item.labkit="{ item }">
|
|
||||||
<div class="text-primary cursor-pointer" @click="LabKit(item)"> LabKits</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<!-- Actions -->
|
|
||||||
<template #item.actions="{ item }">
|
|
||||||
<div class="d-flex gap-1">
|
|
||||||
<IconBtn
|
|
||||||
size="small"
|
|
||||||
@click="editItem(item)"
|
|
||||||
>
|
|
||||||
<VIcon icon="ri-pencil-line" />
|
|
||||||
</IconBtn>
|
|
||||||
<IconBtn
|
|
||||||
size="small"
|
|
||||||
@click="deleteItem(item)"
|
|
||||||
>
|
|
||||||
<VIcon icon="ri-delete-bin-line" />
|
|
||||||
</IconBtn>
|
|
||||||
<IconBtn
|
|
||||||
size="small"
|
|
||||||
@click="getMettings(item)"
|
|
||||||
>
|
|
||||||
<VIcon icon="ri-time-line" />
|
|
||||||
</IconBtn>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</VDataTable>
|
|
||||||
</v-card>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<!-- 👉 Edit Dialog -->
|
|
||||||
<VDialog
|
|
||||||
v-model="editDialog"
|
|
||||||
max-width="600px"
|
|
||||||
>
|
|
||||||
<VForm ref="refVForm" >
|
|
||||||
<VCard>
|
|
||||||
<VCardTitle>
|
|
||||||
<span class="headline">Edit Patient</span>
|
|
||||||
</VCardTitle>
|
|
||||||
|
|
||||||
<VCardText>
|
|
||||||
<VContainer >
|
|
||||||
|
|
||||||
<VRow>
|
|
||||||
<!-- fullName -->
|
|
||||||
<VCol cols="12" md="6">
|
|
||||||
<VTextField
|
|
||||||
v-model="editedItem.first_name"
|
|
||||||
label="First Name"
|
|
||||||
:rules="[requiredFirstName]"
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
<VCol cols="12" md="6">
|
|
||||||
<VTextField
|
|
||||||
v-model="editedItem.last_name"
|
|
||||||
label="Last Name"
|
|
||||||
:rules="[requiredLastName]"
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
|
|
||||||
<!-- email -->
|
|
||||||
<VCol cols="12" sm="6" md="12">
|
|
||||||
<VTextField
|
|
||||||
v-model="editedItem.email"
|
|
||||||
label="Email"
|
|
||||||
:rules="[requiredEmail, emailValidator]"
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
|
|
||||||
|
|
||||||
<VCol cols="12" sm="6" md="12">
|
|
||||||
<VTextField
|
|
||||||
v-model="editedItem.dob" type="date"
|
|
||||||
label="Date Of Birth"
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
<VCol cols="12" sm="6" md="12">
|
|
||||||
<VTextField v-model="editedItem.phone_no" label="Phone Number" pattern="^\(\d{3}\) \d{3}-\d{4}$"
|
|
||||||
:rules="[requiredPhone, validUSAPhone]" placeholder="i.e. (000) 000-0000"
|
|
||||||
@input="formatPhoneNumber" max="14" density="comfortable" />
|
|
||||||
</VCol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- status -->
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
|
|
||||||
md="12"
|
|
||||||
>
|
|
||||||
<VSelect
|
|
||||||
v-model="editedItem.status"
|
|
||||||
:items="selectedOptions"
|
|
||||||
item-title="text"
|
|
||||||
item-value="value"
|
|
||||||
label="Status"
|
|
||||||
variant="outlined"
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
</VRow>
|
|
||||||
</VContainer>
|
|
||||||
</VCardText>
|
|
||||||
|
|
||||||
<VCardActions>
|
|
||||||
<VSpacer />
|
|
||||||
|
|
||||||
<VBtn
|
|
||||||
color="error"
|
|
||||||
variant="outlined"
|
|
||||||
@click="close"
|
|
||||||
>
|
|
||||||
Cancel
|
|
||||||
</VBtn>
|
|
||||||
|
|
||||||
<VBtn
|
|
||||||
color="success"
|
|
||||||
variant="elevated"
|
|
||||||
@click="save"
|
|
||||||
>
|
|
||||||
Save
|
|
||||||
</VBtn>
|
|
||||||
|
|
||||||
</VCardActions>
|
|
||||||
</VCard>
|
|
||||||
</VForm>
|
|
||||||
</VDialog>
|
|
||||||
|
|
||||||
<!-- 👉 Delete Dialog -->
|
|
||||||
<VDialog
|
|
||||||
v-model="deleteDialog"
|
|
||||||
max-width="500px"
|
|
||||||
>
|
|
||||||
<VCard>
|
|
||||||
<VCardTitle>
|
|
||||||
Are you sure you want to delete this item?
|
|
||||||
</VCardTitle>
|
|
||||||
|
|
||||||
<VCardActions>
|
|
||||||
<VSpacer />
|
|
||||||
|
|
||||||
<VBtn
|
|
||||||
color="error"
|
|
||||||
variant="outlined"
|
|
||||||
@click="closeDelete"
|
|
||||||
>
|
|
||||||
Cancel
|
|
||||||
</VBtn>
|
|
||||||
|
|
||||||
<VBtn
|
|
||||||
color="success"
|
|
||||||
variant="elevated"
|
|
||||||
@click="deleteItemConfirm"
|
|
||||||
>
|
|
||||||
OK
|
|
||||||
</VBtn>
|
|
||||||
|
|
||||||
<VSpacer />
|
|
||||||
</VCardActions>
|
|
||||||
</VCard>
|
|
||||||
</VDialog>
|
|
||||||
</template>
|
|
||||||
<style scoped>
|
|
||||||
.highlighted {
|
|
||||||
/* Add your desired highlighting styles here */
|
|
||||||
font-weight: bold;
|
|
||||||
color: #a169ff; /* or any other color you prefer */
|
|
||||||
}
|
|
||||||
</style>
|
|
File diff suppressed because it is too large
Load Diff
@ -1,43 +0,0 @@
|
|||||||
{
|
|
||||||
"bp_match": {
|
|
||||||
"type": "c",
|
|
||||||
"values": {
|
|
||||||
"0": 100,
|
|
||||||
"60": 80,
|
|
||||||
"70": 60
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"exact_match": {
|
|
||||||
"type": "e",
|
|
||||||
"values": {
|
|
||||||
"yes": 100,
|
|
||||||
"no": 2,
|
|
||||||
"high": 2,
|
|
||||||
"never": 2,
|
|
||||||
"almost_never": 30,
|
|
||||||
"occasionally": 66,
|
|
||||||
"almost_always": 75,
|
|
||||||
"always": 100,
|
|
||||||
"very_much": 66,
|
|
||||||
"a_lot": 100,
|
|
||||||
"a_little": 30,
|
|
||||||
"not_at_all": 2,
|
|
||||||
"not_applicable": 2,
|
|
||||||
"rarely": 30,
|
|
||||||
"sometimes": 66,
|
|
||||||
"often": 75,
|
|
||||||
"unsure": 2,
|
|
||||||
"less_than_6_hrs": 100,
|
|
||||||
"six_to_eight_hrs": 66,
|
|
||||||
"more_than_eight": 33,
|
|
||||||
"before_penetrate": 100,
|
|
||||||
"ejaculate_early": 66,
|
|
||||||
"no_issue_with_ejaculation": 2,
|
|
||||||
"no_issue": 2,
|
|
||||||
"usually_difficult": 100,
|
|
||||||
"low": 100,
|
|
||||||
"medium": 66,
|
|
||||||
"none_of_above_them": 2
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,817 +0,0 @@
|
|||||||
<script setup>
|
|
||||||
import { useStore } from 'vuex';
|
|
||||||
const store = useStore()
|
|
||||||
const editDialog = ref(false)
|
|
||||||
const addDialog = ref(false)
|
|
||||||
const deleteDialog = ref(false)
|
|
||||||
const search = ref('')
|
|
||||||
const refVForm = ref(null)
|
|
||||||
const refVFormAdd = ref(null)
|
|
||||||
const selectDropdown = ref(false)
|
|
||||||
const selectdataList = ref(null)
|
|
||||||
const defaultItem = ref({
|
|
||||||
id: -1,
|
|
||||||
title: '',
|
|
||||||
slug: '',
|
|
||||||
list_one_title: '',
|
|
||||||
list_sub_title: '',
|
|
||||||
list_two_title: '',
|
|
||||||
price: '',
|
|
||||||
currency:""
|
|
||||||
})
|
|
||||||
const requiredImageValidator = (value) => !!value || 'Please select an image file.'
|
|
||||||
const requiredExcelValidator = (value) => !!value || 'Please select an Excel file.'
|
|
||||||
const imageFile = ref(null)
|
|
||||||
const excelFile = ref(null)
|
|
||||||
const editedItem = ref(defaultItem.value)
|
|
||||||
const editedIndex = ref(-1)
|
|
||||||
const medicineList = ref([])
|
|
||||||
const isLoading = ref(false)
|
|
||||||
const currencySign = ref('$');
|
|
||||||
const imageBase64 = ref(null)
|
|
||||||
const excelBase64 = ref(null)
|
|
||||||
const currencies = ref([
|
|
||||||
{ code: 'USD', name: 'US Dollar', sign: '$' },
|
|
||||||
{ code: 'EUR', name: 'Euro', sign: '€' },
|
|
||||||
{ code: 'GBP', name: 'British Pound', sign: '£' },
|
|
||||||
{ code: 'JPY', name: 'Japanese Yen', sign: '¥' },
|
|
||||||
])
|
|
||||||
const setCurrency = (code, sign) => {
|
|
||||||
currencySign.value = sign;
|
|
||||||
// You can perform additional operations with the selected currency code if needed
|
|
||||||
};
|
|
||||||
// status options
|
|
||||||
const selectedOptions = [
|
|
||||||
{
|
|
||||||
text: 'Current',
|
|
||||||
value: 1,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: 'Professional',
|
|
||||||
value: 2,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: 'Rejected',
|
|
||||||
value: 3,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: 'Resigned',
|
|
||||||
value: 4,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: 'Applied',
|
|
||||||
value: 5,
|
|
||||||
},
|
|
||||||
]
|
|
||||||
|
|
||||||
// headers
|
|
||||||
const headers = [
|
|
||||||
{
|
|
||||||
title: 'ID',
|
|
||||||
key: 'id',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Title',
|
|
||||||
key: 'title',
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// title: 'Slug',
|
|
||||||
// key: 'slug',
|
|
||||||
// },
|
|
||||||
{
|
|
||||||
title: 'Price',
|
|
||||||
key: 'price',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Short Detail',
|
|
||||||
key: 'list_one_title',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Short Description',
|
|
||||||
key: 'list_sub_title',
|
|
||||||
},
|
|
||||||
|
|
||||||
// {
|
|
||||||
// title: 'ACTIONS',
|
|
||||||
// key: 'actions',
|
|
||||||
// },
|
|
||||||
]
|
|
||||||
|
|
||||||
const resolveStatusVariant = status => {
|
|
||||||
if (status === 1)
|
|
||||||
return {
|
|
||||||
color: 'primary',
|
|
||||||
text: 'Current',
|
|
||||||
}
|
|
||||||
else if (status === 2)
|
|
||||||
return {
|
|
||||||
color: 'success',
|
|
||||||
text: 'Professional',
|
|
||||||
}
|
|
||||||
else if (status === 3)
|
|
||||||
return {
|
|
||||||
color: 'error',
|
|
||||||
text: 'Rejected',
|
|
||||||
}
|
|
||||||
else if (status === 4)
|
|
||||||
return {
|
|
||||||
color: 'warning',
|
|
||||||
text: 'Resigned',
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return {
|
|
||||||
color: 'info',
|
|
||||||
text: 'Applied',
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const editItem = item => {
|
|
||||||
editedIndex.value = medicineList.value.indexOf(item)
|
|
||||||
editedItem.value = { ...item }
|
|
||||||
editDialog.value = true
|
|
||||||
}
|
|
||||||
const addItem = item => {
|
|
||||||
addDialog.value = true
|
|
||||||
}
|
|
||||||
const deleteItem = item => {
|
|
||||||
editedIndex.value = medicineList.value.indexOf(item)
|
|
||||||
editedItem.value = { ...item }
|
|
||||||
deleteDialog.value = true
|
|
||||||
}
|
|
||||||
|
|
||||||
const selectfile = (data) => {
|
|
||||||
if (data == 'dropdown') {
|
|
||||||
selectDropdown.value = true
|
|
||||||
} else {
|
|
||||||
selectDropdown.value = false
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
const close = () => {
|
|
||||||
editDialog.value = false
|
|
||||||
editedIndex.value = -1
|
|
||||||
editedItem.value = { ...defaultItem.value }
|
|
||||||
}
|
|
||||||
const closeAdd = () => {
|
|
||||||
addDialog.value = false
|
|
||||||
}
|
|
||||||
const closeDelete = () => {
|
|
||||||
deleteDialog.value = false
|
|
||||||
editedIndex.value = -1
|
|
||||||
editedItem.value = { ...defaultItem.value }
|
|
||||||
}
|
|
||||||
const getmedicineList = computed(async () => {
|
|
||||||
store.dispatch('updateIsLoading', true)
|
|
||||||
await store.dispatch('medicineList')
|
|
||||||
console.log('medicineList',store.getters.getMedcineList)
|
|
||||||
let list = store.getters.getMedcineList
|
|
||||||
await store.dispatch('questioneriesListExcel')
|
|
||||||
store.dispatch('updateIsLoading', false)
|
|
||||||
let getQuestioneriesList = store.getters.getQuestioneriesList
|
|
||||||
medicineList.value = list
|
|
||||||
return medicineList.value
|
|
||||||
});
|
|
||||||
const convertImageToBase64 = (event) => {
|
|
||||||
const file = event.target.files[0]
|
|
||||||
const reader = new FileReader()
|
|
||||||
reader.readAsDataURL(file)
|
|
||||||
reader.onload = () => {
|
|
||||||
imageBase64.value = reader.result.split(',')[1]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const convertExcelToBase64 = (event) => {
|
|
||||||
const file = event.target.files[0]
|
|
||||||
const reader = new FileReader()
|
|
||||||
reader.readAsDataURL(file)
|
|
||||||
reader.onload = () => {
|
|
||||||
excelBase64.value = reader.result.split(',')[1]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const save = async () => {
|
|
||||||
const { valid } = await refVFormAdd.value.validate()
|
|
||||||
console.log(valid)
|
|
||||||
if (valid) {
|
|
||||||
try {
|
|
||||||
|
|
||||||
if (editedIndex.value > -1) {
|
|
||||||
Object.assign(medicineList.value[editedIndex.value], editedItem.value)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
medicineList.value.push(editedItem.value)
|
|
||||||
console.log(imageFile.value)
|
|
||||||
//const formData = new FormData()
|
|
||||||
//formData.append('image', imageBase64.value)
|
|
||||||
|
|
||||||
|
|
||||||
// formData.append('title', defaultItem.value.title)
|
|
||||||
// formData.append('slug', defaultItem.value.slug)
|
|
||||||
// formData.append('list_one_title', defaultItem.value.list_one_title)
|
|
||||||
// formData.append('list_sub_title', defaultItem.value.list_sub_title)
|
|
||||||
// formData.append('list_two_title', defaultItem.value.list_two_title)
|
|
||||||
// formData.append('price', defaultItem.value.price)
|
|
||||||
// formData.append('currency', currencySign.value)
|
|
||||||
let ecelData=''
|
|
||||||
if (selectDropdown.value) {
|
|
||||||
let datexcel = {
|
|
||||||
type: 'string',
|
|
||||||
data:selectdataList.value
|
|
||||||
}
|
|
||||||
console.log(datexcel)
|
|
||||||
ecelData=datexcel
|
|
||||||
//formData.append('excel', datexcel)
|
|
||||||
} else {
|
|
||||||
|
|
||||||
let datexcel = {
|
|
||||||
type: 'file',
|
|
||||||
data:excelBase64.value
|
|
||||||
}
|
|
||||||
ecelData = datexcel
|
|
||||||
// formData.append('excel', datexcel)
|
|
||||||
}
|
|
||||||
await store.dispatch('medicineAdd',{
|
|
||||||
title: defaultItem.value.title,
|
|
||||||
slug: defaultItem.value.slug,
|
|
||||||
list_one_title: defaultItem.value.list_one_title,
|
|
||||||
list_sub_title: defaultItem.value.list_sub_title,
|
|
||||||
list_two_title: defaultItem.value.list_two_title,
|
|
||||||
price: defaultItem.value.price,
|
|
||||||
currency: currencySign.value,
|
|
||||||
excel:'',//ecelData,
|
|
||||||
image:imageBase64.value
|
|
||||||
})
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Handle the API response
|
|
||||||
console.log(response.data)
|
|
||||||
} catch (error) {
|
|
||||||
console.error(error)
|
|
||||||
}
|
|
||||||
addDialog.value = false
|
|
||||||
await store.dispatch('medicineList')
|
|
||||||
let list = store.getters.getMedcineList
|
|
||||||
medicineList.value = list
|
|
||||||
closeAdd()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const update = async () => {
|
|
||||||
const { valid } = await refVForm.value.validate()
|
|
||||||
console.log(valid)
|
|
||||||
if (valid) {
|
|
||||||
try {
|
|
||||||
|
|
||||||
if (editedIndex.value > -1) {
|
|
||||||
Object.assign(medicineList.value[editedIndex.value], editedItem.value)
|
|
||||||
|
|
||||||
console.log(imageFile.value)
|
|
||||||
|
|
||||||
let ecelData=''
|
|
||||||
if (selectDropdown.value) {
|
|
||||||
let datexcel = {
|
|
||||||
type: 'string',
|
|
||||||
data:selectdataList.value
|
|
||||||
}
|
|
||||||
console.log(datexcel)
|
|
||||||
ecelData=datexcel
|
|
||||||
//formData.append('excel', datexcel)
|
|
||||||
} else {
|
|
||||||
|
|
||||||
let datexcel = {
|
|
||||||
type: 'file',
|
|
||||||
data:excelBase64.value
|
|
||||||
}
|
|
||||||
ecelData = datexcel
|
|
||||||
// formData.append('excel', datexcel)
|
|
||||||
}
|
|
||||||
await store.dispatch('medicineUpdate', {
|
|
||||||
id:editedItem.value.id,
|
|
||||||
title: editedItem.value.title,
|
|
||||||
slug: editedItem.value.slug,
|
|
||||||
list_one_title: editedItem.value.list_one_title,
|
|
||||||
list_sub_title: editedItem.value.list_sub_title,
|
|
||||||
list_two_title: editedItem.value.list_two_title,
|
|
||||||
price: editedItem.value.price,
|
|
||||||
currency: currencySign.value,
|
|
||||||
excel:'',//ecelData,
|
|
||||||
image:imageBase64.value
|
|
||||||
})
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Handle the API response
|
|
||||||
console.log(response.data)
|
|
||||||
} catch (error) {
|
|
||||||
console.error(error)
|
|
||||||
}
|
|
||||||
addDialog.value = false
|
|
||||||
await store.dispatch('medicineList')
|
|
||||||
let list = store.getters.getMedcineList
|
|
||||||
medicineList.value = list
|
|
||||||
close()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const deleteItemConfirm = async () => {
|
|
||||||
|
|
||||||
await store.dispatch('medicineDelete',{
|
|
||||||
id: editedItem.value.id
|
|
||||||
})
|
|
||||||
medicineList.value.splice(editedIndex.value, 1)
|
|
||||||
closeDelete()
|
|
||||||
|
|
||||||
defaultItem.value.id= null
|
|
||||||
defaultItem.value.title= null
|
|
||||||
defaultItem.value.slug= null
|
|
||||||
defaultItem.value.list_one_title= null
|
|
||||||
defaultItem.value.list_sub_title= null
|
|
||||||
defaultItem.value.list_two_title= null
|
|
||||||
defaultItem.value.price =null
|
|
||||||
defaultItem.value.currency=null
|
|
||||||
|
|
||||||
}
|
|
||||||
const generateSlug = () => {
|
|
||||||
console.log(editedItem.title)
|
|
||||||
if (editedItem.value.title) {
|
|
||||||
editedItem.value.slug = editedItem.value.title
|
|
||||||
.toString()
|
|
||||||
.trim()
|
|
||||||
.toLowerCase()
|
|
||||||
.replace(/\s+/g, '-')
|
|
||||||
.replace(/[^\w-]+/g, '')
|
|
||||||
.replace(/--+/g, '-')
|
|
||||||
.replace(/^-+/, '')
|
|
||||||
.replace(/-+$/, '')
|
|
||||||
} else if (defaultItem.value.title) {
|
|
||||||
defaultItem.value.slug = defaultItem.value.title
|
|
||||||
.toString()
|
|
||||||
.trim()
|
|
||||||
.toLowerCase()
|
|
||||||
.replace(/\s+/g, '-')
|
|
||||||
.replace(/[^\w-]+/g, '')
|
|
||||||
.replace(/--+/g, '-')
|
|
||||||
.replace(/^-+/, '')
|
|
||||||
.replace(/-+$/, '')
|
|
||||||
} else {
|
|
||||||
editedItem.slug = ''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
onMounted(() => {
|
|
||||||
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<v-row>
|
|
||||||
<v-col cols="12" md="12" v-if="getmedicineList">
|
|
||||||
<VCard title="Products">
|
|
||||||
|
|
||||||
<VCardText >
|
|
||||||
<VRow>
|
|
||||||
|
|
||||||
<VCol cols="12" md="8" class="d-flex align-center">
|
|
||||||
<VBtn color="primary" prepend-icon="ri-add-line" @click="addDialog = true" style="display: none;">
|
|
||||||
New Product
|
|
||||||
</VBtn>
|
|
||||||
</VCol>
|
|
||||||
<VCol cols="12" md="4" class="d-flex justify-end">
|
|
||||||
<VTextField
|
|
||||||
v-model="search"
|
|
||||||
label="Search"
|
|
||||||
placeholder="Search ..."
|
|
||||||
append-inner-icon="ri-search-line"
|
|
||||||
single-line
|
|
||||||
hide-details
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
</VRow>
|
|
||||||
</VCardText>
|
|
||||||
<VDataTable
|
|
||||||
:headers="headers"
|
|
||||||
:items="medicineList"
|
|
||||||
:search="search"
|
|
||||||
:items-per-page="5"
|
|
||||||
class="text-no-wrap"
|
|
||||||
>
|
|
||||||
<!-- full name -->
|
|
||||||
<template #item.title="{ item }">
|
|
||||||
<div class="d-flex align-center">
|
|
||||||
<!-- avatar -->
|
|
||||||
<VAvatar
|
|
||||||
size="32"
|
|
||||||
:color="item.image_url ? '' : 'primary'"
|
|
||||||
:class="item.image_url ? '' : 'v-avatar-light-bg primary--text'"
|
|
||||||
:variant="!item.image_url ? 'tonal' : undefined"
|
|
||||||
>
|
|
||||||
<VImg
|
|
||||||
v-if="item.image_url"
|
|
||||||
:src="item.image_url"
|
|
||||||
/>
|
|
||||||
<span
|
|
||||||
v-else
|
|
||||||
class="text-sm"
|
|
||||||
>{{ avatarText(item.name) }}</span>
|
|
||||||
</VAvatar>
|
|
||||||
|
|
||||||
<div class="d-flex flex-column ms-3">
|
|
||||||
<span class="d-block font-weight-medium text-high-emphasis text-truncate">{{ item.title }}</span>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<!-- status -->
|
|
||||||
<template #item.status="{ item }">
|
|
||||||
<VChip
|
|
||||||
:color="resolveStatusVariant(item.status).color"
|
|
||||||
density="comfortable"
|
|
||||||
>
|
|
||||||
{{ resolveStatusVariant(item.status).text }}
|
|
||||||
</VChip>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<!-- Actions -->
|
|
||||||
<template #item.actions="{ item }">
|
|
||||||
<div class="d-flex gap-1">
|
|
||||||
<IconBtn
|
|
||||||
size="small"
|
|
||||||
@click="editItem(item)"
|
|
||||||
>
|
|
||||||
<VIcon icon="ri-pencil-line" />
|
|
||||||
</IconBtn>
|
|
||||||
<IconBtn
|
|
||||||
size="small"
|
|
||||||
@click="deleteItem(item)"
|
|
||||||
>
|
|
||||||
<VIcon icon="ri-delete-bin-line" />
|
|
||||||
</IconBtn>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</VDataTable>
|
|
||||||
</VCard>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<!-- 👉 Edit Dialog -->
|
|
||||||
<VDialog
|
|
||||||
v-model="editDialog"
|
|
||||||
max-width="600px"
|
|
||||||
>
|
|
||||||
<VForm ref="refVForm" >
|
|
||||||
<VCard>
|
|
||||||
<VCardTitle>
|
|
||||||
<span class="headline">Edit Medicine</span>
|
|
||||||
</VCardTitle>
|
|
||||||
|
|
||||||
<VCardText>
|
|
||||||
<VContainer >
|
|
||||||
|
|
||||||
<VRow>
|
|
||||||
<!-- fullName -->
|
|
||||||
<VCol cols="12" md="12">
|
|
||||||
<VTextField
|
|
||||||
v-model="editedItem.title"
|
|
||||||
label="Title"
|
|
||||||
:rules="[requiredValidator]"
|
|
||||||
@input="generateSlug"
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
<VCol cols="12" md="12">
|
|
||||||
<VTextField
|
|
||||||
v-model="editedItem.slug"
|
|
||||||
label="Slug"
|
|
||||||
:rules="[requiredValidator]"
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
|
|
||||||
<VCol cols="12" sm="6" md="12">
|
|
||||||
<VTextField
|
|
||||||
v-model="editedItem.price"
|
|
||||||
label="Price"
|
|
||||||
:rules="[requiredValidator]"
|
|
||||||
prepend-inner-icon
|
|
||||||
>
|
|
||||||
<template v-slot:prepend-inner>
|
|
||||||
<VMenu
|
|
||||||
offset-y
|
|
||||||
transition="slide-y-transition"
|
|
||||||
:close-on-content-click="false"
|
|
||||||
>
|
|
||||||
<template v-slot:activator="{ props }">
|
|
||||||
<span v-bind="props">{{ currencySign || '$money' }}</span>
|
|
||||||
</template>
|
|
||||||
<VList>
|
|
||||||
<VListItem
|
|
||||||
v-for="currency in currencies"
|
|
||||||
:key="currency.code"
|
|
||||||
@click.prevent="setCurrency(currency.code, currency.sign)"
|
|
||||||
>
|
|
||||||
<VListItemTitle>{{ currency.name }}</VListItemTitle>
|
|
||||||
</VListItem>
|
|
||||||
</VList>
|
|
||||||
</VMenu>
|
|
||||||
</template>
|
|
||||||
</VTextField>
|
|
||||||
</VCol>
|
|
||||||
|
|
||||||
<VCol cols="12" sm="6" md="12">
|
|
||||||
<VTextField
|
|
||||||
v-model="editedItem.list_one_title"
|
|
||||||
label="Short Detail"
|
|
||||||
:rules="[requiredValidator]"
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
<VCol cols="12" sm="6" md="12">
|
|
||||||
<VTextField
|
|
||||||
v-model="editedItem.list_sub_title"
|
|
||||||
label="Short Description"
|
|
||||||
:rules="[requiredValidator]"
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
|
|
||||||
<VCol cols="12" sm="6" md="12">
|
|
||||||
<VTextarea
|
|
||||||
v-model="editedItem.list_two_title"
|
|
||||||
label="Full Description"
|
|
||||||
:rules="[requiredValidator]"
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
|
|
||||||
<VCol cols="12" md="8">
|
|
||||||
<div v-if="selectDropdown==false">
|
|
||||||
|
|
||||||
<VFileInput
|
|
||||||
v-model="excelFile"
|
|
||||||
accept=".xlsx,.xls"
|
|
||||||
show-size
|
|
||||||
counter
|
|
||||||
label="Select an Excel file to upload"
|
|
||||||
@change="convertExcelToBase64"
|
|
||||||
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div v-if="selectDropdown==true">
|
|
||||||
<VSelect
|
|
||||||
v-model="selectdataList"
|
|
||||||
:items="store.getters.getQuestioneriesList"
|
|
||||||
item-title="product_file_path"
|
|
||||||
item-value="product_file_path"
|
|
||||||
label="Select File"
|
|
||||||
prepend-icon="ri-file-line"
|
|
||||||
variant="outlined"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</VCol>
|
|
||||||
<VCol cols="12" md="4">
|
|
||||||
<VBtn color="success" variant="outlined" @click="selectfile('dropdown')" class="custom-button" v-if="selectDropdown==false">Select File</VBtn>
|
|
||||||
<VBtn color="success" variant="outlined" @click="selectfile('upload')" class="custom-button" v-if="selectDropdown==true">Upload File</VBtn>
|
|
||||||
</VCol>
|
|
||||||
<VCol cols="12" md="12">
|
|
||||||
<div>
|
|
||||||
|
|
||||||
<VFileInput
|
|
||||||
v-model="imageFile"
|
|
||||||
accept="image/*"
|
|
||||||
show-size
|
|
||||||
counter
|
|
||||||
label="Select an image to upload"
|
|
||||||
@change="convertImageToBase64"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</VCol>
|
|
||||||
|
|
||||||
</VRow>
|
|
||||||
</VContainer>
|
|
||||||
</VCardText>
|
|
||||||
|
|
||||||
<VCardActions>
|
|
||||||
<VSpacer />
|
|
||||||
|
|
||||||
<VBtn
|
|
||||||
color="error"
|
|
||||||
variant="outlined"
|
|
||||||
@click="close"
|
|
||||||
>
|
|
||||||
Cancel
|
|
||||||
</VBtn>
|
|
||||||
|
|
||||||
<VBtn
|
|
||||||
color="success"
|
|
||||||
variant="elevated"
|
|
||||||
@click="update"
|
|
||||||
>
|
|
||||||
Save
|
|
||||||
</VBtn>
|
|
||||||
|
|
||||||
</VCardActions>
|
|
||||||
</VCard>
|
|
||||||
</VForm>
|
|
||||||
</VDialog>
|
|
||||||
|
|
||||||
<!-- 👉 Delete Dialog -->
|
|
||||||
<VDialog
|
|
||||||
v-model="deleteDialog"
|
|
||||||
max-width="500px"
|
|
||||||
>
|
|
||||||
<VCard>
|
|
||||||
<VCardTitle>
|
|
||||||
Are you sure you want to delete this item?
|
|
||||||
</VCardTitle>
|
|
||||||
|
|
||||||
<VCardActions>
|
|
||||||
<VSpacer />
|
|
||||||
|
|
||||||
<VBtn
|
|
||||||
color="error"
|
|
||||||
variant="outlined"
|
|
||||||
@click="closeDelete"
|
|
||||||
>
|
|
||||||
Cancel
|
|
||||||
</VBtn>
|
|
||||||
|
|
||||||
<VBtn
|
|
||||||
color="success"
|
|
||||||
variant="elevated"
|
|
||||||
@click="deleteItemConfirm"
|
|
||||||
>
|
|
||||||
OK
|
|
||||||
</VBtn>
|
|
||||||
|
|
||||||
<VSpacer />
|
|
||||||
</VCardActions>
|
|
||||||
</VCard>
|
|
||||||
</VDialog>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- 👉 Add Dialog -->
|
|
||||||
<VDialog
|
|
||||||
v-model="addDialog"
|
|
||||||
max-width="600px"
|
|
||||||
>
|
|
||||||
<VForm ref="refVFormAdd" >
|
|
||||||
<VCard>
|
|
||||||
<VCardTitle>
|
|
||||||
<span class="headline">Add Medicine</span>
|
|
||||||
</VCardTitle>
|
|
||||||
|
|
||||||
<VCardText>
|
|
||||||
<VContainer >
|
|
||||||
|
|
||||||
<VRow>
|
|
||||||
<!-- fullName -->
|
|
||||||
<VCol cols="12" md="12">
|
|
||||||
<VTextField
|
|
||||||
v-model="defaultItem.title"
|
|
||||||
label="Title"
|
|
||||||
:rules="[requiredValidator]"
|
|
||||||
@input="generateSlug"
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
<VCol cols="12" md="12">
|
|
||||||
<VTextField
|
|
||||||
v-model="defaultItem.slug"
|
|
||||||
label="Slug"
|
|
||||||
:rules="[requiredValidator]"
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
|
|
||||||
<VCol cols="12" sm="6" md="12">
|
|
||||||
<VTextField
|
|
||||||
v-model="defaultItem.price"
|
|
||||||
label="Price"
|
|
||||||
:rules="[requiredValidator]"
|
|
||||||
prepend-inner-icon
|
|
||||||
>
|
|
||||||
<template v-slot:prepend-inner>
|
|
||||||
<VMenu
|
|
||||||
offset-y
|
|
||||||
transition="slide-y-transition"
|
|
||||||
:close-on-content-click="false"
|
|
||||||
>
|
|
||||||
<template v-slot:activator="{ props }">
|
|
||||||
<span v-bind="props">{{ currencySign || '$money' }}</span>
|
|
||||||
</template>
|
|
||||||
<VList>
|
|
||||||
<VListItem
|
|
||||||
v-for="currency in currencies"
|
|
||||||
:key="currency.code"
|
|
||||||
@click.prevent="setCurrency(currency.code, currency.sign)"
|
|
||||||
>
|
|
||||||
<VListItemTitle>{{ currency.name }}</VListItemTitle>
|
|
||||||
</VListItem>
|
|
||||||
</VList>
|
|
||||||
</VMenu>
|
|
||||||
</template>
|
|
||||||
</VTextField>
|
|
||||||
</VCol>
|
|
||||||
|
|
||||||
<VCol cols="12" sm="6" md="12">
|
|
||||||
<VTextField
|
|
||||||
v-model="defaultItem.list_one_title"
|
|
||||||
label="Short Detail"
|
|
||||||
:rules="[requiredValidator]"
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
<VCol cols="12" sm="6" md="12">
|
|
||||||
<VTextField
|
|
||||||
v-model="defaultItem.list_sub_title"
|
|
||||||
label="Short Description"
|
|
||||||
:rules="[requiredValidator]"
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
|
|
||||||
<VCol cols="12" sm="6" md="12">
|
|
||||||
<VTextarea
|
|
||||||
v-model="defaultItem.list_two_title"
|
|
||||||
label="Full Description"
|
|
||||||
:rules="[requiredValidator]"
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
|
|
||||||
<VCol cols="12" md="8">
|
|
||||||
<div v-if="selectDropdown==false">
|
|
||||||
|
|
||||||
<VFileInput
|
|
||||||
v-model="excelFile"
|
|
||||||
accept=".xlsx,.xls"
|
|
||||||
:rules="[requiredExcelValidator]"
|
|
||||||
show-size
|
|
||||||
counter
|
|
||||||
label="Select an Excel file to upload"
|
|
||||||
@change="convertExcelToBase64"
|
|
||||||
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div v-if="selectDropdown==true">
|
|
||||||
<VSelect
|
|
||||||
v-model="selectdataList"
|
|
||||||
:items="store.getters.getQuestioneriesList"
|
|
||||||
item-title="product_file_path"
|
|
||||||
item-value="product_file_path"
|
|
||||||
label="Select File"
|
|
||||||
prepend-icon="ri-file-line"
|
|
||||||
variant="outlined"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</VCol>
|
|
||||||
<VCol cols="12" md="4">
|
|
||||||
<VBtn color="success" variant="outlined" @click="selectfile('dropdown')" class="custom-button" v-if="selectDropdown==false">Select File</VBtn>
|
|
||||||
<VBtn color="success" variant="outlined" @click="selectfile('upload')" class="custom-button" v-if="selectDropdown==true">Upload File</VBtn>
|
|
||||||
</VCol>
|
|
||||||
<VCol cols="12" md="12">
|
|
||||||
<div>
|
|
||||||
|
|
||||||
<VFileInput
|
|
||||||
v-model="imageFile"
|
|
||||||
accept="image/*"
|
|
||||||
:rules="[requiredImageValidator]"
|
|
||||||
show-size
|
|
||||||
counter
|
|
||||||
label="Select an image to upload"
|
|
||||||
@change="convertImageToBase64"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</VCol>
|
|
||||||
|
|
||||||
</VRow>
|
|
||||||
</VContainer>
|
|
||||||
</VCardText>
|
|
||||||
|
|
||||||
<VCardActions>
|
|
||||||
<VSpacer />
|
|
||||||
|
|
||||||
<VBtn
|
|
||||||
color="error"
|
|
||||||
variant="outlined"
|
|
||||||
@click="closeAdd"
|
|
||||||
>
|
|
||||||
Cancel
|
|
||||||
</VBtn>
|
|
||||||
|
|
||||||
<VBtn
|
|
||||||
color="success"
|
|
||||||
variant="elevated"
|
|
||||||
@click="save"
|
|
||||||
>
|
|
||||||
Save
|
|
||||||
</VBtn>
|
|
||||||
|
|
||||||
</VCardActions>
|
|
||||||
</VCard>
|
|
||||||
</VForm>
|
|
||||||
</VDialog>
|
|
||||||
</template>
|
|
||||||
<style scoped>
|
|
||||||
.custom-button {
|
|
||||||
width: 100%;
|
|
||||||
height: 48px; /* This value should match the height of your input fields */
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,212 +0,0 @@
|
|||||||
<script setup>
|
|
||||||
const props = defineProps({
|
|
||||||
userData: {
|
|
||||||
type: Object,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
import moment from 'moment';
|
|
||||||
import { onBeforeMount, onMounted, onUnmounted, ref } from 'vue';
|
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
|
||||||
import { useStore } from 'vuex';
|
|
||||||
|
|
||||||
const store = useStore();
|
|
||||||
const router = useRouter();
|
|
||||||
const route = useRoute();
|
|
||||||
const editDialog = ref(false);
|
|
||||||
const deleteDialog = ref(false);
|
|
||||||
const search = ref('');
|
|
||||||
const appointmentId = ref('');
|
|
||||||
const defaultItem = ref({
|
|
||||||
id: -1,
|
|
||||||
avatar: '',
|
|
||||||
name: '',
|
|
||||||
email: '',
|
|
||||||
dob: '',
|
|
||||||
phone_no: '',
|
|
||||||
});
|
|
||||||
|
|
||||||
const editedItem = ref({ ...defaultItem.value });
|
|
||||||
const editedIndex = ref(-1);
|
|
||||||
const patientMeetingList = ref([]);
|
|
||||||
const isLoading = ref(false);
|
|
||||||
|
|
||||||
// Status options
|
|
||||||
const selectedOptions = [
|
|
||||||
{ text: 'Active', value: 1 },
|
|
||||||
{ text: 'InActive', value: 2 },
|
|
||||||
];
|
|
||||||
|
|
||||||
const refVForm = ref(null);
|
|
||||||
|
|
||||||
// Headers
|
|
||||||
const headers = [
|
|
||||||
// { title: 'Appointment Id', key: 'id' },
|
|
||||||
{ title: 'Patient Name', key: 'patient_name' },
|
|
||||||
// { key: 'appointment_date', sortable: false, title: 'Date' },
|
|
||||||
{ key: 'start_time', title: 'Start Time' },
|
|
||||||
{ key: 'end_time', title: 'End Time' },
|
|
||||||
{ key: 'duration', title: 'Duration' },
|
|
||||||
];
|
|
||||||
|
|
||||||
function totalCallDuration(start_time, end_time) {
|
|
||||||
const startMoment = moment(start_time);
|
|
||||||
const endMoment = moment(end_time);
|
|
||||||
const duration = moment.duration(endMoment.diff(startMoment));
|
|
||||||
const hours = String(duration.hours()).padStart(2, '0');
|
|
||||||
const minutes = String(duration.minutes()).padStart(2, '0');
|
|
||||||
const seconds = String(duration.seconds()).padStart(2, '0');
|
|
||||||
|
|
||||||
if (hours === '00' && minutes === '00') {
|
|
||||||
return `00:00:${seconds}`;
|
|
||||||
} else if (hours === '00') {
|
|
||||||
return `00:${minutes}`;
|
|
||||||
} else {
|
|
||||||
return `${hours}:${minutes}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const formatDate = (date) => {
|
|
||||||
const messageDate = new Date(date);
|
|
||||||
const options = {
|
|
||||||
year: 'numeric',
|
|
||||||
month: 'numeric',
|
|
||||||
day: 'numeric',
|
|
||||||
hour: 'numeric', // Change from '2-digit' to 'numeric'
|
|
||||||
minute: '2-digit',
|
|
||||||
hour12: true, // Add hour12: true to get 12-hour format with AM/PM
|
|
||||||
};
|
|
||||||
const formattedDate = messageDate.toLocaleString('en-US', options).replace(/\//g, '-');
|
|
||||||
return `${formattedDate} `;
|
|
||||||
};
|
|
||||||
// Fetch and process the patient meeting list
|
|
||||||
const getPatientMeetingList = async () => {
|
|
||||||
//store.dispatch('updateIsLoading', true);
|
|
||||||
//await store.dispatch('patientMeetingList', { id: route.params.id });
|
|
||||||
// store.dispatch('updateIsLoading', false);
|
|
||||||
|
|
||||||
let list = props.userData.completed_meetings;
|
|
||||||
|
|
||||||
patientMeetingList.value = list.map(history => ({
|
|
||||||
...history,
|
|
||||||
appointment_date: formatDate(history.appointment_date),
|
|
||||||
start_time: formatDate(history.start_time),
|
|
||||||
end_time: formatDate(history.end_time),
|
|
||||||
duration: totalCallDuration(history.start_time, history.end_time),
|
|
||||||
}));
|
|
||||||
console.log(list);
|
|
||||||
};
|
|
||||||
|
|
||||||
// Lifecycle hooks
|
|
||||||
onBeforeMount(() => {});
|
|
||||||
onMounted(async () => {
|
|
||||||
await getPatientMeetingList();
|
|
||||||
|
|
||||||
});
|
|
||||||
onUnmounted(() => {});
|
|
||||||
const historyDetail = (item, value) => {
|
|
||||||
console.log('item',item.id ,value)
|
|
||||||
if(value == 'notes')
|
|
||||||
router.push('/admin/patient/meeting/notes/' + route.params.id + '/' + item.id);
|
|
||||||
if(value == 'prescription')
|
|
||||||
router.push('/admin/patient/meeting/prescription/' + route.params.id + '/' + item.id);
|
|
||||||
}
|
|
||||||
|
|
||||||
const menusVariant = [
|
|
||||||
'primary'
|
|
||||||
];
|
|
||||||
const options = [
|
|
||||||
{
|
|
||||||
title: 'Notes',
|
|
||||||
key: 'notes',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Prescription',
|
|
||||||
key: 'prescription',
|
|
||||||
},
|
|
||||||
|
|
||||||
]
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
|
|
||||||
<v-row>
|
|
||||||
<v-col cols="12" md="12">
|
|
||||||
<v-card title="Completed Meetings">
|
|
||||||
<v-card-text>
|
|
||||||
<v-row>
|
|
||||||
<v-col cols="12" offset-md="8" md="4">
|
|
||||||
<v-text-field
|
|
||||||
v-model="search"
|
|
||||||
label="Search"
|
|
||||||
placeholder="Search ..."
|
|
||||||
append-inner-icon="ri-search-line"
|
|
||||||
single-line
|
|
||||||
hide-details
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
/>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
</v-card-text>
|
|
||||||
<v-data-table
|
|
||||||
:headers="headers"
|
|
||||||
:items="patientMeetingList"
|
|
||||||
:search="search"
|
|
||||||
:items-per-page="5"
|
|
||||||
class="text-no-wrap"
|
|
||||||
>
|
|
||||||
<template #item.id="{ item }">{{ item.id }}</template>
|
|
||||||
<template #item.patient_name="{ item }">
|
|
||||||
<div class="d-flex flex-column ms-3">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'admin-patient-profile', params: { id: item.patient_id } }"
|
|
||||||
class="highlighted"
|
|
||||||
>
|
|
||||||
<span class="d-block font-weight-medium text-truncate">{{ item.patient_name }}</span>
|
|
||||||
</router-link>
|
|
||||||
<small>{{ item.post }}</small>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<template #item.duration="{ item }">{{ item.duration }}</template>
|
|
||||||
<!-- Actions -->
|
|
||||||
<template #item.actions="{ item }">
|
|
||||||
<div class="demo-space-x">
|
|
||||||
<VMenu
|
|
||||||
v-for="menu in menusVariant"
|
|
||||||
:key="menu"
|
|
||||||
>
|
|
||||||
<template #activator="{ props }">
|
|
||||||
|
|
||||||
<i class="ri-more-2-line cursor-pointer" style="font-size: 32px;" v-bind="props"></i>
|
|
||||||
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<v-list>
|
|
||||||
<v-list-item
|
|
||||||
v-for="opt in options"
|
|
||||||
:key="opt.value"
|
|
||||||
@click="historyDetail(item, opt.key)"
|
|
||||||
>
|
|
||||||
{{ opt.title }}
|
|
||||||
</v-list-item>
|
|
||||||
</v-list>
|
|
||||||
</VMenu>
|
|
||||||
</div>
|
|
||||||
<!-- <div class="d-flex gap-1">
|
|
||||||
<VBtn class="text-capitalize text-white" @click="historyDetail(item)"> Detail
|
|
||||||
</VBtn>
|
|
||||||
</div> -->
|
|
||||||
</template>
|
|
||||||
</v-data-table>
|
|
||||||
</v-card>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
</template>
|
|
||||||
<style scoped>
|
|
||||||
.highlighted {
|
|
||||||
/* Add your desired highlighting styles here */
|
|
||||||
font-weight: bold;
|
|
||||||
color: #a169ff; /* or any other color you prefer */
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,124 +0,0 @@
|
|||||||
<script setup>
|
|
||||||
import { ref } from 'vue';
|
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
|
||||||
import { useStore } from 'vuex';
|
|
||||||
const store = useStore();
|
|
||||||
const router = useRouter();
|
|
||||||
const route = useRoute();
|
|
||||||
const patientId = route.params.patient_id;
|
|
||||||
const appointmentId = route.params.id;
|
|
||||||
const notes = ref([]);
|
|
||||||
const props = defineProps({
|
|
||||||
notesData: {
|
|
||||||
type: Object,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const formatDateDate = (date) => {
|
|
||||||
const messageDate = new Date(date);
|
|
||||||
const options = {
|
|
||||||
year: 'numeric',
|
|
||||||
month: 'long',
|
|
||||||
day: 'numeric',
|
|
||||||
hour: '2-digit',
|
|
||||||
minute: '2-digit',
|
|
||||||
};
|
|
||||||
return messageDate.toLocaleDateString('en-US', options).replace(/\//g, '-');
|
|
||||||
};
|
|
||||||
|
|
||||||
const downloadFile = (fileUrl) => {
|
|
||||||
const link = document.createElement('a');
|
|
||||||
link.href = fileUrl;
|
|
||||||
link.download = 'noteFile.png';
|
|
||||||
document.body.appendChild(link);
|
|
||||||
link.click();
|
|
||||||
document.body.removeChild(link);
|
|
||||||
};
|
|
||||||
const downloadImage = async (imageUrl) => {
|
|
||||||
try {
|
|
||||||
const response = await fetch(imageUrl)
|
|
||||||
const blob = await response.blob()
|
|
||||||
const fileName = imageUrl.split('/').pop()
|
|
||||||
saveAs(blob, fileName)
|
|
||||||
} catch (error) {
|
|
||||||
console.error('Error downloading image:', error) }
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
|
|
||||||
|
|
||||||
<VCard title="Notes">
|
|
||||||
<VCardText>
|
|
||||||
<VTimeline
|
|
||||||
side="end"
|
|
||||||
align="start"
|
|
||||||
line-inset="8"
|
|
||||||
truncate-line="both"
|
|
||||||
density="compact"
|
|
||||||
>
|
|
||||||
|
|
||||||
<!-- SECTION Timeline Item: Flight -->
|
|
||||||
|
|
||||||
<template v-for="(p_note, index) in props.notesData.notes" :key="index" v-if="props.notesData.notes.length>0">
|
|
||||||
<VTimelineItem
|
|
||||||
dot-color="primary"
|
|
||||||
size="x-small"
|
|
||||||
>
|
|
||||||
<!-- 👉 Header -->
|
|
||||||
<div class="d-flex justify-space-between align-center gap-2 flex-wrap">
|
|
||||||
<span class="app-timeline-title" v-if="p_note.note_type=='Notes'">
|
|
||||||
{{p_note.note}}
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<span class="app-timeline-title" v-if="p_note.note_type == 'file'">
|
|
||||||
<VIcon>ri-attachment-2</VIcon> <button @click="downloadImage(p_note.note)">Download Image</button>
|
|
||||||
|
|
||||||
</span>
|
|
||||||
|
|
||||||
|
|
||||||
<span class="app-timeline-meta">{{ formatDateDate(p_note.created_at) }}</span>
|
|
||||||
<!-- <span></span> -->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 👉 Content -->
|
|
||||||
<div class="app-timeline-text mb-1">
|
|
||||||
<span>{{ p_note.provider_name }}</span>
|
|
||||||
<VIcon
|
|
||||||
size="20"
|
|
||||||
icon="tabler-arrow-right"
|
|
||||||
class="mx-2 flip-in-rtl"
|
|
||||||
/>
|
|
||||||
<!-- <span>Heathrow Airport, London</span> -->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- <p class="app-timeline-meta mb-2">
|
|
||||||
6:30 AM
|
|
||||||
</p> -->
|
|
||||||
|
|
||||||
<!-- <div class="app-timeline-text d-flex align-center gap-2">
|
|
||||||
<div>
|
|
||||||
<VImg
|
|
||||||
:src="pdf"
|
|
||||||
:width="22"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<span>booking-card.pdf</span>
|
|
||||||
</div> -->
|
|
||||||
</VTimelineItem>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- !SECTION -->
|
|
||||||
|
|
||||||
<!-- !SECTION -->
|
|
||||||
</VTimeline>
|
|
||||||
</VCardText>
|
|
||||||
</VCard>
|
|
||||||
</template>
|
|
@ -1,354 +0,0 @@
|
|||||||
<script setup>
|
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
|
||||||
import { useStore } from 'vuex';
|
|
||||||
|
|
||||||
const store = useStore();
|
|
||||||
const router = useRouter()
|
|
||||||
const route = useRoute()
|
|
||||||
const itemsPrescriptions = ref([]);
|
|
||||||
const patientId = route.params.patient_id;
|
|
||||||
const props = defineProps({
|
|
||||||
prescriptionData: {
|
|
||||||
type: Object,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
const prescription = computed(async () => {
|
|
||||||
console.log('computed=====')
|
|
||||||
await getprescriptionList()
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
const getprescriptionList = async () => {
|
|
||||||
|
|
||||||
let prescriptions = props.prescriptionData.prescriptions
|
|
||||||
console.log("BeforeOverviewItem", prescriptions);
|
|
||||||
// itemsPrescriptions.value = store.getters.getPrescriptionList
|
|
||||||
for (let data of prescriptions) {
|
|
||||||
let dataObject = {}
|
|
||||||
dataObject.name = data.name
|
|
||||||
dataObject.brand = data.brand
|
|
||||||
dataObject.from = data.from
|
|
||||||
dataObject.direction_quantity = data.direction_quantity
|
|
||||||
dataObject.dosage = data.dosage
|
|
||||||
dataObject.quantity = data.quantity
|
|
||||||
dataObject.refill_quantity = data.refill_quantity
|
|
||||||
dataObject.actions = ''
|
|
||||||
dataObject.id = data.id
|
|
||||||
dataObject.comments = data.comments
|
|
||||||
dataObject.direction_one = data.direction_one
|
|
||||||
dataObject.direction_two= data.direction_two
|
|
||||||
dataObject.status = data.status
|
|
||||||
|
|
||||||
dataObject.date = formatDateDate(data.created_at)
|
|
||||||
|
|
||||||
itemsPrescriptions.value.push(dataObject)
|
|
||||||
}
|
|
||||||
console.log(itemsPrescriptions.value)
|
|
||||||
itemsPrescriptions.value.sort((a, b) => {
|
|
||||||
return b.id - a.id;
|
|
||||||
});
|
|
||||||
console.log("OverviewItem", itemsPrescriptions.value);
|
|
||||||
};
|
|
||||||
const formatDateDate = (date) => {
|
|
||||||
const messageDate = new Date(date);
|
|
||||||
const options = {
|
|
||||||
year: 'numeric',
|
|
||||||
month: 'long',
|
|
||||||
day: 'numeric',
|
|
||||||
hour: '2-digit',
|
|
||||||
minute: '2-digit'
|
|
||||||
};
|
|
||||||
return messageDate.toLocaleDateString('en-US', options).replace(/\//g, '-');
|
|
||||||
};
|
|
||||||
const getStatusColor = (status) => {
|
|
||||||
switch (status) {
|
|
||||||
case 'pending':
|
|
||||||
return 'warning'; // Use Vuetify's warning color (typically yellow)
|
|
||||||
case 'shipped':
|
|
||||||
return '#45B8AC'; // Use Vuetify's primary color (typically blue)
|
|
||||||
case 'delivered':
|
|
||||||
return 'success';
|
|
||||||
case 'returned':
|
|
||||||
return 'red';
|
|
||||||
case 'results':
|
|
||||||
return 'blue';
|
|
||||||
default:
|
|
||||||
return 'grey'; // Use Vuetify's grey color for any other status
|
|
||||||
}
|
|
||||||
};
|
|
||||||
const resolveStatusVariant = status => {
|
|
||||||
if (status === 1)
|
|
||||||
return {
|
|
||||||
color: 'primary',
|
|
||||||
text: 'Current',
|
|
||||||
}
|
|
||||||
else if (status === 2)
|
|
||||||
return {
|
|
||||||
color: 'success',
|
|
||||||
text: 'Professional',
|
|
||||||
}
|
|
||||||
else if (status === 3)
|
|
||||||
return {
|
|
||||||
color: 'error',
|
|
||||||
text: 'Rejected',
|
|
||||||
}
|
|
||||||
else if (status === 4)
|
|
||||||
return {
|
|
||||||
color: 'warning',
|
|
||||||
text: 'Resigned',
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return {
|
|
||||||
color: 'info',
|
|
||||||
text: 'Applied',
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const headers = [
|
|
||||||
|
|
||||||
{
|
|
||||||
title: 'Name',
|
|
||||||
key: 'name',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Date',
|
|
||||||
key: 'date',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Status',
|
|
||||||
key: 'status',
|
|
||||||
},
|
|
||||||
]
|
|
||||||
const prescriptionIndex = ref([]);
|
|
||||||
const prescriptionItem = ref(-1)
|
|
||||||
const prescriptionDialog = ref(false)
|
|
||||||
const selectedItem = ref(null);
|
|
||||||
const showDetail = item => {
|
|
||||||
// console.log("id",item);
|
|
||||||
prescriptionIndex.value = item
|
|
||||||
selectedItem.value = item;
|
|
||||||
// console.log("index",prescriptionIndex.value);
|
|
||||||
// prescriptionItem.value = { ...item }
|
|
||||||
prescriptionDialog.value = true
|
|
||||||
}
|
|
||||||
const close = () => {
|
|
||||||
prescriptionDialog.value = false
|
|
||||||
prescriptionIndex.value = -1
|
|
||||||
prescriptionItem.value = { ...defaultItem.value }
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
|
||||||
<template>
|
|
||||||
|
|
||||||
<v-row>
|
|
||||||
<v-col cols="12" md="12" v-if="itemsPrescriptions">
|
|
||||||
<v-card title="Prescriptions" v-if="prescription">
|
|
||||||
<VCardText >
|
|
||||||
|
|
||||||
</VCardText>
|
|
||||||
<VDataTable
|
|
||||||
:headers="headers"
|
|
||||||
:items="itemsPrescriptions"
|
|
||||||
:items-per-page="5"
|
|
||||||
class="text-no-wrap"
|
|
||||||
>
|
|
||||||
|
|
||||||
<!-- full name -->
|
|
||||||
<!-- status -->
|
|
||||||
<template #item.status="{ item }">
|
|
||||||
|
|
||||||
<VChip
|
|
||||||
:color="getStatusColor(item.status)"
|
|
||||||
density="comfortable"
|
|
||||||
>
|
|
||||||
{{ item.status}}
|
|
||||||
</VChip>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<!-- Actions -->
|
|
||||||
<template #item.name="{ item }">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'admin-patient-profile', params: { id: item.id } }"
|
|
||||||
class="text-high-emphasis "
|
|
||||||
@click.prevent=showDetail(item)
|
|
||||||
>
|
|
||||||
{{ item.name }}
|
|
||||||
</router-link>
|
|
||||||
|
|
||||||
</template>
|
|
||||||
</VDataTable>
|
|
||||||
</v-card>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<VDialog
|
|
||||||
v-model="prescriptionDialog"
|
|
||||||
max-width="600px"
|
|
||||||
>
|
|
||||||
<VCard :title=prescriptionIndex.name>
|
|
||||||
<DialogCloseBtn
|
|
||||||
variant="text"
|
|
||||||
size="default"
|
|
||||||
@click="[prescriptionDialog = false,selectedItem = '']"
|
|
||||||
/>
|
|
||||||
<VCardText>
|
|
||||||
<v-row class='mt-0'>
|
|
||||||
<v-col cols="12" md="4" sm="6">
|
|
||||||
<p class='heading mb-0 text-right'><b>Brand:</b></p>
|
|
||||||
</v-col>
|
|
||||||
<v-col cols="12" md="4" sm="6">
|
|
||||||
<p>{{ prescriptionIndex.brand }}</p>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<VDivider></VDivider>
|
|
||||||
<v-row class='mt-1'>
|
|
||||||
<v-col cols="12" md="4" sm="6">
|
|
||||||
<p class='heading mb-0 text-right'><b>From:</b></p>
|
|
||||||
</v-col>
|
|
||||||
<v-col cols="12" md="4" sm="6">
|
|
||||||
<p>{{ prescriptionIndex.from }}</p>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<VDivider></VDivider>
|
|
||||||
<v-row class='mt-1'>
|
|
||||||
<v-col cols="12" md="4" sm="6">
|
|
||||||
<p class='heading mb-0 text-right'><b>Dosage:</b></p>
|
|
||||||
</v-col>
|
|
||||||
<v-col cols="12" md="4" sm="6">
|
|
||||||
<p>{{ prescriptionIndex.dosage }}</p>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<VDivider></VDivider>
|
|
||||||
<v-row class='mt-1'>
|
|
||||||
<v-col cols="12" md="4" sm="6">
|
|
||||||
<p class='heading mb-0 text-right'><b>Quantity:</b></p>
|
|
||||||
</v-col>
|
|
||||||
<v-col cols="12" md="4" sm="6">
|
|
||||||
<p>{{ prescriptionIndex.quantity }}</p>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<VDivider></VDivider>
|
|
||||||
<v-row class='mt-1'>
|
|
||||||
<v-col cols="12" md="4" sm="6">
|
|
||||||
<p class='heading mb-0 text-right'><b>Direction Quantity:</b></p>
|
|
||||||
</v-col>
|
|
||||||
<v-col cols="12" md="8" sm="6">
|
|
||||||
<p>{{ prescriptionIndex.direction_quantity }}</p>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<VDivider></VDivider>
|
|
||||||
<v-row class='mt-1'>
|
|
||||||
<v-col cols="12" md="4" sm="6">
|
|
||||||
<p class='heading mb-0 text-right'><b>Direction One:</b></p>
|
|
||||||
</v-col>
|
|
||||||
<v-col cols="12" md="8" sm="6">
|
|
||||||
<p>{{ prescriptionIndex.direction_one }} </p>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<VDivider></VDivider>
|
|
||||||
<v-row class='mt-1'>
|
|
||||||
<v-col cols="12" md="4" sm="6">
|
|
||||||
<p class='heading mb-0 text-right'><b>Direction Two:</b></p>
|
|
||||||
</v-col>
|
|
||||||
<v-col cols="12" md="8" sm="6">
|
|
||||||
<p>{{ prescriptionIndex.direction_two }} </p>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<VDivider></VDivider>
|
|
||||||
<v-row class='mt-1'>
|
|
||||||
<v-col cols="12" md="4" sm="6">
|
|
||||||
<p class='heading mb-0 text-right'><b>Refill Quantity:</b></p>
|
|
||||||
</v-col>
|
|
||||||
<v-col cols="12" md="8" sm="6">
|
|
||||||
<p>{{ prescriptionIndex.refill_quantity }}</p>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
</v-row>
|
|
||||||
<VDivider></VDivider>
|
|
||||||
<v-row class='mt-1'>
|
|
||||||
<v-col cols="12" md="4" sm="6">
|
|
||||||
<p class='heading mb-0 text-right'><b>Status:</b></p>
|
|
||||||
</v-col>
|
|
||||||
<v-col cols="12" md="8" sm="6">
|
|
||||||
<p v-if="prescriptionIndex.status == null" class="text-warning">Pending</p>
|
|
||||||
<p v-else>{{ prescriptionIndex.status }}</p>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<VDivider></VDivider>
|
|
||||||
<v-row class='mt-1 pb-0'>
|
|
||||||
<v-col cols="12" md="4" sm="6">
|
|
||||||
<p class='heading mb-0 text-right'><b>Comments:</b></p>
|
|
||||||
</v-col>
|
|
||||||
<v-col cols="12" md="8" sm="8">
|
|
||||||
<p>{{ prescriptionIndex.comments }} </p>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
</v-row>
|
|
||||||
|
|
||||||
</VCardText>
|
|
||||||
</VCard>
|
|
||||||
|
|
||||||
</VDialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
button.v-expansion-panel-title {
|
|
||||||
background-color: #003152 !important;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
button.v-expansion-panel-title.bg-secondary {
|
|
||||||
background-color: #003152 !important;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
button.v-expansion-panel-title {
|
|
||||||
background-color: #003152 !important;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
span.v-expansion-panel-title__icon {
|
|
||||||
color: #fff
|
|
||||||
}
|
|
||||||
|
|
||||||
// button.v-expansion-panel-title.bg-secondary {
|
|
||||||
// background-color: rgba(var(--v-theme-primary), var(--v-activated-opacity)) !important;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// button.v-expansion-panel-title {
|
|
||||||
// background-color: rgba(var(--v-theme-primary), var(--v-activated-opacity)) !important;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// button.v-expansion-panel-title.v-expansion-panel-title--active {
|
|
||||||
// background-color: rgba(var(--v-theme-primary), var(--v-activated-opacity)) !important;
|
|
||||||
// }
|
|
||||||
|
|
||||||
.v-expansion-panel {
|
|
||||||
overflow: hidden;
|
|
||||||
border-radius: 16px;
|
|
||||||
background-color: #fff;
|
|
||||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 10%);
|
|
||||||
margin-block-end: 10px;
|
|
||||||
transition: box-shadow 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.details {
|
|
||||||
position: relative;
|
|
||||||
box-sizing: content-box;
|
|
||||||
border: 2px solid #fff;
|
|
||||||
border-radius: 1em;
|
|
||||||
background-color: #696cff;
|
|
||||||
block-size: 0.85em;
|
|
||||||
box-shadow: 0 0 3px rgba(67, 89, 113, 80%);
|
|
||||||
color: #fff;
|
|
||||||
content: "+";
|
|
||||||
font-family: "Courier New", Courier, monospace;
|
|
||||||
font-weight: 500;
|
|
||||||
inline-size: 0.85em;
|
|
||||||
inset-block-start: 50%;
|
|
||||||
inset-block-start: 0.7em;
|
|
||||||
inset-inline-start: 50%;
|
|
||||||
line-height: 0.9em;
|
|
||||||
text-align: center;
|
|
||||||
transform: translate(-50%, -50%);
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,323 +0,0 @@
|
|||||||
<script setup>
|
|
||||||
const props = defineProps({
|
|
||||||
userData: {
|
|
||||||
type: Object,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
const standardPlan = {
|
|
||||||
plan: 'Standard',
|
|
||||||
price: 99,
|
|
||||||
benefits: [
|
|
||||||
'10 Users',
|
|
||||||
'Up to 10GB storage',
|
|
||||||
'Basic Support',
|
|
||||||
],
|
|
||||||
}
|
|
||||||
|
|
||||||
const isUserInfoEditDialogVisible = ref(false)
|
|
||||||
const isUpgradePlanDialogVisible = ref(false)
|
|
||||||
|
|
||||||
const resolveUserStatusVariant = stat => {
|
|
||||||
if (stat === 'pending')
|
|
||||||
return 'warning'
|
|
||||||
if (stat === 'Active')
|
|
||||||
return 'success'
|
|
||||||
if (stat === 'inActive')
|
|
||||||
return 'secondary'
|
|
||||||
|
|
||||||
return 'primary'
|
|
||||||
}
|
|
||||||
|
|
||||||
const resolveUserRoleVariant = role => {
|
|
||||||
if (role === 'subscriber')
|
|
||||||
return {
|
|
||||||
color: 'primary',
|
|
||||||
icon: 'ri-user-line',
|
|
||||||
}
|
|
||||||
if (role === 'author')
|
|
||||||
return {
|
|
||||||
color: 'warning',
|
|
||||||
icon: 'ri-settings-2-line',
|
|
||||||
}
|
|
||||||
if (role === 'maintainer')
|
|
||||||
return {
|
|
||||||
color: 'success',
|
|
||||||
icon: 'ri-database-2-line',
|
|
||||||
}
|
|
||||||
if (role === 'editor')
|
|
||||||
return {
|
|
||||||
color: 'info',
|
|
||||||
icon: 'ri-pencil-line',
|
|
||||||
}
|
|
||||||
if (role === 'admin')
|
|
||||||
return {
|
|
||||||
color: 'error',
|
|
||||||
icon: 'ri-server-line',
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
color: 'primary',
|
|
||||||
icon: 'ri-user-line',
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<VRow>
|
|
||||||
<!-- SECTION User Details -->
|
|
||||||
<VCol cols="12">
|
|
||||||
<VCard v-if="props.userData">
|
|
||||||
<VCardText class="text-center pt-12 pb-6">
|
|
||||||
<!-- 👉 Avatar -->
|
|
||||||
<VAvatar
|
|
||||||
rounded
|
|
||||||
:size="120"
|
|
||||||
:color="!props.userData.telemed.avatar ? 'primary' : undefined"
|
|
||||||
:variant="!props.userData.telemed.avatar ? 'tonal' : undefined"
|
|
||||||
>
|
|
||||||
<VImg
|
|
||||||
v-if="props.userData.telemed.avatar"
|
|
||||||
:src="props.userData.telemed.avatar"
|
|
||||||
/>
|
|
||||||
<span
|
|
||||||
v-else
|
|
||||||
class="text-5xl font-weight-medium"
|
|
||||||
>
|
|
||||||
{{ avatarText(props.userData.telemed.name) }}
|
|
||||||
</span>
|
|
||||||
</VAvatar>
|
|
||||||
|
|
||||||
<!-- 👉 User fullName -->
|
|
||||||
<h5 class="text-h5 mt-4">
|
|
||||||
{{ props.userData.telemed.first_name }} {{ props.userData.telemed.last_name }}
|
|
||||||
</h5>
|
|
||||||
|
|
||||||
<!-- 👉 Role chip -->
|
|
||||||
|
|
||||||
<!-- <VChip
|
|
||||||
:color="resolveUserStatusVariant(props.userData.telemed.status==1?'Active':'InActive')"
|
|
||||||
size="small"
|
|
||||||
class="text-capitalize mt-4"
|
|
||||||
>
|
|
||||||
{{ props.userData.telemed.status==1?"Active":'InActive' }}
|
|
||||||
</VChip>-->
|
|
||||||
</VCardText>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- 👉 Details -->
|
|
||||||
<VCardText class="pb-6">
|
|
||||||
<h5 class="text-h5">
|
|
||||||
Details
|
|
||||||
</h5>
|
|
||||||
|
|
||||||
<VDivider class="my-4" />
|
|
||||||
|
|
||||||
<!-- 👉 User Details list -->
|
|
||||||
<VList class="card-list">
|
|
||||||
<VListItem>
|
|
||||||
<VListItemTitle class="text-sm">
|
|
||||||
<span class="font-weight-medium">
|
|
||||||
Email:
|
|
||||||
</span>
|
|
||||||
<span class="text-body-1">{{ props.userData.telemed.email }}</span>
|
|
||||||
</VListItemTitle>
|
|
||||||
</VListItem>
|
|
||||||
|
|
||||||
<VListItem>
|
|
||||||
<VListItemTitle class="text-sm">
|
|
||||||
<span class="font-weight-medium">
|
|
||||||
Address:
|
|
||||||
</span>
|
|
||||||
<span class="text-body-1">{{ props.userData.telemed.home_address }}, {{ props.userData.telemed.city }},{{ props.userData.telemed.state }} {{ props.userData.telemed.zip_code }}</span>
|
|
||||||
</VListItemTitle>
|
|
||||||
</VListItem>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<VListItem>
|
|
||||||
<VListItemTitle class="text-sm">
|
|
||||||
<span class="font-weight-medium">
|
|
||||||
Contact:
|
|
||||||
</span>
|
|
||||||
<span class="text-body-1">{{ props.userData.telemed.phone_number }}</span>
|
|
||||||
</VListItemTitle>
|
|
||||||
</VListItem>
|
|
||||||
<VListItem>
|
|
||||||
<VListItemTitle class="text-sm">
|
|
||||||
<span class="font-weight-medium">
|
|
||||||
Availability:
|
|
||||||
</span>
|
|
||||||
<span class="text-body-1">{{ props.userData.telemed.availability_from }}</span> to<span class="text-body-1">{{ props.userData.telemed.availability_to }}</span>
|
|
||||||
</VListItemTitle>
|
|
||||||
</VListItem>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</VList>
|
|
||||||
</VCardText>
|
|
||||||
|
|
||||||
<!-- 👉 Edit and Suspend button -->
|
|
||||||
<VCardText class="d-flex justify-center" >
|
|
||||||
<VBtn
|
|
||||||
variant="elevated"
|
|
||||||
class="me-4"
|
|
||||||
@click="isUserInfoEditDialogVisible = true"
|
|
||||||
style="display: none;"
|
|
||||||
>
|
|
||||||
Edit
|
|
||||||
</VBtn>
|
|
||||||
<VBtn
|
|
||||||
variant="outlined"
|
|
||||||
color="error"
|
|
||||||
style="display: none;"
|
|
||||||
>
|
|
||||||
Suspend
|
|
||||||
</VBtn>
|
|
||||||
</VCardText>
|
|
||||||
</VCard>
|
|
||||||
</VCol>
|
|
||||||
<!-- !SECTION -->
|
|
||||||
|
|
||||||
<!-- SECTION Current Plan -->
|
|
||||||
<VCol cols="12" v-if="props.userData.plans">
|
|
||||||
<VCard
|
|
||||||
flat
|
|
||||||
class="current-plan"
|
|
||||||
|
|
||||||
>
|
|
||||||
<VCardText class="d-flex">
|
|
||||||
<!-- 👉 Standard Chip -->
|
|
||||||
<VChip
|
|
||||||
color="primary"
|
|
||||||
size="small"
|
|
||||||
>
|
|
||||||
{{ props.userData.plans.title }}
|
|
||||||
</VChip>
|
|
||||||
|
|
||||||
<VSpacer />
|
|
||||||
|
|
||||||
<!-- 👉 Current Price -->
|
|
||||||
<div class="d-flex align-center">
|
|
||||||
<sup class="text-primary text-lg font-weight-medium"> {{ props.userData.plans.currency }}</sup>
|
|
||||||
<h1 class="text-h1 text-primary">
|
|
||||||
{{ props.userData.plans.price }}
|
|
||||||
</h1>
|
|
||||||
<sub class="mt-3"><h6 class="text-h6 font-weight-regular">month</h6></sub>
|
|
||||||
</div>
|
|
||||||
</VCardText>
|
|
||||||
|
|
||||||
<VCardText>
|
|
||||||
<!-- 👉 Price Benefits -->
|
|
||||||
<VList class="card-list">
|
|
||||||
<VListItem
|
|
||||||
>
|
|
||||||
<div class="d-flex align-center">
|
|
||||||
<VIcon
|
|
||||||
size="10"
|
|
||||||
color="medium-emphasis"
|
|
||||||
class="me-2"
|
|
||||||
icon="ri-circle-fill"
|
|
||||||
/>
|
|
||||||
<div class="text-medium-emphasis">
|
|
||||||
{{ props.userData.plans.list_one_title }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</VListItem>
|
|
||||||
<VListItem
|
|
||||||
>
|
|
||||||
<div class="d-flex align-center">
|
|
||||||
<VIcon
|
|
||||||
size="10"
|
|
||||||
color="medium-emphasis"
|
|
||||||
class="me-2"
|
|
||||||
icon="ri-circle-fill"
|
|
||||||
/>
|
|
||||||
<div class="text-medium-emphasis">
|
|
||||||
{{ props.userData.plans.list_sub_title }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</VListItem>
|
|
||||||
|
|
||||||
<VListItem
|
|
||||||
>
|
|
||||||
<div class="d-flex align-center">
|
|
||||||
<VIcon
|
|
||||||
size="10"
|
|
||||||
color="medium-emphasis"
|
|
||||||
class="me-2"
|
|
||||||
icon="ri-circle-fill"
|
|
||||||
/>
|
|
||||||
<div class="text-medium-emphasis">
|
|
||||||
{{ props.userData.plans.list_two_title }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</VListItem>
|
|
||||||
</VList>
|
|
||||||
|
|
||||||
<!-- 👉 Days -->
|
|
||||||
<div class="my-6">
|
|
||||||
<div class="d-flex mt-3 mb-2">
|
|
||||||
<h6 class="text-h6 font-weight-medium">
|
|
||||||
Days
|
|
||||||
</h6>
|
|
||||||
<VSpacer />
|
|
||||||
<h6 class="text-h6 font-weight-medium">
|
|
||||||
26 of 30 Days
|
|
||||||
</h6>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 👉 Progress -->
|
|
||||||
<VProgressLinear
|
|
||||||
rounded
|
|
||||||
:model-value="86"
|
|
||||||
height="8"
|
|
||||||
color="primary"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<p class="text-sm mt-1">
|
|
||||||
4 days remaining
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 👉 Upgrade Plan -->
|
|
||||||
<VBtn
|
|
||||||
block
|
|
||||||
@click="isUpgradePlanDialogVisible = true"
|
|
||||||
>
|
|
||||||
Upgrade Plan
|
|
||||||
</VBtn>
|
|
||||||
</VCardText>
|
|
||||||
</VCard>
|
|
||||||
</VCol>
|
|
||||||
<!-- !SECTION -->
|
|
||||||
</VRow>
|
|
||||||
|
|
||||||
<!-- 👉 Edit user info dialog -->
|
|
||||||
<UserInfoEditDialog
|
|
||||||
v-model:isDialogVisible="isUserInfoEditDialogVisible"
|
|
||||||
:user-data="props.userData"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 👉 Upgrade plan dialog -->
|
|
||||||
<UserUpgradePlanDialog v-model:isDialogVisible="isUpgradePlanDialogVisible" />
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.card-list {
|
|
||||||
--v-card-list-gap: .5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.current-plan {
|
|
||||||
border: 2px solid rgb(var(--v-theme-primary));
|
|
||||||
}
|
|
||||||
|
|
||||||
.text-capitalize {
|
|
||||||
text-transform: capitalize !important;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,197 +0,0 @@
|
|||||||
<script setup>
|
|
||||||
const props = defineProps({
|
|
||||||
userData: {
|
|
||||||
type: Object,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
import CompletedMeetingTab from '@/pages/providers/CompletedMeetingTab.vue';
|
|
||||||
import moment from 'moment';
|
|
||||||
import { onBeforeMount, onMounted, onUnmounted, ref } from 'vue';
|
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
|
||||||
import { useStore } from 'vuex';
|
|
||||||
const store = useStore();
|
|
||||||
const router = useRouter();
|
|
||||||
const route = useRoute();
|
|
||||||
const editDialog = ref(false);
|
|
||||||
const deleteDialog = ref(false);
|
|
||||||
const search = ref('');
|
|
||||||
const appointmentId = ref('');
|
|
||||||
const defaultItem = ref({
|
|
||||||
id: -1,
|
|
||||||
avatar: '',
|
|
||||||
name: '',
|
|
||||||
email: '',
|
|
||||||
dob: '',
|
|
||||||
phone_no: '',
|
|
||||||
});
|
|
||||||
|
|
||||||
const editedItem = ref({ ...defaultItem.value });
|
|
||||||
const editedIndex = ref(-1);
|
|
||||||
const patientMeetingList = ref([]);
|
|
||||||
const isLoading = ref(false);
|
|
||||||
|
|
||||||
// Status options
|
|
||||||
const selectedOptions = [
|
|
||||||
{ text: 'Active', value: 1 },
|
|
||||||
{ text: 'InActive', value: 2 },
|
|
||||||
];
|
|
||||||
|
|
||||||
const refVForm = ref(null);
|
|
||||||
|
|
||||||
// Headers
|
|
||||||
const headers = [
|
|
||||||
// { title: 'Appointment Id', key: 'id' },
|
|
||||||
{ title: 'Patient Name', key: 'patient_name' },
|
|
||||||
{ key: 'appointment_date', sortable: false, title: 'Date' },
|
|
||||||
//{ key: 'Meeting Date', title: 'Start Time' },
|
|
||||||
//{ key: 'end_time', title: 'End Time' },
|
|
||||||
//{ title: 'ACTIONS', key: 'actions' },
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function totalCallDuration(start_time, end_time) {
|
|
||||||
const startMoment = moment(start_time);
|
|
||||||
const endMoment = moment(end_time);
|
|
||||||
const duration = moment.duration(endMoment.diff(startMoment));
|
|
||||||
const hours = String(duration.hours()).padStart(2, '0');
|
|
||||||
const minutes = String(duration.minutes()).padStart(2, '0');
|
|
||||||
const seconds = String(duration.seconds()).padStart(2, '0');
|
|
||||||
|
|
||||||
if (hours === '00' && minutes === '00') {
|
|
||||||
return `00:00:${seconds}`;
|
|
||||||
} else if (hours === '00') {
|
|
||||||
return `00:${minutes}`;
|
|
||||||
} else {
|
|
||||||
return `${hours}:${minutes}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const formatDate = (date) => {
|
|
||||||
const messageDate = new Date(date);
|
|
||||||
const options = {
|
|
||||||
year: 'numeric',
|
|
||||||
month: 'numeric',
|
|
||||||
day: 'numeric',
|
|
||||||
hour: 'numeric', // Change from '2-digit' to 'numeric'
|
|
||||||
minute: '2-digit',
|
|
||||||
hour12: true, // Add hour12: true to get 12-hour format with AM/PM
|
|
||||||
};
|
|
||||||
const formattedDate = messageDate.toLocaleString('en-US', options).replace(/\//g, '-');
|
|
||||||
return `${formattedDate} `;
|
|
||||||
};
|
|
||||||
// Fetch and process the patient meeting list
|
|
||||||
const getPatientMeetingList = async () => {
|
|
||||||
//store.dispatch('updateIsLoading', true);
|
|
||||||
//await store.dispatch('patientMeetingList', { id: route.params.id });
|
|
||||||
// store.dispatch('updateIsLoading', false);
|
|
||||||
|
|
||||||
let list = props.userData.upcomingMeetings;
|
|
||||||
|
|
||||||
patientMeetingList.value = list.map(history => ({
|
|
||||||
...history,
|
|
||||||
appointment_date: formatDate(history.appointment_date+' '+history.appointment_time),
|
|
||||||
duration: totalCallDuration(history.start_time, history.end_time),
|
|
||||||
}));
|
|
||||||
console.log(list);
|
|
||||||
};
|
|
||||||
|
|
||||||
// Lifecycle hooks
|
|
||||||
onBeforeMount(() => {});
|
|
||||||
onMounted(async () => {
|
|
||||||
await getPatientMeetingList();
|
|
||||||
|
|
||||||
});
|
|
||||||
onUnmounted(() => {});
|
|
||||||
const historyDetail = (item, value) => {
|
|
||||||
console.log('item',item.id ,value)
|
|
||||||
if(value == 'notes')
|
|
||||||
router.push('/admin/patient/meeting/notes/' + route.params.id + '/' + item.id);
|
|
||||||
if(value == 'prescription')
|
|
||||||
router.push('/admin/patient/meeting/prescription/' + route.params.id + '/' + item.id);
|
|
||||||
}
|
|
||||||
const menusVariant = [
|
|
||||||
'primary'
|
|
||||||
];
|
|
||||||
const options = [
|
|
||||||
{
|
|
||||||
title: 'Notes',
|
|
||||||
key: 'notes',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Prescription',
|
|
||||||
key: 'prescription',
|
|
||||||
},
|
|
||||||
|
|
||||||
]
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
|
|
||||||
<v-row>
|
|
||||||
<v-col cols="12" md="12">
|
|
||||||
<v-card title="UpComming Meetings">
|
|
||||||
<v-card-text>
|
|
||||||
<v-row>
|
|
||||||
<v-col cols="12" offset-md="8" md="4">
|
|
||||||
<v-text-field
|
|
||||||
v-model="search"
|
|
||||||
label="Search"
|
|
||||||
placeholder="Search ..."
|
|
||||||
append-inner-icon="ri-search-line"
|
|
||||||
single-line
|
|
||||||
hide-details
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
/>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
</v-card-text>
|
|
||||||
<v-data-table
|
|
||||||
:headers="headers"
|
|
||||||
:items="patientMeetingList"
|
|
||||||
:search="search"
|
|
||||||
:items-per-page="5"
|
|
||||||
class="text-no-wrap"
|
|
||||||
>
|
|
||||||
<template #item.id="{ item }">{{ item.id }}</template>
|
|
||||||
|
|
||||||
<template #item.duration="{ item }">{{ item.duration }}</template>
|
|
||||||
<!-- Actions -->
|
|
||||||
<template #item.actions="{ item }">
|
|
||||||
<div class="demo-space-x">
|
|
||||||
<VMenu
|
|
||||||
v-for="menu in menusVariant"
|
|
||||||
:key="menu"
|
|
||||||
>
|
|
||||||
<template #activator="{ props }">
|
|
||||||
|
|
||||||
<i class="ri-more-2-line cursor-pointer" style="font-size: 32px;" v-bind="props"></i>
|
|
||||||
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<v-list>
|
|
||||||
<v-list-item
|
|
||||||
v-for="opt in options"
|
|
||||||
:key="opt.value"
|
|
||||||
@click="historyDetail(item, opt.key)"
|
|
||||||
>
|
|
||||||
{{ opt.title }}
|
|
||||||
</v-list-item>
|
|
||||||
</v-list>
|
|
||||||
</VMenu>
|
|
||||||
</div>
|
|
||||||
<!-- <div class="d-flex gap-1">
|
|
||||||
<VBtn class="text-capitalize text-white" @click="historyDetail(item)"> Detail
|
|
||||||
</VBtn>
|
|
||||||
</div> -->
|
|
||||||
</template>
|
|
||||||
</v-data-table>
|
|
||||||
</v-card>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<CompletedMeetingTab :user-data="props.userData"/>
|
|
||||||
</template>
|
|
@ -1,79 +0,0 @@
|
|||||||
<script setup>
|
|
||||||
import Notes from '@/pages/pages/patient-meetings/notes.vue';
|
|
||||||
import Prescription from '@/pages/pages/patient-meetings/prescription.vue';
|
|
||||||
import moment from 'moment';
|
|
||||||
import { onMounted, ref } from 'vue';
|
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
|
||||||
import { useStore } from 'vuex';
|
|
||||||
const store = useStore();
|
|
||||||
const router = useRouter();
|
|
||||||
const route = useRoute();
|
|
||||||
const patientId = route.params.patient_id;
|
|
||||||
const appointmentId = route.params.id;
|
|
||||||
const currentTab = ref(0);
|
|
||||||
const appointmentID = ref();
|
|
||||||
const doctorName = ref();
|
|
||||||
const startTime = ref();
|
|
||||||
const endTime = ref();
|
|
||||||
const duration = ref();
|
|
||||||
const appointmentData = ref(null);
|
|
||||||
|
|
||||||
onMounted(async () => {
|
|
||||||
store.dispatch('updateIsLoading', true);
|
|
||||||
await store.dispatch('getAppointmentByIdAgent', {
|
|
||||||
patient_id: patientId,
|
|
||||||
appointment_id: appointmentId,
|
|
||||||
});
|
|
||||||
appointmentData.value = store.getters.getSinglePatientAppointment;
|
|
||||||
appointmentID.value = appointmentId;
|
|
||||||
doctorName.value = appointmentData.value.agent_name;
|
|
||||||
startTime.value = appointmentData.value.start_time;
|
|
||||||
endTime.value = appointmentData.value.end_time;
|
|
||||||
duration.value = totalCallDuration(startTime.value, endTime.value);
|
|
||||||
localStorage.setItem('meetingPatientAppointmentId', appointmentID.value);
|
|
||||||
store.dispatch('updateIsLoading', false);
|
|
||||||
});
|
|
||||||
|
|
||||||
const totalCallDuration = (start_time, end_time) => {
|
|
||||||
const startMoment = moment(start_time);
|
|
||||||
const endMoment = moment(end_time);
|
|
||||||
const duration = moment.duration(endMoment.diff(startMoment));
|
|
||||||
const hours = duration.hours();
|
|
||||||
const minutes = duration.minutes();
|
|
||||||
const seconds = duration.seconds();
|
|
||||||
return `${String(hours).padStart(2, '0')}:${String(minutes).padStart(2, '0')}:${String(seconds).padStart(2, '0')}`;
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<VCard>
|
|
||||||
<VCardText>
|
|
||||||
<h3 v-if="appointmentID"> #{{ appointmentID }} By {{ doctorName }} </h3>
|
|
||||||
<span> Meeting duration: <b>{{ duration }}</b></span>
|
|
||||||
</VCardText>
|
|
||||||
<div class="d-flex">
|
|
||||||
<div>
|
|
||||||
<VTabs v-model="currentTab" direction="vertical">
|
|
||||||
<VTab>
|
|
||||||
<VIcon start icon="tabler-edit" />
|
|
||||||
Notes
|
|
||||||
</VTab>
|
|
||||||
<VTab>
|
|
||||||
<VIcon start icon="tabler-lock" />
|
|
||||||
Prescriptions
|
|
||||||
</VTab>
|
|
||||||
</VTabs>
|
|
||||||
</div>
|
|
||||||
<VCardText>
|
|
||||||
<VWindow v-model="currentTab" class="ms-3">
|
|
||||||
<VWindowItem>
|
|
||||||
<Notes />
|
|
||||||
</VWindowItem>
|
|
||||||
<VWindowItem>
|
|
||||||
<Prescription />
|
|
||||||
</VWindowItem>
|
|
||||||
</VWindow>
|
|
||||||
</VCardText>
|
|
||||||
</div>
|
|
||||||
</VCard>
|
|
||||||
</template>
|
|
@ -1,189 +0,0 @@
|
|||||||
<script setup>
|
|
||||||
import moment from 'moment';
|
|
||||||
import { onBeforeMount, onMounted, onUnmounted, ref } from 'vue';
|
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
|
||||||
import { useStore } from 'vuex';
|
|
||||||
|
|
||||||
const store = useStore();
|
|
||||||
const router = useRouter();
|
|
||||||
const route = useRoute();
|
|
||||||
const editDialog = ref(false);
|
|
||||||
const deleteDialog = ref(false);
|
|
||||||
const search = ref('');
|
|
||||||
const appointmentId = ref('');
|
|
||||||
const defaultItem = ref({
|
|
||||||
id: -1,
|
|
||||||
avatar: '',
|
|
||||||
name: '',
|
|
||||||
email: '',
|
|
||||||
dob: '',
|
|
||||||
phone_no: '',
|
|
||||||
});
|
|
||||||
|
|
||||||
const editedItem = ref({ ...defaultItem.value });
|
|
||||||
const editedIndex = ref(-1);
|
|
||||||
const providerMeetingList = ref([]);
|
|
||||||
const isLoading = ref(false);
|
|
||||||
|
|
||||||
// Status options
|
|
||||||
const selectedOptions = [
|
|
||||||
{ text: 'Active', value: 1 },
|
|
||||||
{ text: 'InActive', value: 2 },
|
|
||||||
];
|
|
||||||
|
|
||||||
const refVForm = ref(null);
|
|
||||||
|
|
||||||
// Headers
|
|
||||||
const headers = [
|
|
||||||
// { title: 'Appointment Id', key: 'id' },
|
|
||||||
{ title: 'Patient', key: 'patient_name' },
|
|
||||||
// { key: 'appointment_date', sortable: false, title: 'Date' },
|
|
||||||
{ key: 'start_time', title: 'Start Time' },
|
|
||||||
{ key: 'end_time', title: 'End Time' },
|
|
||||||
{ key: 'duration', title: 'Duration' },
|
|
||||||
{ title: 'ACTIONS', key: 'actions' },
|
|
||||||
];
|
|
||||||
|
|
||||||
// Utility functions
|
|
||||||
function changeDateFormat(dateFormat) {
|
|
||||||
if (dateFormat) {
|
|
||||||
const [datePart, timePart] = dateFormat.split(' ');
|
|
||||||
const [year, month, day] = datePart.split('-');
|
|
||||||
// const formattedDate = `${parseInt(month)}-${parseInt(day)}-${year}`;
|
|
||||||
return `${formattedDate} ${timePart}`;
|
|
||||||
}
|
|
||||||
return dateFormat;
|
|
||||||
}
|
|
||||||
|
|
||||||
function changeFormat(dateFormat) {
|
|
||||||
const [year, month, day] = dateFormat.split('-');
|
|
||||||
return `${parseInt(month)}-${parseInt(day)}-${year}`;
|
|
||||||
}
|
|
||||||
|
|
||||||
function totalCallDuration(start_time, end_time) {
|
|
||||||
const startMoment = moment(start_time);
|
|
||||||
const endMoment = moment(end_time);
|
|
||||||
const duration = moment.duration(endMoment.diff(startMoment));
|
|
||||||
const hours = String(duration.hours()).padStart(2, '0');
|
|
||||||
const minutes = String(duration.minutes()).padStart(2, '0');
|
|
||||||
const seconds = String(duration.seconds()).padStart(2, '0');
|
|
||||||
|
|
||||||
if (hours === '00' && minutes === '00') {
|
|
||||||
return `00:00:${seconds}`;
|
|
||||||
} else if (hours === '00') {
|
|
||||||
return `00:${minutes}:${seconds}`;
|
|
||||||
} else {
|
|
||||||
return `${hours}:${minutes}:${seconds}`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fetch and process the patient meeting list
|
|
||||||
const getPatientMeetingList = async () => {
|
|
||||||
store.dispatch('updateIsLoading', true);
|
|
||||||
await store.dispatch('providerMeetingList', { id: route.params.id });
|
|
||||||
store.dispatch('updateIsLoading', false);
|
|
||||||
|
|
||||||
let list = store.getters.getProviderMeetingList;
|
|
||||||
providerMeetingList.value = list.map(history => ({
|
|
||||||
...history,
|
|
||||||
appointment_date: changeFormat(history.appointment_date),
|
|
||||||
start_time: changeDateFormat(history.start_time),
|
|
||||||
end_time: changeDateFormat(history.end_time),
|
|
||||||
duration: totalCallDuration(history.start_time, history.end_time),
|
|
||||||
}));
|
|
||||||
console.log(list);
|
|
||||||
};
|
|
||||||
|
|
||||||
// Lifecycle hooks
|
|
||||||
onBeforeMount(() => {});
|
|
||||||
onMounted(async () => {
|
|
||||||
await getPatientMeetingList();
|
|
||||||
|
|
||||||
});
|
|
||||||
onUnmounted(() => {});
|
|
||||||
const historyDetail = (item, value) => {
|
|
||||||
console.log('item',item.id ,value)
|
|
||||||
if(value == 'notes')
|
|
||||||
router.push('/admin/patient/meeting/notes/' + item.patient_id + '/' + item.id);
|
|
||||||
if(value == 'prescription')
|
|
||||||
router.push('/admin/patient/meeting/prescription/' + item.patient_id + '/' + item.id);
|
|
||||||
}
|
|
||||||
const menusVariant = [
|
|
||||||
'primary'
|
|
||||||
];
|
|
||||||
const options = [
|
|
||||||
{
|
|
||||||
title: 'Notes',
|
|
||||||
key: 'notes',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Prescription',
|
|
||||||
key: 'prescription',
|
|
||||||
},
|
|
||||||
|
|
||||||
]
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<v-row>
|
|
||||||
<v-col cols="12" md="12">
|
|
||||||
<v-card title="Meetings">
|
|
||||||
<v-card-text>
|
|
||||||
<v-row>
|
|
||||||
<v-col cols="12" offset-md="8" md="4">
|
|
||||||
<v-text-field
|
|
||||||
v-model="search"
|
|
||||||
label="Search"
|
|
||||||
placeholder="Search ..."
|
|
||||||
append-inner-icon="ri-search-line"
|
|
||||||
single-line
|
|
||||||
hide-details
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
/>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
</v-card-text>
|
|
||||||
<v-data-table
|
|
||||||
:headers="headers"
|
|
||||||
:items="providerMeetingList"
|
|
||||||
:search="search"
|
|
||||||
:items-per-page="5"
|
|
||||||
class="text-no-wrap"
|
|
||||||
>
|
|
||||||
<template #item.id="{ item }">{{ item.id }}</template>
|
|
||||||
<template #item.duration="{ item }">{{ item.duration }}</template>
|
|
||||||
<!-- Actions -->
|
|
||||||
<template #item.actions="{ item }">
|
|
||||||
<div class="demo-space-x">
|
|
||||||
<VMenu
|
|
||||||
v-for="menu in menusVariant"
|
|
||||||
:key="menu"
|
|
||||||
>
|
|
||||||
<template #activator="{ props }">
|
|
||||||
|
|
||||||
<i class="ri-more-2-line cursor-pointer" v-bind="props"></i>
|
|
||||||
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<v-list>
|
|
||||||
<v-list-item
|
|
||||||
v-for="opt in options"
|
|
||||||
:key="opt.value"
|
|
||||||
@click="historyDetail(item, opt.key)"
|
|
||||||
>
|
|
||||||
{{ opt.title }}
|
|
||||||
</v-list-item>
|
|
||||||
</v-list>
|
|
||||||
</VMenu>
|
|
||||||
</div>
|
|
||||||
<!-- <div class="d-flex gap-1">
|
|
||||||
<VBtn class="text-capitalize text-white" @click="historyDetail(item)"> Detail
|
|
||||||
</VBtn>
|
|
||||||
</div> -->
|
|
||||||
</template>
|
|
||||||
</v-data-table>
|
|
||||||
</v-card>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
</template>
|
|
@ -1,114 +0,0 @@
|
|||||||
<script setup>
|
|
||||||
import NotesPanel from '@/pages/providers/NotesPanel.vue'
|
|
||||||
import PrescriptionPanel from '@/pages/providers/PrescriptionPanel.vue'
|
|
||||||
import ProviderBioPanel from '@/pages/providers/ProviderBioPanel.vue'
|
|
||||||
import ProviderTabOverview from '@/pages/providers/ProviderTabOverview.vue'
|
|
||||||
|
|
||||||
import UserTabNotifications from '@/views/apps/user/view/UserTabNotifications.vue'
|
|
||||||
import { useStore } from 'vuex'
|
|
||||||
const patientDtail = ref(null);
|
|
||||||
|
|
||||||
const store = useStore();
|
|
||||||
const route = useRoute('apps-user-view-id')
|
|
||||||
const userTab = ref(null)
|
|
||||||
|
|
||||||
const tabs = [
|
|
||||||
{
|
|
||||||
icon: 'ri-group-line',
|
|
||||||
title: 'Overview',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: 'ri-lock-2-line',
|
|
||||||
title: 'Notes',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: 'ri-bookmark-line',
|
|
||||||
title: 'Prescriptions',
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// icon: 'ri-notification-4-line',
|
|
||||||
// title: 'Notifications',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// icon: 'ri-link-m',
|
|
||||||
// title: 'Connections',
|
|
||||||
// },
|
|
||||||
]
|
|
||||||
const getPatientDeatail = async () => {
|
|
||||||
store.dispatch('updateIsLoading', true);
|
|
||||||
await store.dispatch('providerDetial', { id: route.params.id });
|
|
||||||
store.dispatch('updateIsLoading', false);
|
|
||||||
|
|
||||||
let list = store.getters.getProviderDetail;
|
|
||||||
patientDtail.value=list
|
|
||||||
console.log(list.patient);
|
|
||||||
};
|
|
||||||
onMounted(async () => {
|
|
||||||
await getPatientDeatail();
|
|
||||||
|
|
||||||
});
|
|
||||||
//const { data: userData } = await useApi(`/apps/users/${ route.params.id }`)
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<VRow v-if="patientDtail">
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
md="5"
|
|
||||||
lg="4"
|
|
||||||
>
|
|
||||||
<ProviderBioPanel :user-data="patientDtail" />
|
|
||||||
</VCol>
|
|
||||||
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
md="7"
|
|
||||||
lg="8"
|
|
||||||
>
|
|
||||||
<VTabs
|
|
||||||
v-model="userTab"
|
|
||||||
class="v-tabs-pill"
|
|
||||||
>
|
|
||||||
<VTab
|
|
||||||
v-for="tab in tabs"
|
|
||||||
:key="tab.icon"
|
|
||||||
>
|
|
||||||
<VIcon
|
|
||||||
start
|
|
||||||
:icon="tab.icon"
|
|
||||||
/>
|
|
||||||
<span>{{ tab.title }}</span>
|
|
||||||
</VTab>
|
|
||||||
</VTabs>
|
|
||||||
|
|
||||||
<VWindow
|
|
||||||
v-model="userTab"
|
|
||||||
class="mt-6 disable-tab-transition"
|
|
||||||
:touch="false"
|
|
||||||
>
|
|
||||||
<VWindowItem>
|
|
||||||
<ProviderTabOverview :user-data="patientDtail"/>
|
|
||||||
</VWindowItem>
|
|
||||||
|
|
||||||
<VWindowItem>
|
|
||||||
<NotesPanel :notes-data="patientDtail"/>
|
|
||||||
</VWindowItem>
|
|
||||||
|
|
||||||
<VWindowItem>
|
|
||||||
<PrescriptionPanel :prescription-data="patientDtail"/>
|
|
||||||
</VWindowItem>
|
|
||||||
|
|
||||||
<VWindowItem>
|
|
||||||
<UserTabNotifications />
|
|
||||||
</VWindowItem>
|
|
||||||
|
|
||||||
|
|
||||||
</VWindow>
|
|
||||||
</VCol>
|
|
||||||
</VRow>
|
|
||||||
<VCard v-else>
|
|
||||||
<VCardTitle class="text-center">
|
|
||||||
No User Found
|
|
||||||
</VCardTitle>
|
|
||||||
</VCard>
|
|
||||||
</template>
|
|
@ -1,695 +0,0 @@
|
|||||||
<script setup>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import { useStore } from 'vuex';
|
|
||||||
const store = useStore()
|
|
||||||
const editDialog = ref(false)
|
|
||||||
const deleteDialog = ref(false)
|
|
||||||
const search = ref('')
|
|
||||||
const defaultItem = ref({
|
|
||||||
id: -1,
|
|
||||||
avatar: '',
|
|
||||||
name: '',
|
|
||||||
email: '',
|
|
||||||
// dob: '',
|
|
||||||
phone_no: '',
|
|
||||||
|
|
||||||
})
|
|
||||||
const router = useRouter()
|
|
||||||
const editedItem = ref(defaultItem.value)
|
|
||||||
const editedIndex = ref(-1)
|
|
||||||
const providersList = ref([])
|
|
||||||
const isLoading=ref(false)
|
|
||||||
// status options
|
|
||||||
const selectedOptions = [
|
|
||||||
{
|
|
||||||
text: 'Active',
|
|
||||||
value: 1,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: 'InActive',
|
|
||||||
value: 2,
|
|
||||||
},
|
|
||||||
|
|
||||||
]
|
|
||||||
|
|
||||||
const refVForm = ref(null)
|
|
||||||
|
|
||||||
|
|
||||||
const formatPhoneNumber = () => {
|
|
||||||
console.log(editedItem.value)
|
|
||||||
// Remove non-numeric characters from the input
|
|
||||||
const numericValue = editedItem.value.phone_no.replace(/\D/g, '');
|
|
||||||
|
|
||||||
// Apply formatting logic
|
|
||||||
if (numericValue.length <= 10) {
|
|
||||||
editedItem.value.phone_no = numericValue.replace(/(\d{3})(\d{3})(\d{4})/, '($1) $2-$3');
|
|
||||||
} else {
|
|
||||||
// Limit the input to a maximum of 14 characters
|
|
||||||
const truncatedValue = numericValue.slice(0, 10);
|
|
||||||
editedItem.value.phone_no = truncatedValue.replace(/(\d{3})(\d{3})(\d{4})/, '($1) $2-$3');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
// headers
|
|
||||||
const headers = [
|
|
||||||
{
|
|
||||||
title: 'ID',
|
|
||||||
key: 'id',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'NAME',
|
|
||||||
key: 'name',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'EMAIL',
|
|
||||||
key: 'email',
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// title: 'Date Of Birth',
|
|
||||||
// key: 'dob',
|
|
||||||
// },
|
|
||||||
{
|
|
||||||
title: 'Phone',
|
|
||||||
key: 'phone_no',
|
|
||||||
},
|
|
||||||
|
|
||||||
// {
|
|
||||||
// title: 'ACTIONS',
|
|
||||||
// key: 'actions',
|
|
||||||
// },
|
|
||||||
]
|
|
||||||
|
|
||||||
const resolveStatusVariant = status => {
|
|
||||||
if (status === 1)
|
|
||||||
return {
|
|
||||||
color: 'primary',
|
|
||||||
text: 'Current',
|
|
||||||
}
|
|
||||||
else if (status === 2)
|
|
||||||
return {
|
|
||||||
color: 'success',
|
|
||||||
text: 'Professional',
|
|
||||||
}
|
|
||||||
else if (status === 3)
|
|
||||||
return {
|
|
||||||
color: 'error',
|
|
||||||
text: 'Rejected',
|
|
||||||
}
|
|
||||||
else if (status === 4)
|
|
||||||
return {
|
|
||||||
color: 'warning',
|
|
||||||
text: 'Resigned',
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return {
|
|
||||||
color: 'info',
|
|
||||||
text: 'Applied',
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const editItem = item => {
|
|
||||||
editedIndex.value = providersList.value.indexOf(item)
|
|
||||||
editedItem.value = { ...item }
|
|
||||||
editDialog.value = true
|
|
||||||
}
|
|
||||||
|
|
||||||
const deleteItem = item => {
|
|
||||||
editedIndex.value = providersList.value.indexOf(item)
|
|
||||||
editedItem.value = { ...item }
|
|
||||||
deleteDialog.value = true
|
|
||||||
}
|
|
||||||
|
|
||||||
const close = () => {
|
|
||||||
editDialog.value = false
|
|
||||||
editedIndex.value = -1
|
|
||||||
editedItem.value = { ...defaultItem.value }
|
|
||||||
}
|
|
||||||
|
|
||||||
const closeDelete = () => {
|
|
||||||
deleteDialog.value = false
|
|
||||||
editedIndex.value = -1
|
|
||||||
editedItem.value = { ...defaultItem.value }
|
|
||||||
}
|
|
||||||
|
|
||||||
const save = async () => {
|
|
||||||
const { valid } = await refVForm.value.validate()
|
|
||||||
console.log(valid)
|
|
||||||
if (valid) {
|
|
||||||
if (editedIndex.value > -1){
|
|
||||||
await store.dispatch('providerUpdate',{
|
|
||||||
id: editedItem.value.id,
|
|
||||||
first_name: editedItem.value.first_name,
|
|
||||||
last_name: editedItem.value.last_name,
|
|
||||||
email: editedItem.value.email,
|
|
||||||
})
|
|
||||||
Object.assign(providersList.value[editedIndex.value], editedItem.value)
|
|
||||||
}else{
|
|
||||||
providersList.value.push(editedItem.value)
|
|
||||||
}
|
|
||||||
close()
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
const states = ref([
|
|
||||||
|
|
||||||
{ name: 'Alabama', abbreviation: 'AL' },
|
|
||||||
{ name: 'Alaska', abbreviation: 'AK' },
|
|
||||||
{ name: 'Arizona', abbreviation: 'AZ' },
|
|
||||||
{ name: 'Arkansas', abbreviation: 'AR' },
|
|
||||||
{ name: 'Howland Island', abbreviation: 'UM-84' },
|
|
||||||
{ name: 'Delaware', abbreviation: 'DE' },
|
|
||||||
{ name: 'Maryland', abbreviation: 'MD' },
|
|
||||||
{ name: 'Baker Island', abbreviation: 'UM-81' },
|
|
||||||
{ name: 'Kingman Reef', abbreviation: 'UM-89' },
|
|
||||||
{ name: 'New Hampshire', abbreviation: 'NH' },
|
|
||||||
{ name: 'Wake Island', abbreviation: 'UM-79' },
|
|
||||||
{ name: 'Kansas', abbreviation: 'KS' },
|
|
||||||
{ name: 'Texas', abbreviation: 'TX' },
|
|
||||||
{ name: 'Nebraska', abbreviation: 'NE' },
|
|
||||||
{ name: 'Vermont', abbreviation: 'VT' },
|
|
||||||
{ name: 'Jarvis Island', abbreviation: 'UM-86' },
|
|
||||||
{ name: 'Hawaii', abbreviation: 'HI' },
|
|
||||||
{ name: 'Guam', abbreviation: 'GU' },
|
|
||||||
{ name: 'United States Virgin Islands', abbreviation: 'VI' },
|
|
||||||
{ name: 'Utah', abbreviation: 'UT' },
|
|
||||||
{ name: 'Oregon', abbreviation: 'OR' },
|
|
||||||
{ name: 'California', abbreviation: 'CA' },
|
|
||||||
{ name: 'New Jersey', abbreviation: 'NJ' },
|
|
||||||
{ name: 'North Dakota', abbreviation: 'ND' },
|
|
||||||
{ name: 'Kentucky', abbreviation: 'KY' },
|
|
||||||
{ name: 'Minnesota', abbreviation: 'MN' },
|
|
||||||
{ name: 'Oklahoma', abbreviation: 'OK' },
|
|
||||||
{ name: 'Pennsylvania', abbreviation: 'PA' },
|
|
||||||
{ name: 'New Mexico', abbreviation: 'NM' },
|
|
||||||
{ name: 'American Samoa', abbreviation: 'AS' },
|
|
||||||
{ name: 'Illinois', abbreviation: 'IL' },
|
|
||||||
{ name: 'Michigan', abbreviation: 'MI' },
|
|
||||||
{ name: 'Virginia', abbreviation: 'VA' },
|
|
||||||
{ name: 'Johnston Atoll', abbreviation: 'UM-67' },
|
|
||||||
{ name: 'West Virginia', abbreviation: 'WV' },
|
|
||||||
{ name: 'Mississippi', abbreviation: 'MS' },
|
|
||||||
{ name: 'Northern Mariana Islands', abbreviation: 'MP' },
|
|
||||||
{ name: 'United States Minor Outlying Islands', abbreviation: 'UM' },
|
|
||||||
{ name: 'Massachusetts', abbreviation: 'MA' },
|
|
||||||
{ name: 'Connecticut', abbreviation: 'CT' },
|
|
||||||
{ name: 'Florida', abbreviation: 'FL' },
|
|
||||||
{ name: 'District of Columbia', abbreviation: 'DC' },
|
|
||||||
{ name: 'Midway Atoll', abbreviation: 'UM-71' },
|
|
||||||
{ name: 'Navassa Island', abbreviation: 'UM-76' },
|
|
||||||
{ name: 'Indiana', abbreviation: 'IN' },
|
|
||||||
{ name: 'Wisconsin', abbreviation: 'WI' },
|
|
||||||
{ name: 'Wyoming', abbreviation: 'WY' },
|
|
||||||
{ name: 'South Carolina', abbreviation: 'SC' },
|
|
||||||
{ name: 'Arkansas', abbreviation: 'AR' },
|
|
||||||
{ name: 'South Dakota', abbreviation: 'SD' },
|
|
||||||
{ name: 'Montana', abbreviation: 'MT' },
|
|
||||||
{ name: 'North Carolina', abbreviation: 'NC' },
|
|
||||||
{ name: 'Palmyra Atoll', abbreviation: 'UM-95' },
|
|
||||||
{ name: 'Puerto Rico', abbreviation: 'PR' },
|
|
||||||
{ name: 'Colorado', abbreviation: 'CO' },
|
|
||||||
{ name: 'Missouri', abbreviation: 'MO' },
|
|
||||||
{ name: 'New York', abbreviation: 'NY' },
|
|
||||||
{ name: 'Maine', abbreviation: 'ME' },
|
|
||||||
{ name: 'Tennessee', abbreviation: 'TN' },
|
|
||||||
{ name: 'Georgia', abbreviation: 'GA' },
|
|
||||||
{ name: 'Louisiana', abbreviation: 'LA' },
|
|
||||||
{ name: 'Nevada', abbreviation: 'NV' },
|
|
||||||
{ name: 'Iowa', abbreviation: 'IA' },
|
|
||||||
{ name: 'Idaho', abbreviation: 'ID' },
|
|
||||||
{ name: 'Rhode Island', abbreviation: 'RI' },
|
|
||||||
{ name: 'Washington', abbreviation: 'WA' },
|
|
||||||
{ name: 'Ohio', abbreviation: 'OH' },
|
|
||||||
{ name: 'All', abbreviation: 'All' }
|
|
||||||
// ... (add the rest of the states)
|
|
||||||
]);
|
|
||||||
|
|
||||||
const sortedStates = computed(() => {
|
|
||||||
const sorted = states.value.slice().sort((a, b) => {
|
|
||||||
// Move "All" to the beginning
|
|
||||||
if (a.name === 'All') return -1;
|
|
||||||
if (b.name === 'All') return 1;
|
|
||||||
// Sort other states alphabetically
|
|
||||||
return a.name.localeCompare(b.name);
|
|
||||||
});
|
|
||||||
return sorted;
|
|
||||||
});
|
|
||||||
const getMettings = (Item) => {
|
|
||||||
router.push('/admin/provider/meetings/'+Item.id);
|
|
||||||
}
|
|
||||||
const deleteItemConfirm = async() => {
|
|
||||||
console.log('editedIndex.value',editedIndex.value,editedItem.value.id)
|
|
||||||
await store.dispatch('providerDelete',{
|
|
||||||
id: editedItem.value.id
|
|
||||||
})
|
|
||||||
providersList.value.splice(editedIndex.value, 1)
|
|
||||||
closeDelete()
|
|
||||||
}
|
|
||||||
const getprovidersList = computed(async () => {
|
|
||||||
providersList.value = [];
|
|
||||||
console.log('getprovidersFilterList',store.getters.getProvidersList)
|
|
||||||
let list = store.getters.getProvidersList
|
|
||||||
store.dispatch('updateIsLoading', false)
|
|
||||||
providersList.value = list
|
|
||||||
return providersList.value
|
|
||||||
});
|
|
||||||
|
|
||||||
const getProviderFilter = async() => {
|
|
||||||
store.dispatch('updateIsLoading', true)
|
|
||||||
await store.dispatch('providersFilterList',{
|
|
||||||
gender: filter.value.gender.toLowerCase(),
|
|
||||||
state: filter.value.state,
|
|
||||||
availabilityFrom: filter.value.availabilityFrom,
|
|
||||||
availabilityTo:filter.value.availabilityTo,
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
store.dispatch('updateIsLoading', false)
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(async() => {
|
|
||||||
store.dispatch('updateIsLoading', true)
|
|
||||||
await store.dispatch('providersList')
|
|
||||||
store.dispatch('updateIsLoading', false)
|
|
||||||
|
|
||||||
})
|
|
||||||
const filter = ref({
|
|
||||||
practics_state:'',
|
|
||||||
gender: 'All',
|
|
||||||
state: 'All',
|
|
||||||
specialty:'',
|
|
||||||
availabilityFrom:'All',
|
|
||||||
availabilityTo:'All'
|
|
||||||
// plan: '',
|
|
||||||
})
|
|
||||||
// const onSubcriptionChange = async(newvalue)=> {
|
|
||||||
// filter.value.plan = newvalue;
|
|
||||||
// console.log("Plan",filter.value.plan );
|
|
||||||
// await getPatientFilter();
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
const onSpecialty = async(newvalue)=> {
|
|
||||||
if(newvalue.length > 3){
|
|
||||||
filter.value.specialty = newvalue;
|
|
||||||
console.log("onSpecialty",filter.value.specialty);
|
|
||||||
}
|
|
||||||
|
|
||||||
// await getPatientFilter();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
const onGenderChange = async(newvalue)=> {
|
|
||||||
filter.value.gender = newvalue;
|
|
||||||
console.log("gender",filter.value.gender);
|
|
||||||
await getProviderFilter();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
const onStateChange = async(newvalue)=> {
|
|
||||||
filter.value.state = newvalue;
|
|
||||||
console.log("state",filter.value.state);
|
|
||||||
await getProviderFilter();
|
|
||||||
|
|
||||||
}
|
|
||||||
const onAvailabilityFromChange = async(newvalue)=> {
|
|
||||||
filter.value.availabilityFrom = newvalue;
|
|
||||||
console.log("frmo",filter.value.availabilityFrom);
|
|
||||||
await getProviderFilter();
|
|
||||||
|
|
||||||
}
|
|
||||||
const onAvailabilityToChange = async(newvalue)=> {
|
|
||||||
filter.value.availabilityTo = newvalue;
|
|
||||||
console.log("to",filter.value.availabilityTo);
|
|
||||||
await getProviderFilter();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
const onPracticsStateChange = async(newvalue)=> {
|
|
||||||
filter.value.practics_state = newvalue;
|
|
||||||
console.log("state",filter.value.practics_state);
|
|
||||||
await getProviderFilter();
|
|
||||||
|
|
||||||
}
|
|
||||||
const onDateRangeChange = async(newvalue)=> {
|
|
||||||
filter.value.date_range = newvalue;
|
|
||||||
console.log("Length", newvalue.length);
|
|
||||||
}
|
|
||||||
|
|
||||||
const timeOptions = computed(() => {
|
|
||||||
const options = ['All'];
|
|
||||||
|
|
||||||
// Loop through the hours from 12 to 23 (for 12:00 PM to 11:00 PM)
|
|
||||||
for (let hour = 12; hour <= 23; hour++) {
|
|
||||||
// Loop through the minutes (0 and 30)
|
|
||||||
for (let minute of [0, 30]) {
|
|
||||||
// Construct the time string
|
|
||||||
const timeString = `${hour.toString().padStart(2, '0')}:${minute.toString().padStart(2, '0')}`;
|
|
||||||
options.push(timeString);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add the time option for 24:00 (midnight)
|
|
||||||
options.push('24:00');
|
|
||||||
|
|
||||||
return options;
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<v-row>
|
|
||||||
<v-col cols="12" md="12" v-if="getprovidersList">
|
|
||||||
<VCard title="Providers">
|
|
||||||
<VCardText >
|
|
||||||
<VRow>
|
|
||||||
<!-- <VCol
|
|
||||||
cols="12"
|
|
||||||
|
|
||||||
md="3"
|
|
||||||
>
|
|
||||||
<VSelect
|
|
||||||
v-model="filter.plan"
|
|
||||||
label="Subcription"
|
|
||||||
placeholder="Subcription"
|
|
||||||
density="comfortable"
|
|
||||||
:items="subcriptionLists"
|
|
||||||
item-title="title"
|
|
||||||
item-value="slug"
|
|
||||||
@update:model-value="onSubcriptionChange"
|
|
||||||
/>
|
|
||||||
|
|
||||||
|
|
||||||
</VCol> -->
|
|
||||||
<!-- <VCol
|
|
||||||
cols="12"
|
|
||||||
md="2"
|
|
||||||
>
|
|
||||||
<VSelect
|
|
||||||
v-model="filter.practics_state"
|
|
||||||
label="Practics State"
|
|
||||||
density="comfortable"
|
|
||||||
:items="sortedStates"
|
|
||||||
item-title="name"
|
|
||||||
item-value="abbreviation"
|
|
||||||
@update:model-value="onPracticsStateChange"
|
|
||||||
|
|
||||||
/>
|
|
||||||
</VCol> -->
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
|
|
||||||
md="2"
|
|
||||||
>
|
|
||||||
|
|
||||||
<VSelect
|
|
||||||
v-model="filter.gender"
|
|
||||||
label="Gender"
|
|
||||||
placeholder="Gender"
|
|
||||||
density="comfortable"
|
|
||||||
:items="['All','Male', 'Female']"
|
|
||||||
@update:model-value="onGenderChange"
|
|
||||||
|
|
||||||
/>
|
|
||||||
|
|
||||||
</VCol>
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
|
|
||||||
md="2"
|
|
||||||
>
|
|
||||||
<VSelect
|
|
||||||
v-model="filter.state"
|
|
||||||
label="State"
|
|
||||||
density="comfortable"
|
|
||||||
:items="sortedStates"
|
|
||||||
item-title="name"
|
|
||||||
item-value="abbreviation"
|
|
||||||
@update:model-value="onStateChange"
|
|
||||||
|
|
||||||
/>
|
|
||||||
|
|
||||||
</VCol>
|
|
||||||
|
|
||||||
<!-- <VCol
|
|
||||||
cols="12"
|
|
||||||
md="2"
|
|
||||||
>
|
|
||||||
<VTextField
|
|
||||||
v-model="filter.specialty"
|
|
||||||
label="Speciality"
|
|
||||||
append-inner-icon="ri-search-line"
|
|
||||||
@update:model-value="onSpecialty"
|
|
||||||
/>
|
|
||||||
</VCol> -->
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
md="3"
|
|
||||||
>
|
|
||||||
<VSelect @update:model-value="onAvailabilityFromChange" v-model="filter.availabilityFrom" label="Availability From" :items="timeOptions" density="comfortable" />
|
|
||||||
</VCol>
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
md="3"
|
|
||||||
>
|
|
||||||
<VSelect @update:model-value="onAvailabilityToChange" v-model="filter.availabilityTo" label="Availability To" :items="timeOptions" density="comfortable"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</VCol>
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
md="2"
|
|
||||||
>
|
|
||||||
<VTextField
|
|
||||||
v-model="search"
|
|
||||||
label="Search"
|
|
||||||
placeholder="Search ..."
|
|
||||||
append-inner-icon="ri-search-line"
|
|
||||||
single-line
|
|
||||||
hide-details
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
</VRow>
|
|
||||||
</VCardText>
|
|
||||||
<VDataTable
|
|
||||||
:headers="headers"
|
|
||||||
:items="providersList"
|
|
||||||
:search="search"
|
|
||||||
:items-per-page="5"
|
|
||||||
class="text-no-wrap"
|
|
||||||
>
|
|
||||||
<!-- full name -->
|
|
||||||
<template #item.name="{ item }">
|
|
||||||
<div class="d-flex align-center">
|
|
||||||
<!-- avatar -->
|
|
||||||
<VAvatar
|
|
||||||
size="32"
|
|
||||||
:color="item.avatar ? '' : 'primary'"
|
|
||||||
:class="item.avatar ? '' : 'v-avatar-light-bg primary--text'"
|
|
||||||
:variant="!item.avatar ? 'tonal' : undefined"
|
|
||||||
>
|
|
||||||
<VImg
|
|
||||||
v-if="item.avatar"
|
|
||||||
:src="item.avatar"
|
|
||||||
/>
|
|
||||||
<span
|
|
||||||
v-else
|
|
||||||
class="text-sm"
|
|
||||||
>{{ avatarText(item.name) }}</span>
|
|
||||||
</VAvatar>
|
|
||||||
|
|
||||||
<div class="d-flex flex-column ms-3">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'admin-provider-profile', params: { id: item.id } }"
|
|
||||||
class=" highlighted"
|
|
||||||
>
|
|
||||||
<span class="d-block font-weight-medium text-truncate">{{ item.name }}</span>
|
|
||||||
</router-link>
|
|
||||||
<small>{{ item.post }}</small>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<!-- status -->
|
|
||||||
<template #item.status="{ item }">
|
|
||||||
<VChip
|
|
||||||
:color="resolveStatusVariant(item.status).color"
|
|
||||||
density="comfortable"
|
|
||||||
>
|
|
||||||
{{ resolveStatusVariant(item.status).text }}
|
|
||||||
</VChip>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<!-- Actions -->
|
|
||||||
<template #item.actions="{ item }">
|
|
||||||
<div class="d-flex gap-1">
|
|
||||||
<IconBtn
|
|
||||||
size="small"
|
|
||||||
@click="editItem(item)"
|
|
||||||
style="display: none;"
|
|
||||||
>
|
|
||||||
<VIcon icon="ri-pencil-line" />
|
|
||||||
</IconBtn>
|
|
||||||
<IconBtn
|
|
||||||
size="small"
|
|
||||||
@click="deleteItem(item)"
|
|
||||||
style="display: none;"
|
|
||||||
>
|
|
||||||
<VIcon icon="ri-delete-bin-line" />
|
|
||||||
</IconBtn>
|
|
||||||
<IconBtn
|
|
||||||
size="small"
|
|
||||||
@click="getMettings(item)"
|
|
||||||
>
|
|
||||||
<VIcon icon="ri-time-line" />
|
|
||||||
</IconBtn>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</VDataTable>
|
|
||||||
</VCard>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<!-- 👉 Edit Dialog -->
|
|
||||||
<VDialog
|
|
||||||
v-model="editDialog"
|
|
||||||
max-width="600px"
|
|
||||||
>
|
|
||||||
<VForm ref="refVForm" >
|
|
||||||
<VCard>
|
|
||||||
<VCardTitle>
|
|
||||||
<span class="headline">Edit Provider</span>
|
|
||||||
</VCardTitle>
|
|
||||||
|
|
||||||
<VCardText>
|
|
||||||
<VContainer >
|
|
||||||
|
|
||||||
<VRow>
|
|
||||||
<!-- fullName -->
|
|
||||||
<VCol cols="12" md="6">
|
|
||||||
<VTextField
|
|
||||||
v-model="editedItem.first_name"
|
|
||||||
label="First Name"
|
|
||||||
:rules="[requiredFirstName]"
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
<VCol cols="12" md="6">
|
|
||||||
<VTextField
|
|
||||||
v-model="editedItem.last_name"
|
|
||||||
label="Last Name"
|
|
||||||
:rules="[requiredLastName]"
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
|
|
||||||
<!-- email -->
|
|
||||||
<VCol cols="12" sm="6" md="12">
|
|
||||||
<VTextField
|
|
||||||
v-model="editedItem.email"
|
|
||||||
label="Email"
|
|
||||||
:rules="[requiredEmail, emailValidator]"
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <VCol cols="12" sm="6" md="12">
|
|
||||||
<VTextField
|
|
||||||
v-model="editedItem.dob"
|
|
||||||
label="Date Of Birth"
|
|
||||||
/>
|
|
||||||
</VCol> -->
|
|
||||||
<VCol cols="12" sm="6" md="12">
|
|
||||||
<VTextField v-model="editedItem.phone_no" label="Phone Number" pattern="^\(\d{3}\) \d{3}-\d{4}$"
|
|
||||||
:rules="[requiredPhone, validUSAPhone]" placeholder="i.e. (000) 000-0000"
|
|
||||||
@input="formatPhoneNumber" max="14" density="comfortable" />
|
|
||||||
</VCol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- status -->
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
|
|
||||||
md="12"
|
|
||||||
>
|
|
||||||
<VSelect
|
|
||||||
v-model="editedItem.status"
|
|
||||||
:items="selectedOptions"
|
|
||||||
item-title="text"
|
|
||||||
item-value="value"
|
|
||||||
label="Status"
|
|
||||||
variant="outlined"
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
</VRow>
|
|
||||||
</VContainer>
|
|
||||||
</VCardText>
|
|
||||||
|
|
||||||
<VCardActions>
|
|
||||||
<VSpacer />
|
|
||||||
|
|
||||||
<VBtn
|
|
||||||
color="error"
|
|
||||||
variant="outlined"
|
|
||||||
@click="close"
|
|
||||||
>
|
|
||||||
Cancel
|
|
||||||
</VBtn>
|
|
||||||
|
|
||||||
<VBtn
|
|
||||||
color="success"
|
|
||||||
variant="elevated"
|
|
||||||
@click="save"
|
|
||||||
>
|
|
||||||
Save
|
|
||||||
</VBtn>
|
|
||||||
|
|
||||||
</VCardActions>
|
|
||||||
</VCard>
|
|
||||||
</VForm>
|
|
||||||
</VDialog>
|
|
||||||
|
|
||||||
<!-- 👉 Delete Dialog -->
|
|
||||||
<VDialog
|
|
||||||
v-model="deleteDialog"
|
|
||||||
max-width="500px"
|
|
||||||
>
|
|
||||||
<VCard>
|
|
||||||
<VCardTitle>
|
|
||||||
Are you sure you want to delete this item?
|
|
||||||
</VCardTitle>
|
|
||||||
|
|
||||||
<VCardActions>
|
|
||||||
<VSpacer />
|
|
||||||
|
|
||||||
<VBtn
|
|
||||||
color="error"
|
|
||||||
variant="outlined"
|
|
||||||
@click="closeDelete"
|
|
||||||
>
|
|
||||||
Cancel
|
|
||||||
</VBtn>
|
|
||||||
|
|
||||||
<VBtn
|
|
||||||
color="success"
|
|
||||||
variant="elevated"
|
|
||||||
@click="deleteItemConfirm"
|
|
||||||
>
|
|
||||||
OK
|
|
||||||
</VBtn>
|
|
||||||
|
|
||||||
<VSpacer />
|
|
||||||
</VCardActions>
|
|
||||||
</VCard>
|
|
||||||
</VDialog>
|
|
||||||
</template>
|
|
||||||
<style scoped>
|
|
||||||
.highlighted {
|
|
||||||
/* Add your desired highlighting styles here */
|
|
||||||
font-weight: bold;
|
|
||||||
color: #a169ff; /* or any other color you prefer */
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,748 +0,0 @@
|
|||||||
<script setup>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import { useStore } from 'vuex';
|
|
||||||
const store = useStore()
|
|
||||||
const editDialog = ref(false)
|
|
||||||
const deleteDialog = ref(false)
|
|
||||||
const search = ref('')
|
|
||||||
const defaultItem = ref({
|
|
||||||
id: -1,
|
|
||||||
avatar: '',
|
|
||||||
name: '',
|
|
||||||
email: '',
|
|
||||||
// dob: '',
|
|
||||||
phone_no: '',
|
|
||||||
|
|
||||||
})
|
|
||||||
const router = useRouter()
|
|
||||||
const editedItem = ref(defaultItem.value)
|
|
||||||
const editedIndex = ref(-1)
|
|
||||||
const providersList = ref([])
|
|
||||||
const providersFilter = ref([])
|
|
||||||
const isLoading=ref(false)
|
|
||||||
// status options
|
|
||||||
const selectedOptions = [
|
|
||||||
{
|
|
||||||
text: 'Active',
|
|
||||||
value: 1,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: 'InActive',
|
|
||||||
value: 2,
|
|
||||||
},
|
|
||||||
|
|
||||||
]
|
|
||||||
|
|
||||||
const refVForm = ref(null)
|
|
||||||
|
|
||||||
|
|
||||||
const formatPhoneNumber = () => {
|
|
||||||
console.log(editedItem.value)
|
|
||||||
// Remove non-numeric characters from the input
|
|
||||||
const numericValue = editedItem.value.phone_no.replace(/\D/g, '');
|
|
||||||
|
|
||||||
// Apply formatting logic
|
|
||||||
if (numericValue.length <= 10) {
|
|
||||||
editedItem.value.phone_no = numericValue.replace(/(\d{3})(\d{3})(\d{4})/, '($1) $2-$3');
|
|
||||||
} else {
|
|
||||||
// Limit the input to a maximum of 14 characters
|
|
||||||
const truncatedValue = numericValue.slice(0, 10);
|
|
||||||
editedItem.value.phone_no = truncatedValue.replace(/(\d{3})(\d{3})(\d{4})/, '($1) $2-$3');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
// headers
|
|
||||||
const headers = [
|
|
||||||
{
|
|
||||||
title: 'ID',
|
|
||||||
key: 'id',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'NAME',
|
|
||||||
key: 'name',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'EMAIL',
|
|
||||||
key: 'email',
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// title: 'Date Of Birth',
|
|
||||||
// key: 'dob',
|
|
||||||
// },
|
|
||||||
{
|
|
||||||
title: 'Phone',
|
|
||||||
key: 'phone_no',
|
|
||||||
},
|
|
||||||
|
|
||||||
// {
|
|
||||||
// title: 'ACTIONS',
|
|
||||||
// key: 'actions',
|
|
||||||
// },
|
|
||||||
]
|
|
||||||
|
|
||||||
const resolveStatusVariant = status => {
|
|
||||||
if (status === 1)
|
|
||||||
return {
|
|
||||||
color: 'primary',
|
|
||||||
text: 'Current',
|
|
||||||
}
|
|
||||||
else if (status === 2)
|
|
||||||
return {
|
|
||||||
color: 'success',
|
|
||||||
text: 'Professional',
|
|
||||||
}
|
|
||||||
else if (status === 3)
|
|
||||||
return {
|
|
||||||
color: 'error',
|
|
||||||
text: 'Rejected',
|
|
||||||
}
|
|
||||||
else if (status === 4)
|
|
||||||
return {
|
|
||||||
color: 'warning',
|
|
||||||
text: 'Resigned',
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return {
|
|
||||||
color: 'info',
|
|
||||||
text: 'Applied',
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const editItem = item => {
|
|
||||||
editedIndex.value = providersList.value.indexOf(item)
|
|
||||||
editedItem.value = { ...item }
|
|
||||||
editDialog.value = true
|
|
||||||
}
|
|
||||||
|
|
||||||
const deleteItem = item => {
|
|
||||||
editedIndex.value = providersList.value.indexOf(item)
|
|
||||||
editedItem.value = { ...item }
|
|
||||||
deleteDialog.value = true
|
|
||||||
}
|
|
||||||
|
|
||||||
const close = () => {
|
|
||||||
editDialog.value = false
|
|
||||||
editedIndex.value = -1
|
|
||||||
editedItem.value = { ...defaultItem.value }
|
|
||||||
}
|
|
||||||
|
|
||||||
const closeDelete = () => {
|
|
||||||
deleteDialog.value = false
|
|
||||||
editedIndex.value = -1
|
|
||||||
editedItem.value = { ...defaultItem.value }
|
|
||||||
}
|
|
||||||
|
|
||||||
const save = async () => {
|
|
||||||
await getProviderFilter()
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
const states = ref([
|
|
||||||
|
|
||||||
{ name: 'Alabama', abbreviation: 'AL' },
|
|
||||||
{ name: 'Alaska', abbreviation: 'AK' },
|
|
||||||
{ name: 'Arizona', abbreviation: 'AZ' },
|
|
||||||
{ name: 'Arkansas', abbreviation: 'AR' },
|
|
||||||
{ name: 'Howland Island', abbreviation: 'UM-84' },
|
|
||||||
{ name: 'Delaware', abbreviation: 'DE' },
|
|
||||||
{ name: 'Maryland', abbreviation: 'MD' },
|
|
||||||
{ name: 'Baker Island', abbreviation: 'UM-81' },
|
|
||||||
{ name: 'Kingman Reef', abbreviation: 'UM-89' },
|
|
||||||
{ name: 'New Hampshire', abbreviation: 'NH' },
|
|
||||||
{ name: 'Wake Island', abbreviation: 'UM-79' },
|
|
||||||
{ name: 'Kansas', abbreviation: 'KS' },
|
|
||||||
{ name: 'Texas', abbreviation: 'TX' },
|
|
||||||
{ name: 'Nebraska', abbreviation: 'NE' },
|
|
||||||
{ name: 'Vermont', abbreviation: 'VT' },
|
|
||||||
{ name: 'Jarvis Island', abbreviation: 'UM-86' },
|
|
||||||
{ name: 'Hawaii', abbreviation: 'HI' },
|
|
||||||
{ name: 'Guam', abbreviation: 'GU' },
|
|
||||||
{ name: 'United States Virgin Islands', abbreviation: 'VI' },
|
|
||||||
{ name: 'Utah', abbreviation: 'UT' },
|
|
||||||
{ name: 'Oregon', abbreviation: 'OR' },
|
|
||||||
{ name: 'California', abbreviation: 'CA' },
|
|
||||||
{ name: 'New Jersey', abbreviation: 'NJ' },
|
|
||||||
{ name: 'North Dakota', abbreviation: 'ND' },
|
|
||||||
{ name: 'Kentucky', abbreviation: 'KY' },
|
|
||||||
{ name: 'Minnesota', abbreviation: 'MN' },
|
|
||||||
{ name: 'Oklahoma', abbreviation: 'OK' },
|
|
||||||
{ name: 'Pennsylvania', abbreviation: 'PA' },
|
|
||||||
{ name: 'New Mexico', abbreviation: 'NM' },
|
|
||||||
{ name: 'American Samoa', abbreviation: 'AS' },
|
|
||||||
{ name: 'Illinois', abbreviation: 'IL' },
|
|
||||||
{ name: 'Michigan', abbreviation: 'MI' },
|
|
||||||
{ name: 'Virginia', abbreviation: 'VA' },
|
|
||||||
{ name: 'Johnston Atoll', abbreviation: 'UM-67' },
|
|
||||||
{ name: 'West Virginia', abbreviation: 'WV' },
|
|
||||||
{ name: 'Mississippi', abbreviation: 'MS' },
|
|
||||||
{ name: 'Northern Mariana Islands', abbreviation: 'MP' },
|
|
||||||
{ name: 'United States Minor Outlying Islands', abbreviation: 'UM' },
|
|
||||||
{ name: 'Massachusetts', abbreviation: 'MA' },
|
|
||||||
{ name: 'Connecticut', abbreviation: 'CT' },
|
|
||||||
{ name: 'Florida', abbreviation: 'FL' },
|
|
||||||
{ name: 'District of Columbia', abbreviation: 'DC' },
|
|
||||||
{ name: 'Midway Atoll', abbreviation: 'UM-71' },
|
|
||||||
{ name: 'Navassa Island', abbreviation: 'UM-76' },
|
|
||||||
{ name: 'Indiana', abbreviation: 'IN' },
|
|
||||||
{ name: 'Wisconsin', abbreviation: 'WI' },
|
|
||||||
{ name: 'Wyoming', abbreviation: 'WY' },
|
|
||||||
{ name: 'South Carolina', abbreviation: 'SC' },
|
|
||||||
{ name: 'Arkansas', abbreviation: 'AR' },
|
|
||||||
{ name: 'South Dakota', abbreviation: 'SD' },
|
|
||||||
{ name: 'Montana', abbreviation: 'MT' },
|
|
||||||
{ name: 'North Carolina', abbreviation: 'NC' },
|
|
||||||
{ name: 'Palmyra Atoll', abbreviation: 'UM-95' },
|
|
||||||
{ name: 'Puerto Rico', abbreviation: 'PR' },
|
|
||||||
{ name: 'Colorado', abbreviation: 'CO' },
|
|
||||||
{ name: 'Missouri', abbreviation: 'MO' },
|
|
||||||
{ name: 'New York', abbreviation: 'NY' },
|
|
||||||
{ name: 'Maine', abbreviation: 'ME' },
|
|
||||||
{ name: 'Tennessee', abbreviation: 'TN' },
|
|
||||||
{ name: 'Georgia', abbreviation: 'GA' },
|
|
||||||
{ name: 'Louisiana', abbreviation: 'LA' },
|
|
||||||
{ name: 'Nevada', abbreviation: 'NV' },
|
|
||||||
{ name: 'Iowa', abbreviation: 'IA' },
|
|
||||||
{ name: 'Idaho', abbreviation: 'ID' },
|
|
||||||
{ name: 'Rhode Island', abbreviation: 'RI' },
|
|
||||||
{ name: 'Washington', abbreviation: 'WA' },
|
|
||||||
{ name: 'Ohio', abbreviation: 'OH' },
|
|
||||||
{ name: 'All', abbreviation: 'All' }
|
|
||||||
// ... (add the rest of the states)
|
|
||||||
]);
|
|
||||||
|
|
||||||
const sortedStates = computed(() => {
|
|
||||||
const sorted = states.value.slice().sort((a, b) => {
|
|
||||||
// Move "All" to the beginning
|
|
||||||
if (a.name === 'All') return -1;
|
|
||||||
if (b.name === 'All') return 1;
|
|
||||||
// Sort other states alphabetically
|
|
||||||
return a.name.localeCompare(b.name);
|
|
||||||
});
|
|
||||||
return sorted;
|
|
||||||
});
|
|
||||||
const getMettings = (Item) => {
|
|
||||||
router.push('/admin/provider/meetings/'+Item.id);
|
|
||||||
}
|
|
||||||
const deleteItemConfirm = async() => {
|
|
||||||
console.log('editedIndex.value',editedIndex.value,editedItem.value.id)
|
|
||||||
await store.dispatch('providerDelete',{
|
|
||||||
id: editedItem.value.id
|
|
||||||
})
|
|
||||||
providersList.value.splice(editedIndex.value, 1)
|
|
||||||
closeDelete()
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const getProviderFilter = async() => {
|
|
||||||
store.dispatch('updateIsLoading', true)
|
|
||||||
await store.dispatch('providersReportsFilterList',{
|
|
||||||
gender: filter.value.gender.toLowerCase(),
|
|
||||||
state: filter.value.state,
|
|
||||||
availabilityFrom: filter.value.availabilityFrom.toLowerCase(),
|
|
||||||
availabilityTo: filter.value.availabilityTo.toLowerCase(),
|
|
||||||
specialty: filter.value.specialty,
|
|
||||||
provider_list: filter.value.provider_list,
|
|
||||||
practics_state:filter.value.practics_state,
|
|
||||||
})
|
|
||||||
|
|
||||||
store.dispatch('updateIsLoading', false)
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(async() => {
|
|
||||||
store.dispatch('updateIsLoading', true)
|
|
||||||
await store.dispatch('providersReportFilter')
|
|
||||||
providersFilter.value =store.getters.getProvidersReportFilter
|
|
||||||
store.dispatch('updateIsLoading', false)
|
|
||||||
|
|
||||||
})
|
|
||||||
const filter = ref({
|
|
||||||
practics_state:'',
|
|
||||||
gender: 'All',
|
|
||||||
state: 'All',
|
|
||||||
specialty:'',
|
|
||||||
availabilityFrom:'All',
|
|
||||||
availabilityTo: 'All',
|
|
||||||
provider_list:'All'
|
|
||||||
// plan: '',
|
|
||||||
})
|
|
||||||
// const onSubcriptionChange = async(newvalue)=> {
|
|
||||||
// filter.value.plan = newvalue;
|
|
||||||
// console.log("Plan",filter.value.plan );
|
|
||||||
// await getPatientFilter();
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
const onSpecialty = async(newvalue)=> {
|
|
||||||
if(newvalue.length > 3){
|
|
||||||
filter.value.specialty = newvalue;
|
|
||||||
console.log("onSpecialty",filter.value.specialty);
|
|
||||||
}
|
|
||||||
|
|
||||||
//await getProviderFilter();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
const onGenderChange = async(newvalue)=> {
|
|
||||||
filter.value.gender = newvalue;
|
|
||||||
console.log("gender",filter.value.gender);
|
|
||||||
//await getProviderFilter();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
const onStateChange = async(newvalue)=> {
|
|
||||||
filter.value.state = newvalue;
|
|
||||||
console.log("state",filter.value.state);
|
|
||||||
//await getProviderFilter();
|
|
||||||
|
|
||||||
}
|
|
||||||
const onAvailabilityFromChange = async(newvalue)=> {
|
|
||||||
filter.value.availabilityFrom = newvalue;
|
|
||||||
console.log("frmo",filter.value.availabilityFrom);
|
|
||||||
//await getProviderFilter();
|
|
||||||
|
|
||||||
}
|
|
||||||
const onAvailabilityToChange = async(newvalue)=> {
|
|
||||||
filter.value.availabilityTo = newvalue;
|
|
||||||
console.log("to",filter.value.availabilityTo);
|
|
||||||
//await getProviderFilter();
|
|
||||||
|
|
||||||
}
|
|
||||||
const onProviderListChange = async(newvalue)=> {
|
|
||||||
filter.value.provider_list = newvalue;
|
|
||||||
console.log("provider_list",filter.value.provider_list);
|
|
||||||
//await getProviderFilter();
|
|
||||||
|
|
||||||
}
|
|
||||||
const onPracticsStateChange = async(newvalue)=> {
|
|
||||||
filter.value.practics_state = newvalue;
|
|
||||||
console.log("state",filter.value.practics_state);
|
|
||||||
//await getProviderFilter();
|
|
||||||
|
|
||||||
}
|
|
||||||
const onDateRangeChange = async(newvalue)=> {
|
|
||||||
filter.value.date_range = newvalue;
|
|
||||||
console.log("Length", newvalue.length);
|
|
||||||
}
|
|
||||||
|
|
||||||
const timeOptions = computed(() => {
|
|
||||||
const options = ['All'];
|
|
||||||
|
|
||||||
// Loop through the hours from 12 to 23 (for 12:00 PM to 11:00 PM)
|
|
||||||
for (let hour = 12; hour <= 23; hour++) {
|
|
||||||
// Loop through the minutes (0 and 30)
|
|
||||||
for (let minute of [0, 30]) {
|
|
||||||
// Construct the time string
|
|
||||||
const timeString = `${hour.toString().padStart(2, '0')}:${minute.toString().padStart(2, '0')}`;
|
|
||||||
options.push(timeString);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add the time option for 24:00 (midnight)
|
|
||||||
options.push('24:00');
|
|
||||||
|
|
||||||
return options;
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<v-row>
|
|
||||||
<v-col cols="12" md="12" >
|
|
||||||
<VCard title="Providers">
|
|
||||||
<VCardText >
|
|
||||||
<VRow>
|
|
||||||
<!-- <VCol
|
|
||||||
cols="12"
|
|
||||||
|
|
||||||
md="3"
|
|
||||||
>
|
|
||||||
<VSelect
|
|
||||||
v-model="filter.plan"
|
|
||||||
label="Subcription"
|
|
||||||
placeholder="Subcription"
|
|
||||||
density="comfortable"
|
|
||||||
:items="subcriptionLists"
|
|
||||||
item-title="title"
|
|
||||||
item-value="slug"
|
|
||||||
@update:model-value="onSubcriptionChange"
|
|
||||||
/>
|
|
||||||
|
|
||||||
|
|
||||||
</VCol> -->
|
|
||||||
<!-- <VCol
|
|
||||||
cols="12"
|
|
||||||
md="2"
|
|
||||||
>
|
|
||||||
<VSelect
|
|
||||||
v-model="filter.practics_state"
|
|
||||||
label="Practics State"
|
|
||||||
density="comfortable"
|
|
||||||
:items="sortedStates"
|
|
||||||
item-title="name"
|
|
||||||
item-value="abbreviation"
|
|
||||||
@update:model-value="onPracticsStateChange"
|
|
||||||
|
|
||||||
/>
|
|
||||||
</VCol> -->
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
|
|
||||||
md="2"
|
|
||||||
>
|
|
||||||
|
|
||||||
<VSelect
|
|
||||||
v-model="filter.gender"
|
|
||||||
label="Gender"
|
|
||||||
placeholder="Gender"
|
|
||||||
density="comfortable"
|
|
||||||
:items="['All','Male', 'Female']"
|
|
||||||
@update:model-value="onGenderChange"
|
|
||||||
|
|
||||||
/>
|
|
||||||
|
|
||||||
</VCol>
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
|
|
||||||
md="2"
|
|
||||||
>
|
|
||||||
<VAutocomplete
|
|
||||||
v-model="filter.provider_list"
|
|
||||||
label="Provider"
|
|
||||||
:items="providersFilter.provider_list"
|
|
||||||
item-title="name"
|
|
||||||
item-value="id"
|
|
||||||
placeholder="Select Provider"
|
|
||||||
@update:model-value="onProviderListChange"
|
|
||||||
/>
|
|
||||||
|
|
||||||
|
|
||||||
</VCol>
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
|
|
||||||
md="2"
|
|
||||||
>
|
|
||||||
<VAutocomplete
|
|
||||||
v-model="filter.practics_state"
|
|
||||||
label="Practice States"
|
|
||||||
:items="providersFilter.practicing_states"
|
|
||||||
item-title="name"
|
|
||||||
item-value="abbreviation"
|
|
||||||
placeholder="Select State"
|
|
||||||
@update:model-value="onPracticsStateChange"
|
|
||||||
/>
|
|
||||||
|
|
||||||
|
|
||||||
</VCol>
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
|
|
||||||
md="2"
|
|
||||||
>
|
|
||||||
<VAutocomplete
|
|
||||||
v-model="filter.state"
|
|
||||||
label="States"
|
|
||||||
:items="sortedStates"
|
|
||||||
item-title="name"
|
|
||||||
item-value="abbreviation"
|
|
||||||
placeholder="Select State"
|
|
||||||
@update:model-value="onStateChange"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</VCol>
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
|
|
||||||
md="2"
|
|
||||||
>
|
|
||||||
<VAutocomplete
|
|
||||||
v-model="filter.specialty"
|
|
||||||
label="Specialty"
|
|
||||||
:items="providersFilter.specialty"
|
|
||||||
item-title="specialty"
|
|
||||||
item-value="specialty"
|
|
||||||
placeholder="Select specialty"
|
|
||||||
@update:model-value="onSpecialty"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</VCol>
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
md="2"
|
|
||||||
>
|
|
||||||
<VTextField
|
|
||||||
v-model="search"
|
|
||||||
label="Search"
|
|
||||||
placeholder="Search ..."
|
|
||||||
append-inner-icon="ri-search-line"
|
|
||||||
single-line
|
|
||||||
hide-details
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
<!-- <VCol
|
|
||||||
cols="12"
|
|
||||||
md="2"
|
|
||||||
>
|
|
||||||
<VTextField
|
|
||||||
v-model="filter.specialty"
|
|
||||||
label="Speciality"
|
|
||||||
append-inner-icon="ri-search-line"
|
|
||||||
@update:model-value="onSpecialty"
|
|
||||||
/>
|
|
||||||
</VCol> -->
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
md="3"
|
|
||||||
>
|
|
||||||
<VSelect @update:model-value="onAvailabilityFromChange" v-model="filter.availabilityFrom" label="Availability From" :items="timeOptions" density="comfortable" />
|
|
||||||
</VCol>
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
md="3"
|
|
||||||
>
|
|
||||||
<VSelect @update:model-value="onAvailabilityToChange" v-model="filter.availabilityTo" label="Availability To" :items="timeOptions" density="comfortable"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</VCol>
|
|
||||||
|
|
||||||
</VRow>
|
|
||||||
<VCardActions>
|
|
||||||
<VSpacer />
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<VBtn
|
|
||||||
color="success"
|
|
||||||
variant="elevated"
|
|
||||||
@click="getProviderFilter"
|
|
||||||
>
|
|
||||||
<VIcon class="ri-file-download-line" ></VIcon>
|
|
||||||
Download
|
|
||||||
</VBtn>
|
|
||||||
|
|
||||||
</VCardActions>
|
|
||||||
</VCardText>
|
|
||||||
<VDataTable
|
|
||||||
:headers="headers"
|
|
||||||
:items="providersList"
|
|
||||||
:search="search"
|
|
||||||
:items-per-page="5"
|
|
||||||
class="text-no-wrap"
|
|
||||||
style="display: none;"
|
|
||||||
>
|
|
||||||
<!-- full name -->
|
|
||||||
<template #item.name="{ item }">
|
|
||||||
<div class="d-flex align-center">
|
|
||||||
<!-- avatar -->
|
|
||||||
<VAvatar
|
|
||||||
size="32"
|
|
||||||
:color="item.avatar ? '' : 'primary'"
|
|
||||||
:class="item.avatar ? '' : 'v-avatar-light-bg primary--text'"
|
|
||||||
:variant="!item.avatar ? 'tonal' : undefined"
|
|
||||||
>
|
|
||||||
<VImg
|
|
||||||
v-if="item.avatar"
|
|
||||||
:src="item.avatar"
|
|
||||||
/>
|
|
||||||
<span
|
|
||||||
v-else
|
|
||||||
class="text-sm"
|
|
||||||
>{{ avatarText(item.name) }}</span>
|
|
||||||
</VAvatar>
|
|
||||||
|
|
||||||
<div class="d-flex flex-column ms-3">
|
|
||||||
<router-link
|
|
||||||
:to="{ name: 'admin-provider-profile', params: { id: item.id } }"
|
|
||||||
class=" highlighted"
|
|
||||||
>
|
|
||||||
<span class="d-block font-weight-medium text-truncate">{{ item.name }}</span>
|
|
||||||
</router-link>
|
|
||||||
<small>{{ item.post }}</small>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<!-- status -->
|
|
||||||
<template #item.status="{ item }">
|
|
||||||
<VChip
|
|
||||||
:color="resolveStatusVariant(item.status).color"
|
|
||||||
density="comfortable"
|
|
||||||
>
|
|
||||||
{{ resolveStatusVariant(item.status).text }}
|
|
||||||
</VChip>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<!-- Actions -->
|
|
||||||
<template #item.actions="{ item }">
|
|
||||||
<div class="d-flex gap-1">
|
|
||||||
<IconBtn
|
|
||||||
size="small"
|
|
||||||
@click="editItem(item)"
|
|
||||||
style="display: none;"
|
|
||||||
>
|
|
||||||
<VIcon icon="ri-pencil-line" />
|
|
||||||
</IconBtn>
|
|
||||||
<IconBtn
|
|
||||||
size="small"
|
|
||||||
@click="deleteItem(item)"
|
|
||||||
style="display: none;"
|
|
||||||
>
|
|
||||||
<VIcon icon="ri-delete-bin-line" />
|
|
||||||
</IconBtn>
|
|
||||||
<IconBtn
|
|
||||||
size="small"
|
|
||||||
@click="getMettings(item)"
|
|
||||||
>
|
|
||||||
<VIcon icon="ri-time-line" />
|
|
||||||
</IconBtn>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</VDataTable>
|
|
||||||
</VCard>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
<!-- 👉 Edit Dialog -->
|
|
||||||
<VDialog
|
|
||||||
v-model="editDialog"
|
|
||||||
max-width="600px"
|
|
||||||
>
|
|
||||||
<VForm ref="refVForm" >
|
|
||||||
<VCard>
|
|
||||||
<VCardTitle>
|
|
||||||
<span class="headline">Edit Provider</span>
|
|
||||||
</VCardTitle>
|
|
||||||
|
|
||||||
<VCardText>
|
|
||||||
<VContainer >
|
|
||||||
|
|
||||||
<VRow>
|
|
||||||
<!-- fullName -->
|
|
||||||
<VCol cols="12" md="6">
|
|
||||||
<VTextField
|
|
||||||
v-model="editedItem.first_name"
|
|
||||||
label="First Name"
|
|
||||||
:rules="[requiredFirstName]"
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
<VCol cols="12" md="6">
|
|
||||||
<VTextField
|
|
||||||
v-model="editedItem.last_name"
|
|
||||||
label="Last Name"
|
|
||||||
:rules="[requiredLastName]"
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
|
|
||||||
<!-- email -->
|
|
||||||
<VCol cols="12" sm="6" md="12">
|
|
||||||
<VTextField
|
|
||||||
v-model="editedItem.email"
|
|
||||||
label="Email"
|
|
||||||
:rules="[requiredEmail, emailValidator]"
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <VCol cols="12" sm="6" md="12">
|
|
||||||
<VTextField
|
|
||||||
v-model="editedItem.dob"
|
|
||||||
label="Date Of Birth"
|
|
||||||
/>
|
|
||||||
</VCol> -->
|
|
||||||
<VCol cols="12" sm="6" md="12">
|
|
||||||
<VTextField v-model="editedItem.phone_no" label="Phone Number" pattern="^\(\d{3}\) \d{3}-\d{4}$"
|
|
||||||
:rules="[requiredPhone, validUSAPhone]" placeholder="i.e. (000) 000-0000"
|
|
||||||
@input="formatPhoneNumber" max="14" density="comfortable" />
|
|
||||||
</VCol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- status -->
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
|
|
||||||
md="12"
|
|
||||||
>
|
|
||||||
<VSelect
|
|
||||||
v-model="editedItem.status"
|
|
||||||
:items="selectedOptions"
|
|
||||||
item-title="text"
|
|
||||||
item-value="value"
|
|
||||||
label="Status"
|
|
||||||
variant="outlined"
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
</VRow>
|
|
||||||
</VContainer>
|
|
||||||
</VCardText>
|
|
||||||
|
|
||||||
<VCardActions>
|
|
||||||
<VSpacer />
|
|
||||||
|
|
||||||
<VBtn
|
|
||||||
color="error"
|
|
||||||
variant="outlined"
|
|
||||||
@click="close"
|
|
||||||
>
|
|
||||||
Cancel
|
|
||||||
</VBtn>
|
|
||||||
|
|
||||||
<VBtn
|
|
||||||
color="success"
|
|
||||||
variant="elevated"
|
|
||||||
@click="save"
|
|
||||||
>
|
|
||||||
Save
|
|
||||||
</VBtn>
|
|
||||||
|
|
||||||
</VCardActions>
|
|
||||||
</VCard>
|
|
||||||
</VForm>
|
|
||||||
</VDialog>
|
|
||||||
|
|
||||||
<!-- 👉 Delete Dialog -->
|
|
||||||
<VDialog
|
|
||||||
v-model="deleteDialog"
|
|
||||||
max-width="500px"
|
|
||||||
>
|
|
||||||
<VCard>
|
|
||||||
<VCardTitle>
|
|
||||||
Are you sure you want to delete this item?
|
|
||||||
</VCardTitle>
|
|
||||||
|
|
||||||
<VCardActions>
|
|
||||||
<VSpacer />
|
|
||||||
|
|
||||||
<VBtn
|
|
||||||
color="error"
|
|
||||||
variant="outlined"
|
|
||||||
@click="closeDelete"
|
|
||||||
>
|
|
||||||
Cancel
|
|
||||||
</VBtn>
|
|
||||||
|
|
||||||
<VBtn
|
|
||||||
color="success"
|
|
||||||
variant="elevated"
|
|
||||||
@click="deleteItemConfirm"
|
|
||||||
>
|
|
||||||
OK
|
|
||||||
</VBtn>
|
|
||||||
|
|
||||||
<VSpacer />
|
|
||||||
</VCardActions>
|
|
||||||
</VCard>
|
|
||||||
</VDialog>
|
|
||||||
</template>
|
|
||||||
<style scoped>
|
|
||||||
.highlighted {
|
|
||||||
/* Add your desired highlighting styles here */
|
|
||||||
font-weight: bold;
|
|
||||||
color: #a169ff; /* or any other color you prefer */
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -4,30 +4,15 @@ const emailRouteComponent = () => import('@/pages/apps/email/index.vue')
|
|||||||
export const redirects = [
|
export const redirects = [
|
||||||
// ℹ️ We are redirecting to different pages based on role.
|
// ℹ️ We are redirecting to different pages based on role.
|
||||||
// NOTE: Role is just for UI purposes. ACL is based on abilities.
|
// NOTE: Role is just for UI purposes. ACL is based on abilities.
|
||||||
{
|
|
||||||
path: '/admin',
|
|
||||||
// name: 'index',
|
|
||||||
redirect: to => {
|
|
||||||
// TODO: Get type from backend
|
|
||||||
const userData = useCookie('userData')
|
|
||||||
const userRole = userData.value?.role
|
|
||||||
if (userRole === 'admin')
|
|
||||||
return { name: 'admin-dashboard' }
|
|
||||||
if (userRole === 'client')
|
|
||||||
return { name: 'access-control' }
|
|
||||||
|
|
||||||
return { name: 'login', query: to.query }
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: '/',
|
path: '/',
|
||||||
// name: 'index',
|
name: 'index',
|
||||||
redirect: to => {
|
redirect: to => {
|
||||||
// TODO: Get type from backend
|
// TODO: Get type from backend
|
||||||
const userData = useCookie('userData')
|
const userData = useCookie('userData')
|
||||||
const userRole = userData.value?.role
|
const userRole = userData.value?.role
|
||||||
if (userRole === 'admin')
|
if (userRole === 'admin')
|
||||||
return { name: 'admin-dashboard' }
|
return { name: 'dashboards-crm' }
|
||||||
if (userRole === 'client')
|
if (userRole === 'client')
|
||||||
return { name: 'access-control' }
|
return { name: 'access-control' }
|
||||||
|
|
||||||
@ -44,123 +29,9 @@ export const redirects = [
|
|||||||
name: 'pages-account-settings',
|
name: 'pages-account-settings',
|
||||||
redirect: () => ({ name: 'pages-account-settings-tab', params: { tab: 'account' } }),
|
redirect: () => ({ name: 'pages-account-settings-tab', params: { tab: 'account' } }),
|
||||||
},
|
},
|
||||||
|
|
||||||
]
|
]
|
||||||
export const routes = [
|
export const routes = [
|
||||||
// Email filter
|
// Email filter
|
||||||
{
|
|
||||||
path: '/admin/dashboard',
|
|
||||||
name: 'admin-dashboard',
|
|
||||||
component: () => import('@/pages/dashboards/analytics.vue'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/admin/patients',
|
|
||||||
name: 'admin-patients',
|
|
||||||
component: () => import('@/pages/patients/patients.vue'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/admin/patients/labkit/:patient_id',
|
|
||||||
name: 'admin-patients-labkit',
|
|
||||||
component: () => import('@/pages/pages/patient-labkits/labkit.vue'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/admin/patient/meetings/:id',
|
|
||||||
name: 'admin-patient-meeitngs',
|
|
||||||
component: () => import('@/pages/patients/meetings.vue'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/admin/patient/meeting-details/:patient_id/:id',
|
|
||||||
name: 'admin-patient-meeitng-details',
|
|
||||||
component: () => import('@/pages/patients/meeting-details.vue'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/admin/provider/meetings/:id',
|
|
||||||
name: 'admin-provider-meeitngs',
|
|
||||||
component: () => import('@/pages/providers/meetings.vue'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/admin/provider/meeting-details/:provider_id/:id',
|
|
||||||
name: 'admin-provider-meeitng-details',
|
|
||||||
component: () => import('@/pages/providers/meeting-details.vue'),
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
path: '/admin/patient/meeting/prescription/:patient_id/:id',
|
|
||||||
name: 'admin-patient-meeitng-prescription',
|
|
||||||
component: () => import('@/pages/pages/patient-meetings/prescription.vue'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/admin/patient/meeting/notes/:patient_id/:id',
|
|
||||||
name: 'admin-patient-meeitng-notes',
|
|
||||||
component: () => import('@/pages/pages/patient-meetings/notes.vue'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/admin/providers',
|
|
||||||
name: 'admin-providers',
|
|
||||||
component: () => import('@/pages/providers/providers.vue'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/admin/labs',
|
|
||||||
name: 'admin-labs',
|
|
||||||
component: () => import('@/pages/labs/labs.vue'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/admin/lab-kites',
|
|
||||||
name: 'admin-lab-kites',
|
|
||||||
component: () => import('@/pages/labs/labs-kit.vue'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/admin/products',
|
|
||||||
name: 'admin-products',
|
|
||||||
component: () => import('@/pages/products/product.vue'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/admin/profile',
|
|
||||||
name: 'admin-profile',
|
|
||||||
component: () => import('@/views/pages/account-settings/AccountSettingsAccount.vue'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/admin/change-password',
|
|
||||||
name: 'admin-change-password',
|
|
||||||
component: () => import('@/views/pages/account-settings/AccountSettingsSecurity.vue'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/admin/site-setting',
|
|
||||||
name: 'admin-site-setting',
|
|
||||||
component: () => import('@/views/pages/account-settings/WebsiteSettings.vue'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/admin/patients/patient-profile/:id',
|
|
||||||
name: 'admin-patient-profile',
|
|
||||||
component: () => import('@/pages/patients/patient-profile.vue'),
|
|
||||||
meta: {
|
|
||||||
activeParent: 'admin-patients'
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/admin/provider/provider-profile/:id',
|
|
||||||
name: 'admin-provider-profile',
|
|
||||||
component: () => import('@/pages/providers/provider-profile.vue'),
|
|
||||||
meta: {
|
|
||||||
activeParent: 'admin-providers'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/admin/providers/patientprofile/:id',
|
|
||||||
name: 'admin-providers-patientprofile',
|
|
||||||
component: () => import('@/pages/patients/PatientQuestionProfile.vue'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/admin/reports/providers',
|
|
||||||
name: 'admin-provider-report',
|
|
||||||
component: () => import('@/pages/reports/providers-report.vue'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/admin/orders',
|
|
||||||
name: 'admin-orders',
|
|
||||||
component: () => import('@/pages/apps/ecommerce/order/list/index.vue'),
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: '/apps/email/filter/:filter',
|
path: '/apps/email/filter/:filter',
|
||||||
name: 'apps-email-filter',
|
name: 'apps-email-filter',
|
||||||
@ -197,5 +68,4 @@ export const routes = [
|
|||||||
name: 'apps-ecommerce-dashboard',
|
name: 'apps-ecommerce-dashboard',
|
||||||
component: () => import('@/pages/dashboards/ecommerce.vue'),
|
component: () => import('@/pages/dashboards/ecommerce.vue'),
|
||||||
},
|
},
|
||||||
|
|
||||||
]
|
]
|
||||||
|
@ -156,15 +156,6 @@
|
|||||||
"Dashboard": "Dashboard",
|
"Dashboard": "Dashboard",
|
||||||
"Fleet": "Fleet",
|
"Fleet": "Fleet",
|
||||||
"Widgets": "Widgets",
|
"Widgets": "Widgets",
|
||||||
"Patients": "Patients",
|
|
||||||
"Lab Kites": "Lab Kites",
|
|
||||||
"Providers": "Providers",
|
|
||||||
"Prodcuts": "Prodcuts",
|
|
||||||
"Labs": "Labs",
|
|
||||||
"Medicines": "Medicines",
|
|
||||||
"Profile": "Profile",
|
|
||||||
"Security": "Security",
|
|
||||||
"Site Setting": "Site Setting",
|
|
||||||
"5": "5",
|
"5": "5",
|
||||||
"10": "10",
|
"10": "10",
|
||||||
"20": "20",
|
"20": "20",
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -4,7 +4,7 @@ import pdf from '@images/icons/project-icons/pdf.png'
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VCard title="Activity">
|
<VCard title="Activity Timeline">
|
||||||
<VCardText>
|
<VCardText>
|
||||||
<VTimeline
|
<VTimeline
|
||||||
side="end"
|
side="end"
|
||||||
|
@ -1,38 +1,28 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import avatar1 from '@images/avatars/avatar-1.png';
|
import avatar1 from '@images/avatars/avatar-1.png'
|
||||||
import {
|
|
||||||
emailValidator,
|
|
||||||
requiredEmail,
|
|
||||||
requiredName,
|
|
||||||
requiredPhone,
|
|
||||||
validUSAPhone
|
|
||||||
} from '@validators';
|
|
||||||
import { useStore } from 'vuex';
|
|
||||||
|
|
||||||
const store = useStore();
|
|
||||||
let imageBlob = null;
|
|
||||||
const profileData = ref([]);
|
|
||||||
const errors = ref({
|
|
||||||
name: undefined,
|
|
||||||
email: undefined,
|
|
||||||
phone_no:undefined,
|
|
||||||
})
|
|
||||||
const accountData = {
|
const accountData = {
|
||||||
avatarImg: avatar1,
|
avatarImg: avatar1,
|
||||||
name: '',
|
firstName: 'john',
|
||||||
last_name: '',
|
lastName: 'Doe',
|
||||||
email: '',
|
email: 'johnDoe@example.com',
|
||||||
phone_no: '',
|
org: 'ThemeSelection',
|
||||||
|
phone: '+1 (917) 543-9876',
|
||||||
|
address: '123 Main St, New York, NY 10001',
|
||||||
|
state: 'New York',
|
||||||
|
zip: '10001',
|
||||||
|
country: ['USA'],
|
||||||
|
language: ['English'],
|
||||||
|
timezone: '(GMT-11:00) International Date Line West',
|
||||||
|
currency: 'USD',
|
||||||
}
|
}
|
||||||
|
|
||||||
const refVForm = ref()
|
|
||||||
const refInputEl = ref()
|
const refInputEl = ref()
|
||||||
const isConfirmDialogOpen = ref(false)
|
const isConfirmDialogOpen = ref(false)
|
||||||
const accountDataLocal = ref(structuredClone(accountData))
|
const accountDataLocal = ref(structuredClone(accountData))
|
||||||
const isAccountDeactivated = ref(false)
|
const isAccountDeactivated = ref(false)
|
||||||
const validateAccountDeactivation = [v => !!v || 'Please confirm account deactivation']
|
const validateAccountDeactivation = [v => !!v || 'Please confirm account deactivation']
|
||||||
const getIsTonalSnackbarVisible = ref(false);
|
|
||||||
const ImageBase64 = ref();
|
|
||||||
const resetForm = () => {
|
const resetForm = () => {
|
||||||
accountDataLocal.value = structuredClone(accountData)
|
accountDataLocal.value = structuredClone(accountData)
|
||||||
}
|
}
|
||||||
@ -43,28 +33,12 @@ const changeAvatar = file => {
|
|||||||
if (files && files.length) {
|
if (files && files.length) {
|
||||||
fileReader.readAsDataURL(files[0])
|
fileReader.readAsDataURL(files[0])
|
||||||
fileReader.onload = () => {
|
fileReader.onload = () => {
|
||||||
if (typeof fileReader.result === 'string') {
|
if (typeof fileReader.result === 'string')
|
||||||
accountDataLocal.value.avatarImg = fileReader.result
|
accountDataLocal.value.avatarImg = fileReader.result
|
||||||
}
|
|
||||||
ImageBase64.value = fileReader.result.split(',')[1];
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onMounted(async () => {
|
|
||||||
await store.dispatch('adminDetial');
|
|
||||||
let list = await store.getters.getAdminDetail
|
|
||||||
accountDataLocal.value.email = list.email
|
|
||||||
accountDataLocal.value.name = list.name
|
|
||||||
accountDataLocal.value.last_name = list.last_name;
|
|
||||||
accountDataLocal.value.phone_no = list.phone_no
|
|
||||||
if(!list.image_path){
|
|
||||||
accountDataLocal.value.avatarImg = avatar1;
|
|
||||||
}else{
|
|
||||||
accountDataLocal.value.avatarImg = list.image_path
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
// reset avatar image
|
// reset avatar image
|
||||||
const resetAvatar = () => {
|
const resetAvatar = () => {
|
||||||
accountDataLocal.value.avatarImg = accountData.avatarImg
|
accountDataLocal.value.avatarImg = accountData.avatarImg
|
||||||
@ -126,64 +100,14 @@ const currencies = [
|
|||||||
'HUF',
|
'HUF',
|
||||||
'INR',
|
'INR',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
const onSubmit = async () => {
|
|
||||||
const { valid } = await refVForm.value.validate()
|
|
||||||
console.log(valid)
|
|
||||||
if (valid) {
|
|
||||||
try {
|
|
||||||
console.log(ImageBase64.value);
|
|
||||||
await store.dispatch('profileUpdate',{
|
|
||||||
name: accountDataLocal.value.name,
|
|
||||||
last_name: accountDataLocal.value.last_name,
|
|
||||||
phone_no: accountDataLocal.value.phone_no,
|
|
||||||
image: ImageBase64.value, //ecelData,
|
|
||||||
})
|
|
||||||
} catch (error) {
|
|
||||||
console.error(error)
|
|
||||||
}
|
|
||||||
await store.dispatch('adminDetial');
|
|
||||||
let list = await store.getters.getAdminDetail
|
|
||||||
console.log('list',list)
|
|
||||||
accountDataLocal.value.avatarImg = list.image_path
|
|
||||||
accountDataLocal.value.name = list.name
|
|
||||||
accountDataLocal.value.last_name = list.last_name
|
|
||||||
accountDataLocal.value.phone_no = list.phone_no
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const formatPhoneNumber = () => {
|
|
||||||
// Remove non-numeric characters from the input
|
|
||||||
const numericValue = accountDataLocal.value.phone_no.replace(/\D/g, '');
|
|
||||||
|
|
||||||
// Apply formatting logic
|
|
||||||
if (numericValue.length <= 10) {
|
|
||||||
accountDataLocal.value.phone_no = numericValue.replace(/(\d{3})(\d{3})(\d{4})/, '($1) $2-$3');
|
|
||||||
} else {
|
|
||||||
// Limit the input to a maximum of 14 characters
|
|
||||||
const truncatedValue = numericValue.slice(0, 10);
|
|
||||||
accountDataLocal.value.phone_no = truncatedValue.replace(/(\d{3})(\d{3})(\d{4})/, '($1) $2-$3');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
||||||
<VRow>
|
<VRow>
|
||||||
|
|
||||||
<VCol cols="12">
|
<VCol cols="12">
|
||||||
<VCard>
|
<VCard>
|
||||||
<VCardText>
|
<VCardText>
|
||||||
<div class="d-flex mb-10">
|
<div class="d-flex mb-10">
|
||||||
<VSnackbar v-model="getIsTonalSnackbarVisible" :timeout="5000" location="top end" variant="flat"
|
|
||||||
color="success">
|
|
||||||
<VIcon
|
|
||||||
class="ri-success-line success-icon"
|
|
||||||
/> Profile Update Successfully
|
|
||||||
</VSnackbar>
|
|
||||||
<!-- 👉 Avatar -->
|
<!-- 👉 Avatar -->
|
||||||
<VAvatar
|
<VAvatar
|
||||||
rounded
|
rounded
|
||||||
@ -203,7 +127,7 @@ const formatPhoneNumber = () => {
|
|||||||
icon="ri-upload-cloud-line"
|
icon="ri-upload-cloud-line"
|
||||||
class="d-sm-none"
|
class="d-sm-none"
|
||||||
/>
|
/>
|
||||||
<span class="d-none d-sm-block">Upload Logo</span>
|
<span class="d-none d-sm-block">Upload new photo</span>
|
||||||
</VBtn>
|
</VBtn>
|
||||||
<input
|
<input
|
||||||
ref="refInputEl"
|
ref="refInputEl"
|
||||||
@ -213,6 +137,18 @@ const formatPhoneNumber = () => {
|
|||||||
hidden
|
hidden
|
||||||
@input="changeAvatar"
|
@input="changeAvatar"
|
||||||
>
|
>
|
||||||
|
<VBtn
|
||||||
|
type="reset"
|
||||||
|
color="error"
|
||||||
|
variant="outlined"
|
||||||
|
@click="resetAvatar"
|
||||||
|
>
|
||||||
|
<span class="d-none d-sm-block">Reset</span>
|
||||||
|
<VIcon
|
||||||
|
icon="ri-refresh-line"
|
||||||
|
class="d-sm-none"
|
||||||
|
/>
|
||||||
|
</VBtn>
|
||||||
</div>
|
</div>
|
||||||
<p class="text-body-1 mb-0">
|
<p class="text-body-1 mb-0">
|
||||||
Allowed JPG, GIF or PNG. Max size of 800K
|
Allowed JPG, GIF or PNG. Max size of 800K
|
||||||
@ -221,7 +157,7 @@ const formatPhoneNumber = () => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 👉 Form -->
|
<!-- 👉 Form -->
|
||||||
<VForm ref="refVForm">
|
<VForm>
|
||||||
<VRow>
|
<VRow>
|
||||||
<!-- 👉 First Name -->
|
<!-- 👉 First Name -->
|
||||||
<VCol
|
<VCol
|
||||||
@ -229,10 +165,9 @@ const formatPhoneNumber = () => {
|
|||||||
cols="12"
|
cols="12"
|
||||||
>
|
>
|
||||||
<VTextField
|
<VTextField
|
||||||
v-model="accountDataLocal.name"
|
v-model="accountDataLocal.firstName"
|
||||||
label="Name"
|
placeholder="John"
|
||||||
:rules="[requiredName]"
|
label="First Name"
|
||||||
:error-messages="errors.name"
|
|
||||||
/>
|
/>
|
||||||
</VCol>
|
</VCol>
|
||||||
|
|
||||||
@ -242,7 +177,7 @@ const formatPhoneNumber = () => {
|
|||||||
cols="12"
|
cols="12"
|
||||||
>
|
>
|
||||||
<VTextField
|
<VTextField
|
||||||
v-model="accountDataLocal.last_name"
|
v-model="accountDataLocal.lastName"
|
||||||
placeholder="Doe"
|
placeholder="Doe"
|
||||||
label="Last Name"
|
label="Last Name"
|
||||||
/>
|
/>
|
||||||
@ -253,18 +188,25 @@ const formatPhoneNumber = () => {
|
|||||||
cols="12"
|
cols="12"
|
||||||
md="6"
|
md="6"
|
||||||
>
|
>
|
||||||
<VTextField readonly
|
<VTextField
|
||||||
v-model="accountDataLocal.email"
|
v-model="accountDataLocal.email"
|
||||||
label="E-mail"
|
label="E-mail"
|
||||||
placeholder="johndoe@gmail.com"
|
placeholder="johndoe@gmail.com"
|
||||||
type="email"
|
type="email"
|
||||||
:rules="[requiredEmail, emailValidator]"
|
|
||||||
:error-messages="errors.email"
|
|
||||||
/>
|
/>
|
||||||
</VCol>
|
</VCol>
|
||||||
|
|
||||||
<!-- 👉 Organization -->
|
<!-- 👉 Organization -->
|
||||||
|
<VCol
|
||||||
|
cols="12"
|
||||||
|
md="6"
|
||||||
|
>
|
||||||
|
<VTextField
|
||||||
|
v-model="accountDataLocal.org"
|
||||||
|
label="Organization"
|
||||||
|
placeholder="ThemeSelection"
|
||||||
|
/>
|
||||||
|
</VCol>
|
||||||
|
|
||||||
<!-- 👉 Phone -->
|
<!-- 👉 Phone -->
|
||||||
<VCol
|
<VCol
|
||||||
@ -272,32 +214,123 @@ const formatPhoneNumber = () => {
|
|||||||
md="6"
|
md="6"
|
||||||
>
|
>
|
||||||
<VTextField
|
<VTextField
|
||||||
v-model="accountDataLocal.phone_no"
|
v-model="accountDataLocal.phone"
|
||||||
label="Phone Number"
|
label="Phone Number"
|
||||||
placeholder="+1 (917) 543-9876"
|
placeholder="+1 (917) 543-9876"
|
||||||
:rules="[requiredPhone, validUSAPhone]"
|
|
||||||
:error-messages="errors.phone"
|
|
||||||
@input="formatPhoneNumber"
|
|
||||||
max="14"
|
|
||||||
pattern="^\(\d{3}\) \d{3}-\d{4}$"
|
|
||||||
/>
|
/>
|
||||||
</VCol>
|
</VCol>
|
||||||
|
|
||||||
|
<!-- 👉 Address -->
|
||||||
|
<VCol
|
||||||
|
cols="12"
|
||||||
|
md="6"
|
||||||
|
>
|
||||||
|
<VTextField
|
||||||
|
v-model="accountDataLocal.address"
|
||||||
|
label="Address"
|
||||||
|
placeholder="123 Main St, New York, NY 10001"
|
||||||
|
/>
|
||||||
|
</VCol>
|
||||||
|
|
||||||
|
<!-- 👉 State -->
|
||||||
|
<VCol
|
||||||
|
cols="12"
|
||||||
|
md="6"
|
||||||
|
>
|
||||||
|
<VTextField
|
||||||
|
v-model="accountDataLocal.state"
|
||||||
|
label="State"
|
||||||
|
placeholder="New York"
|
||||||
|
/>
|
||||||
|
</VCol>
|
||||||
|
|
||||||
|
<!-- 👉 Zip Code -->
|
||||||
|
<VCol
|
||||||
|
cols="12"
|
||||||
|
md="6"
|
||||||
|
>
|
||||||
|
<VTextField
|
||||||
|
v-model="accountDataLocal.zip"
|
||||||
|
label="Zip Code"
|
||||||
|
placeholder="10001"
|
||||||
|
/>
|
||||||
|
</VCol>
|
||||||
|
|
||||||
|
<!-- 👉 Country -->
|
||||||
|
<VCol
|
||||||
|
cols="12"
|
||||||
|
md="6"
|
||||||
|
>
|
||||||
|
<VSelect
|
||||||
|
v-model="accountDataLocal.country"
|
||||||
|
multiple
|
||||||
|
chips
|
||||||
|
closable-chips
|
||||||
|
label="Country"
|
||||||
|
:items="['USA', 'Canada', 'UK', 'India', 'Australia']"
|
||||||
|
placeholder="Select Country"
|
||||||
|
/>
|
||||||
|
</VCol>
|
||||||
|
|
||||||
|
<!-- 👉 Language -->
|
||||||
|
<VCol
|
||||||
|
cols="12"
|
||||||
|
md="6"
|
||||||
|
>
|
||||||
|
<VSelect
|
||||||
|
v-model="accountDataLocal.language"
|
||||||
|
label="Language"
|
||||||
|
multiple
|
||||||
|
chips
|
||||||
|
closable-chips
|
||||||
|
placeholder="Select Language"
|
||||||
|
:items="['English', 'Spanish', 'Arabic', 'Hindi', 'Urdu']"
|
||||||
|
/>
|
||||||
|
</VCol>
|
||||||
|
|
||||||
|
<!-- 👉 Timezone -->
|
||||||
|
<VCol
|
||||||
|
cols="12"
|
||||||
|
md="6"
|
||||||
|
>
|
||||||
|
<VSelect
|
||||||
|
v-model="accountDataLocal.timezone"
|
||||||
|
label="Timezone"
|
||||||
|
placeholder="Select Timezone"
|
||||||
|
:items="timezones"
|
||||||
|
:menu-props="{ maxHeight: 200 }"
|
||||||
|
/>
|
||||||
|
</VCol>
|
||||||
|
|
||||||
|
<!-- 👉 Currency -->
|
||||||
|
<VCol
|
||||||
|
cols="12"
|
||||||
|
md="6"
|
||||||
|
>
|
||||||
|
<VSelect
|
||||||
|
v-model="accountDataLocal.currency"
|
||||||
|
label="Currency"
|
||||||
|
placeholder="Select Currency"
|
||||||
|
:items="currencies"
|
||||||
|
:menu-props="{ maxHeight: 200 }"
|
||||||
|
/>
|
||||||
|
</VCol>
|
||||||
|
|
||||||
<!-- 👉 Form Actions -->
|
<!-- 👉 Form Actions -->
|
||||||
<VCol
|
<VCol
|
||||||
cols="12"
|
cols="12"
|
||||||
class="d-flex flex-wrap gap-4"
|
class="d-flex flex-wrap gap-4"
|
||||||
>
|
>
|
||||||
<VBtn @click.prevent="onSubmit">Save changes</VBtn>
|
<VBtn>Save changes</VBtn>
|
||||||
|
|
||||||
|
<VBtn
|
||||||
|
color="secondary"
|
||||||
|
variant="outlined"
|
||||||
|
type="reset"
|
||||||
|
@click.prevent="resetForm"
|
||||||
|
>
|
||||||
|
Reset
|
||||||
|
</VBtn>
|
||||||
</VCol>
|
</VCol>
|
||||||
</VRow>
|
</VRow>
|
||||||
</VForm>
|
</VForm>
|
||||||
@ -305,6 +338,30 @@ const formatPhoneNumber = () => {
|
|||||||
</VCard>
|
</VCard>
|
||||||
</VCol>
|
</VCol>
|
||||||
|
|
||||||
|
<VCol cols="12">
|
||||||
|
<!-- 👉 Delete Account -->
|
||||||
|
<VCard title="Delete Account">
|
||||||
|
<VCardText>
|
||||||
|
<!-- 👉 Checkbox and Button -->
|
||||||
|
<div>
|
||||||
|
<VCheckbox
|
||||||
|
v-model="isAccountDeactivated"
|
||||||
|
:rules="validateAccountDeactivation"
|
||||||
|
label="I confirm my account deactivation"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<VBtn
|
||||||
|
:disabled="!isAccountDeactivated"
|
||||||
|
color="error"
|
||||||
|
class="mt-3"
|
||||||
|
@click="isConfirmDialogOpen = true"
|
||||||
|
>
|
||||||
|
Deactivate Account
|
||||||
|
</VBtn>
|
||||||
|
</VCardText>
|
||||||
|
</VCard>
|
||||||
|
</VCol>
|
||||||
</VRow>
|
</VRow>
|
||||||
|
|
||||||
<!-- Confirm Dialog -->
|
<!-- Confirm Dialog -->
|
||||||
|
@ -1,16 +1,14 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import sittingGirlWithLaptopDark from '@images/illustrations/sitting-girl-with-laptop-dark.png';
|
import sittingGirlWithLaptopDark from '@images/illustrations/sitting-girl-with-laptop-dark.png'
|
||||||
import sittingGirlWithLaptopLight from '@images/illustrations/sitting-girl-with-laptop-light.png';
|
import sittingGirlWithLaptopLight from '@images/illustrations/sitting-girl-with-laptop-light.png'
|
||||||
import { useStore } from 'vuex';
|
|
||||||
const store = useStore();
|
|
||||||
const refVForm = ref(null)
|
|
||||||
const isCurrentPasswordVisible = ref(false)
|
const isCurrentPasswordVisible = ref(false)
|
||||||
const isNewPasswordVisible = ref(false)
|
const isNewPasswordVisible = ref(false)
|
||||||
const isConfirmPasswordVisible = ref(false)
|
const isConfirmPasswordVisible = ref(false)
|
||||||
const currentPassword = ref('')
|
const currentPassword = ref('')
|
||||||
const newPassword = ref('')
|
const newPassword = ref('')
|
||||||
const confirmPassword = ref('')
|
const confirmPassword = ref('')
|
||||||
const passwordConfirmationTarget = computed(() => newPassword.value);
|
|
||||||
const passwordRequirements = [
|
const passwordRequirements = [
|
||||||
'Minimum 8 characters long - the more, the better',
|
'Minimum 8 characters long - the more, the better',
|
||||||
'At least one lowercase character',
|
'At least one lowercase character',
|
||||||
@ -119,28 +117,7 @@ const recentDevices = [
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
const save = async () => {
|
|
||||||
const { valid } = await refVForm.value.validate()
|
|
||||||
console.log(valid)
|
|
||||||
if (valid) {
|
|
||||||
try {
|
|
||||||
|
|
||||||
await store.dispatch('adminPasswordUpadate',{
|
|
||||||
password: currentPassword.value,
|
|
||||||
new_password : newPassword.value,
|
|
||||||
confirm_password : confirmPassword.value,
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
} catch (error) {
|
|
||||||
console.error(error)
|
|
||||||
}
|
|
||||||
|
|
||||||
currentPassword.value = null
|
|
||||||
newPassword.value = null
|
|
||||||
confirmPassword.value = null
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const sittingGirlImg = useGenerateImageVariant(sittingGirlWithLaptopLight, sittingGirlWithLaptopDark)
|
const sittingGirlImg = useGenerateImageVariant(sittingGirlWithLaptopLight, sittingGirlWithLaptopDark)
|
||||||
const isOneTimePasswordDialogVisible = ref(false)
|
const isOneTimePasswordDialogVisible = ref(false)
|
||||||
</script>
|
</script>
|
||||||
@ -153,7 +130,7 @@ const isOneTimePasswordDialogVisible = ref(false)
|
|||||||
<VCardItem class="pb-6">
|
<VCardItem class="pb-6">
|
||||||
<VCardTitle>Change Password</VCardTitle>
|
<VCardTitle>Change Password</VCardTitle>
|
||||||
</VCardItem>
|
</VCardItem>
|
||||||
<VForm ref="refVForm">
|
<VForm>
|
||||||
<VCardText class="pt-0">
|
<VCardText class="pt-0">
|
||||||
<!-- 👉 Current Password -->
|
<!-- 👉 Current Password -->
|
||||||
<VRow>
|
<VRow>
|
||||||
@ -170,7 +147,6 @@ const isOneTimePasswordDialogVisible = ref(false)
|
|||||||
label="Current Password"
|
label="Current Password"
|
||||||
placeholder="············"
|
placeholder="············"
|
||||||
@click:append-inner="isCurrentPasswordVisible = !isCurrentPasswordVisible"
|
@click:append-inner="isCurrentPasswordVisible = !isCurrentPasswordVisible"
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</VCol>
|
</VCol>
|
||||||
</VRow>
|
</VRow>
|
||||||
@ -190,8 +166,6 @@ const isOneTimePasswordDialogVisible = ref(false)
|
|||||||
autocomplete="on"
|
autocomplete="on"
|
||||||
placeholder="············"
|
placeholder="············"
|
||||||
@click:append-inner="isNewPasswordVisible = !isNewPasswordVisible"
|
@click:append-inner="isNewPasswordVisible = !isNewPasswordVisible"
|
||||||
:rules="[passwordValidator]"
|
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</VCol>
|
</VCol>
|
||||||
|
|
||||||
@ -199,7 +173,6 @@ const isOneTimePasswordDialogVisible = ref(false)
|
|||||||
cols="12"
|
cols="12"
|
||||||
md="6"
|
md="6"
|
||||||
>
|
>
|
||||||
|
|
||||||
<!-- 👉 confirm password -->
|
<!-- 👉 confirm password -->
|
||||||
<VTextField
|
<VTextField
|
||||||
v-model="confirmPassword"
|
v-model="confirmPassword"
|
||||||
@ -209,7 +182,6 @@ const isOneTimePasswordDialogVisible = ref(false)
|
|||||||
label="Confirm New Password"
|
label="Confirm New Password"
|
||||||
placeholder="············"
|
placeholder="············"
|
||||||
@click:append-inner="isConfirmPasswordVisible = !isConfirmPasswordVisible"
|
@click:append-inner="isConfirmPasswordVisible = !isConfirmPasswordVisible"
|
||||||
:rules="[value => confirmedValidator(value, passwordConfirmationTarget)]"
|
|
||||||
/>
|
/>
|
||||||
</VCol>
|
</VCol>
|
||||||
</VRow>
|
</VRow>
|
||||||
@ -242,15 +214,15 @@ const isOneTimePasswordDialogVisible = ref(false)
|
|||||||
|
|
||||||
<!-- 👉 Action Buttons -->
|
<!-- 👉 Action Buttons -->
|
||||||
<div class="d-flex flex-wrap gap-4">
|
<div class="d-flex flex-wrap gap-4">
|
||||||
<VBtn @click="save">Save changes</VBtn>
|
<VBtn>Save changes</VBtn>
|
||||||
|
|
||||||
<!-- <VBtn
|
<VBtn
|
||||||
type="reset"
|
type="reset"
|
||||||
color="secondary"
|
color="secondary"
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
>
|
>
|
||||||
Reset
|
Reset
|
||||||
</VBtn>-->
|
</VBtn>
|
||||||
</div>
|
</div>
|
||||||
</VCardText>
|
</VCardText>
|
||||||
</VForm>
|
</VForm>
|
||||||
@ -259,7 +231,7 @@ const isOneTimePasswordDialogVisible = ref(false)
|
|||||||
<!-- !SECTION -->
|
<!-- !SECTION -->
|
||||||
|
|
||||||
<!-- SECTION Two-steps verification -->
|
<!-- SECTION Two-steps verification -->
|
||||||
<VCol cols="12" style="display: none;">
|
<VCol cols="12">
|
||||||
<VCard>
|
<VCard>
|
||||||
<VCardItem class="pb-6">
|
<VCardItem class="pb-6">
|
||||||
<VCardTitle>Two-steps verification</VCardTitle>
|
<VCardTitle>Two-steps verification</VCardTitle>
|
||||||
@ -284,7 +256,7 @@ const isOneTimePasswordDialogVisible = ref(false)
|
|||||||
</VCol>
|
</VCol>
|
||||||
<!-- !SECTION -->
|
<!-- !SECTION -->
|
||||||
|
|
||||||
<VCol cols="12" style="display: none;">
|
<VCol cols="12">
|
||||||
<!-- SECTION: Create an API key -->
|
<!-- SECTION: Create an API key -->
|
||||||
<VCard title="Create an API key">
|
<VCard title="Create an API key">
|
||||||
<VRow>
|
<VRow>
|
||||||
@ -341,7 +313,7 @@ const isOneTimePasswordDialogVisible = ref(false)
|
|||||||
<!-- !SECTION -->
|
<!-- !SECTION -->
|
||||||
</VCol>
|
</VCol>
|
||||||
|
|
||||||
<VCol cols="12" style="display: none;">
|
<VCol cols="12">
|
||||||
<!-- SECTION: API Keys List -->
|
<!-- SECTION: API Keys List -->
|
||||||
<VCard>
|
<VCard>
|
||||||
<VCardItem class="pb-4">
|
<VCardItem class="pb-4">
|
||||||
@ -391,7 +363,7 @@ const isOneTimePasswordDialogVisible = ref(false)
|
|||||||
</VCol>
|
</VCol>
|
||||||
|
|
||||||
<!-- SECTION Recent Devices -->
|
<!-- SECTION Recent Devices -->
|
||||||
<VCol cols="12" style="display: none;">
|
<VCol cols="12">
|
||||||
<!-- 👉 Table -->
|
<!-- 👉 Table -->
|
||||||
<VCard
|
<VCard
|
||||||
title="Recent Devices"
|
title="Recent Devices"
|
||||||
@ -424,6 +396,6 @@ const isOneTimePasswordDialogVisible = ref(false)
|
|||||||
</VRow>
|
</VRow>
|
||||||
|
|
||||||
<!-- SECTION Enable One time password -->
|
<!-- SECTION Enable One time password -->
|
||||||
<TwoFactorAuthDialog v-model:isDialogVisible="isOneTimePasswordDialogVisible" style="display: none;"/>
|
<TwoFactorAuthDialog v-model:isDialogVisible="isOneTimePasswordDialogVisible" />
|
||||||
<!-- !SECTION -->
|
<!-- !SECTION -->
|
||||||
</template>
|
</template>
|
||||||
|
@ -1,504 +0,0 @@
|
|||||||
<script setup>
|
|
||||||
import { useStore } from 'vuex';
|
|
||||||
const store = useStore();
|
|
||||||
const accountData = {
|
|
||||||
favicon:'',
|
|
||||||
domain_name: '',
|
|
||||||
footer_text: '',
|
|
||||||
header_title: '',
|
|
||||||
logo: '',
|
|
||||||
plan_description: '',
|
|
||||||
plan_main_title:'',
|
|
||||||
id:'',
|
|
||||||
}
|
|
||||||
const refVForm = ref(null)
|
|
||||||
const refInputEl = ref()
|
|
||||||
const refInputElFavicon = ref()
|
|
||||||
const isConfirmDialogOpen = ref(false)
|
|
||||||
const accountDataLocal = ref(structuredClone(accountData))
|
|
||||||
const isAccountDeactivated = ref(false)
|
|
||||||
const validateAccountDeactivation = [v => !!v || 'Please confirm account deactivation']
|
|
||||||
const imageBase64 = ref(null)
|
|
||||||
const faviconBase64 = ref(null)
|
|
||||||
const resetForm = () => {
|
|
||||||
accountDataLocal.value = structuredClone(accountData)
|
|
||||||
}
|
|
||||||
const resetFormFavicon = () => {
|
|
||||||
accountDataLocal.value = structuredClone(accountData)
|
|
||||||
}
|
|
||||||
const changeAvatar = file => {
|
|
||||||
const fileReader = new FileReader()
|
|
||||||
const { files } = file.target
|
|
||||||
if (files && files.length) {
|
|
||||||
fileReader.readAsDataURL(files[0])
|
|
||||||
fileReader.onload = () => {
|
|
||||||
if (typeof fileReader.result === 'string') {
|
|
||||||
accountDataLocal.value.logo = fileReader.result
|
|
||||||
}
|
|
||||||
|
|
||||||
imageBase64.value = fileReader.result.split(',')[1]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const changeAvatarFavicon = file => {
|
|
||||||
const fileReader = new FileReader()
|
|
||||||
const { files } = file.target
|
|
||||||
if (files && files.length) {
|
|
||||||
fileReader.readAsDataURL(files[0])
|
|
||||||
fileReader.onload = () => {
|
|
||||||
if (typeof fileReader.result === 'string') {
|
|
||||||
accountDataLocal.value.favicon = fileReader.result
|
|
||||||
}
|
|
||||||
faviconBase64.value = fileReader.result.split(',')[1]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// reset avatar image
|
|
||||||
const resetAvatar = () => {
|
|
||||||
accountDataLocal.value.logo = accountData.logo
|
|
||||||
}
|
|
||||||
const resetAvatarFavicon = () => {
|
|
||||||
accountDataLocal.value.favicon = accountData.favicon
|
|
||||||
}
|
|
||||||
const timezones = [
|
|
||||||
'(GMT-11:00) International Date Line West',
|
|
||||||
'(GMT-11:00) Midway Island',
|
|
||||||
'(GMT-10:00) Hawaii',
|
|
||||||
'(GMT-09:00) Alaska',
|
|
||||||
'(GMT-08:00) Pacific Time (US & Canada)',
|
|
||||||
'(GMT-08:00) Tijuana',
|
|
||||||
'(GMT-07:00) Arizona',
|
|
||||||
'(GMT-07:00) Chihuahua',
|
|
||||||
'(GMT-07:00) La Paz',
|
|
||||||
'(GMT-07:00) Mazatlan',
|
|
||||||
'(GMT-07:00) Mountain Time (US & Canada)',
|
|
||||||
'(GMT-06:00) Central America',
|
|
||||||
'(GMT-06:00) Central Time (US & Canada)',
|
|
||||||
'(GMT-06:00) Guadalajara',
|
|
||||||
'(GMT-06:00) Mexico City',
|
|
||||||
'(GMT-06:00) Monterrey',
|
|
||||||
'(GMT-06:00) Saskatchewan',
|
|
||||||
'(GMT-05:00) Bogota',
|
|
||||||
'(GMT-05:00) Eastern Time (US & Canada)',
|
|
||||||
'(GMT-05:00) Indiana (East)',
|
|
||||||
'(GMT-05:00) Lima',
|
|
||||||
'(GMT-05:00) Quito',
|
|
||||||
'(GMT-04:00) Atlantic Time (Canada)',
|
|
||||||
'(GMT-04:00) Caracas',
|
|
||||||
'(GMT-04:00) La Paz',
|
|
||||||
'(GMT-04:00) Santiago',
|
|
||||||
'(GMT-03:30) Newfoundland',
|
|
||||||
'(GMT-03:00) Brasilia',
|
|
||||||
'(GMT-03:00) Buenos Aires',
|
|
||||||
'(GMT-03:00) Georgetown',
|
|
||||||
'(GMT-03:00) Greenland',
|
|
||||||
'(GMT-02:00) Mid-Atlantic',
|
|
||||||
'(GMT-01:00) Azores',
|
|
||||||
'(GMT-01:00) Cape Verde Is.',
|
|
||||||
'(GMT+00:00) Casablanca',
|
|
||||||
'(GMT+00:00) Dublin',
|
|
||||||
'(GMT+00:00) Edinburgh',
|
|
||||||
'(GMT+00:00) Lisbon',
|
|
||||||
'(GMT+00:00) London',
|
|
||||||
]
|
|
||||||
|
|
||||||
const currencies = [
|
|
||||||
'USD',
|
|
||||||
'EUR',
|
|
||||||
'GBP',
|
|
||||||
'AUD',
|
|
||||||
'BRL',
|
|
||||||
'CAD',
|
|
||||||
'CNY',
|
|
||||||
'CZK',
|
|
||||||
'DKK',
|
|
||||||
'HKD',
|
|
||||||
'HUF',
|
|
||||||
'INR',
|
|
||||||
]
|
|
||||||
onMounted(async () => {
|
|
||||||
await store.dispatch('siteSetting');
|
|
||||||
let list = await store.getters.getSiteSetting
|
|
||||||
console.log('list',list)
|
|
||||||
accountDataLocal.value.logo = list.logo
|
|
||||||
accountDataLocal.value.favicon = list.favicon
|
|
||||||
accountDataLocal.value.plan_main_title = list.plan_main_title
|
|
||||||
accountDataLocal.value.plan_description = list.plan_description
|
|
||||||
accountDataLocal.value.header_title = list.header_title
|
|
||||||
accountDataLocal.value.footer_text = list.footer_text
|
|
||||||
accountDataLocal.value.domain_name = list.domain_name
|
|
||||||
accountDataLocal.value.id = list.id
|
|
||||||
});
|
|
||||||
const convertImageToBase64 = (event) => {
|
|
||||||
const file = event.target.files[0]
|
|
||||||
const reader = new FileReader()
|
|
||||||
reader.readAsDataURL(file)
|
|
||||||
reader.onload = () => {
|
|
||||||
imageBase64.value = reader.result.split(',')[1]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const save = async () => {
|
|
||||||
const { valid } = await refVForm.value.validate()
|
|
||||||
console.log(valid)
|
|
||||||
if (valid) {
|
|
||||||
try {
|
|
||||||
console.log(imageBase64.value)
|
|
||||||
await store.dispatch('siteSettingUpdate',{
|
|
||||||
plan_main_title: accountDataLocal.value.plan_main_title,
|
|
||||||
plan_description: accountDataLocal.value.plan_description,
|
|
||||||
header_title: accountDataLocal.value.header_title,
|
|
||||||
footer_text: accountDataLocal.value.footer_text,
|
|
||||||
domain_name: accountDataLocal.value.domain_name,
|
|
||||||
id: accountDataLocal.value.id,
|
|
||||||
logo:imageBase64.value, //ecelData,
|
|
||||||
favicon:faviconBase64.value//imageBase64.value
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
} catch (error) {
|
|
||||||
console.error(error)
|
|
||||||
}
|
|
||||||
await store.dispatch('siteSetting');
|
|
||||||
let list = await store.getters.getSiteSetting
|
|
||||||
console.log('list',list)
|
|
||||||
accountDataLocal.value.logo = list.logo
|
|
||||||
accountDataLocal.value.favicon = list.favicon
|
|
||||||
accountDataLocal.value.plan_main_title = list.plan_main_title
|
|
||||||
accountDataLocal.value.plan_description = list.plan_description
|
|
||||||
accountDataLocal.value.header_title = list.header_title
|
|
||||||
accountDataLocal.value.footer_text = list.footer_text
|
|
||||||
accountDataLocal.value.domain_name = list.domain_name
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<VRow>
|
|
||||||
|
|
||||||
<VCol cols="12">
|
|
||||||
<VCard>
|
|
||||||
<VCardText>
|
|
||||||
<div class="d-flex mb-10">
|
|
||||||
<!-- 👉 Avatar -->
|
|
||||||
<VAvatar
|
|
||||||
rounded
|
|
||||||
size="70"
|
|
||||||
class="me-6"
|
|
||||||
:image="accountDataLocal.logo"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 👉 Upload Photo -->
|
|
||||||
<form class="d-flex flex-column justify-center gap-4">
|
|
||||||
<div class="d-flex flex-wrap gap-4">
|
|
||||||
<VBtn
|
|
||||||
color="primary"
|
|
||||||
@click="refInputEl?.click()"
|
|
||||||
>
|
|
||||||
<VIcon
|
|
||||||
icon="ri-upload-cloud-line"
|
|
||||||
class="d-sm-none"
|
|
||||||
/>
|
|
||||||
<span class="d-none d-sm-block">Upload new Logo</span>
|
|
||||||
</VBtn>
|
|
||||||
<input
|
|
||||||
ref="refInputEl"
|
|
||||||
type="file"
|
|
||||||
name="file"
|
|
||||||
accept=".jpeg,.png,.webp,.jpg,GIF"
|
|
||||||
hidden
|
|
||||||
@input="changeAvatar"
|
|
||||||
>
|
|
||||||
<VBtn
|
|
||||||
type="reset"
|
|
||||||
color="error"
|
|
||||||
variant="outlined"
|
|
||||||
@click="resetAvatar"
|
|
||||||
>
|
|
||||||
<span class="d-none d-sm-block">Reset</span>
|
|
||||||
<VIcon
|
|
||||||
icon="ri-refresh-line"
|
|
||||||
class="d-sm-none"
|
|
||||||
/>
|
|
||||||
</VBtn>
|
|
||||||
</div>
|
|
||||||
<p class="text-body-1 mb-0">
|
|
||||||
Allowed JPG, GIF ,webp or PNG. Max size of 800K
|
|
||||||
</p>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="d-flex mb-10">
|
|
||||||
<!-- 👉 Avatar -->
|
|
||||||
<VAvatar
|
|
||||||
rounded
|
|
||||||
size="70"
|
|
||||||
class="me-6"
|
|
||||||
:image="accountDataLocal.favicon"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 👉 Upload Photo -->
|
|
||||||
<form class="d-flex flex-column justify-center gap-4">
|
|
||||||
<div class="d-flex flex-wrap gap-4">
|
|
||||||
<VBtn
|
|
||||||
color="primary"
|
|
||||||
@click="refInputElFavicon?.click()"
|
|
||||||
>
|
|
||||||
<VIcon
|
|
||||||
icon="ri-upload-cloud-line"
|
|
||||||
class="d-sm-none"
|
|
||||||
/>
|
|
||||||
<span class="d-none d-sm-block">Upload new Favicon</span>
|
|
||||||
</VBtn>
|
|
||||||
<input
|
|
||||||
ref="refInputElFavicon"
|
|
||||||
type="file"
|
|
||||||
name="file"
|
|
||||||
accept=".jpeg,.png,.webp,.jpg,GIF"
|
|
||||||
hidden
|
|
||||||
@input="changeAvatarFavicon"
|
|
||||||
>
|
|
||||||
<VBtn
|
|
||||||
type="reset"
|
|
||||||
color="error"
|
|
||||||
variant="outlined"
|
|
||||||
@click="resetAvatarFavicon"
|
|
||||||
>
|
|
||||||
<span class="d-none d-sm-block">Reset</span>
|
|
||||||
<VIcon
|
|
||||||
icon="ri-refresh-line"
|
|
||||||
class="d-sm-none"
|
|
||||||
/>
|
|
||||||
</VBtn>
|
|
||||||
</div>
|
|
||||||
<p class="text-body-1 mb-0">
|
|
||||||
Allowed JPG,webp, GIF or PNG. Max size of 800K
|
|
||||||
</p>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
<!-- 👉 Form -->
|
|
||||||
<VForm ref="refVForm" >
|
|
||||||
<VRow>
|
|
||||||
<!-- 👉 First Name -->
|
|
||||||
<VCol
|
|
||||||
md="6"
|
|
||||||
cols="12"
|
|
||||||
>
|
|
||||||
<VTextField
|
|
||||||
v-model="accountDataLocal.plan_main_title"
|
|
||||||
placeholder="Plan Main Page Title"
|
|
||||||
label="Plan Page Main Title"
|
|
||||||
:rules="[requiredValidator]"
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
|
|
||||||
<!-- 👉 Last Name -->
|
|
||||||
<VCol
|
|
||||||
md="6"
|
|
||||||
cols="12"
|
|
||||||
>
|
|
||||||
<VTextField
|
|
||||||
v-model="accountDataLocal.plan_description"
|
|
||||||
placeholder="Doe"
|
|
||||||
label="Plan Description"
|
|
||||||
:rules="[requiredValidator]"
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
<!-- 👉 Header Title -->
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
md="6"
|
|
||||||
|
|
||||||
>
|
|
||||||
<VTextField
|
|
||||||
v-model="accountDataLocal.header_title"
|
|
||||||
label="Header Title"
|
|
||||||
placeholder="Header Title"
|
|
||||||
:rules="[requiredValidator]"
|
|
||||||
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
md="6"
|
|
||||||
>
|
|
||||||
<VTextField
|
|
||||||
v-model="accountDataLocal.domain_name"
|
|
||||||
label="Domain Name"
|
|
||||||
placeholder="Domain Name"
|
|
||||||
:rules="[requiredValidator]"
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
<!-- 👉 Email -->
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
md="6"
|
|
||||||
>
|
|
||||||
<VTextarea
|
|
||||||
v-model="accountDataLocal.footer_text"
|
|
||||||
label="Footer Text"
|
|
||||||
placeholder="Footer Text"
|
|
||||||
:rules="[requiredValidator]"
|
|
||||||
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- 👉 Phone -->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- 👉 Address -->
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
md="6"
|
|
||||||
style="display: none;"
|
|
||||||
>
|
|
||||||
<VTextField
|
|
||||||
v-model="accountDataLocal.address"
|
|
||||||
label="Address"
|
|
||||||
placeholder="123 Main St, New York, NY 10001"
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
|
|
||||||
<!-- 👉 State -->
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
md="6"
|
|
||||||
style="display: none;"
|
|
||||||
>
|
|
||||||
<VTextField
|
|
||||||
v-model="accountDataLocal.state"
|
|
||||||
label="State"
|
|
||||||
placeholder="New York"
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
|
|
||||||
<!-- 👉 Zip Code -->
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
md="6"
|
|
||||||
style="display: none;"
|
|
||||||
>
|
|
||||||
<VTextField
|
|
||||||
v-model="accountDataLocal.zip"
|
|
||||||
label="Zip Code"
|
|
||||||
placeholder="10001"
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
|
|
||||||
<!-- 👉 Country -->
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
md="6"
|
|
||||||
style="display: none;"
|
|
||||||
>
|
|
||||||
<VSelect
|
|
||||||
v-model="accountDataLocal.country"
|
|
||||||
multiple
|
|
||||||
chips
|
|
||||||
closable-chips
|
|
||||||
label="Country"
|
|
||||||
:items="['USA', 'Canada', 'UK', 'India', 'Australia']"
|
|
||||||
placeholder="Select Country"
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
|
|
||||||
<!-- 👉 Language -->
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
md="6"
|
|
||||||
style="display: none;"
|
|
||||||
>
|
|
||||||
<VSelect
|
|
||||||
v-model="accountDataLocal.language"
|
|
||||||
label="Language"
|
|
||||||
multiple
|
|
||||||
chips
|
|
||||||
closable-chips
|
|
||||||
placeholder="Select Language"
|
|
||||||
:items="['English', 'Spanish', 'Arabic', 'Hindi', 'Urdu']"
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
|
|
||||||
<!-- 👉 Timezone -->
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
md="6"
|
|
||||||
style="display: none;"
|
|
||||||
>
|
|
||||||
<VSelect
|
|
||||||
v-model="accountDataLocal.timezone"
|
|
||||||
label="Timezone"
|
|
||||||
placeholder="Select Timezone"
|
|
||||||
:items="timezones"
|
|
||||||
:menu-props="{ maxHeight: 200 }"
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
|
|
||||||
<!-- 👉 Currency -->
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
md="6"
|
|
||||||
style="display: none;"
|
|
||||||
>
|
|
||||||
<VSelect
|
|
||||||
v-model="accountDataLocal.currency"
|
|
||||||
label="Currency"
|
|
||||||
placeholder="Select Currency"
|
|
||||||
:items="currencies"
|
|
||||||
:menu-props="{ maxHeight: 200 }"
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
|
|
||||||
<!-- 👉 Form Actions -->
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
class="d-flex flex-wrap gap-4"
|
|
||||||
>
|
|
||||||
<VBtn @click="save">Save changes</VBtn>
|
|
||||||
|
|
||||||
|
|
||||||
</VCol>
|
|
||||||
</VRow>
|
|
||||||
</VForm>
|
|
||||||
</VCardText>
|
|
||||||
</VCard>
|
|
||||||
</VCol>
|
|
||||||
|
|
||||||
<VCol cols="12" style="display: none;">
|
|
||||||
<!-- 👉 Delete Account -->
|
|
||||||
<VCard title="Delete Account">
|
|
||||||
<VCardText>
|
|
||||||
<!-- 👉 Checkbox and Button -->
|
|
||||||
<div>
|
|
||||||
<VCheckbox
|
|
||||||
v-model="isAccountDeactivated"
|
|
||||||
:rules="validateAccountDeactivation"
|
|
||||||
label="I confirm my account deactivation"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<VBtn
|
|
||||||
:disabled="!isAccountDeactivated"
|
|
||||||
color="error"
|
|
||||||
class="mt-3"
|
|
||||||
@click="isConfirmDialogOpen = true"
|
|
||||||
>
|
|
||||||
Deactivate Account
|
|
||||||
</VBtn>
|
|
||||||
</VCardText>
|
|
||||||
</VCard>
|
|
||||||
</VCol>
|
|
||||||
</VRow>
|
|
||||||
|
|
||||||
<!-- Confirm Dialog -->
|
|
||||||
<ConfirmDialog
|
|
||||||
v-model:isDialogVisible="isConfirmDialogOpen"
|
|
||||||
confirmation-question="Are you sure you want to deactivate your account?"
|
|
||||||
confirm-title="Deactivated!"
|
|
||||||
confirm-msg="Your account has been deactivated successfully."
|
|
||||||
cancel-title="Cancelled"
|
|
||||||
cancel-msg="Account Deactivation Cancelled!"
|
|
||||||
/>
|
|
||||||
</template>
|
|
@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<link rel="icon" href="{{ asset('images/favicon.webp') }}" />
|
<link rel="icon" href="{{ asset('favicon.ico') }}" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>{{ config('app.name') }}</title>
|
<title>Materio - Vuetify Vuejs Admin Template</title>
|
||||||
<link rel="stylesheet" type="text/css" href="{{ asset('loader.css') }}" />
|
<link rel="stylesheet" type="text/css" href="{{ asset('loader.css') }}" />
|
||||||
@vite(['resources/js/main.js'])
|
@vite(['resources/js/main.js'])
|
||||||
</head>
|
</head>
|
||||||
@ -15,7 +15,7 @@
|
|||||||
<div id="loading-bg">
|
<div id="loading-bg">
|
||||||
<div class="loading-logo">
|
<div class="loading-logo">
|
||||||
<!-- SVG Logo -->
|
<!-- SVG Logo -->
|
||||||
<!-- <svg width="86" height="48" viewBox="0 0 30 24" xmlns="http://www.w3.org/2000/svg">
|
<svg width="86" height="48" viewBox="0 0 30 24" xmlns="http://www.w3.org/2000/svg">
|
||||||
<g fill="none" fill-rule="evenodd">
|
<g fill="none" fill-rule="evenodd">
|
||||||
<path d="M30 21.392a2 2 0 0 1-3.027 1.716l-3.258-1.95a2 2 0 0 1-.973-1.716l-.001-6.7L15
|
<path d="M30 21.392a2 2 0 0 1-3.027 1.716l-3.258-1.95a2 2 0 0 1-.973-1.716l-.001-6.7L15
|
||||||
17.178l-7.742-4.434v6.7a2 2 0 0 1-.973 1.715l-3.258 1.95A2 2 0 0 1 0 21.392V3.585l.005-.15L0 3.572a2 2 0 0
|
17.178l-7.742-4.434v6.7a2 2 0 0 1-.973 1.715l-3.258 1.95A2 2 0 0 1 0 21.392V3.585l.005-.15L0 3.572a2 2 0 0
|
||||||
@ -26,9 +26,10 @@
|
|||||||
<path fill="var(--initial-loader-color)" opacity=".078" d="m30 8.589-7.258 4.052v2.62z" />
|
<path fill="var(--initial-loader-color)" opacity=".078" d="m30 8.589-7.258 4.052v2.62z" />
|
||||||
<path d="M3.045 1.866 15 9.194v7.983L0 8.587V3.571a2 2 0 0 1 3.045-1.706Z" fill-opacity=".15" fill="
|
<path d="M3.045 1.866 15 9.194v7.983L0 8.587V3.571a2 2 0 0 1 3.045-1.706Z" fill-opacity=".15" fill="
|
||||||
#FFF" />
|
#FFF" />
|
||||||
<path d="M26.955 1.866 15 9.194v7.983l15-8.59V3.571a2 2 0 0 0-3.045-1.706Z" fill-opacity=".35" fill="#FFF" />
|
<path d="M26.955 1.866 15 9.194v7.983l15-8.59V3.571a2 2 0 0 0-3.045-1.706Z" fill-opacity=".35"
|
||||||
|
fill="#FFF" />
|
||||||
</g>
|
</g>
|
||||||
</svg> -->
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
<div class=" loading">
|
<div class=" loading">
|
||||||
<div class="effect-1 effects"></div>
|
<div class="effect-1 effects"></div>
|
||||||
|
@ -4,16 +4,15 @@ import { breakpointsVuetify } from '@vueuse/core'
|
|||||||
import { VIcon } from 'vuetify/components/VIcon'
|
import { VIcon } from 'vuetify/components/VIcon'
|
||||||
|
|
||||||
// ❗ Logo SVG must be imported with ?raw suffix
|
// ❗ Logo SVG must be imported with ?raw suffix
|
||||||
import logoImage from '@images/logo-peptied-web.webp'
|
import logo from '@images/logo.svg?raw'
|
||||||
|
|
||||||
import { AppContentLayoutNav, ContentWidth, FooterType, NavbarType } from '@layouts/enums'
|
import { AppContentLayoutNav, ContentWidth, FooterType, NavbarType } from '@layouts/enums'
|
||||||
|
|
||||||
export const { themeConfig, layoutConfig } = defineThemeConfig({
|
export const { themeConfig, layoutConfig } = defineThemeConfig({
|
||||||
app: {
|
app: {
|
||||||
title: '',
|
title: 'TelemedPro',
|
||||||
|
|
||||||
// ❗ if you have SVG logo and want it to adapt according to theme color, you have to apply color as `color: rgb(var(--v-global-theme-primary))`
|
// ❗ if you have SVG logo and want it to adapt according to theme color, you have to apply color as `color: rgb(var(--v-global-theme-primary))`
|
||||||
logo: h('div', { innerHTML: `<img src="${logoImage}" alt="Logo" style="width:170px;">` }),
|
logo: h('div', { innerHTML: logo, style: 'line-height:0; color: rgb(var(--v-global-theme-primary))' }),
|
||||||
contentWidth: ContentWidth.Boxed,
|
contentWidth: ContentWidth.Boxed,
|
||||||
contentLayoutNav: AppContentLayoutNav.Vertical,
|
contentLayoutNav: AppContentLayoutNav.Vertical,
|
||||||
overlayNavFromBreakpoint: breakpointsVuetify.md + 16, // 16 for scrollbar. Docs: https://next.vuetifyjs.com/en/features/display-and-platform/
|
overlayNavFromBreakpoint: breakpointsVuetify.md + 16, // 16 for scrollbar. Docs: https://next.vuetifyjs.com/en/features/display-and-platform/
|
||||||
|
28
typed-router.d.ts
vendored
28
typed-router.d.ts
vendored
@ -118,8 +118,6 @@ declare module 'vue-router/auto/routes' {
|
|||||||
'front-pages-landing-page': RouteRecordInfo<'front-pages-landing-page', '/front-pages/landing-page', Record<never, never>, Record<never, never>>,
|
'front-pages-landing-page': RouteRecordInfo<'front-pages-landing-page', '/front-pages/landing-page', Record<never, never>, Record<never, never>>,
|
||||||
'front-pages-payment': RouteRecordInfo<'front-pages-payment', '/front-pages/payment', Record<never, never>, Record<never, never>>,
|
'front-pages-payment': RouteRecordInfo<'front-pages-payment', '/front-pages/payment', Record<never, never>, Record<never, never>>,
|
||||||
'front-pages-pricing': RouteRecordInfo<'front-pages-pricing', '/front-pages/pricing', Record<never, never>, Record<never, never>>,
|
'front-pages-pricing': RouteRecordInfo<'front-pages-pricing', '/front-pages/pricing', Record<never, never>, Record<never, never>>,
|
||||||
'labs-labs': RouteRecordInfo<'labs-labs', '/labs/labs', Record<never, never>, Record<never, never>>,
|
|
||||||
'labs-labs-kit': RouteRecordInfo<'labs-labs-kit', '/labs/labs-kit', Record<never, never>, Record<never, never>>,
|
|
||||||
'login': RouteRecordInfo<'login', '/login', Record<never, never>, Record<never, never>>,
|
'login': RouteRecordInfo<'login', '/login', Record<never, never>, Record<never, never>>,
|
||||||
'not-authorized': RouteRecordInfo<'not-authorized', '/not-authorized', Record<never, never>, Record<never, never>>,
|
'not-authorized': RouteRecordInfo<'not-authorized', '/not-authorized', Record<never, never>, Record<never, never>>,
|
||||||
'pages-account-settings-tab': RouteRecordInfo<'pages-account-settings-tab', '/pages/account-settings/:tab', { tab: ParamValue<true> }, { tab: ParamValue<false> }>,
|
'pages-account-settings-tab': RouteRecordInfo<'pages-account-settings-tab', '/pages/account-settings/:tab', { tab: ParamValue<true> }, { tab: ParamValue<false> }>,
|
||||||
@ -147,36 +145,10 @@ declare module 'vue-router/auto/routes' {
|
|||||||
'pages-icons': RouteRecordInfo<'pages-icons', '/pages/icons', Record<never, never>, Record<never, never>>,
|
'pages-icons': RouteRecordInfo<'pages-icons', '/pages/icons', Record<never, never>, Record<never, never>>,
|
||||||
'pages-misc-coming-soon': RouteRecordInfo<'pages-misc-coming-soon', '/pages/misc/coming-soon', Record<never, never>, Record<never, never>>,
|
'pages-misc-coming-soon': RouteRecordInfo<'pages-misc-coming-soon', '/pages/misc/coming-soon', Record<never, never>, Record<never, never>>,
|
||||||
'pages-misc-under-maintenance': RouteRecordInfo<'pages-misc-under-maintenance', '/pages/misc/under-maintenance', Record<never, never>, Record<never, never>>,
|
'pages-misc-under-maintenance': RouteRecordInfo<'pages-misc-under-maintenance', '/pages/misc/under-maintenance', Record<never, never>, Record<never, never>>,
|
||||||
'pages-patient-labkits-labkit': RouteRecordInfo<'pages-patient-labkits-labkit', '/pages/patient-labkits/labkit', Record<never, never>, Record<never, never>>,
|
|
||||||
'pages-patient-meetings-notes': RouteRecordInfo<'pages-patient-meetings-notes', '/pages/patient-meetings/notes', Record<never, never>, Record<never, never>>,
|
|
||||||
'pages-patient-meetings-prescription': RouteRecordInfo<'pages-patient-meetings-prescription', '/pages/patient-meetings/prescription', Record<never, never>, Record<never, never>>,
|
|
||||||
'pages-pricing': RouteRecordInfo<'pages-pricing', '/pages/pricing', Record<never, never>, Record<never, never>>,
|
'pages-pricing': RouteRecordInfo<'pages-pricing', '/pages/pricing', Record<never, never>, Record<never, never>>,
|
||||||
'pages-typography': RouteRecordInfo<'pages-typography', '/pages/typography', Record<never, never>, Record<never, never>>,
|
'pages-typography': RouteRecordInfo<'pages-typography', '/pages/typography', Record<never, never>, Record<never, never>>,
|
||||||
'pages-user-profile-tab': RouteRecordInfo<'pages-user-profile-tab', '/pages/user-profile/:tab', { tab: ParamValue<true> }, { tab: ParamValue<false> }>,
|
'pages-user-profile-tab': RouteRecordInfo<'pages-user-profile-tab', '/pages/user-profile/:tab', { tab: ParamValue<true> }, { tab: ParamValue<false> }>,
|
||||||
'patients-completed-meeting-tab': RouteRecordInfo<'patients-completed-meeting-tab', '/patients/CompletedMeetingTab', Record<never, never>, Record<never, never>>,
|
|
||||||
'patients-meeting-details': RouteRecordInfo<'patients-meeting-details', '/patients/meeting-details', Record<never, never>, Record<never, never>>,
|
|
||||||
'patients-meetings': RouteRecordInfo<'patients-meetings', '/patients/meetings', Record<never, never>, Record<never, never>>,
|
|
||||||
'patients-notes-panel': RouteRecordInfo<'patients-notes-panel', '/patients/NotesPanel', Record<never, never>, Record<never, never>>,
|
|
||||||
'patients-patient-profile': RouteRecordInfo<'patients-patient-profile', '/patients/patient-profile', Record<never, never>, Record<never, never>>,
|
|
||||||
'patients-patien-tab-overview': RouteRecordInfo<'patients-patien-tab-overview', '/patients/PatienTabOverview', Record<never, never>, Record<never, never>>,
|
|
||||||
'patients-patient-bio-panel': RouteRecordInfo<'patients-patient-bio-panel', '/patients/PatientBioPanel', Record<never, never>, Record<never, never>>,
|
|
||||||
'patients-patient-lab-test': RouteRecordInfo<'patients-patient-lab-test', '/patients/PatientLabTest', Record<never, never>, Record<never, never>>,
|
|
||||||
'patients-patient-question-profile': RouteRecordInfo<'patients-patient-question-profile', '/patients/PatientQuestionProfile', Record<never, never>, Record<never, never>>,
|
|
||||||
'patients-patients': RouteRecordInfo<'patients-patients', '/patients/patients', Record<never, never>, Record<never, never>>,
|
|
||||||
'patients-prescription-panel': RouteRecordInfo<'patients-prescription-panel', '/patients/PrescriptionPanel', Record<never, never>, Record<never, never>>,
|
|
||||||
'patients-question-progress-bar': RouteRecordInfo<'patients-question-progress-bar', '/patients/QuestionProgressBar', Record<never, never>, Record<never, never>>,
|
|
||||||
'products-product': RouteRecordInfo<'products-product', '/products/product', Record<never, never>, Record<never, never>>,
|
|
||||||
'providers-completed-meeting-tab': RouteRecordInfo<'providers-completed-meeting-tab', '/providers/CompletedMeetingTab', Record<never, never>, Record<never, never>>,
|
|
||||||
'providers-meeting-details': RouteRecordInfo<'providers-meeting-details', '/providers/meeting-details', Record<never, never>, Record<never, never>>,
|
|
||||||
'providers-meetings': RouteRecordInfo<'providers-meetings', '/providers/meetings', Record<never, never>, Record<never, never>>,
|
|
||||||
'providers-notes-panel': RouteRecordInfo<'providers-notes-panel', '/providers/NotesPanel', Record<never, never>, Record<never, never>>,
|
|
||||||
'providers-prescription-panel': RouteRecordInfo<'providers-prescription-panel', '/providers/PrescriptionPanel', Record<never, never>, Record<never, never>>,
|
|
||||||
'providers-provider-profile': RouteRecordInfo<'providers-provider-profile', '/providers/provider-profile', Record<never, never>, Record<never, never>>,
|
|
||||||
'providers-provider-bio-panel': RouteRecordInfo<'providers-provider-bio-panel', '/providers/ProviderBioPanel', Record<never, never>, Record<never, never>>,
|
|
||||||
'providers-providers': RouteRecordInfo<'providers-providers', '/providers/providers', Record<never, never>, Record<never, never>>,
|
|
||||||
'providers-provider-tab-overview': RouteRecordInfo<'providers-provider-tab-overview', '/providers/ProviderTabOverview', Record<never, never>, Record<never, never>>,
|
|
||||||
'register': RouteRecordInfo<'register', '/register', Record<never, never>, Record<never, never>>,
|
'register': RouteRecordInfo<'register', '/register', Record<never, never>, Record<never, never>>,
|
||||||
'reports-providers-report': RouteRecordInfo<'reports-providers-report', '/reports/providers-report', Record<never, never>, Record<never, never>>,
|
|
||||||
'tables-data-table': RouteRecordInfo<'tables-data-table', '/tables/data-table', Record<never, never>, Record<never, never>>,
|
'tables-data-table': RouteRecordInfo<'tables-data-table', '/tables/data-table', Record<never, never>, Record<never, never>>,
|
||||||
'tables-simple-table': RouteRecordInfo<'tables-simple-table', '/tables/simple-table', Record<never, never>, Record<never, never>>,
|
'tables-simple-table': RouteRecordInfo<'tables-simple-table', '/tables/simple-table', Record<never, never>, Record<never, never>>,
|
||||||
'wizard-examples-checkout': RouteRecordInfo<'wizard-examples-checkout', '/wizard-examples/checkout', Record<never, never>, Record<never, never>>,
|
'wizard-examples-checkout': RouteRecordInfo<'wizard-examples-checkout', '/wizard-examples/checkout', Record<never, never>, Record<never, never>>,
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
|
import laravel from 'laravel-vite-plugin'
|
||||||
|
import { fileURLToPath } from 'node:url'
|
||||||
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'
|
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'
|
||||||
import vue from '@vitejs/plugin-vue'
|
import vue from '@vitejs/plugin-vue'
|
||||||
import vueJsx from '@vitejs/plugin-vue-jsx'
|
import vueJsx from '@vitejs/plugin-vue-jsx'
|
||||||
import laravel from 'laravel-vite-plugin'
|
|
||||||
import { fileURLToPath } from 'node:url'
|
|
||||||
import AutoImport from 'unplugin-auto-import/vite'
|
import AutoImport from 'unplugin-auto-import/vite'
|
||||||
import Components from 'unplugin-vue-components/vite'
|
import Components from 'unplugin-vue-components/vite'
|
||||||
import { VueRouterAutoImports, getPascalCaseRouteName } from 'unplugin-vue-router'
|
import { VueRouterAutoImports, getPascalCaseRouteName } from 'unplugin-vue-router'
|
||||||
@ -106,8 +106,6 @@ export default defineConfig({
|
|||||||
'@layouts': fileURLToPath(new URL('./resources/js/@layouts', import.meta.url)),
|
'@layouts': fileURLToPath(new URL('./resources/js/@layouts', import.meta.url)),
|
||||||
'@images': fileURLToPath(new URL('./resources/images/', import.meta.url)),
|
'@images': fileURLToPath(new URL('./resources/images/', import.meta.url)),
|
||||||
'@styles': fileURLToPath(new URL('./resources/styles/', import.meta.url)),
|
'@styles': fileURLToPath(new URL('./resources/styles/', import.meta.url)),
|
||||||
'@validators': fileURLToPath(new URL('./resources/js/@core/utils/validators',
|
|
||||||
import.meta.url)),
|
|
||||||
'@configured-variables': fileURLToPath(new URL('./resources/styles/variables/_template.scss', import.meta.url)),
|
'@configured-variables': fileURLToPath(new URL('./resources/styles/variables/_template.scss', import.meta.url)),
|
||||||
'@db': fileURLToPath(new URL('./resources/js/plugins/fake-api/handlers/', import.meta.url)),
|
'@db': fileURLToPath(new URL('./resources/js/plugins/fake-api/handlers/', import.meta.url)),
|
||||||
'@api-utils': fileURLToPath(new URL('./resources/js/plugins/fake-api/utils/', import.meta.url)),
|
'@api-utils': fileURLToPath(new URL('./resources/js/plugins/fake-api/utils/', import.meta.url)),
|
||||||
|
Loading…
Reference in New Issue
Block a user