Add child task support

This commit is contained in:
Jonas Lochmann 2020-11-16 01:00:00 +01:00
parent 020fe0aea6
commit d67b7a7619
No known key found for this signature in database
GPG key ID: 8B8C9AEE10FA5B36
73 changed files with 2864 additions and 88 deletions

View file

@ -37,6 +37,7 @@ export class Cache {
categoriesWithModifiedBaseData = new Set<string>()
categoriesWithModifiedTimeLimitRules = new Set<string>()
categoriesWithModifiedUsedTimes = new Set<string>()
categoriesWithModifiedTasks = new Set<string>()
devicesWithModifiedInstalledApps = new Set<string>()
devicesWithModifiedShowDeviceConnected = new Map<string, boolean>()
@ -209,6 +210,22 @@ export class Cache {
this.categoriesWithModifiedUsedTimes.clear()
}
if (this.categoriesWithModifiedTasks.size > 0) {
await database.category.update({
taskListVersion: generateVersionId()
}, {
where: {
familyId,
categoryId: {
[Sequelize.Op.in]: setToList(this.categoriesWithModifiedTasks)
}
},
transaction
})
this.categoriesWithModifiedUsedTimes.clear()
}
if (this.devicesWithModifiedInstalledApps.size > 0) {
await database.device.update({
installedAppsVersion: generateVersionId()