style(backend): apply Prettier formatting
This commit is contained in:
@@ -62,23 +62,23 @@ async function main(): Promise<void> {
|
||||
// Références (doivent exister via le seed).
|
||||
const roleEtudiant = required(
|
||||
await prisma.role.findUnique({ where: { code: 'ETUDIANT' } }),
|
||||
'Role ETUDIANT manquant — lance d\'abord `npm run seed`',
|
||||
"Role ETUDIANT manquant — lance d'abord `npm run seed`",
|
||||
);
|
||||
const roleResponsable = required(
|
||||
await prisma.role.findUnique({ where: { code: 'RESPONSABLE' } }),
|
||||
'Role RESPONSABLE manquant — lance d\'abord `npm run seed`',
|
||||
"Role RESPONSABLE manquant — lance d'abord `npm run seed`",
|
||||
);
|
||||
const campus = required(
|
||||
await prisma.campus.findFirst({ where: { nom: 'Campus Saint-Christophe' } }),
|
||||
'Campus manquant — lance d\'abord `npm run seed`',
|
||||
"Campus manquant — lance d'abord `npm run seed`",
|
||||
);
|
||||
const salle = required(
|
||||
await prisma.sallePret.findFirst({ where: { campusId: campus.id } }),
|
||||
'Salle de pret manquante — lance d\'abord `npm run seed`',
|
||||
"Salle de pret manquante — lance d'abord `npm run seed`",
|
||||
);
|
||||
const poste = required(
|
||||
await prisma.posteEmprunt.findFirst({ where: { sallePretId: salle.id } }),
|
||||
'Poste manquant — lance d\'abord `npm run seed`',
|
||||
"Poste manquant — lance d'abord `npm run seed`",
|
||||
);
|
||||
const catOrdi = required(
|
||||
await prisma.categorieMateriel.findFirst({ where: { nom: 'Ordinateur portable' } }),
|
||||
@@ -305,8 +305,20 @@ async function main(): Promise<void> {
|
||||
});
|
||||
await prisma.checklistElement.createMany({
|
||||
data: [
|
||||
{ checklistId: clDepart1.id, accessoireId: chargeur.id, nomElement: 'Chargeur', etat: 'PRESENT', quantiteConstatee: 1 },
|
||||
{ checklistId: clDepart1.id, accessoireId: souris.id, nomElement: 'Souris', etat: 'PRESENT', quantiteConstatee: 1 },
|
||||
{
|
||||
checklistId: clDepart1.id,
|
||||
accessoireId: chargeur.id,
|
||||
nomElement: 'Chargeur',
|
||||
etat: 'PRESENT',
|
||||
quantiteConstatee: 1,
|
||||
},
|
||||
{
|
||||
checklistId: clDepart1.id,
|
||||
accessoireId: souris.id,
|
||||
nomElement: 'Souris',
|
||||
etat: 'PRESENT',
|
||||
quantiteConstatee: 1,
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
@@ -393,8 +405,20 @@ async function main(): Promise<void> {
|
||||
});
|
||||
await prisma.checklistElement.createMany({
|
||||
data: [
|
||||
{ checklistId: clDepart4.id, accessoireId: housse.id, nomElement: 'Housse', etat: 'PRESENT', quantiteConstatee: 1 },
|
||||
{ checklistId: clDepart4.id, accessoireId: chargeur.id, nomElement: 'Chargeur', etat: 'PRESENT', quantiteConstatee: 1 },
|
||||
{
|
||||
checklistId: clDepart4.id,
|
||||
accessoireId: housse.id,
|
||||
nomElement: 'Housse',
|
||||
etat: 'PRESENT',
|
||||
quantiteConstatee: 1,
|
||||
},
|
||||
{
|
||||
checklistId: clDepart4.id,
|
||||
accessoireId: chargeur.id,
|
||||
nomElement: 'Chargeur',
|
||||
etat: 'PRESENT',
|
||||
quantiteConstatee: 1,
|
||||
},
|
||||
],
|
||||
});
|
||||
const clRetour4 = await prisma.checklist.create({
|
||||
@@ -407,8 +431,21 @@ async function main(): Promise<void> {
|
||||
});
|
||||
await prisma.checklistElement.createMany({
|
||||
data: [
|
||||
{ checklistId: clRetour4.id, accessoireId: housse.id, nomElement: 'Housse', etat: 'ABSENT', quantiteConstatee: 0, commentaire: 'Manquante au retour' },
|
||||
{ checklistId: clRetour4.id, accessoireId: chargeur.id, nomElement: 'Chargeur', etat: 'PRESENT', quantiteConstatee: 1 },
|
||||
{
|
||||
checklistId: clRetour4.id,
|
||||
accessoireId: housse.id,
|
||||
nomElement: 'Housse',
|
||||
etat: 'ABSENT',
|
||||
quantiteConstatee: 0,
|
||||
commentaire: 'Manquante au retour',
|
||||
},
|
||||
{
|
||||
checklistId: clRetour4.id,
|
||||
accessoireId: chargeur.id,
|
||||
nomElement: 'Chargeur',
|
||||
etat: 'PRESENT',
|
||||
quantiteConstatee: 1,
|
||||
},
|
||||
],
|
||||
});
|
||||
console.log('[fixtures] 4 emprunts + checklists crees');
|
||||
@@ -464,7 +501,7 @@ async function main(): Promise<void> {
|
||||
},
|
||||
],
|
||||
});
|
||||
console.log('[fixtures] 2 entrees d\'historique creees');
|
||||
console.log("[fixtures] 2 entrees d'historique creees");
|
||||
}
|
||||
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user