Fixed linting and formatting errors
This commit is contained in:
@@ -14,7 +14,9 @@ interface Student {
|
||||
}
|
||||
|
||||
export default function ConsultStudents() {
|
||||
const [data, setData] = useState<{ promotions: Promotion[]; students: Student[] } | null>(null);
|
||||
const [data, setData] = useState<
|
||||
{ promotions: Promotion[]; students: Student[] } | null
|
||||
>(null);
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -17,7 +17,7 @@ export default function UploadStudents() {
|
||||
}
|
||||
};
|
||||
|
||||
const confirmUpload = async () => {
|
||||
const confirmUpload = () => {
|
||||
if (!fileData.value) {
|
||||
statusMessage.value = "Please select a file before confirming upload.";
|
||||
return;
|
||||
|
||||
@@ -7,7 +7,7 @@ const properties: AppProperties = {
|
||||
index: "Homepage",
|
||||
overview: "Students overview",
|
||||
upload: "Upload students",
|
||||
consult: "Consult students"
|
||||
consult: "Consult students",
|
||||
},
|
||||
adminOnly: ["upload", "consult"],
|
||||
hint: "Create students promotion and see informations",
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { Handlers } from "$fresh/server.ts";
|
||||
import { Database } from "@db/sqlite";
|
||||
// import { Database } from "@db/sqlite";
|
||||
import connect from "$root/databases/connect.ts";
|
||||
|
||||
export const handler: Handlers = {
|
||||
// deno-lint-ignore require-await
|
||||
async GET() {
|
||||
try {
|
||||
using connection = connect("students");
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
import ConsultStudents from "$root/routes/(apps)/students/(_islands)/ConsultStudents.tsx";
|
||||
import { getPartialsConfig, makePartials } from "$root/defaults/makePartials.tsx";
|
||||
import {
|
||||
getPartialsConfig,
|
||||
makePartials,
|
||||
} from "$root/defaults/makePartials.tsx";
|
||||
import { FreshContext } from "$fresh/server.ts";
|
||||
import { State } from "$root/routes/_middleware.ts";
|
||||
//import EditStudents from "../(_islands)/EditStudents.tsx";
|
||||
|
||||
// deno-lint-ignore require-await
|
||||
async function Students(_request: Request, _context: FreshContext<State>) {
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
import UploadStudents from "$root/routes/(apps)/students/(_islands)/UploadStudents.tsx";
|
||||
import { getPartialsConfig, makePartials } from "$root/defaults/makePartials.tsx";
|
||||
import {
|
||||
getPartialsConfig,
|
||||
makePartials,
|
||||
} from "$root/defaults/makePartials.tsx";
|
||||
import { FreshContext } from "$fresh/server.ts";
|
||||
import { State } from "$root/routes/_middleware.ts";
|
||||
//import EditStudents from "../(_islands)/EditStudents.tsx";
|
||||
|
||||
// deno-lint-ignore require-await
|
||||
async function Students(_request: Request, _context: FreshContext<State>) {
|
||||
return (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user