feat: complete admin panel major functionalities including responsive layout, recharts, custom modals, inline editing, and loading states
This commit is contained in:
1 parent
ee041d4e52
commit
a7ebb8d792
33 files changed
+1311
-173
No files matched your search
@@ -63,4 +63,18 @@ export class AuthService {
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
async adminLogin(body: any) {
|
||||
if (body.email === 'admin@canina-iran.com' && body.password === 'admin123') {
|
||||
const payload = { sub: 'admin-123', email: body.email, role: 'Admin' };
|
||||
return {
|
||||
success: true,
|
||||
data: {
|
||||
user: { id: 'admin-123', email: body.email, role: 'Admin' },
|
||||
accessToken: this.jwtService.sign(payload),
|
||||
},
|
||||
};
|
||||
}
|
||||
throw new BadRequestException({ message: 'ایمیل یا رمز عبور اشتباه است', error: 'INVALID_CREDENTIALS' });
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user