-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bin
217 lines (182 loc) · 9.65 KB
/
.bin
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
https://dribbble.com/shots/23657029-Hospital-Dashboard-UI-UX-Design
https://dribbble.com/shots/22645162-Hospital-Management-Webapp-2
https://dribbble.com/shots/21988235-Healthcare-Website-Design
https://dribbble.com/shots/15231082-Hospital-Management-Dashboard
<!-- Impoated -->
https://www.behance.net/gallery/127003557/MedCare-A-Medical-Website-UIUX-Case-Study?tracking_source=project_owner_other_projects
https://dribbble.com/shots/20562297-Hospital-Admin-Panel
https://html.phoenixcoded.net/light-able/bootstrap/application/ecom_product.html
https://doctris-landing-next.vercel.app/
https://preview.themeforest.net/item/meddox-medical-health-wordpress-theme/full_screen_preview/44217765?_ga=2.234335070.1704687909.1713327124-1986032265.1713171823
https://dribbble.com/shots/21531479-Hospital-Website-Landing-Page
https://dribbble.com/shots/23371451-MediSys-Hospital-Management-Software-UI-Design
https://dribbble.com/shots/23578757-Hospital-Management-System
https://preclinic.dreamstechnologies.com/html/template/index.html
<!-- Docotos Side -->
https://www.behance.net/gallery/136821989/MEDICO-Doctor-Patient-Management-System-UIUX-Design?tracking_source=search_projects|meet+our++doctor&l=77
<!-- patient -->
https://dribbble.com/shots/22397625-Doctor-s-Admin-panel-Animation
<!-- Webiste -->
https://dribbble.com/shots/23526603-Medical-landing-Pages
<!-- -->
https://www.figma.com/community/file/1136218938837512548
https://www.figma.com/file/IEsTeqw5EG3K7Zxx7PJKx3/Scout-AI-%E2%80%94-Landing-Page-UI-%E2%80%94-Web-to-Figma-(Community)?type=design&t=iOseqw3KICElAOc4-6
https://www.figma.com/community/file/1265745417162895335
https://www.figma.com/community/file/1322288609844114161
https://www.figma.com/community/file/1136218407755679074
https://www.figma.com/community/file/1126451782099017231
https://www.figma.com/community/file/1108224781951753647
https://www.figma.com/community/file/1250314760992299521
https://www.figma.com/community/file/1279984137137322946
https://www.figma.com/community/file/1162319395757141627
https://www.figma.com/community/file/1320680898391917262
https://www.figma.com/community/file/1294259723229617122
https://www.figma.com/community/file/1230047731970873727
https://www.figma.com/community/file/1204844586695899918
https://www.figma.com/community/file/1271155653941468823
https://www.figma.com/community/file/1267584376234254760
https://www.figma.com/community/file/1212272645845576616
https://www.figma.com/community/file/1268462528883927733
https://www.figma.com/community/file/1291780160752813614
https://www.figma.com/community/file/1298600645760828059
https://www.figma.com/file/Ra7A8EeXh9tCP7unVhldeJ/AV-Web-(Front-End)-(Copy)-(Copy)?type=design&t=3Gsy96R1FdL2pabk-6
https://www.figma.com/community/file/1355994025268822133
https://www.figma.com/community/file/1108224781951753647
https://www.figma.com/community/file/1358720002349391000
https://www.figma.com/community/file/1356163070287591604 proflo
https://www.figma.com/community/file/1337410959583712899/portfolio-websites-examples?fuid=1327248714948615854
https://www.figma.com/community/file/1357000604887674643
https://www.figma.com/community/file/1359902325360456607 resume
https://www.figma.com/community/file/1358446155046812662
https://www.figma.com/community/file/1353062491440156761
https://www.figma.com/community/file/1357533463345402194
https://www.figma.com/community/file/1356615944691816915
https://www.figma.com/community/file/1352948298249666523
https://www.figma.com/community/file/1355444693516055303
https://www.figma.com/community/file/1359451335692539498
https://figma.com/community/file/1358436079515958242
https://www.figma.com/community/file/1349801829648706090
https://www.figma.com/community/file/1348933677523685643
https://www.figma.com/community/file/1346795158104308529
https://www.figma.com/community/file/1359902841481393056
https://www.figma.com/community/file/1355960997413213286
https://www.figma.com/community/file/1358440523383343080
https://www.figma.com/community/file/1355098255116261914
https://www.figma.com/community/file/1356928419282932447 webflow
https://www.figma.com/community/file/1351868507074905099
https://www.figma.com/community/file/1343940596086810083
https://www.figma.com/community/file/1336620425747528594/robotiko-ai-robotic-engineering?fuid=1327248714948615854
https://www.figma.com/community/file/1345194357780375175
https://www.figma.com/community/file/1341975025360405606
https://www.figma.com/community/file/1338143066623036607
https://www.figma.com/community/file/1345410241729364790
https://www.figma.com/community/file/1331030274995182812 = >Designlunch
https://www.figma.com/community/file/1355731054710384608
https://www.figma.com/community/file/1344677836807810202 = apple
https://www.figma.com/community/file/1344358510481227630
https://www.figma.com/community/file/1343322579688708199 = > docto
https://www.figma.com/community/file/1342013263747897469
https://www.figma.com/community/file/1344202787803208380= icons
https://www.figma.com/community/file/1328311794122710005/website-login-and-registration-from-ui-design-free-resources?fuid=1327248714948615854
https://www.figma.com/community/file/1331381641303792117/furniture-ecommerce-website-ui
https://www.figma.com/community/file/1331264667060482437/6-free-login-pages
https://www.figma.com/community/file/1340243706966258481/landing-page-website-freelancer?fuid=1327248714948615854
https://www.figma.com/community/file/1331059570995696876/shopping-ecommerce-website-ui?fuid=1327248714948615854
https://www.figma.com/community/file/1328128790358163376/reservebite?fuid=1327248714948615854
https://www.figma.com/community/file/1344157707796438679/booking-website-design?fuid=1327248714948615854 => in broker is avavilble
https://www.figma.com/community/file/1344571495674457129/website-for-tata-motors?fuid=1327248714948615854 => tata
https://www.figma.com/community/file/1337097505876062550/47-page-full-e-commerce-landing-page?fuid=1327248714948615854
https://www.figma.com/community/file/1336619245677839249/skincare-e-commerce-website?fuid=1327248714948615854
https://www.figma.com/community/file/1337109341417195876/web3-crypto-landing-page-with-simple-parallax-animation?fuid=1327248714948615854
https://www.figma.com/community/file/1334225650154033099/digital-agency-landing-page-freebie?fuid=1327248714948615854
https://www.figma.com/community/file/1332438464623565284/online-shopping-website-design-ecommerce-store-website-ui?fuid=1327248714948615854
https://www.figma.com/community/file/1332416436156584398/login-register-web-ui-kit-freebie?fuid=1327248714948615854 => login-register-web-ui-kit-free
https://www.figma.com/community/file/1329054620524451447/14-login-and-register-flow-website-ui-kit?fuid=1327248714948615854
https://www.figma.com/community/file/1344140603372948104/sass-webflow-website-design?fuid=1327248714948615854
https://www.figma.com/community/file/1329722651282392262/hr-management-admin-system-ui-ux-by-econev => Hr management
https://www.figma.com/community/file/1314076616839640516/real-estate-business-website-ui-template-dark-theme-produce-ui?fuid=1327248714948615854
https://www.figma.com/community/file/1314498920967386967/crm-woorkroom?fuid=1327248714948615854
https://www.figma.com/community/file/1323952104479859297/moon-ceramic-furniture-store-ecommerce-website-shop?fuid=1327248714948615854
https://www.figma.com/community/file/1328099352846185380/heritage-site-rajasthan
https://www.figma.com/community/file/1101821575593741193
<!-- Breadcrumb -->
<!-- NextJS Essential Extension Pack -->
const token = request?.cookies?.get("\_token")?.value;
const isUserAuthenticated = !!token;
let userDetails = {};
if (token) {
try {
const userDetailsRes = await fetchUserDetails(token);
userDetails = userDetailsRes?.data || {};
} catch (error) {
console.log({ error });
}
}
const activePath = request?.nextUrl?.pathname;
// If user is not admin authenticated
if (
(!isUserAuthenticated && authAdminRoutes.includes(activePath)) ||
(isUserAuthenticated &&
!userDetails?.userData?.email &&
userDetails?.role === "admin")
) {
return NextResponse.redirect(new URL("/admin", request.url));
}
// if user is authenticated
if (
isUserAuthenticated &&
userDetails?.userData?.email &&
loginPage.includes(activePath)
) {
return NextResponse.redirect(new URL("/admin/transactions", request.url));
}
return NextResponse.next();
<!-- -->
<!-- -->
<!-- -->
const loginPage = ["/admin"];
import { appConfig } from "./config";
const fetchUserDetails = async (token) => {
const userDetailsRes = await fetch(
appConfig.API_URL + "/v1/admin/user/details",
{
method: "GET",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${token}`,
},
}
);
return (await userDetailsRes?.json()) || {};
};
export function middleware(request) {
const path = request.nextUrl.pathname;
const isPublicPath =
path === "/" ||
path === "/admin/login" ||
path === "/doctor/login" ||
path === "/patient/login" ||
path === "/patient/signup" ||
path === "/reception/login";
const adminAuth = request.cookies.get("adminToken")?.value;
const patientAuth = request.cookies.get("patientToken")?.value;
const doctorAuth = request.cookies.get("doctorToken")?.value;
if (isPublicPath && adminAuth && patientAuth && doctorAuth) {
return NextResponse.redirect(new URL("/", request.nextUrl));
}
if (!isPublicPath && !adminAuth) {
return NextResponse.redirect(new URL("/admin/login", request.nextUrl));
}
if (!isPublicPath && !doctorAuth) {
return NextResponse.redirect(new URL("/doctor/login", request.nextUrl));
}
if (!isPublicPath && !patientAuth) {
return NextResponse.redirect(new URL("/patient/login", request.nextUrl));
}
}
<!-- // const response = await axios.post(
// process.env.NEXT_PUBLIC_BACKEND_URL + "admin/login",
// adminCredentials,
// config
// );
-->