This project was created as part of the CEP (Computer Elective Programme) WA3.
The rubrics, development logs, reflections, class digrams and video can be found
in the cep-wa3/
folder. Do note that the video will probably be gitignore-ed so it won't be on github.
Features
- Edit tasks
- "Expire"/Archive tasks
- Router
- Show list of people who have completed a particular task
- Archive members
- Multiple selections and actions
- Clear the contents of modals after dimsissing
- Revert history entry
Code stuff
- Fix the using classes in defineProps issue
- Implement a fromDoc instead of a fromId to prevent fetching data twice
- collection
members
(members of RICP)- document
<auto generated id>
(artificial id we give each member in case they have the same name or smth)- string
name
- subcollection
history
- document
<auto generated id>
- string
_tag
(either "task" or "manual" to distinguis between TaskHistoryEntry and ManualHistoryEntry) - common fields:
- timestamp
timestamp
- string
adminId
- timestamp
- if
_tag
is"manual"
:- integer | null
change
(either change and message is null OR task is null) - string | null
message
- integer | null
- if
_tag
is"task"
:- string | null
taskId
(the task associated with this addition of points)
- string | null
- string
- document
- string
- document
- collection
tasks
- document
<auto generated id>
- string
title
- string
description
- timestamp
dateAdded
- timestamp | null
expiryDate
- boolean
expired
- boolean
deleted
- string
scoreFnName
* - map
scoreFnParams
- string
- document
- collection
users
(admin users)- document
<uid>
(uid from firebase auth)- string
name
- string
- document
* see score functions docs below
A score function f(x)
for a task gives the score of the task x
days after
the task was first set (can be overridden with a start date).
ST = Current day
, the "start time" of the function. The function will be called asf(x - ST)
.LB = 0
, the lower bound of the score function. The score function will be clamped betweenL
andU
UB = Infinity
, the upper bound of the score function. The score function will be clamped betweenL
andU
Mathematical expression: f(x) = C
Additional parameters:
C = 100
, the number of points this task will be worth, always (the lower and upper bounds will still apply)
Mathematical expression: f(x) = -Mx + C
(the negative is there for convenience)
Additional parameters:
M = 10
, the number of points that gets subtracted every day from the day 0 scoreC = 100
, the original number of points the task is worth on day 0 (i.e. if they solve it the day the task is announced)
I might add more (such as exponential) in the future.
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 <script setup>
SFCs, check out the script setup docs to learn more.
Since TypeScript cannot handle type information for .vue
imports, they are shimmed to be a generic Vue component type by default. In most cases this is fine if you don't really care about component prop types outside of templates. However, if you wish to get actual prop types in .vue
imports (for example to get props validation when using manual h(...)
calls), you can enable Volar's Take Over mode by following these steps:
- Run
Extensions: Show Built-in Extensions
from VS Code's command palette, look forTypeScript and JavaScript Language Features
, then right click and selectDisable (Workspace)
. By default, Take Over mode will enable itself if the default TypeScript extension is disabled. - Reload the VS Code window by running
Developer: Reload Window
from the command palette.
You can learn more about Take Over mode here.