feat: add reporting pay type and logic
All checks were successful
Docker Build and Publish / build-and-push (push) Successful in 41s

This commit is contained in:
2026-01-12 08:34:18 -05:00
parent 9a939f0182
commit 89e5e8a303
4 changed files with 34 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("time_entries")
const typeField = collection.schema.getFieldByName("type")
// Add reporting_pay to the existing values
typeField.options.values = ["regular", "overtime", "standby", "callback", "non_contiguous", "reporting_pay"]
return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("time_entries")
const typeField = collection.schema.getFieldByName("type")
// Revert back to previous list
typeField.options.values = ["regular", "overtime", "standby", "callback", "non_contiguous"]
return dao.saveCollection(collection)
})