Skip to content
This repository has been archived by the owner on Oct 15, 2023. It is now read-only.

Commit

Permalink
✨ Ajout du nom de la matière dans les devoirs perso
Browse files Browse the repository at this point in the history
  • Loading branch information
ecnivtwelve committed Apr 12, 2023
1 parent d6ba436 commit dc0ad55
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/views/homework/HomeworkView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@
header: 'Ajouter un devoir',
subHeader: 'Entrez ici le contenu de votre devoir',
inputs: [
{
name: 'subject',
type: 'input',
placeholder: 'Matière (optionnel)'
},
{
name: 'content',
type: 'textarea',
Expand All @@ -89,6 +94,15 @@
text: 'Ajouter',
handler: async (data) => {
let text = data.content;
let subject = data.subject;
if (!subject) {
subject = "DEVOIR PERSONNALISÉ"
}
if (!text) {
return;
}
// get --ion-color-primary
let color = getComputedStyle(document.documentElement).getPropertyValue('--ion-color-primary');
Expand All @@ -108,7 +122,7 @@
done: false,
},
homework: {
subject: "DEVOIR PERSONNALISÉ",
subject: subject.toUpperCase(),
content: text,
shortContent: shortText,
},
Expand Down

0 comments on commit dc0ad55

Please sign in to comment.