This commit is contained in:
nasir@endelospay.com 2024-06-06 00:41:41 +05:00
parent 83459a1ea8
commit f216ff713c
8 changed files with 563 additions and 69 deletions

View File

@ -31,3 +31,7 @@ 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"

View File

@ -1,7 +1,7 @@
<script setup>
import Shepherd from 'shepherd.js'
import { withQuery } from 'ufo'
import { useConfigStore } from '@core/stores/config'
import { useConfigStore } from '@core/stores/config';
import Shepherd from 'shepherd.js';
import { withQuery } from 'ufo';
defineOptions({
// 👉 Is App Search Bar Visible
@ -133,11 +133,11 @@ const noDataSuggestions = [
params: { tab: 'account' },
},
},
{
title: 'Pricing Page',
icon: 'ri-cash-line',
url: { name: 'pages-pricing' },
},
// {
// title: 'Pricing Page',
// icon: 'ri-cash-line',
// url: { name: 'pages-pricing' },
// },
]
const searchQuery = ref('')

View File

@ -30,15 +30,15 @@ const logout = async () => {
const userProfileList = [
{ type: 'divider' },
{
type: 'navItem',
icon: 'ri-user-line',
title: 'Profile',
to: {
name: 'apps-user-view-id',
params: { id: 21 },
},
},
// {
// type: 'navItem',
// icon: 'ri-user-line',
// title: 'Profile',
// to: {
// name: 'apps-user-view-id',
// params: { id: 21 },
// },
// },
{
type: 'navItem',
icon: 'ri-settings-4-line',
@ -48,32 +48,32 @@ const userProfileList = [
params: { tab: 'account' },
},
},
{
type: 'navItem',
icon: 'ri-file-text-line',
title: 'Billing Plan',
to: {
name: 'pages-account-settings-tab',
params: { tab: 'billing-plans' },
},
badgeProps: {
color: 'error',
content: '4',
},
},
{ type: 'divider' },
{
type: 'navItem',
icon: 'ri-money-dollar-circle-line',
title: 'Pricing',
to: { name: 'pages-pricing' },
},
{
type: 'navItem',
icon: 'ri-question-line',
title: 'FAQ',
to: { name: 'pages-faq' },
},
// {
// type: 'navItem',
// icon: 'ri-file-text-line',
// title: 'Billing Plan',
// to: {
// name: 'pages-account-settings-tab',
// params: { tab: 'billing-plans' },
// },
// badgeProps: {
// color: 'error',
// content: '5',
// },
// },
// { type: 'divider' },
// {
// type: 'navItem',
// icon: 'ri-money-dollar-circle-line',
// title: 'Pricing',
// to: { name: 'pages-pricing' },
// },
// {
// type: 'navItem',
// icon: 'ri-question-line',
// title: 'FAQ',
// to: { name: 'pages-faq' },
// },
{ type: 'divider' },
]
</script>

View File

@ -4,7 +4,7 @@ import AccountSettingsBillingAndPlans from '@/views/pages/account-settings/Accou
import AccountSettingsConnections from '@/views/pages/account-settings/AccountSettingsConnections.vue'
import AccountSettingsNotification from '@/views/pages/account-settings/AccountSettingsNotification.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 activeTab = computed({
@ -24,21 +24,13 @@ const tabs = [
icon: 'ri-lock-line',
tab: 'security',
},
{
title: 'Billing & Plans',
icon: 'ri-bookmark-line',
tab: 'billing-plans',
},
{
title: 'Notifications',
icon: 'ri-notification-3-line',
tab: 'notification',
},
{
title: 'Connections',
{
title: 'Site Setting',
icon: 'ri-link',
tab: 'connection',
tab: 'site-settings',
},
]
definePage({ meta: { navActiveLink: 'pages-account-settings-tab' } })
@ -78,7 +70,10 @@ definePage({ meta: { navActiveLink: 'pages-account-settings-tab' } })
<VWindowItem value="security">
<AccountSettingsSecurity />
</VWindowItem>
<!-- site setting -->
<VWindowItem value="site-settings">
<WebsiteSettings />
</VWindowItem>
<!-- Billing -->
<VWindowItem value="billing-plans">
<AccountSettingsBillingAndPlans />

View File

@ -1,6 +1,7 @@
import axios from 'axios';
import { createStore } from 'vuex';
import {
ADMIN_LOGIN_DETAIL,
APPOINTMENT_DETAILS_API,
LABS_DELETE_API,
LABS_LIST_API,
@ -36,7 +37,8 @@ export default createStore({
patientPrescription:null,
patientNotes: null,
medicineList: [],
questioneriesList: []
questioneriesList: [],
adminDetail:null
},
mutations: {
setLoading(state, payload) {
@ -72,7 +74,11 @@ export default createStore({
},
setQuestionersList(state, payload) {
state.questioneriesList = payload
},
setAdminDetail(state, payload) {
state.adminDetail = payload
}
},
actions: {
@ -536,7 +542,25 @@ export default createStore({
commit('setLoading', false)
console.error('Error:', error);
});
},
},
async adminDetial({ commit }, payload) {
commit('setLoading', true)
await axios.post(ADMIN_LOGIN_DETAIL, {}, {
headers: {
'Authorization': `Bearer ${localStorage.getItem('admin_access_token')}`,
}
}) .then(response => {
commit('setLoading', false)
console.log('Response:', response.data);
commit('setAdminDetail',response.data.medicines)
})
.catch(error => {
commit('setLoading', false)
console.error('Error:', error);
});
},
},
getters: {
getIsLoading(state){
@ -573,5 +597,8 @@ export default createStore({
getQuestioneriesList(state){
return state.questioneriesList
},
getAdminDetail(state){
return state.adminDetail
},
}
})

View File

@ -1,6 +1,7 @@
<script setup>
import avatar1 from '@images/avatars/avatar-1.png'
import avatar1 from '@images/avatars/avatar-1.png';
import { useStore } from 'vuex';
const store = useStore();
const accountData = {
avatarImg: avatar1,
firstName: 'john',
@ -38,7 +39,10 @@ const changeAvatar = file => {
}
}
}
onMounted(async () => {
await store.dispatch('adminDetial');
});
// reset avatar image
const resetAvatar = () => {
accountDataLocal.value.avatarImg = accountData.avatarImg
@ -200,11 +204,13 @@ const currencies = [
<VCol
cols="12"
md="6"
style="display: none;"
>
<VTextField
v-model="accountDataLocal.org"
label="Organization"
placeholder="ThemeSelection"
/>
</VCol>
@ -224,6 +230,7 @@ const currencies = [
<VCol
cols="12"
md="6"
style="display: none;"
>
<VTextField
v-model="accountDataLocal.address"
@ -236,6 +243,7 @@ const currencies = [
<VCol
cols="12"
md="6"
style="display: none;"
>
<VTextField
v-model="accountDataLocal.state"
@ -248,6 +256,7 @@ const currencies = [
<VCol
cols="12"
md="6"
style="display: none;"
>
<VTextField
v-model="accountDataLocal.zip"
@ -260,6 +269,7 @@ const currencies = [
<VCol
cols="12"
md="6"
style="display: none;"
>
<VSelect
v-model="accountDataLocal.country"
@ -276,6 +286,7 @@ const currencies = [
<VCol
cols="12"
md="6"
style="display: none;"
>
<VSelect
v-model="accountDataLocal.language"
@ -292,6 +303,7 @@ const currencies = [
<VCol
cols="12"
md="6"
style="display: none;"
>
<VSelect
v-model="accountDataLocal.timezone"
@ -306,6 +318,7 @@ const currencies = [
<VCol
cols="12"
md="6"
style="display: none;"
>
<VSelect
v-model="accountDataLocal.currency"
@ -338,7 +351,7 @@ const currencies = [
</VCard>
</VCol>
<VCol cols="12">
<VCol cols="12" style="display: none;">
<!-- 👉 Delete Account -->
<VCard title="Delete Account">
<VCardText>

View File

@ -1,6 +1,6 @@
<script setup>
import sittingGirlWithLaptopDark from '@images/illustrations/sitting-girl-with-laptop-dark.png'
import sittingGirlWithLaptopLight from '@images/illustrations/sitting-girl-with-laptop-light.png'
import sittingGirlWithLaptopDark from '@images/illustrations/sitting-girl-with-laptop-dark.png';
import sittingGirlWithLaptopLight from '@images/illustrations/sitting-girl-with-laptop-light.png';
const isCurrentPasswordVisible = ref(false)
const isNewPasswordVisible = ref(false)
@ -231,7 +231,7 @@ const isOneTimePasswordDialogVisible = ref(false)
<!-- !SECTION -->
<!-- SECTION Two-steps verification -->
<VCol cols="12">
<VCol cols="12" style="display: none;">
<VCard>
<VCardItem class="pb-6">
<VCardTitle>Two-steps verification</VCardTitle>
@ -256,7 +256,7 @@ const isOneTimePasswordDialogVisible = ref(false)
</VCol>
<!-- !SECTION -->
<VCol cols="12">
<VCol cols="12" style="display: none;">
<!-- SECTION: Create an API key -->
<VCard title="Create an API key">
<VRow>
@ -313,7 +313,7 @@ const isOneTimePasswordDialogVisible = ref(false)
<!-- !SECTION -->
</VCol>
<VCol cols="12">
<VCol cols="12" style="display: none;">
<!-- SECTION: API Keys List -->
<VCard>
<VCardItem class="pb-4">

View File

@ -0,0 +1,455 @@
<script setup>
import avatar1 from '@images/avatars/avatar-1.png';
import { useStore } from 'vuex';
const store = useStore();
const accountData = {
avatarImg: avatar1,
favicon:'',
firstName: 'john',
lastName: 'Doe',
email: 'johnDoe@example.com',
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 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 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.avatarImg = fileReader.result
}
}
}
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
}
}
}
onMounted(async () => {
await store.dispatch('adminDetial');
});
// reset avatar image
const resetAvatar = () => {
accountDataLocal.value.avatarImg = accountData.avatarImg
}
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',
]
</script>
<template>
<VRow>
<VCol cols="12">
<VCard>
<VCardText>
<div class="d-flex mb-10">
<!-- 👉 Avatar -->
<VAvatar
rounded
size="100"
class="me-6"
:image="accountDataLocal.avatarImg"
/>
<!-- 👉 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,.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="100"
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,.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>
<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"
/>
</VCol>
<!-- 👉 Last Name -->
<VCol
md="6"
cols="12"
>
<VTextField
v-model="accountDataLocal.plan_description"
placeholder="Doe"
label="Plan Description"
/>
</VCol>
<!-- 👉 Header Title -->
<VCol
cols="12"
md="6"
>
<VTextField
v-model="accountDataLocal.header_title"
label="Header Title"
placeholder="Header Title"
/>
</VCol>
<VCol
cols="12"
md="6"
>
<VTextField
v-model="accountDataLocal.domain_name"
label="Domain Name"
placeholder="Domain Name"
/>
</VCol>
<!-- 👉 Email -->
<VCol
cols="12"
md="6"
>
<VTextarea
v-model="accountDataLocal.footer_text"
label="Footer Text"
placeholder="Footer Text"
/>
</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>Save changes</VBtn>
<VBtn
color="secondary"
variant="outlined"
type="reset"
@click.prevent="resetForm"
>
Reset
</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>