diff --git a/src/components/authorities/authority-list.tsx b/src/components/authorities/authority-list.tsx index d189771..e5d0250 100644 --- a/src/components/authorities/authority-list.tsx +++ b/src/components/authorities/authority-list.tsx @@ -35,9 +35,9 @@ import { getAuthorities, } from "@/lib/actions/authorities.action"; import { obfuscate } from "@/lib/endecode"; +import { useError } from "@/providers/error-provider"; import { AuthorityDTO } from "@/types/authorities"; import { PermissionUtils } from "@/types/resources"; -import { useError } from "@/providers/error-provider"; export function AuthoritiesView() { const router = useRouter(); diff --git a/src/components/authorities/authority-view.tsx b/src/components/authorities/authority-view.tsx index 061827e..f9d7d83 100644 --- a/src/components/authorities/authority-view.tsx +++ b/src/components/authorities/authority-view.tsx @@ -33,13 +33,13 @@ import { getUsersByAuthority, } from "@/lib/actions/authorities.action"; import { obfuscate } from "@/lib/endecode"; +import { useError } from "@/providers/error-provider"; import { AuthorityDTO, AuthorityResourcePermissionDTO, } from "@/types/authorities"; import { PermissionUtils } from "@/types/resources"; import { UserDTO } from "@/types/users"; -import { useError } from "@/providers/error-provider"; export const AuthorityView = ({ authorityId }: { authorityId: string }) => { const permissionLevel = usePagePermission(); diff --git a/src/components/dashboard/global-dashboard-recent-activities.tsx b/src/components/dashboard/global-dashboard-recent-activities.tsx index 315f89b..dff2a54 100644 --- a/src/components/dashboard/global-dashboard-recent-activities.tsx +++ b/src/components/dashboard/global-dashboard-recent-activities.tsx @@ -17,8 +17,8 @@ import { import { getUserActivities } from "@/lib/actions/activity-logs.action"; import { formatDateTimeDistanceToNow } from "@/lib/datetime"; import { obfuscate } from "@/lib/endecode"; -import { ActivityLogDTO } from "@/types/activity-logs"; import { useError } from "@/providers/error-provider"; +import { ActivityLogDTO } from "@/types/activity-logs"; const RecentUserTeamActivities = () => { const [activityLogs, setActivityLogs] = useState([]); diff --git a/src/components/dashboard/notifications-user.tsx b/src/components/dashboard/notifications-user.tsx index da27b4c..d03cc83 100644 --- a/src/components/dashboard/notifications-user.tsx +++ b/src/components/dashboard/notifications-user.tsx @@ -13,8 +13,8 @@ import { markNotificationsAsRead, } from "@/lib/actions/notifications.action"; import { formatDateTimeDistanceToNow } from "@/lib/datetime"; -import { NotificationDTO } from "@/types/commons"; import { useError } from "@/providers/error-provider"; +import { NotificationDTO } from "@/types/commons"; const UserNotifications = () => { const [notifications, setNotifications] = useState([]); diff --git a/src/components/dashboard/team-unresolved-tickets-priority-distribution.tsx b/src/components/dashboard/team-unresolved-tickets-priority-distribution.tsx index b7fe5cb..7168057 100644 --- a/src/components/dashboard/team-unresolved-tickets-priority-distribution.tsx +++ b/src/components/dashboard/team-unresolved-tickets-priority-distribution.tsx @@ -17,8 +17,8 @@ import { import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Spinner } from "@/components/ui/spinner"; import { getTeamTicketPriorityDistributionForUser } from "@/lib/actions/teams-request.action"; -import { TeamRequestPriority } from "@/types/team-requests"; import { useError } from "@/providers/error-provider"; +import { TeamRequestPriority } from "@/types/team-requests"; const PRIORITY_COLORS: Record = { Critical: "#dc2626", diff --git a/src/components/shared/audit-log-view.tsx b/src/components/shared/audit-log-view.tsx index 74e97d4..28899f7 100644 --- a/src/components/shared/audit-log-view.tsx +++ b/src/components/shared/audit-log-view.tsx @@ -15,9 +15,9 @@ import { getActivityLogs } from "@/lib/actions/activity-logs.action"; import { formatDateTimeDistanceToNow } from "@/lib/datetime"; import { obfuscate } from "@/lib/endecode"; import { cn } from "@/lib/utils"; +import { useError } from "@/providers/error-provider"; import { ActivityLogDTO } from "@/types/activity-logs"; import { EntityType } from "@/types/commons"; -import { useError } from "@/providers/error-provider"; type AuditLogViewProps = { entityType: EntityType; diff --git a/src/components/shared/comments-view.tsx b/src/components/shared/comments-view.tsx index 6e1d296..38ca075 100644 --- a/src/components/shared/comments-view.tsx +++ b/src/components/shared/comments-view.tsx @@ -17,8 +17,8 @@ import { } from "@/lib/actions/comments.action"; import { formatDateTimeDistanceToNow } from "@/lib/datetime"; import { obfuscate } from "@/lib/endecode"; -import { CommentDTO, EntityType } from "@/types/commons"; import { useError } from "@/providers/error-provider"; +import { CommentDTO, EntityType } from "@/types/commons"; type CommentsViewProps = { entityType: EntityType; diff --git a/src/components/shared/user-select.tsx b/src/components/shared/user-select.tsx index f65eb7c..c0d4636 100644 --- a/src/components/shared/user-select.tsx +++ b/src/components/shared/user-select.tsx @@ -34,9 +34,9 @@ import { } from "@/components/ui/tooltip"; import { searchUsers } from "@/lib/actions/users.action"; import { cn } from "@/lib/utils"; +import { useError } from "@/providers/error-provider"; import { QueryDTO } from "@/types/query"; import { UiAttributes } from "@/types/ui-components"; -import { useError } from "@/providers/error-provider"; export const UserSelectField = ({ form, diff --git a/src/components/teams/team-add-user-dialog.tsx b/src/components/teams/team-add-user-dialog.tsx index 6d89c00..39b5f50 100644 --- a/src/components/teams/team-add-user-dialog.tsx +++ b/src/components/teams/team-add-user-dialog.tsx @@ -24,8 +24,8 @@ import { } from "@/components/ui/form"; import MultipleSelector from "@/components/ui/multi-select-dynamic"; import { addUsersToTeam, findUsersNotInTeam } from "@/lib/actions/teams.action"; -import { TeamDTO } from "@/types/teams"; import { useError } from "@/providers/error-provider"; +import { TeamDTO } from "@/types/teams"; type AddUserToTeamDialogProps = { open: boolean; diff --git a/src/components/teams/team-dashboard-recent-activities.tsx b/src/components/teams/team-dashboard-recent-activities.tsx index 63ba205..5cc2a9d 100644 --- a/src/components/teams/team-dashboard-recent-activities.tsx +++ b/src/components/teams/team-dashboard-recent-activities.tsx @@ -13,8 +13,8 @@ import { } from "@/components/ui/tooltip"; import { getActivityLogs } from "@/lib/actions/activity-logs.action"; import { formatDateTimeDistanceToNow } from "@/lib/datetime"; -import { ActivityLogDTO } from "@/types/activity-logs"; import { useError } from "@/providers/error-provider"; +import { ActivityLogDTO } from "@/types/activity-logs"; const RecentTeamActivities = ({ teamId }: { teamId: number }) => { const [activityLogs, setActivityLogs] = useState([]); diff --git a/src/components/teams/team-form.tsx b/src/components/teams/team-form.tsx index dfbb085..cda0846 100644 --- a/src/components/teams/team-form.tsx +++ b/src/components/teams/team-form.tsx @@ -3,7 +3,6 @@ import { zodResolver } from "@hookform/resolvers/zod"; import { Loader2 } from "lucide-react"; import { useRouter } from "next/navigation"; -import { useSession } from "next-auth/react"; import React, { useEffect, useState } from "react"; import { useForm } from "react-hook-form"; @@ -32,8 +31,8 @@ import { findTeamById } from "@/lib/actions/teams.action"; import { BACKEND_API } from "@/lib/constants"; import { obfuscate } from "@/lib/endecode"; import { validateForm } from "@/lib/validator"; -import { TeamDTO, TeamDTOSchema } from "@/types/teams"; import { useError } from "@/providers/error-provider"; +import { TeamDTO, TeamDTOSchema } from "@/types/teams"; export const TeamForm = ({ teamId }: { teamId: number | undefined }) => { const router = useRouter(); diff --git a/src/components/teams/team-list.tsx b/src/components/teams/team-list.tsx index 4589fca..c853fce 100644 --- a/src/components/teams/team-list.tsx +++ b/src/components/teams/team-list.tsx @@ -40,10 +40,10 @@ import { usePagePermission } from "@/hooks/use-page-permission"; import { deleteTeams, searchTeams } from "@/lib/actions/teams.action"; import { obfuscate } from "@/lib/endecode"; import { cn } from "@/lib/utils"; +import { useError } from "@/providers/error-provider"; import { Filter, QueryDTO } from "@/types/query"; import { PermissionUtils } from "@/types/resources"; import { TeamDTO } from "@/types/teams"; -import { useError } from "@/providers/error-provider"; export const TeamList = () => { const router = useRouter(); diff --git a/src/components/teams/team-new-request-dialog.tsx b/src/components/teams/team-new-request-dialog.tsx index a25b187..ba9e789 100644 --- a/src/components/teams/team-new-request-dialog.tsx +++ b/src/components/teams/team-new-request-dialog.tsx @@ -31,6 +31,7 @@ import { FormMessage, } from "@/components/ui/form"; import { createTeamRequest } from "@/lib/actions/teams-request.action"; +import { useError } from "@/providers/error-provider"; import { TeamRequestDTO, TeamRequestDTOSchema, @@ -38,7 +39,6 @@ import { } from "@/types/team-requests"; import { TeamDTO } from "@/types/teams"; import { WorkflowDTO } from "@/types/workflows"; -import { useError } from "@/providers/error-provider"; type NewRequestToTeamDialogProps = { open: boolean; diff --git a/src/components/teams/team-request-detail-sheet.tsx b/src/components/teams/team-request-detail-sheet.tsx index 18fa547..67c622b 100644 --- a/src/components/teams/team-request-detail-sheet.tsx +++ b/src/components/teams/team-request-detail-sheet.tsx @@ -22,8 +22,8 @@ import { updateTeamRequest } from "@/lib/actions/teams-request.action"; import { formatDateTimeDistanceToNow } from "@/lib/datetime"; import { obfuscate } from "@/lib/endecode"; import { getSpecifiedColor } from "@/lib/utils"; -import { TeamRequestDTO } from "@/types/team-requests"; import { useError } from "@/providers/error-provider"; +import { TeamRequestDTO } from "@/types/team-requests"; type RequestDetailsProps = { open: boolean; diff --git a/src/components/teams/team-requests-detail.tsx b/src/components/teams/team-requests-detail.tsx index 9390559..b060e37 100644 --- a/src/components/teams/team-requests-detail.tsx +++ b/src/components/teams/team-requests-detail.tsx @@ -27,9 +27,9 @@ import { obfuscate } from "@/lib/endecode"; import { navigateToRecord } from "@/lib/navigation-record"; import { getSpecifiedColor, randomPair } from "@/lib/utils"; import { BreadcrumbProvider } from "@/providers/breadcrumb-provider"; +import { useError } from "@/providers/error-provider"; import { PermissionUtils } from "@/types/resources"; import { TeamRequestDTO } from "@/types/team-requests"; -import { useError } from "@/providers/error-provider"; const TeamRequestDetailView = ({ teamRequestId, diff --git a/src/components/teams/team-requests-distribution-chart.tsx b/src/components/teams/team-requests-distribution-chart.tsx index c9821ba..df858e2 100644 --- a/src/components/teams/team-requests-distribution-chart.tsx +++ b/src/components/teams/team-requests-distribution-chart.tsx @@ -18,8 +18,8 @@ import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Spinner } from "@/components/ui/spinner"; import { getTicketsAssignmentDistributionByTeam } from "@/lib/actions/teams-request.action"; import { obfuscate } from "@/lib/endecode"; -import { TicketDistributionDTO } from "@/types/team-requests"; import { useError } from "@/providers/error-provider"; +import { TicketDistributionDTO } from "@/types/team-requests"; interface TicketDistributionChartProps { teamId: number; diff --git a/src/components/teams/team-requests-form.tsx b/src/components/teams/team-requests-form.tsx index 27464a9..33fab99 100644 --- a/src/components/teams/team-requests-form.tsx +++ b/src/components/teams/team-requests-form.tsx @@ -1,7 +1,7 @@ "use client"; import { zodResolver } from "@hookform/resolvers/zod"; -import { notFound, useRouter } from "next/navigation"; +import { useRouter } from "next/navigation"; import React, { useEffect, useState } from "react"; import { useForm } from "react-hook-form"; @@ -34,12 +34,12 @@ import { import { obfuscate } from "@/lib/endecode"; import { randomPair } from "@/lib/utils"; import { validateForm } from "@/lib/validator"; +import { useError } from "@/providers/error-provider"; import { TeamRequestDTO, TeamRequestDTOSchema, TeamRequestPriority, } from "@/types/team-requests"; -import { useError } from "@/providers/error-provider"; export const TeamRequestForm = ({ teamRequestId, diff --git a/src/components/teams/team-requests-overdue.tsx b/src/components/teams/team-requests-overdue.tsx index e1a43ff..170476e 100644 --- a/src/components/teams/team-requests-overdue.tsx +++ b/src/components/teams/team-requests-overdue.tsx @@ -18,8 +18,8 @@ import { import { getOverdueTicketsByTeam } from "@/lib/actions/teams-request.action"; import { formatDateTimeDistanceToNow } from "@/lib/datetime"; import { obfuscate } from "@/lib/endecode"; -import { TeamRequestDTO, TeamRequestPriority } from "@/types/team-requests"; import { useError } from "@/providers/error-provider"; +import { TeamRequestDTO, TeamRequestPriority } from "@/types/team-requests"; const TeamOverdueTickets = ({ teamId }: { teamId: number }) => { const [currentPage, setCurrentPage] = useState(1); diff --git a/src/components/teams/team-requests-priority-chart.tsx b/src/components/teams/team-requests-priority-chart.tsx index 1a1f762..a584c18 100644 --- a/src/components/teams/team-requests-priority-chart.tsx +++ b/src/components/teams/team-requests-priority-chart.tsx @@ -14,9 +14,9 @@ import { import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Spinner } from "@/components/ui/spinner"; import { getTicketsPriorityDistributionByTeam } from "@/lib/actions/teams-request.action"; +import { useError } from "@/providers/error-provider"; import { PriorityDistributionDTO } from "@/types/team-requests"; import { TeamRequestPriority } from "@/types/team-requests"; -import { useError } from "@/providers/error-provider"; const TicketPriorityPieChart = ({ teamId }: { teamId: number }) => { const [priorityData, setPriorityData] = useState( diff --git a/src/components/teams/team-requests-timeline-history.tsx b/src/components/teams/team-requests-timeline-history.tsx index fa3e1cc..9ba46ba 100644 --- a/src/components/teams/team-requests-timeline-history.tsx +++ b/src/components/teams/team-requests-timeline-history.tsx @@ -19,8 +19,8 @@ import { } from "@/components/ui/tooltip"; import { getTeamRequestStateChangesHistory } from "@/lib/actions/teams.action"; import { formatDateTimeDistanceToNow } from "@/lib/datetime"; -import { TransitionItemCollectionDTO } from "@/types/teams"; import { useError } from "@/providers/error-provider"; +import { TransitionItemCollectionDTO } from "@/types/teams"; const TeamRequestsTimelineHistory = ({ teamId }: { teamId: number }) => { const [transitionItemCollection, setTransitionItemCollection] = diff --git a/src/components/teams/team-requests-unassigned.tsx b/src/components/teams/team-requests-unassigned.tsx index e2fd396..436116c 100644 --- a/src/components/teams/team-requests-unassigned.tsx +++ b/src/components/teams/team-requests-unassigned.tsx @@ -18,8 +18,8 @@ import { import { getUnassignedTickets } from "@/lib/actions/teams-request.action"; import { formatDateTimeDistanceToNow } from "@/lib/datetime"; import { obfuscate } from "@/lib/endecode"; -import { TeamRequestDTO, TeamRequestPriority } from "@/types/team-requests"; import { useError } from "@/providers/error-provider"; +import { TeamRequestDTO, TeamRequestPriority } from "@/types/team-requests"; const UnassignedTickets = ({ teamId }: { teamId: number }) => { const [currentPage, setCurrentPage] = useState(1); diff --git a/src/components/teams/team-requests.tsx b/src/components/teams/team-requests.tsx index cd11c6a..a8976a0 100644 --- a/src/components/teams/team-requests.tsx +++ b/src/components/teams/team-requests.tsx @@ -36,13 +36,13 @@ import { searchTeamRequests } from "@/lib/actions/teams-request.action"; import { getWorkflowsByTeam } from "@/lib/actions/workflows.action"; import { obfuscate } from "@/lib/endecode"; import { BreadcrumbProvider } from "@/providers/breadcrumb-provider"; +import { useError } from "@/providers/error-provider"; import { useTeam } from "@/providers/team-provider"; import { useUserTeamRole } from "@/providers/user-team-role-provider"; import { Filter, GroupFilter, QueryDTO } from "@/types/query"; import { PermissionUtils } from "@/types/resources"; import { TeamRequestDTO } from "@/types/team-requests"; import { WorkflowDTO } from "@/types/workflows"; -import { useError } from "@/providers/error-provider"; export type Pagination = { page: number; diff --git a/src/components/teams/team-users-select.tsx b/src/components/teams/team-users-select.tsx index 3313d04..b602e96 100644 --- a/src/components/teams/team-users-select.tsx +++ b/src/components/teams/team-users-select.tsx @@ -28,9 +28,9 @@ import { } from "@/components/ui/popover"; import { findMembersByTeamId } from "@/lib/actions/teams.action"; import { cn } from "@/lib/utils"; +import { useError } from "@/providers/error-provider"; import { UiAttributes } from "@/types/ui-components"; import { UserWithTeamRoleDTO } from "@/types/users"; -import { useError } from "@/providers/error-provider"; const TeamUserSelectField = ({ form, diff --git a/src/components/teams/team-users.tsx b/src/components/teams/team-users.tsx index 9831d6d..5cf5070 100644 --- a/src/components/teams/team-users.tsx +++ b/src/components/teams/team-users.tsx @@ -40,11 +40,11 @@ import { } from "@/lib/actions/teams.action"; import { obfuscate } from "@/lib/endecode"; import { BreadcrumbProvider } from "@/providers/breadcrumb-provider"; +import { useError } from "@/providers/error-provider"; import { useTeam } from "@/providers/team-provider"; import { useUserTeamRole } from "@/providers/user-team-role-provider"; import { PermissionUtils } from "@/types/resources"; import { UserWithTeamRoleDTO } from "@/types/users"; -import { useError } from "@/providers/error-provider"; const TeamUsersView = () => { const team = useTeam(); diff --git a/src/components/teams/team-workflow-detail-view.tsx b/src/components/teams/team-workflow-detail-view.tsx index 7a6423e..173f656 100644 --- a/src/components/teams/team-workflow-detail-view.tsx +++ b/src/components/teams/team-workflow-detail-view.tsx @@ -22,11 +22,11 @@ import { } from "@/lib/actions/workflows.action"; import { obfuscate } from "@/lib/endecode"; import { BreadcrumbProvider } from "@/providers/breadcrumb-provider"; +import { useError } from "@/providers/error-provider"; import { useTeam } from "@/providers/team-provider"; import { useUserTeamRole } from "@/providers/user-team-role-provider"; import { PermissionUtils } from "@/types/resources"; import { WorkflowDetailDTO } from "@/types/workflows"; -import { useError } from "@/providers/error-provider"; const TeamWorkflowDetailView = ({ workflowId }: { workflowId: number }) => { const team = useTeam(); diff --git a/src/components/teams/team-workflow-new-refer-shared-workflow.tsx b/src/components/teams/team-workflow-new-refer-shared-workflow.tsx index 3f20aea..63dbae1 100644 --- a/src/components/teams/team-workflow-new-refer-shared-workflow.tsx +++ b/src/components/teams/team-workflow-new-refer-shared-workflow.tsx @@ -30,8 +30,8 @@ import { getGlobalWorkflowHasNotLinkedWithTeam, } from "@/lib/actions/workflows.action"; import { obfuscate } from "@/lib/endecode"; -import { WorkflowDTO } from "@/types/workflows"; import { useError } from "@/providers/error-provider"; +import { WorkflowDTO } from "@/types/workflows"; const workflowReferenceSchema = z.object({ referenceWorkflowId: z diff --git a/src/components/teams/team-workflows.tsx b/src/components/teams/team-workflows.tsx index 0683fd5..f66bd4d 100644 --- a/src/components/teams/team-workflows.tsx +++ b/src/components/teams/team-workflows.tsx @@ -28,11 +28,11 @@ import { import { obfuscate } from "@/lib/endecode"; import { cn } from "@/lib/utils"; import { BreadcrumbProvider } from "@/providers/breadcrumb-provider"; +import { useError } from "@/providers/error-provider"; import { useTeam } from "@/providers/team-provider"; import { useUserTeamRole } from "@/providers/user-team-role-provider"; import { PermissionUtils } from "@/types/resources"; import { WorkflowDTO } from "@/types/workflows"; -import { useError } from "@/providers/error-provider"; const TeamWorkflowsView = () => { const team = useTeam(); diff --git a/src/components/users/authorities-select.tsx b/src/components/users/authorities-select.tsx index 6d1ca10..88efb04 100644 --- a/src/components/users/authorities-select.tsx +++ b/src/components/users/authorities-select.tsx @@ -10,9 +10,9 @@ import { } from "@/components/ui/form"; import { MultiSelect } from "@/components/ui/multi-select"; import { getAuthorities } from "@/lib/actions/authorities.action"; +import { useError } from "@/providers/error-provider"; import { AuthorityDTO } from "@/types/authorities"; import { UiAttributes } from "@/types/ui-components"; -import { useError } from "@/providers/error-provider"; interface AuthoritiesSelectProps { form: any; diff --git a/src/components/users/user-form.tsx b/src/components/users/user-form.tsx index 1dc1f99..00dde6c 100644 --- a/src/components/users/user-form.tsx +++ b/src/components/users/user-form.tsx @@ -20,8 +20,8 @@ import { Form } from "@/components/ui/form"; import { Separator } from "@/components/ui/separator"; import { createUser, findUserById } from "@/lib/actions/users.action"; import { obfuscate } from "@/lib/endecode"; -import { UserDTO, UserDTOSchema } from "@/types/users"; import { useError } from "@/providers/error-provider"; +import { UserDTO, UserDTOSchema } from "@/types/users"; type UserFormValues = z.infer; diff --git a/src/components/users/user-list.tsx b/src/components/users/user-list.tsx index 80109a3..39276dc 100644 --- a/src/components/users/user-list.tsx +++ b/src/components/users/user-list.tsx @@ -50,10 +50,10 @@ import { } from "@/lib/actions/users.action"; import { obfuscate } from "@/lib/endecode"; import { cn } from "@/lib/utils"; +import { useError } from "@/providers/error-provider"; import { QueryDTO } from "@/types/query"; import { PermissionUtils } from "@/types/resources"; import { UserDTO } from "@/types/users"; -import { useError } from "@/providers/error-provider"; export const UserList = () => { const { toast } = useToast(); diff --git a/src/components/users/user-view.tsx b/src/components/users/user-view.tsx index 8d164d7..b53da6c 100644 --- a/src/components/users/user-view.tsx +++ b/src/components/users/user-view.tsx @@ -27,10 +27,10 @@ import { usePagePermission } from "@/hooks/use-page-permission"; import { findTeamsByMemberId } from "@/lib/actions/teams.action"; import { findUserById, getDirectReports } from "@/lib/actions/users.action"; import { obfuscate } from "@/lib/endecode"; +import { useError } from "@/providers/error-provider"; import { PermissionUtils } from "@/types/resources"; import { TeamDTO } from "@/types/teams"; import { UserDTO } from "@/types/users"; -import { useError } from "@/providers/error-provider"; export const UserView = ({ userId }: { userId: number }) => { const [user, setUser] = useState(undefined); diff --git a/src/components/workflows/workflow-create-from-scratch.tsx b/src/components/workflows/workflow-create-from-scratch.tsx index 3bec2bd..457c043 100644 --- a/src/components/workflows/workflow-create-from-scratch.tsx +++ b/src/components/workflows/workflow-create-from-scratch.tsx @@ -7,8 +7,8 @@ import { WorkflowDiagram } from "@/components/workflows/workflow-diagram-view"; import WorkflowEditForm from "@/components/workflows/workflow-editor-form"; import { saveWorkflowDetail } from "@/lib/actions/workflows.action"; import { obfuscate } from "@/lib/endecode"; -import { WorkflowDetailDTO } from "@/types/workflows"; import { useError } from "@/providers/error-provider"; +import { WorkflowDetailDTO } from "@/types/workflows"; const defaultWorkflow: WorkflowDetailDTO = { id: undefined, diff --git a/src/components/workflows/workflow-detail-view.tsx b/src/components/workflows/workflow-detail-view.tsx index 21cbc20..cb6aae4 100644 --- a/src/components/workflows/workflow-detail-view.tsx +++ b/src/components/workflows/workflow-detail-view.tsx @@ -16,9 +16,9 @@ import { getWorkflowDetail, updateWorkflowDetail, } from "@/lib/actions/workflows.action"; +import { useError } from "@/providers/error-provider"; import { PermissionUtils } from "@/types/resources"; import { WorkflowDetailDTO } from "@/types/workflows"; -import { useError } from "@/providers/error-provider"; const GlobalWorkflowDetailView = ({ workflowId }: { workflowId: number }) => { const router = useRouter(); diff --git a/src/components/workflows/workflow-list.tsx b/src/components/workflows/workflow-list.tsx index 855f2a2..f786422 100644 --- a/src/components/workflows/workflow-list.tsx +++ b/src/components/workflows/workflow-list.tsx @@ -32,10 +32,10 @@ import { } from "@/lib/actions/workflows.action"; import { obfuscate } from "@/lib/endecode"; import { cn } from "@/lib/utils"; +import { useError } from "@/providers/error-provider"; import { QueryDTO } from "@/types/query"; import { PermissionUtils } from "@/types/resources"; import { WorkflowDTO } from "@/types/workflows"; -import { useError } from "@/providers/error-provider"; const WorkflowsView = () => { const [items, setItems] = useState>([]); diff --git a/src/components/workflows/workflow-select.tsx b/src/components/workflows/workflow-select.tsx index 23a32dd..2f218ad 100644 --- a/src/components/workflows/workflow-select.tsx +++ b/src/components/workflows/workflow-select.tsx @@ -27,9 +27,9 @@ import { } from "@/components/ui/popover"; import { getWorkflowsByTeam } from "@/lib/actions/workflows.action"; import { cn } from "@/lib/utils"; +import { useError } from "@/providers/error-provider"; import { UiAttributes } from "@/types/ui-components"; import { WorkflowDTO } from "@/types/workflows"; -import { useError } from "@/providers/error-provider"; const WorkflowSelectField = ({ form, diff --git a/src/components/workflows/workflow-state-select.tsx b/src/components/workflows/workflow-state-select.tsx index 0c03ea4..c4139f8 100644 --- a/src/components/workflows/workflow-state-select.tsx +++ b/src/components/workflows/workflow-state-select.tsx @@ -18,8 +18,8 @@ import { } from "@/components/ui/select"; import { getValidTargetStates } from "@/lib/actions/workflows.action"; import { cn } from "@/lib/utils"; -import { WorkflowStateDTO } from "@/types/workflows"; import { useError } from "@/providers/error-provider"; +import { WorkflowStateDTO } from "@/types/workflows"; type WorkflowStateSelectProps = { form: UseFormReturn; diff --git a/src/providers/user-team-role-provider.tsx b/src/providers/user-team-role-provider.tsx index 5f093ee..3752355 100644 --- a/src/providers/user-team-role-provider.tsx +++ b/src/providers/user-team-role-provider.tsx @@ -4,8 +4,8 @@ import { useSession } from "next-auth/react"; import React, { createContext, useContext, useEffect, useState } from "react"; import { getUserRoleInTeam } from "@/lib/actions/teams.action"; -import { TeamRole } from "@/types/teams"; import { useError } from "@/providers/error-provider"; +import { TeamRole } from "@/types/teams"; type UserTeamRoleContextType = { role: TeamRole;