diff --git a/package-lock.json b/package-lock.json
index 8af3152..6996288 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -36,6 +36,7 @@
"vue": "^3.4.21",
"vue-axios": "^3.5.2",
"vue-chartjs": "^5.3.2",
+ "vue-input-otp": "^0.3.2",
"vue-markdown": "^2.1.3",
"vue-router": "^4.3.0",
"vue-tel-input": "^8.3.1",
@@ -7832,6 +7833,61 @@
"eslint": ">=6.0.0"
}
},
+ "node_modules/vue-input-otp": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/vue-input-otp/-/vue-input-otp-0.3.2.tgz",
+ "integrity": "sha512-QMl1842WB6uNAsK4+mZXIskb00TOfahH3AQt8rpRecbtQnOp+oHSUbL/Z3wekfy6pAl+hyN3e1rCUSkCMzbDLQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@vueuse/core": "^12.8.2",
+ "reka-ui": "^2.6.1"
+ },
+ "peerDependencies": {
+ "vue": "^3.2.0"
+ }
+ },
+ "node_modules/vue-input-otp/node_modules/@types/web-bluetooth": {
+ "version": "0.0.21",
+ "resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.21.tgz",
+ "integrity": "sha512-oIQLCGWtcFZy2JW77j9k8nHzAOpqMHLQejDA48XXMWH6tjCQHz5RCFz1bzsmROyL6PUm+LLnUiI4BCn221inxA==",
+ "license": "MIT"
+ },
+ "node_modules/vue-input-otp/node_modules/@vueuse/core": {
+ "version": "12.8.2",
+ "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-12.8.2.tgz",
+ "integrity": "sha512-HbvCmZdzAu3VGi/pWYm5Ut+Kd9mn1ZHnn4L5G8kOQTPs/IwIAmJoBrmYk2ckLArgMXZj0AW3n5CAejLUO+PhdQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/web-bluetooth": "^0.0.21",
+ "@vueuse/metadata": "12.8.2",
+ "@vueuse/shared": "12.8.2",
+ "vue": "^3.5.13"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/antfu"
+ }
+ },
+ "node_modules/vue-input-otp/node_modules/@vueuse/metadata": {
+ "version": "12.8.2",
+ "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-12.8.2.tgz",
+ "integrity": "sha512-rAyLGEuoBJ/Il5AmFHiziCPdQzRt88VxR+Y/A/QhJ1EWtWqPBBAxTAFaSkviwEuOEZNtW8pvkPgoCZQ+HxqW1A==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/antfu"
+ }
+ },
+ "node_modules/vue-input-otp/node_modules/@vueuse/shared": {
+ "version": "12.8.2",
+ "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-12.8.2.tgz",
+ "integrity": "sha512-dznP38YzxZoNloI0qpEfpkms8knDtaoQ6Y/sfS0L7Yki4zh40LFHEhur0odJC6xTHG5dxWVPiUWBXn+wCG2s5w==",
+ "license": "MIT",
+ "dependencies": {
+ "vue": "^3.5.13"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/antfu"
+ }
+ },
"node_modules/vue-markdown": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/vue-markdown/-/vue-markdown-2.1.3.tgz",
diff --git a/package.json b/package.json
index 156e010..8025c54 100644
--- a/package.json
+++ b/package.json
@@ -42,6 +42,7 @@
"vue": "^3.4.21",
"vue-axios": "^3.5.2",
"vue-chartjs": "^5.3.2",
+ "vue-input-otp": "^0.3.2",
"vue-markdown": "^2.1.3",
"vue-router": "^4.3.0",
"vue-tel-input": "^8.3.1",
diff --git a/src/components/VendorNav.vue b/src/components/VendorNav.vue
index ed52b25..1f7bb55 100644
--- a/src/components/VendorNav.vue
+++ b/src/components/VendorNav.vue
@@ -1,5 +1,5 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/ui/input-otp/InputOTPGroup.vue b/src/components/ui/input-otp/InputOTPGroup.vue
new file mode 100644
index 0000000..569a092
--- /dev/null
+++ b/src/components/ui/input-otp/InputOTPGroup.vue
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/ui/input-otp/InputOTPSeparator.vue b/src/components/ui/input-otp/InputOTPSeparator.vue
new file mode 100644
index 0000000..9fb642c
--- /dev/null
+++ b/src/components/ui/input-otp/InputOTPSeparator.vue
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/ui/input-otp/InputOTPSlot.vue b/src/components/ui/input-otp/InputOTPSlot.vue
new file mode 100644
index 0000000..4118f36
--- /dev/null
+++ b/src/components/ui/input-otp/InputOTPSlot.vue
@@ -0,0 +1,32 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/ui/input-otp/index.ts b/src/components/ui/input-otp/index.ts
new file mode 100644
index 0000000..431134d
--- /dev/null
+++ b/src/components/ui/input-otp/index.ts
@@ -0,0 +1,4 @@
+export { default as InputOTP } from "./InputOTP.vue"
+export { default as InputOTPGroup } from "./InputOTPGroup.vue"
+export { default as InputOTPSeparator } from "./InputOTPSeparator.vue"
+export { default as InputOTPSlot } from "./InputOTPSlot.vue"
\ No newline at end of file
diff --git a/src/components/vendors/VendorShare.vue b/src/components/vendors/VendorShare.vue
index e84afde..02ccef4 100644
--- a/src/components/vendors/VendorShare.vue
+++ b/src/components/vendors/VendorShare.vue
@@ -47,8 +47,7 @@ const props = defineProps<{
const copied = ref(false);
const baseLink = 'https://weeshr.com/v';
const vendorSlug = computed(() => {
- // return props.vendorName?.toLowerCase().replace(/\s+/g, '-');
- return JSON.parse(localStorage.getItem('vendor') || 'null').toLowerCase().replace(/\s+/g, '-');
+ return props.vendorName?.toLowerCase().replace(/\s+/g, '-');
});
const storeLink = computed(() => {
return `${baseLink}/${vendorSlug.value}`;
@@ -97,7 +96,7 @@ const handleShare = (option: any) => {
if (option.action === 'copy') {
navigator.clipboard.writeText(storeLink.value);
copied.value = true;
- console.log(storeLink.value)
+ // console.log(storeLink.value)
setTimeout(() => {
copied.value = false;
}, 2000);
diff --git a/src/components/vendors/vendorDetailCom.vue b/src/components/vendors/vendorDetailCom.vue
index f29d5f2..3f3af05 100644
--- a/src/components/vendors/vendorDetailCom.vue
+++ b/src/components/vendors/vendorDetailCom.vue
@@ -747,6 +747,7 @@ const saveUserData = async () => {
// Check if response status is 200 or 201
if (response.status === 200 || response.status === 201) {
+ await useSuperAdminStore().fetchUsersData('Success', id)
// Show success toast
toast({
title: 'Success',
diff --git a/src/router/index.ts b/src/router/index.ts
index 6ea6223..225cd3f 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -42,6 +42,7 @@ import GlobalGeeftr from '@/views/protected/VendorModule/GlobalGeeftr.vue'
import VendorRegistration from '@/views/unprotected/VendorModule/VendorRegistration.vue'
import VendorsDetailsPage from '@/components/vendors/vendorsDetailsPage.vue'
import VendorPayout from '@/views/protected/AdminModule/VendorPayout.vue'
+import ResetPassword from '@/views/unprotected/SuperAdminModule/ResetPassword.vue'
const routes = [
// dashboard,
@@ -49,7 +50,7 @@ const routes = [
path: '/',
name: 'home',
component: DashboardWrapper,
- meta: { requiresAuth: true, dynamic: true }
+ meta: { requiresAuth: true, dynamic: true }
},
{
path: '/registration',
@@ -63,6 +64,12 @@ const routes = [
component: SuperAdminLogin,
meta: { hideSidebar: true }
},
+ {
+ path: '/reset-password',
+ name: 'reset-password',
+ component: ResetPassword,
+ meta: { hideSidebar: true }
+ },
{
path: '/error',
@@ -295,16 +302,16 @@ router.beforeEach((to, from, next) => {
const isAuthenticated = useSuperAdminStore().token !== ''
// const isVendor = useSuperAdminStore().isVendor
const requiresAuth = to.matched.some((record) => record.meta.requiresAuth)
- // 🧠Dynamic dashboard: if user is vendor, switch home component
-// if (to.name === 'home') {
-// const record = to.matched[0]
+ // 🧠Dynamic dashboard: if user is vendor, switch home component
+ // if (to.name === 'home') {
+ // const record = to.matched[0]
-// if (record?.components) {
-// record.components.default = isVendor
-// ? Vendors
-// : AdminDashboard
-// }
-// }
+ // if (record?.components) {
+ // record.components.default = isVendor
+ // ? Vendors
+ // : AdminDashboard
+ // }
+ // }
diff --git a/src/stores/super-admin/super-admin.ts b/src/stores/super-admin/super-admin.ts
index 4dbff36..572c098 100644
--- a/src/stores/super-admin/super-admin.ts
+++ b/src/stores/super-admin/super-admin.ts
@@ -118,6 +118,8 @@ export const useSuperAdminStore = defineStore({
if (response.status === 200 || response.status === 201) {
// Update the users data with the response
this.vendor = response.data.data;
+ localStorage.setItem('vendor', JSON.stringify(response.data.data.companyName))
+ this.companyName = response.data.data.companyName;
// console.log(response.data.data)
// const responseData = response.data.data[0]
// const phoneData = response.data.data[0].phoneNumber.normalizedNumber
diff --git a/src/stores/vendor/vendor-list.ts b/src/stores/vendor/vendor-list.ts
index 36d70bb..214734e 100644
--- a/src/stores/vendor/vendor-list.ts
+++ b/src/stores/vendor/vendor-list.ts
@@ -77,8 +77,8 @@ export const useVendorListStore = defineStore({
page: params?.page || 1,
limit: params?.limit || 10,
search: params?.search || '',
+ // status: params?.status || 'all',
// sortBy: params?.sortBy || 'name',
- // status: params?.status || 'all'
}
})
diff --git a/src/views/unprotected/SuperAdminModule/ResetPassword.vue b/src/views/unprotected/SuperAdminModule/ResetPassword.vue
new file mode 100644
index 0000000..70f3b7a
--- /dev/null
+++ b/src/views/unprotected/SuperAdminModule/ResetPassword.vue
@@ -0,0 +1,514 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
THE
+
+
SUPER ADMIN FACTORY
+
+
+
+
+
+
+
+
+
THE
+
+
+
SUPER ADMIN FACTORY
+
+
+
+
+
+
+
+
+
+
+ {{ currentStep === STEP.EMAIL ? 'Reset Password' : 'Verify OTP & Create Password' }}
+
+
+ Step {{ currentStep }} of 2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Back
+
+
+
+
+
+ Send OTP
+
+
+
+
+
+ Reset Password
+
+
+
+
+ Login instead?
+
+
+
+ Copyright © {{ currentYear }}
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/unprotected/SuperAdminModule/SuperAdminLogin.vue b/src/views/unprotected/SuperAdminModule/SuperAdminLogin.vue
index 05eb5e6..7f2d08d 100644
--- a/src/views/unprotected/SuperAdminModule/SuperAdminLogin.vue
+++ b/src/views/unprotected/SuperAdminModule/SuperAdminLogin.vue
@@ -333,6 +333,11 @@ const onSubmit = form.handleSubmit(async () => {
Sign In
+
+
+ Forgot Password?
+
+
Copyright © {{ currentYear }}