feat: update alert rendering for feedback and student status changes based on permissions
This commit is contained in:
parent
93c5514c22
commit
a6c6966cf1
@ -1,7 +1,3 @@
|
|||||||
import { Head, Link, router } from '@inertiajs/react';
|
|
||||||
import { format } from 'date-fns';
|
|
||||||
import { Info, Plus } from 'lucide-react';
|
|
||||||
import { useState } from 'react';
|
|
||||||
import type { PaginationState } from '@/components/data-table';
|
import type { PaginationState } from '@/components/data-table';
|
||||||
import { DataTable } from '@/components/data-table';
|
import { DataTable } from '@/components/data-table';
|
||||||
import { DeleteConfirmDialog } from '@/components/delete-confirm-dialog';
|
import { DeleteConfirmDialog } from '@/components/delete-confirm-dialog';
|
||||||
@ -31,6 +27,10 @@ import {
|
|||||||
} from '@/routes/admin/feedback';
|
} from '@/routes/admin/feedback';
|
||||||
import type { Feedback } from '@/types/feedback';
|
import type { Feedback } from '@/types/feedback';
|
||||||
import { FeedbackStatusLabels, FeedbackTypeLabels } from '@/types/feedback';
|
import { FeedbackStatusLabels, FeedbackTypeLabels } from '@/types/feedback';
|
||||||
|
import { Head, Link, router } from '@inertiajs/react';
|
||||||
|
import { format } from 'date-fns';
|
||||||
|
import { Info, Plus } from 'lucide-react';
|
||||||
|
import { useState } from 'react';
|
||||||
import { createFeedbackColumns, FeedbackStatusVariants } from './columns';
|
import { createFeedbackColumns, FeedbackStatusVariants } from './columns';
|
||||||
|
|
||||||
type FeedbackTypeOption = { value: string; label: string };
|
type FeedbackTypeOption = { value: string; label: string };
|
||||||
@ -155,14 +155,16 @@ export default function FeedbackIndex({
|
|||||||
feedback={viewing}
|
feedback={viewing}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Alert>
|
{canUpdateStatus && (
|
||||||
<Info />
|
<Alert>
|
||||||
<AlertTitle>Ubah status Kritik dan Saran</AlertTitle>
|
<Info />
|
||||||
<AlertDescription>
|
<AlertTitle>Ubah status Kritik dan Saran</AlertTitle>
|
||||||
Klik badge Status pada tabel untuk mengubah status
|
<AlertDescription>
|
||||||
Kritik dan Saran secara langsung.
|
Klik badge Status pada tabel untuk mengubah status
|
||||||
</AlertDescription>
|
Kritik dan Saran secara langsung.
|
||||||
</Alert>
|
</AlertDescription>
|
||||||
|
</Alert>
|
||||||
|
)}
|
||||||
|
|
||||||
<DataTable
|
<DataTable
|
||||||
columns={columns}
|
columns={columns}
|
||||||
|
|||||||
@ -1,6 +1,3 @@
|
|||||||
import { Head, Link, router } from '@inertiajs/react';
|
|
||||||
import { FileSpreadsheet, Info, Plus, RotateCcw } from 'lucide-react';
|
|
||||||
import { useState } from 'react';
|
|
||||||
import { ConfirmDialog } from '@/components/confirm-dialog';
|
import { ConfirmDialog } from '@/components/confirm-dialog';
|
||||||
import type { PaginationState } from '@/components/data-table';
|
import type { PaginationState } from '@/components/data-table';
|
||||||
import { DataTable } from '@/components/data-table';
|
import { DataTable } from '@/components/data-table';
|
||||||
@ -16,15 +13,18 @@ import {
|
|||||||
create,
|
create,
|
||||||
destroy,
|
destroy,
|
||||||
edit,
|
edit,
|
||||||
|
exportMethod as exportStudents,
|
||||||
reset_password,
|
reset_password,
|
||||||
|
index as studentsIndex,
|
||||||
update_status,
|
update_status,
|
||||||
update_user_status,
|
update_user_status,
|
||||||
exportMethod as exportStudents,
|
|
||||||
index as studentsIndex,
|
|
||||||
} from '@/routes/admin/users/students';
|
} from '@/routes/admin/users/students';
|
||||||
import { formatDepartmentLabel } from '@/types/department';
|
import { formatDepartmentLabel } from '@/types/department';
|
||||||
import { createStudentColumns } from './columns';
|
import { Head, Link, router } from '@inertiajs/react';
|
||||||
|
import { FileSpreadsheet, Info, Plus, RotateCcw } from 'lucide-react';
|
||||||
|
import { useState } from 'react';
|
||||||
import type { Student } from './columns';
|
import type { Student } from './columns';
|
||||||
|
import { createStudentColumns } from './columns';
|
||||||
|
|
||||||
type Department = { id: number; name: string; degree_level: string | null };
|
type Department = { id: number; name: string; degree_level: string | null };
|
||||||
type StatusOption = { value: string; label: string };
|
type StatusOption = { value: string; label: string };
|
||||||
@ -210,14 +210,16 @@ export default function StudentIndex({
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Alert>
|
{canUpdateAcademicStatus && (
|
||||||
<Info />
|
<Alert>
|
||||||
<AlertTitle>Ubah status mahasiswa</AlertTitle>
|
<Info />
|
||||||
<AlertDescription>
|
<AlertTitle>Ubah status mahasiswa</AlertTitle>
|
||||||
Klik badge Status pada tabel untuk mengubah status
|
<AlertDescription>
|
||||||
mahasiswa secara langsung.
|
Klik badge Status pada tabel untuk mengubah status
|
||||||
</AlertDescription>
|
mahasiswa secara langsung.
|
||||||
</Alert>
|
</AlertDescription>
|
||||||
|
</Alert>
|
||||||
|
)}
|
||||||
|
|
||||||
<DataTable
|
<DataTable
|
||||||
columns={columns}
|
columns={columns}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user