Project

General

Profile

Actions

Note Form

Motivation

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.

Datenstruktur

Table NoteForm (wird mit geliefert als default table)
  • id <int>
  • pIdCreator <int>
  • xId <int> Die ID des aktuellen Formulars, zu dem die Notiz gehört.
  • formId <int>
  • tableName <varchar>
  • note <text>
  • access <enum ('private','set of group','all')> Bestimmt die Sichtbarkeit der Notiz (privat, gruppenbasiert oder öffentlich).
  • reminderDate <datetime>
  • isDone <enum('yes','no')>
  • formName <varchar>
Table Ggroup
  • id <int>
  • grId <int>
  • reference <varchar> "note_form_tag" (this is mendatory for tags)
  • name <varchar>
Table GroupMember
  • id <int>
  • grId <int>
  • xId <int>

Interface

  • Ein Notiz-Button zeigt die Anzahl vorhandener Notizen an.
  • Ein Modal-Fenster listet alle zugehörigen Notizen auf, inklusive einer Scrollbar für lange Listen.
  • Die Benutzeroberfläche reagiert dynamisch auf Änderungen, die über AJAX-Requests durchgeführt werden.
  • Funktionen im Modal-Fenster:
    • Done-Button zum Markieren von Notizen als erledigt.
    • Frei erstellbare Tags für spätere Filterung im Dashboard.
    • Löschen-Button zum Entfernen von Notizen.
    • Bearbeitungsmöglichkeit für ausgewählte Notizen.

Skizze

Mock up

Funktionbeschreibung

Mögliche Funktion
  • Falls keine Reminder gesetz wird wird dieser nicht in dashboad angezeigt?
  • Es wäre gut falls die Daten nicht erfolgreich gespeichert werden, werden sie im lokalen Speicher (LocalStorage) gesichert, um Datenverlust zu vermeiden.

Dashboard

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.

#
# NoteForm Dashboard
#

form = '{{form:SE}}'

# get current Person id
{
  sql = SELECT p.id AS _currentPid
          FROM Person AS p
          WHERE p.account = '{{feUser:UTE}}'

}

# build table
  {
    sql = SELECT f.id AS _fId
                 , nf.xId AS _xId
                 , nf.formName AS _formName
                 , nf.formTitle AS _fTitle
            FROM NoteForm AS nf, Form AS f
            WHERE f.id = nf.formId
            GROUP BY nf.xId 

  head = <table class="table table-hover qfq-table-50 tablesorter tablesorter-filter">     
           <thead>
             <tr>
           <th>Count</th>
             <th>Title</th>
             <th>Form</th>
             <th>Done</th>
           </tr>
           </thead>
         <tbody>

  tail = </table></tbody>

  # count note which is not done
       { 
    sql = SELECT COUNT(*) AS _noteNotDone 
            FROM NoteForm AS nf 
            WHERE nf.formId = '{{fId:R0}}' 
              AND nf.xId = '{{xId:R0}}'
              AND nf.isDone = 'no' 
              AND nf.hasToolbar = 'yes' 
            GROUP BY formId
  }

  # prepare notes and build button-group
  {
    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'
                 , 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'
                 , 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'
                 , IF(nf.hasToolbar = 'yes' AND nf.isDone = 'no', 'pending',IF(nf.hasToolbar = 'no','not important','DONE')) AS _isDone
            FROM NoteForm AS nf, Form AS f
            WHERE nf.formId = f.id
              AND f.id = '{{fId:R0}}'
              AND nf.xId = '{{xId:R0}}'
              AND  ((nf.access = 'all') 
               OR (nf.access = 'private'  AND nf.pIdCreator = '{{currentPid:RE}}'))
            GROUP BY f.id

    {
      sql = SELECT ''

      head = <tr><td> <div class="button-group"> {{&editFormButton:RE::-}} {{&editNoteButton:RE::-}}</td> </div>     

      tail = </tr>

      # output Form
      {
        sql =  SELECT '{{fTitle:RE}}'
                      , '{{formName:RE}}'
                      , '{{isDone:RE}}'

      fbeg = <td>
      fend = </td>

      }
    }
  }
}

noteForm

Use-Cases

Topic: QFQ Branch newFeature

[1] CR:
ich schreibe hier ein Protokoll
ich schreibe hier ein Protokoll
ich schreibe hier ein Protokoll
ich schreibe hier ein Protokoll
ich schreibe hier ein Protokoll
ich schreibe hier ein Protokoll
TAG: 'project x', 'protokoll'
ACCESS: All

[2] CR:
ich mache mir hier eine notizt mit Reminder: bitte Fenster oeffnen
Reminder: +24h
ACCESS: All

[3] ZL:
Es wird kalt, Fenster bitte schliessen
ACCESS: All

[4] CR: Ruecksprache mit Institutsleitung (IL)
TAG: 'projekt x', 'IL',
GROUP: IT-IL, BB-ZL-CR
ACCESS: All|Private
Reminder: +24h
DONE: wird durch CR gesetzt wenn Aufgabe abgeschlossen ist


  • 'ACCESS: All' * Dashboard: nicht anzeigen * Detailansicht: anzeigen
  • 'ACCESS: All,<group>' (ich bin member of '<group>') * Dashboard: anzeigen * Detailansicht: anzeigen
  • 'ACCESS: Private' * Dashboard: anzeigen wenn ich der Owner bin * Detailansicht: anzeigen wenn ich der Owner bin

Roadmap

V.1.0
  • Notiz Form mit 'text', 'done'
  • Speichern via regulaerem QFQ Save
  • Bestehende Notizen im Form anzeigen
  • Notiz Form mit 'tags'
  • Bestehende Notizen editieren / loeschen
  • Neue Browser fenster
V.1.1
  • Typeahead nach 'tags' suchen
  • Dashboard
  • Reminder Email
V.1.2
  • floating divs
  • minimieren / resize
  • oder Modal

Updated by Zhoujie Li 4 months ago · 25 revisions