Note Form » History » Version 25
Zhoujie Li, 07.03.2024 12:10
1 | 1 | Zhoujie Li | h1. Note Form |
---|---|---|---|
2 | 2 | Zhoujie Li | |
3 | h3. Motivation |
||
4 | |||
5 | Das Note soll dazu dienen auf beliebige Formular einer Notiz aufzumachen. Und ganz einfach für sich selber oder für anderen als toDo zu tagen. |
||
6 | |||
7 | h3. Datenstruktur |
||
8 | |||
9 | 21 | Zhoujie Li | Table *NoteForm* (wird mit geliefert als default table) |
10 | 2 | Zhoujie Li | * id <int> |
11 | * pIdCreator <int> |
||
12 | 5 | Carsten Rose | * xId <int> Die ID des aktuellen Formulars, zu dem die Notiz gehört. |
13 | 22 | Zhoujie Li | * formId <int> |
14 | * tableName <varchar> |
||
15 | 2 | Zhoujie Li | * note <text> |
16 | 22 | Zhoujie Li | * access <enum ('private','set of group','all')> Bestimmt die Sichtbarkeit der Notiz (privat, gruppenbasiert oder öffentlich). |
17 | 1 | Zhoujie Li | * reminderDate <datetime> |
18 | 22 | Zhoujie Li | * isDone <enum('yes','no')> |
19 | * formName <varchar> |
||
20 | 1 | Zhoujie Li | |
21 | 25 | Zhoujie Li | Table *Ggroup* |
22 | 21 | Zhoujie Li | * id <int> |
23 | * grId <int> |
||
24 | * reference <varchar> "note_form_tag" (this is mendatory for tags) |
||
25 | * name <varchar> |
||
26 | |||
27 | 25 | Zhoujie Li | Table *GroupMember* |
28 | 21 | Zhoujie Li | * id <int> |
29 | * grId <int> |
||
30 | * xId <int> |
||
31 | |||
32 | 2 | Zhoujie Li | h3. Interface |
33 | |||
34 | * Ein Notiz-Button zeigt die Anzahl vorhandener Notizen an. |
||
35 | * Ein Modal-Fenster listet alle zugehörigen Notizen auf, inklusive einer Scrollbar für lange Listen. |
||
36 | * Die Benutzeroberfläche reagiert dynamisch auf Änderungen, die über AJAX-Requests durchgeführt werden. |
||
37 | * Funktionen im Modal-Fenster: |
||
38 | ** Done-Button zum Markieren von Notizen als erledigt. |
||
39 | ** Frei erstellbare Tags für spätere Filterung im Dashboard. |
||
40 | ** Löschen-Button zum Entfernen von Notizen. |
||
41 | ** Bearbeitungsmöglichkeit für ausgewählte Notizen. |
||
42 | |||
43 | *Skizze* |
||
44 | |||
45 | 3 | Zhoujie Li | !clipboard-202401291353-oc8zv.png! |
46 | 9 | Zhoujie Li | |
47 | 18 | Zhoujie Li | |
48 | *Mock up* |
||
49 | |||
50 | !clipboard-202402211132-bwgkj.png! !clipboard-202402211133-v2kfe.png! |
||
51 | 16 | Zhoujie Li | |
52 | 1 | Zhoujie Li | h3. Funktionbeschreibung |
53 | 15 | Zhoujie Li | |
54 | 23 | Zhoujie Li | |
55 | 9 | Zhoujie Li | *Mögliche Funktion* |
56 | * Falls keine Reminder gesetz wird wird dieser nicht in dashboad angezeigt? |
||
57 | 21 | Zhoujie Li | * Es wäre gut falls die Daten nicht erfolgreich gespeichert werden, werden sie im lokalen Speicher (LocalStorage) gesichert, um Datenverlust zu vermeiden. |
58 | 9 | Zhoujie Li | |
59 | 23 | Zhoujie Li | h3. Dashboard |
60 | |||
61 | *Hier ist ein einfacher Dashboard "report" zur Übersicht, in dem man angelegte Notizen sehen kann, und es wird farblich angezeigt, falls sie noch nicht auf done gesetz ist.* |
||
62 | |||
63 | <pre> |
||
64 | # |
||
65 | # NoteForm Dashboard |
||
66 | # |
||
67 | |||
68 | form = '{{form:SE}}' |
||
69 | |||
70 | |||
71 | 24 | Zhoujie Li | # get current Person id |
72 | 23 | Zhoujie Li | { |
73 | sql = SELECT p.id AS _currentPid |
||
74 | FROM Person AS p |
||
75 | WHERE p.account = '{{feUser:UTE}}' |
||
76 | |||
77 | } |
||
78 | |||
79 | 24 | Zhoujie Li | # build table |
80 | 23 | Zhoujie Li | { |
81 | sql = SELECT f.id AS _fId |
||
82 | , nf.xId AS _xId |
||
83 | , nf.formName AS _formName |
||
84 | , nf.formTitle AS _fTitle |
||
85 | FROM NoteForm AS nf, Form AS f |
||
86 | WHERE f.id = nf.formId |
||
87 | 1 | Zhoujie Li | GROUP BY nf.xId |
88 | |||
89 | 24 | Zhoujie Li | head = <table class="table table-hover qfq-table-50 tablesorter tablesorter-filter"> |
90 | <thead> |
||
91 | <tr> |
||
92 | <th>Count</th> |
||
93 | 1 | Zhoujie Li | <th>Title</th> |
94 | <th>Form</th> |
||
95 | <th>Done</th> |
||
96 | 24 | Zhoujie Li | </tr> |
97 | </thead> |
||
98 | <tbody> |
||
99 | 23 | Zhoujie Li | |
100 | 24 | Zhoujie Li | tail = </table></tbody> |
101 | 23 | Zhoujie Li | |
102 | 24 | Zhoujie Li | # count note which is not done |
103 | 23 | Zhoujie Li | { |
104 | sql = SELECT COUNT(*) AS _noteNotDone |
||
105 | FROM NoteForm AS nf |
||
106 | 1 | Zhoujie Li | WHERE nf.formId = '{{fId:R0}}' |
107 | AND nf.xId = '{{xId:R0}}' |
||
108 | 23 | Zhoujie Li | AND nf.isDone = 'no' |
109 | AND nf.hasToolbar = 'yes' |
||
110 | GROUP BY formId |
||
111 | } |
||
112 | 24 | Zhoujie Li | |
113 | # prepare notes and build button-group |
||
114 | 23 | Zhoujie Li | { |
115 | sql = SELECT CONCAT('p:{{pageSlug:T}}?form={{formName:RE}}&r=',nf.xId,'&formId=',nf.formId,'&xId={{xId:RE}}|s|b|E') AS '_link|_hide|editFormButton' |
||
116 | , CONCAT('p:{{pageSlug:T}}?form=noteForm&r=0&formId={{fId:R0}}&xId={{xId:R0}}&formName={{formName:RE}}&formTitle={{fTitle:RE}}&type=1 |s|G:glyphicon-paperclip|t:<span' |
||
117 | , IF('{{noteNotDone:R0}}' > 0 AND COUNT(nf.xId) != 0 ,' style="background-color:#f89406"; class="badge">',' class="badge">'),COUNT(nf.xId),'</span>|b|g:_blank') AS '_link|_hide|editNoteButton' |
||
118 | , IF(nf.hasToolbar = 'yes' AND nf.isDone = 'no', 'pending',IF(nf.hasToolbar = 'no','not important','DONE')) AS _isDone |
||
119 | FROM NoteForm AS nf, Form AS f |
||
120 | WHERE nf.formId = f.id |
||
121 | AND f.id = '{{fId:R0}}' |
||
122 | AND nf.xId = '{{xId:R0}}' |
||
123 | AND ((nf.access = 'all') |
||
124 | OR (nf.access = 'private' AND nf.pIdCreator = '{{currentPid:RE}}')) |
||
125 | GROUP BY f.id |
||
126 | |||
127 | { |
||
128 | 1 | Zhoujie Li | sql = SELECT '' |
129 | 23 | Zhoujie Li | |
130 | head = <tr><td> <div class="button-group"> {{&editFormButton:RE::-}} {{&editNoteButton:RE::-}}</td> </div> |
||
131 | |||
132 | tail = </tr> |
||
133 | |||
134 | 24 | Zhoujie Li | # output Form |
135 | 23 | Zhoujie Li | { |
136 | sql = SELECT '{{fTitle:RE}}' |
||
137 | , '{{formName:RE}}' |
||
138 | , '{{isDone:RE}}' |
||
139 | |||
140 | fbeg = <td> |
||
141 | fend = </td> |
||
142 | |||
143 | } |
||
144 | } |
||
145 | } |
||
146 | } |
||
147 | |||
148 | </pre> |
||
149 | 9 | Zhoujie Li | |
150 | h2. noteForm |
||
151 | |||
152 | 2 | Zhoujie Li | h3. Use-Cases |
153 | |||
154 | 13 | Zhoujie Li | *Topic: QFQ Branch newFeature* |
155 | 6 | Carsten Rose | |
156 | [1] CR: |
||
157 | ich schreibe hier ein Protokoll |
||
158 | ich schreibe hier ein Protokoll |
||
159 | ich schreibe hier ein Protokoll |
||
160 | ich schreibe hier ein Protokoll |
||
161 | ich schreibe hier ein Protokoll |
||
162 | ich schreibe hier ein Protokoll |
||
163 | TAG: 'project x', 'protokoll' |
||
164 | ACCESS: All |
||
165 | |||
166 | [2] CR: |
||
167 | ich mache mir hier eine notizt mit Reminder: bitte Fenster oeffnen |
||
168 | Reminder: +24h |
||
169 | ACCESS: All |
||
170 | |||
171 | [3] ZL: |
||
172 | Es wird kalt, Fenster bitte schliessen |
||
173 | ACCESS: All |
||
174 | |||
175 | [4] CR: Ruecksprache mit Institutsleitung (IL) |
||
176 | TAG: 'projekt x', 'IL', |
||
177 | GROUP: IT-IL, BB-ZL-CR |
||
178 | ACCESS: All|Private |
||
179 | Reminder: +24h |
||
180 | DONE: wird durch CR gesetzt wenn Aufgabe abgeschlossen ist |
||
181 | |||
182 | ---------------- |
||
183 | |||
184 | * 'ACCESS: All' |
||
185 | * Dashboard: nicht anzeigen |
||
186 | * Detailansicht: anzeigen |
||
187 | |||
188 | * 'ACCESS: All,<group>' (ich bin member of '<group>') |
||
189 | 1 | Zhoujie Li | * Dashboard: anzeigen |
190 | * Detailansicht: anzeigen |
||
191 | 6 | Carsten Rose | |
192 | * 'ACCESS: Private' |
||
193 | 1 | Zhoujie Li | * Dashboard: anzeigen wenn ich der Owner bin |
194 | 6 | Carsten Rose | * Detailansicht: anzeigen wenn ich der Owner bin |
195 | |||
196 | 1 | Zhoujie Li | ----------------- |
197 | |||
198 | *Roadmap* |
||
199 | |||
200 | 10 | Zhoujie Li | *V.1.0* |
201 | 1 | Zhoujie Li | * Notiz Form mit 'text', 'done' |
202 | 6 | Carsten Rose | * Speichern via regulaerem QFQ Save |
203 | * Bestehende Notizen im Form anzeigen |
||
204 | 20 | Zhoujie Li | * Notiz Form mit 'tags' |
205 | 6 | Carsten Rose | * Bestehende Notizen editieren / loeschen |
206 | 21 | Zhoujie Li | * Neue Browser fenster |
207 | 1 | Zhoujie Li | |
208 | 11 | Zhoujie Li | |
209 | 20 | Zhoujie Li | *V.1.1* |
210 | 10 | Zhoujie Li | * Typeahead nach 'tags' suchen |
211 | 20 | Zhoujie Li | * Dashboard |
212 | * Reminder Email |
||
213 | 11 | Zhoujie Li | |
214 | |||
215 | 20 | Zhoujie Li | *V.1.2* |
216 | 1 | Zhoujie Li | * floating divs |
217 | 11 | Zhoujie Li | * minimieren / resize |
218 | 20 | Zhoujie Li | * oder Modal |