up notes
This commit is contained in:
parent
b56bd43ede
commit
ff4bd2a868
@ -4,20 +4,81 @@
|
||||
<main class="main">
|
||||
<div class="content columns">
|
||||
<div class="left-side column is-4">
|
||||
<img
|
||||
src="https://www.openstreetmap.fr/wp-content/uploads/2020/06/cropped-OpenStreepMap-france-logo-seul-transparent-2.png"
|
||||
alt="logo osm">
|
||||
|
||||
<strong>
|
||||
Sujets:
|
||||
</strong>
|
||||
<ul>
|
||||
<li class="subject" *ngFor="let s of subjects; index as i"
|
||||
<li class="subject is-clickable is-hoverable hover:has-background-blue"
|
||||
(click)="setSubject(i)"
|
||||
*ngFor="let s of subjects; index as i"
|
||||
[ngClass]="{ active: (currentSubjectId +1) == (i+1) }">
|
||||
<strong>{{ i + 1 }}) {{ s.title }}</strong>
|
||||
|
||||
<p>{{ s.duration }} min, par {{ s.author }}. Reste: {{ resteTopicMinutes }}. Passé: {{s.spentSeconds}}. </p>
|
||||
<p class="is-small">
|
||||
{{ s.duration }} min, par {{ s.author }}. Reste: {{ resteTopicMinutes(s) }}. Passé: {{ round(s.spentSeconds) }}.
|
||||
</p>
|
||||
<p *ngIf="s.finished">🎉</p>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<textarea class="textarea mx-2 is-full" [(ngModel)]="pasteLand" id="pasteland" (ngModelChange)="parseTheListOfTopicsInPasteLand()"></textarea>
|
||||
<div class="pad">
|
||||
|
||||
<h2>
|
||||
notes
|
||||
</h2>
|
||||
<textarea name="note" id="note" cols="30" rows="10" [(ngModel)]="subjects[currentSubjectId].notes"></textarea>
|
||||
<h2>
|
||||
Texte du pad
|
||||
</h2>
|
||||
<textarea class="textarea mx-2 is-full" [(ngModel)]="pasteLand" id="pasteland"
|
||||
(ngModelChange)="parseTheListOfTopicsInPasteLand()"></textarea>
|
||||
<h2>
|
||||
Compte rendu
|
||||
</h2>
|
||||
<p>
|
||||
{{buildCompteRendu()}}
|
||||
</p>
|
||||
<button class="btn is-primary" (click)="copyCompteRenduToClipboard()">
|
||||
copier
|
||||
</button>
|
||||
|
||||
</div>
|
||||
<div class="liens">
|
||||
|
||||
<h2>Liens</h2>
|
||||
<div>
|
||||
<ul>
|
||||
<li><a href="https://annuel.framapad.org/p/N_IDAQXYLHswlpU2s3oE">pad de notes de réunion</a></li>
|
||||
<li><a href="https://t.me/SOTM2023-Marseille">canal spécial pour le SOTM fr sur telegram</a></li>
|
||||
<li><a href="https://t.me/osm-fr">canal général sur telegram</a></li>
|
||||
<li><a href="https://app.element.io/#/room/%23osmfr:matrix.org">espace de canaux sur matrix</a></li>
|
||||
<li><a href="https://forum.openstreetmap.fr/c/openstreetmap-france/ca/53">forum section CA</a></li>
|
||||
<li><a href="https://github.com/osm-fr/">github osm-france</a></li>
|
||||
<li><a href="https://osmvideo.cloud68.co/user/fre-aux-yuh">réunions mensuelles du CA</a></li>
|
||||
<li><a href="https://nextcloud.openstreetmap.fr">nextcloud osm</a></li>
|
||||
<li><a href="https://stats.uptimerobot.com/mQX5Vi5YW2">status des services en ligne</a></li>
|
||||
<li>source: <a href="https://forge.chapril.org/tykayn/scripts">ordre du jour par Tykayn</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="explications">
|
||||
<p>
|
||||
|
||||
{{statsExplication}}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="debug" *ngIf="showDebug">
|
||||
debug:
|
||||
<pre>
|
||||
{{ subjects|json }}
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<p>
|
||||
{{ (hints) }}
|
||||
</p>
|
||||
@ -55,12 +116,7 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="debug" *ngIf="showDebug">
|
||||
debug:
|
||||
<pre>
|
||||
{{ subjects|json }}
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
||||
</main>
|
||||
|
||||
|
@ -7,6 +7,7 @@ import {FormsModule} from "@angular/forms";
|
||||
interface Topic {
|
||||
id: number, // numéro du sujet
|
||||
title: string, // titre du sujet à aborder
|
||||
notes: string, // titre du sujet à aborder
|
||||
duration: number, // nombre de minutes du sujet
|
||||
author: string,// auteur du sujet qui anime la discussion
|
||||
startDate: Date, // date de début du sujet
|
||||
@ -26,26 +27,19 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||
title = 'odj';
|
||||
subjects: Array<Topic> = [];
|
||||
currentSubjectId = 0;
|
||||
// startTime: string = "20:30";
|
||||
startTime: string = "17:00";
|
||||
startTime: string = "20:30";
|
||||
// startTime: string = "17:00";
|
||||
endTime: string = "22:00";
|
||||
pasteLand: string = "* Présentation du suivi sur Nextcloud - 5min (tykayn)\n" +
|
||||
"* Réduction de bus factor - 5min (tykayn)\n" +
|
||||
"* Réunion avec Wikimedia France - 5min (tykayn)\n" +
|
||||
"";
|
||||
|
||||
hints: string = " - le pad des notes de réunion https://annuel.framapad.org/p/N_IDAQXYLHswlpU2s3oE\n" +
|
||||
"\t - canal spécial pour le SOTM fr sur telegram https://t.me/SOTM2023-Marseille\n" +
|
||||
"\t - canal général sur telegram https://t.me/osm-fr\n" +
|
||||
"\t - espace de canaux sur matrix https://app.element.io/#/room/#osmfr:matrix.org\n" +
|
||||
"\t - le forum section CA https://forum.openstreetmap.fr/c/openstreetmap-france/ca/53\n" +
|
||||
"\t - le github osm-france https://github.com/osm-fr/ \n" +
|
||||
"\t - les réunions mensuelles du CA https://osmvideo.cloud68.co/user/fre-aux-yuh \n" +
|
||||
"\t - le nextcloud osm https://nextcloud.openstreetmap.fr\n" +
|
||||
"\t - les status des services en ligne https://stats.uptimerobot.com/mQX5Vi5YW2";
|
||||
statsExplication: string = ''
|
||||
|
||||
resteTopicMinutes: any = 10;
|
||||
showDebug: boolean = false;
|
||||
hints: string = "";
|
||||
|
||||
showDebug: boolean = true;
|
||||
private startDate: Date = new Date();
|
||||
private endDate: Date = new Date();
|
||||
private topicChangeDate: Date = new Date();
|
||||
@ -60,6 +54,12 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||
this.subjects[this.currentSubjectId].spentSeconds += timeDifferenceInSeconds;
|
||||
this.topicChangeDate = currentTime;
|
||||
}
|
||||
round(val:number){
|
||||
if (val < 60) {
|
||||
return Math.round(val) +' s'
|
||||
}
|
||||
return (Math.round(val / 60) * 60) + ' min'
|
||||
}
|
||||
|
||||
parseTheListOfTopicsInPasteLand() {
|
||||
|
||||
@ -77,7 +77,10 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||
id: ii,
|
||||
title: boom[0],
|
||||
duration: 15,
|
||||
spentSeconds: 0,
|
||||
author: '',
|
||||
notes: '',
|
||||
finished: false,
|
||||
startDate: this.getStartDateAfterDuration(accumulatedDuration + ''),
|
||||
endDate: this.getEndDateAfterDuration(accumulatedDuration + ''),
|
||||
})
|
||||
@ -109,13 +112,13 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||
*
|
||||
* @param {Topic} topic - The topic for which to compute the remaining time.
|
||||
*/
|
||||
computeResteTopicMinutes(topic: Topic): void {
|
||||
computeResteTopicMinutes(topic: Topic): number {
|
||||
let currentSubjectDuration = topic.duration; // The duration of the current subject, in minutes
|
||||
let currentSubjectStartTime = new Date(this.startTime); // The start time of the current subject
|
||||
let currentSubjectEndTime = new Date(currentSubjectStartTime.getTime() + currentSubjectDuration * 60000); // The end time of the current subject
|
||||
|
||||
let remainingTime = currentSubjectEndTime.getTime() - new Date().getTime(); // The remaining time, in milliseconds
|
||||
this.resteTopicMinutes = Math.floor(remainingTime / 60000); // The remaining time, in minutes
|
||||
return currentSubjectEndTime.getTime() - new Date().getTime(); // The remaining time, in milliseconds
|
||||
|
||||
}
|
||||
|
||||
interval: any;
|
||||
@ -185,6 +188,11 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||
console.log('ajout au topic', this.currentSubjectId)
|
||||
}
|
||||
|
||||
resteTopicMinutes(topic: Topic) {
|
||||
return this.round(topic.spentSeconds / topic.duration * 60) + ' min'
|
||||
}
|
||||
|
||||
|
||||
convertTextToHTMLLinks(text: string): string {
|
||||
let urlRegex = /(https?:\/\/[^\s<]+[^<.,:;\"\'\]\s])(?!["\])\s])/g;
|
||||
let matches = urlRegex.exec(text);
|
||||
@ -204,4 +212,58 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||
this.updateTopicChangeDate()
|
||||
this.currentSubjectId < 1 ? this.currentSubjectId = 0 : this.currentSubjectId -= 1;
|
||||
}
|
||||
|
||||
makeStatisticsOnTopicsSpentSeconds() {
|
||||
let totalSeconds = 0;
|
||||
for (const topic of this.subjects) {
|
||||
totalSeconds += topic.spentSeconds;
|
||||
}
|
||||
|
||||
let averageSeconds = totalSeconds / this.subjects.length;
|
||||
|
||||
let longestTopic = this.subjects[0];
|
||||
let longestSeconds = longestTopic.spentSeconds;
|
||||
for (const topic of this.subjects) {
|
||||
if (topic.spentSeconds > longestSeconds) {
|
||||
longestSeconds = topic.spentSeconds;
|
||||
longestTopic = topic;
|
||||
}
|
||||
}
|
||||
|
||||
let shortestTopic = this.subjects[0];
|
||||
let shortestSeconds = shortestTopic.spentSeconds;
|
||||
for (const topic of this.subjects) {
|
||||
if (topic.spentSeconds < shortestSeconds) {
|
||||
shortestSeconds = topic.spentSeconds;
|
||||
shortestTopic = topic;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
this.statsExplication = `Total spent seconds: ${totalSeconds}\nAverage spent seconds: ${averageSeconds}\nLongest topic: ${longestTopic.title} (${longestSeconds} seconds)\nShortest topic: ${shortestTopic.title} (${shortestSeconds} seconds)`;
|
||||
}
|
||||
|
||||
|
||||
setSubject(i: number) {
|
||||
this.currentSubjectId = i;
|
||||
this.updateTopicChangeDate()
|
||||
}
|
||||
|
||||
compteRendu:string = ''
|
||||
|
||||
|
||||
buildCompteRendu(){
|
||||
let compteRendu = 'Compte rendu :\n\n';
|
||||
for (const topic of this.subjects) {
|
||||
compteRendu += `Sujet ${topic.id + 1} : ${topic.title}\n`;
|
||||
compteRendu += `Durée : ${topic.duration} minutes\n`;
|
||||
compteRendu += `Temps écoulé : ${this.resteTopicMinutes(topic)}\n\n`;
|
||||
}
|
||||
this.compteRendu = compteRendu
|
||||
return compteRendu
|
||||
}
|
||||
copyCompteRenduToClipboard() {
|
||||
|
||||
navigator.clipboard.writeText(this.compteRendu);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user