kesekian kali
This commit is contained in:
@@ -60,6 +60,7 @@ export async function POST(request: NextRequest) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Insert without specifying id_kk to let the database auto-generate it
|
||||||
const { data, error } = await supabase
|
const { data, error } = await supabase
|
||||||
.from('kelompok_keahlian')
|
.from('kelompok_keahlian')
|
||||||
.insert([{ nama_kelompok: nama_kelompok.trim() }])
|
.insert([{ nama_kelompok: nama_kelompok.trim() }])
|
||||||
@@ -211,4 +212,4 @@ export async function DELETE(request: NextRequest) {
|
|||||||
{ status: 500 }
|
{ status: 500 }
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -28,7 +28,7 @@ export default function TotalMahasiswaPage() {
|
|||||||
|
|
||||||
<div className="mb-2">
|
<div className="mb-2">
|
||||||
<p className="text-gray-600 dark:text-gray-300">
|
<p className="text-gray-600 dark:text-gray-300">
|
||||||
Visualisasi data akademik mahasiswa Informartika Universitas Tanjungpura
|
Visualisasi Data Akademik Mahasiswa Informatika Universitas Tanjungpura
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ export default function DashboardPage() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="container mx-auto p-4 space-y-6">
|
<div className="container mx-auto p-4 space-y-6">
|
||||||
<h1 className="text-3xl font-bold mb-8">Visualisasi Data Mahasiswa Informatika</h1>
|
<h1 className="text-2xl font-bold mb-8">Visualisasi Data Akademik Mahasiswa Informatika</h1>
|
||||||
|
|
||||||
{loading ? (
|
{loading ? (
|
||||||
<div className="grid gap-6 md:grid-cols-2 lg:grid-cols-4">
|
<div className="grid gap-6 md:grid-cols-2 lg:grid-cols-4">
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ export default function KelompokKeahlianStatusChart({ selectedYear }: Props) {
|
|||||||
xaxis: {
|
xaxis: {
|
||||||
categories: years.map(y => y.toString()),
|
categories: years.map(y => y.toString()),
|
||||||
title: {
|
title: {
|
||||||
text: 'Tahun Angkatan',
|
text: 'Jumlah Mahasiswa',
|
||||||
style: {
|
style: {
|
||||||
fontSize: '14px',
|
fontSize: '14px',
|
||||||
fontWeight: 'bold',
|
fontWeight: 'bold',
|
||||||
@@ -118,7 +118,7 @@ export default function KelompokKeahlianStatusChart({ selectedYear }: Props) {
|
|||||||
},
|
},
|
||||||
yaxis: {
|
yaxis: {
|
||||||
title: {
|
title: {
|
||||||
text: 'Jumlah Mahasiswa',
|
text: 'Tahun Angkatan',
|
||||||
style: {
|
style: {
|
||||||
fontSize: '14px',
|
fontSize: '14px',
|
||||||
fontWeight: 'bold',
|
fontWeight: 'bold',
|
||||||
|
|||||||
@@ -278,8 +278,10 @@ export default function DataTablePrestasiMahasiswa() {
|
|||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
// Handle specific NIM not found error
|
// Handle specific NIM not found error
|
||||||
if (response.status === 404 && responseData.message.includes("tidak terdaftar")) {
|
if (response.status === 404 && responseData.message.includes("tidak terdaftar")) {
|
||||||
|
showError("Gagal!", `NIM ${formData.nim} tidak terdaftar`);
|
||||||
throw new Error(`NIM ${formData.nim} tidak terdaftar dalam database. Silakan cek kembali NIM yang dimasukkan.`);
|
throw new Error(`NIM ${formData.nim} tidak terdaftar dalam database. Silakan cek kembali NIM yang dimasukkan.`);
|
||||||
}
|
}
|
||||||
|
showError("Gagal!", responseData.message || "Failed to add prestasi");
|
||||||
throw new Error(responseData.message || "Failed to add prestasi");
|
throw new Error(responseData.message || "Failed to add prestasi");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -119,7 +119,6 @@ export default function UploadFilePrestasiMahasiswa({ onUploadSuccess }: UploadF
|
|||||||
<div className="space-y-4 py-4">
|
<div className="space-y-4 py-4">
|
||||||
<div className="text-sm text-muted-foreground">
|
<div className="text-sm text-muted-foreground">
|
||||||
<p>Upload file Excel (.xlsx, .xls) atau CSV (.csv)</p>
|
<p>Upload file Excel (.xlsx, .xls) atau CSV (.csv)</p>
|
||||||
<p className="mt-1">Format kolom: NIM, Jenis Prestasi, Nama Prestasi, Tingkat Prestasi, Peringkat, Tanggal (DD-MM-YYYY, DD/MM/YYYY, atau YYYY-MM-DD)</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="grid w-full max-w-sm items-center gap-1.5">
|
<div className="grid w-full max-w-sm items-center gap-1.5">
|
||||||
|
|||||||
1
fix_sequence.sql
Normal file
1
fix_sequence.sql
Normal file
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
Reference in New Issue
Block a user