feat: implement permissions and actions management
- Add permissions logic for status options in corrective actions. - Create tests for permissions functionality. - Implement queries for user authentication and actions management. - Develop Actions page to display and manage corrective actions. - Create authentication pages for login, setup, and password reset. - Add IncidentDetail page to view incident details and associated actions. - Implement Settings page for user management and password changes.
This commit is contained in:
1 parent
708da6b9f7
commit
3f6dff5f24
94 files changed
+7213
-643
No files matched your search
@@ -0,0 +1,32 @@
|
||||
import { ChevronLeft, ChevronRight } from 'lucide-react'
|
||||
import { iconButton } from './styles'
|
||||
|
||||
interface PaginationProps {
|
||||
page: number
|
||||
pageSize: number
|
||||
total: number
|
||||
onPage: (page: number) => void
|
||||
}
|
||||
|
||||
export function Pagination({ page, pageSize, total, onPage }: PaginationProps) {
|
||||
const pages = Math.max(1, Math.ceil(total / pageSize))
|
||||
const first = total === 0 ? 0 : (page - 1) * pageSize + 1
|
||||
return (
|
||||
<div className="flex items-center justify-between border-t border-line px-6 py-3 text-2xs text-muted print:hidden">
|
||||
<span>
|
||||
{first}–{Math.min(page * pageSize, total)} of {total}
|
||||
</span>
|
||||
<div className="flex items-center gap-1">
|
||||
<button type="button" className={`${iconButton} disabled:opacity-30`} disabled={page <= 1} onClick={() => onPage(page - 1)} aria-label="Previous page">
|
||||
<ChevronLeft size={16} />
|
||||
</button>
|
||||
<span>
|
||||
Page {page} of {pages}
|
||||
</span>
|
||||
<button type="button" className={`${iconButton} disabled:opacity-30`} disabled={page >= pages} onClick={() => onPage(page + 1)} aria-label="Next page">
|
||||
<ChevronRight size={16} />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user