refactor: remove unused components and files related to date filtering and doctor search
- Deleted Date.js and FilterDate.js components as they are no longer needed. - Removed SearchDoctor.js component which was responsible for searching doctors. - Cleaned up the Head component by removing references to the deleted Date and SearchDoctor components. - Removed TurnsPage component and its associated List component, which were not utilized. - Deleted Cards and Table components from the list directory as they were not in use. - Removed user account related components including Tab, Head, and Form components. - Cleaned up bank account components including List, Item, and modal components. - Removed representation adapters and related functions that were not in use.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { AbilityBuilder, createMongoAbility } from "@casl/ability";
|
||||
import { safeJsonParse } from "./sanitize";
|
||||
|
||||
export function defineAbilitiesFor(user) {
|
||||
const { can, cannot, build } = new AbilityBuilder(createMongoAbility);
|
||||
@@ -7,11 +6,6 @@ export function defineAbilitiesFor(user) {
|
||||
if (user) {
|
||||
can("access", "Dashboard");
|
||||
cannot("access", "Login");
|
||||
const parsedData = safeJsonParse(user.value);
|
||||
const roles = parsedData?.roles;
|
||||
if (roles && Array.isArray(Object.values(roles)) && Object.values(roles).includes("representation")) {
|
||||
can("access", "Panel");
|
||||
}
|
||||
} else {
|
||||
can("access", "Login");
|
||||
cannot("access", "Dashboard");
|
||||
|
||||
Reference in New Issue
Block a user