@aneuhold/be-ts-db-lib 4.2.28 → 4.2.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/index.ts +1 -1
- package/lib/repositories/BaseRepository.d.ts +2 -12
- package/lib/repositories/BaseRepository.d.ts.map +1 -1
- package/lib/repositories/BaseRepository.js +8 -8
- package/lib/repositories/BaseRepository.js.map +1 -1
- package/lib/repositories/BaseRepository.ts +9 -9
- package/lib/repositories/common/UserRepository.d.ts +1 -2
- package/lib/repositories/common/UserRepository.d.ts.map +1 -1
- package/lib/repositories/common/UserRepository.js +6 -6
- package/lib/repositories/common/UserRepository.js.map +1 -1
- package/lib/repositories/common/UserRepository.ts +6 -6
- package/lib/repositories/dashboard/DashboardBaseRepository.d.ts +1 -1
- package/lib/repositories/dashboard/DashboardBaseRepository.d.ts.map +1 -1
- package/lib/repositories/dashboard/DashboardBaseRepository.js +2 -2
- package/lib/repositories/dashboard/DashboardBaseRepository.js.map +1 -1
- package/lib/repositories/dashboard/DashboardBaseRepository.ts +2 -2
- package/lib/repositories/dashboard/DashboardNonogramKatanaItemRepository.d.ts +2 -2
- package/lib/repositories/dashboard/DashboardNonogramKatanaItemRepository.d.ts.map +1 -1
- package/lib/repositories/dashboard/DashboardNonogramKatanaItemRepository.js +4 -4
- package/lib/repositories/dashboard/DashboardNonogramKatanaItemRepository.js.map +1 -1
- package/lib/repositories/dashboard/DashboardNonogramKatanaItemRepository.ts +5 -5
- package/lib/repositories/dashboard/DashboardNonogramKatanaUpgradeRepository.d.ts +2 -2
- package/lib/repositories/dashboard/DashboardNonogramKatanaUpgradeRepository.d.ts.map +1 -1
- package/lib/repositories/dashboard/DashboardNonogramKatanaUpgradeRepository.js +4 -4
- package/lib/repositories/dashboard/DashboardNonogramKatanaUpgradeRepository.js.map +1 -1
- package/lib/repositories/dashboard/DashboardNonogramKatanaUpgradeRepository.ts +5 -5
- package/lib/repositories/dashboard/DashboardTaskRepository.d.ts +2 -10
- package/lib/repositories/dashboard/DashboardTaskRepository.d.ts.map +1 -1
- package/lib/repositories/dashboard/DashboardTaskRepository.js +7 -7
- package/lib/repositories/dashboard/DashboardTaskRepository.js.map +1 -1
- package/lib/repositories/dashboard/DashboardTaskRepository.ts +8 -8
- package/lib/repositories/dashboard/DashboardUserConfigRepository.d.ts +2 -15
- package/lib/repositories/dashboard/DashboardUserConfigRepository.d.ts.map +1 -1
- package/lib/repositories/dashboard/DashboardUserConfigRepository.js +9 -9
- package/lib/repositories/dashboard/DashboardUserConfigRepository.js.map +1 -1
- package/lib/repositories/dashboard/DashboardUserConfigRepository.ts +10 -10
- package/lib/repositories/workout/WorkoutBaseRepository.d.ts +1 -1
- package/lib/repositories/workout/WorkoutBaseRepository.d.ts.map +1 -1
- package/lib/repositories/workout/WorkoutBaseRepository.js +2 -2
- package/lib/repositories/workout/WorkoutBaseRepository.js.map +1 -1
- package/lib/repositories/workout/WorkoutBaseRepository.ts +2 -2
- package/lib/repositories/workout/WorkoutEquipmentTypeRepository.d.ts +2 -2
- package/lib/repositories/workout/WorkoutEquipmentTypeRepository.d.ts.map +1 -1
- package/lib/repositories/workout/WorkoutEquipmentTypeRepository.js +4 -4
- package/lib/repositories/workout/WorkoutEquipmentTypeRepository.js.map +1 -1
- package/lib/repositories/workout/WorkoutEquipmentTypeRepository.ts +5 -5
- package/lib/repositories/workout/WorkoutExerciseCalibrationRepository.d.ts +2 -2
- package/lib/repositories/workout/WorkoutExerciseCalibrationRepository.d.ts.map +1 -1
- package/lib/repositories/workout/WorkoutExerciseCalibrationRepository.js +4 -4
- package/lib/repositories/workout/WorkoutExerciseCalibrationRepository.js.map +1 -1
- package/lib/repositories/workout/WorkoutExerciseCalibrationRepository.ts +5 -5
- package/lib/repositories/workout/WorkoutExerciseRepository.d.ts +2 -2
- package/lib/repositories/workout/WorkoutExerciseRepository.d.ts.map +1 -1
- package/lib/repositories/workout/WorkoutExerciseRepository.js +4 -4
- package/lib/repositories/workout/WorkoutExerciseRepository.js.map +1 -1
- package/lib/repositories/workout/WorkoutExerciseRepository.ts +5 -5
- package/lib/repositories/workout/WorkoutMesocycleRepository.d.ts +2 -2
- package/lib/repositories/workout/WorkoutMesocycleRepository.d.ts.map +1 -1
- package/lib/repositories/workout/WorkoutMesocycleRepository.js +4 -4
- package/lib/repositories/workout/WorkoutMesocycleRepository.js.map +1 -1
- package/lib/repositories/workout/WorkoutMesocycleRepository.ts +5 -5
- package/lib/repositories/workout/WorkoutMicrocycleRepository.d.ts +2 -2
- package/lib/repositories/workout/WorkoutMicrocycleRepository.d.ts.map +1 -1
- package/lib/repositories/workout/WorkoutMicrocycleRepository.js +4 -4
- package/lib/repositories/workout/WorkoutMicrocycleRepository.js.map +1 -1
- package/lib/repositories/workout/WorkoutMicrocycleRepository.ts +5 -5
- package/lib/repositories/workout/WorkoutMuscleGroupRepository.d.ts +2 -2
- package/lib/repositories/workout/WorkoutMuscleGroupRepository.d.ts.map +1 -1
- package/lib/repositories/workout/WorkoutMuscleGroupRepository.js +8 -11
- package/lib/repositories/workout/WorkoutMuscleGroupRepository.js.map +1 -1
- package/lib/repositories/workout/WorkoutMuscleGroupRepository.ts +9 -12
- package/lib/repositories/workout/WorkoutSessionExerciseRepository.d.ts +2 -2
- package/lib/repositories/workout/WorkoutSessionExerciseRepository.d.ts.map +1 -1
- package/lib/repositories/workout/WorkoutSessionExerciseRepository.js +4 -4
- package/lib/repositories/workout/WorkoutSessionExerciseRepository.js.map +1 -1
- package/lib/repositories/workout/WorkoutSessionExerciseRepository.ts +5 -5
- package/lib/repositories/workout/WorkoutSessionRepository.d.ts +2 -2
- package/lib/repositories/workout/WorkoutSessionRepository.d.ts.map +1 -1
- package/lib/repositories/workout/WorkoutSessionRepository.js +4 -4
- package/lib/repositories/workout/WorkoutSessionRepository.js.map +1 -1
- package/lib/repositories/workout/WorkoutSessionRepository.ts +5 -5
- package/lib/repositories/workout/WorkoutSetRepository.d.ts +2 -2
- package/lib/repositories/workout/WorkoutSetRepository.d.ts.map +1 -1
- package/lib/repositories/workout/WorkoutSetRepository.js +4 -4
- package/lib/repositories/workout/WorkoutSetRepository.js.map +1 -1
- package/lib/repositories/workout/WorkoutSetRepository.ts +5 -5
- package/lib/services/DemoAccountsService/DashboardDemoAccounts.service.d.ts +21 -0
- package/lib/services/DemoAccountsService/DashboardDemoAccounts.service.d.ts.map +1 -0
- package/lib/services/DemoAccountsService/{DashboardDemoAccountsService.js → DashboardDemoAccounts.service.js} +28 -28
- package/lib/services/DemoAccountsService/DashboardDemoAccounts.service.js.map +1 -0
- package/lib/services/DemoAccountsService/{DashboardDemoAccountsService.ts → DashboardDemoAccounts.service.ts} +27 -27
- package/lib/services/DemoAccountsService/{DemoAccountsService.d.ts → DemoAccounts.service.d.ts} +1 -1
- package/lib/services/DemoAccountsService/DemoAccounts.service.d.ts.map +1 -0
- package/lib/services/DemoAccountsService/{DemoAccountsService.js → DemoAccounts.service.js} +2 -2
- package/lib/services/DemoAccountsService/DemoAccounts.service.js.map +1 -0
- package/lib/services/DemoAccountsService/{DemoAccountsService.ts → DemoAccounts.service.ts} +1 -1
- package/lib/services/DemoAccountsService/index.d.ts +1 -1
- package/lib/services/DemoAccountsService/index.d.ts.map +1 -1
- package/lib/services/DemoAccountsService/index.js +1 -1
- package/lib/services/DemoAccountsService/index.js.map +1 -1
- package/lib/services/DemoAccountsService/index.ts +1 -1
- package/lib/services/{GoogleAuthService.d.ts → GoogleAuth.service.d.ts} +2 -8
- package/lib/services/GoogleAuth.service.d.ts.map +1 -0
- package/lib/services/{GoogleAuthService.js → GoogleAuth.service.js} +6 -6
- package/lib/services/GoogleAuth.service.js.map +1 -0
- package/lib/services/{GoogleAuthService.ts → GoogleAuth.service.ts} +5 -5
- package/lib/services/{MigrationService.d.ts → Migration.service.d.ts} +1 -1
- package/lib/services/Migration.service.d.ts.map +1 -0
- package/lib/services/{MigrationService.js → Migration.service.js} +1 -1
- package/lib/services/Migration.service.js.map +1 -0
- package/lib/services/{RepoSubscriptionService.d.ts → RepoSubscription.service.d.ts} +1 -1
- package/lib/services/RepoSubscription.service.d.ts.map +1 -0
- package/lib/services/{RepoSubscriptionService.js → RepoSubscription.service.js} +1 -1
- package/lib/services/RepoSubscription.service.js.map +1 -0
- package/lib/util/DbOperationMetaData.d.ts +1 -4
- package/lib/util/DbOperationMetaData.d.ts.map +1 -1
- package/lib/util/DbOperationMetaData.js +12 -12
- package/lib/util/DbOperationMetaData.js.map +1 -1
- package/lib/util/DbOperationMetaData.ts +12 -12
- package/lib/util/DocumentDb.d.ts +1 -9
- package/lib/util/DocumentDb.d.ts.map +1 -1
- package/lib/util/DocumentDb.js +14 -14
- package/lib/util/DocumentDb.js.map +1 -1
- package/lib/util/DocumentDb.ts +14 -14
- package/lib/validators/common/UserValidator.d.ts +1 -8
- package/lib/validators/common/UserValidator.d.ts.map +1 -1
- package/lib/validators/common/UserValidator.js +3 -3
- package/lib/validators/common/UserValidator.js.map +1 -1
- package/lib/validators/common/UserValidator.ts +3 -3
- package/package.json +9 -7
- package/lib/services/DemoAccountsService/DashboardDemoAccountsService.d.ts +0 -72
- package/lib/services/DemoAccountsService/DashboardDemoAccountsService.d.ts.map +0 -1
- package/lib/services/DemoAccountsService/DashboardDemoAccountsService.js.map +0 -1
- package/lib/services/DemoAccountsService/DemoAccountsService.d.ts.map +0 -1
- package/lib/services/DemoAccountsService/DemoAccountsService.js.map +0 -1
- package/lib/services/GoogleAuthService.d.ts.map +0 -1
- package/lib/services/GoogleAuthService.js.map +0 -1
- package/lib/services/MigrationService.d.ts.map +0 -1
- package/lib/services/MigrationService.js.map +0 -1
- package/lib/services/RepoSubscriptionService.d.ts.map +0 -1
- package/lib/services/RepoSubscriptionService.js.map +0 -1
- /package/lib/services/{MigrationService.ts → Migration.service.ts} +0 -0
- /package/lib/services/{RepoSubscriptionService.ts → RepoSubscription.service.ts} +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { User, WorkoutMicrocycle, WorkoutSession } from '@aneuhold/core-ts-db-lib';
|
|
2
2
|
import type { UUID } from 'crypto';
|
|
3
|
-
import type { RepoListeners } from '../../services/
|
|
3
|
+
import type { RepoListeners } from '../../services/RepoSubscription.service.js';
|
|
4
4
|
import type DbOperationMetaData from '../../util/DbOperationMetaData.js';
|
|
5
5
|
import WorkoutBaseWithUserIdRepository from './WorkoutBaseWithUserIdRepository.js';
|
|
6
6
|
/**
|
|
7
7
|
* The repository that contains {@link WorkoutSession} documents.
|
|
8
8
|
*/
|
|
9
9
|
export default class WorkoutSessionRepository extends WorkoutBaseWithUserIdRepository<WorkoutSession> {
|
|
10
|
-
private
|
|
10
|
+
#private;
|
|
11
11
|
private constructor();
|
|
12
12
|
static getListenersForUserRepo(): RepoListeners<User>;
|
|
13
13
|
static getListenersForMicrocycleRepo(): RepoListeners<WorkoutMicrocycle>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkoutSessionRepository.d.ts","sourceRoot":"","sources":["../../../src/repositories/workout/WorkoutSessionRepository.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAExF,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"WorkoutSessionRepository.d.ts","sourceRoot":"","sources":["../../../src/repositories/workout/WorkoutSessionRepository.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAExF,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAChF,OAAO,KAAK,mBAAmB,MAAM,mCAAmC,CAAC;AAEzE,OAAO,+BAA+B,MAAM,sCAAsC,CAAC;AAGnF;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,wBAAyB,SAAQ,+BAA+B,CAAC,cAAc,CAAC;;IAGnG,OAAO;IAIP,MAAM,CAAC,uBAAuB,IAAI,aAAa,CAAC,IAAI,CAAC;IAYrD,MAAM,CAAC,6BAA6B,IAAI,aAAa,CAAC,iBAAiB,CAAC;IAYxE,SAAS,CAAC,gBAAgB,IAAI,IAAI;IAIlC;;;;;OAKG;IACG,sBAAsB,CAAC,YAAY,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;IAI3F;;;;;OAKG;IACG,uBAAuB,CAAC,aAAa,EAAE,IAAI,EAAE,EAAE,IAAI,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;WAgBjF,OAAO,IAAI,wBAAwB;CAMlD"}
|
|
@@ -6,7 +6,7 @@ import WorkoutSessionExerciseRepository from './WorkoutSessionExerciseRepository
|
|
|
6
6
|
* The repository that contains {@link WorkoutSession} documents.
|
|
7
7
|
*/
|
|
8
8
|
export default class WorkoutSessionRepository extends WorkoutBaseWithUserIdRepository {
|
|
9
|
-
static singletonInstance;
|
|
9
|
+
static #singletonInstance;
|
|
10
10
|
constructor() {
|
|
11
11
|
super(WorkoutSession_docType, new WorkoutSessionValidator());
|
|
12
12
|
}
|
|
@@ -63,10 +63,10 @@ export default class WorkoutSessionRepository extends WorkoutBaseWithUserIdRepos
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
static getRepo() {
|
|
66
|
-
if (!WorkoutSessionRepository
|
|
67
|
-
WorkoutSessionRepository
|
|
66
|
+
if (!WorkoutSessionRepository.#singletonInstance) {
|
|
67
|
+
WorkoutSessionRepository.#singletonInstance = new WorkoutSessionRepository();
|
|
68
68
|
}
|
|
69
|
-
return WorkoutSessionRepository
|
|
69
|
+
return WorkoutSessionRepository.#singletonInstance;
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
//# sourceMappingURL=WorkoutSessionRepository.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkoutSessionRepository.js","sourceRoot":"","sources":["../../../src/repositories/workout/WorkoutSessionRepository.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAIlE,OAAO,uBAAuB,MAAM,8CAA8C,CAAC;AACnF,OAAO,+BAA+B,MAAM,sCAAsC,CAAC;AACnF,OAAO,gCAAgC,MAAM,uCAAuC,CAAC;AAErF;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,wBAAyB,SAAQ,+BAA+C;
|
|
1
|
+
{"version":3,"file":"WorkoutSessionRepository.js","sourceRoot":"","sources":["../../../src/repositories/workout/WorkoutSessionRepository.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAIlE,OAAO,uBAAuB,MAAM,8CAA8C,CAAC;AACnF,OAAO,+BAA+B,MAAM,sCAAsC,CAAC;AACnF,OAAO,gCAAgC,MAAM,uCAAuC,CAAC;AAErF;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,wBAAyB,SAAQ,+BAA+C;IACnG,MAAM,CAAC,kBAAkB,CAA4B;IAErD;QACE,KAAK,CAAC,sBAAsB,EAAE,IAAI,uBAAuB,EAAE,CAAC,CAAC;IAC/D,CAAC;IAED,MAAM,CAAC,uBAAuB;QAC5B,MAAM,WAAW,GAAG,wBAAwB,CAAC,OAAO,EAAE,CAAC;QACvD,OAAO;YACL,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE;gBAChC,MAAM,WAAW,CAAC,gBAAgB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;YACnD,CAAC;YACD,UAAU,EAAE,KAAK,EAAE,OAAO,EAA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AAM,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QACtC,CAAC;IACH,CAAC;IAEM,MAAM,CAAC,OAAO;QACnB,IAAI,CAAC,wBAAwB,CAAC,kBAAkB,EAAE,CAAC;YACjD,wBAAwB,CAAC,kBAAkB,GAAG,IAAI,wBAAwB,EAAE,CAAC;QAC/E,CAAC;QACD,OAAO,wBAAwB,CAAC,kBAAkB,CAAC;IACrD,CAAC;CACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { User, WorkoutMicrocycle, WorkoutSession } from '@aneuhold/core-ts-db-lib';
|
|
2
2
|
import { WorkoutSession_docType } from '@aneuhold/core-ts-db-lib';
|
|
3
3
|
import type { UUID } from 'crypto';
|
|
4
|
-
import type { RepoListeners } from '../../services/
|
|
4
|
+
import type { RepoListeners } from '../../services/RepoSubscription.service.js';
|
|
5
5
|
import type DbOperationMetaData from '../../util/DbOperationMetaData.js';
|
|
6
6
|
import WorkoutSessionValidator from '../../validators/workout/SessionValidator.js';
|
|
7
7
|
import WorkoutBaseWithUserIdRepository from './WorkoutBaseWithUserIdRepository.js';
|
|
@@ -11,7 +11,7 @@ import WorkoutSessionExerciseRepository from './WorkoutSessionExerciseRepository
|
|
|
11
11
|
* The repository that contains {@link WorkoutSession} documents.
|
|
12
12
|
*/
|
|
13
13
|
export default class WorkoutSessionRepository extends WorkoutBaseWithUserIdRepository<WorkoutSession> {
|
|
14
|
-
|
|
14
|
+
static #singletonInstance?: WorkoutSessionRepository;
|
|
15
15
|
|
|
16
16
|
private constructor() {
|
|
17
17
|
super(WorkoutSession_docType, new WorkoutSessionValidator());
|
|
@@ -78,9 +78,9 @@ export default class WorkoutSessionRepository extends WorkoutBaseWithUserIdRepos
|
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
public static getRepo(): WorkoutSessionRepository {
|
|
81
|
-
if (!WorkoutSessionRepository
|
|
82
|
-
WorkoutSessionRepository
|
|
81
|
+
if (!WorkoutSessionRepository.#singletonInstance) {
|
|
82
|
+
WorkoutSessionRepository.#singletonInstance = new WorkoutSessionRepository();
|
|
83
83
|
}
|
|
84
|
-
return WorkoutSessionRepository
|
|
84
|
+
return WorkoutSessionRepository.#singletonInstance;
|
|
85
85
|
}
|
|
86
86
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { User, WorkoutSessionExercise, WorkoutSet } from '@aneuhold/core-ts-db-lib';
|
|
2
2
|
import type { UUID } from 'crypto';
|
|
3
|
-
import type { RepoListeners } from '../../services/
|
|
3
|
+
import type { RepoListeners } from '../../services/RepoSubscription.service.js';
|
|
4
4
|
import type DbOperationMetaData from '../../util/DbOperationMetaData.js';
|
|
5
5
|
import WorkoutBaseWithUserIdRepository from './WorkoutBaseWithUserIdRepository.js';
|
|
6
6
|
/**
|
|
7
7
|
* The repository that contains {@link WorkoutSet} documents.
|
|
8
8
|
*/
|
|
9
9
|
export default class WorkoutSetRepository extends WorkoutBaseWithUserIdRepository<WorkoutSet> {
|
|
10
|
-
private
|
|
10
|
+
#private;
|
|
11
11
|
private constructor();
|
|
12
12
|
static getListenersForUserRepo(): RepoListeners<User>;
|
|
13
13
|
static getListenersForSessionExerciseRepo(): RepoListeners<WorkoutSessionExercise>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkoutSetRepository.d.ts","sourceRoot":"","sources":["../../../src/repositories/workout/WorkoutSetRepository.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,sBAAsB,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEzF,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"WorkoutSetRepository.d.ts","sourceRoot":"","sources":["../../../src/repositories/workout/WorkoutSetRepository.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,sBAAsB,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEzF,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAChF,OAAO,KAAK,mBAAmB,MAAM,mCAAmC,CAAC;AAEzE,OAAO,+BAA+B,MAAM,sCAAsC,CAAC;AAEnF;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,+BAA+B,CAAC,UAAU,CAAC;;IAG3F,OAAO;IAIP,MAAM,CAAC,uBAAuB,IAAI,aAAa,CAAC,IAAI,CAAC;IAYrD,MAAM,CAAC,kCAAkC,IAAI,aAAa,CAAC,sBAAsB,CAAC;IAYlF,SAAS,CAAC,gBAAgB,IAAI,IAAI;IAElC;;;;;OAKG;IACG,2BAA2B,CAC/B,iBAAiB,EAAE,IAAI,EACvB,IAAI,CAAC,EAAE,mBAAmB,GACzB,OAAO,CAAC,IAAI,CAAC;IAIhB;;;;;OAKG;IACG,4BAA4B,CAChC,kBAAkB,EAAE,IAAI,EAAE,EAC1B,IAAI,CAAC,EAAE,mBAAmB,GACzB,OAAO,CAAC,IAAI,CAAC;WAgBF,OAAO,IAAI,oBAAoB;CAM9C"}
|
|
@@ -5,7 +5,7 @@ import WorkoutBaseWithUserIdRepository from './WorkoutBaseWithUserIdRepository.j
|
|
|
5
5
|
* The repository that contains {@link WorkoutSet} documents.
|
|
6
6
|
*/
|
|
7
7
|
export default class WorkoutSetRepository extends WorkoutBaseWithUserIdRepository {
|
|
8
|
-
static singletonInstance;
|
|
8
|
+
static #singletonInstance;
|
|
9
9
|
constructor() {
|
|
10
10
|
super(WorkoutSet_docType, new WorkoutSetValidator());
|
|
11
11
|
}
|
|
@@ -60,10 +60,10 @@ export default class WorkoutSetRepository extends WorkoutBaseWithUserIdRepositor
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
static getRepo() {
|
|
63
|
-
if (!WorkoutSetRepository
|
|
64
|
-
WorkoutSetRepository
|
|
63
|
+
if (!WorkoutSetRepository.#singletonInstance) {
|
|
64
|
+
WorkoutSetRepository.#singletonInstance = new WorkoutSetRepository();
|
|
65
65
|
}
|
|
66
|
-
return WorkoutSetRepository
|
|
66
|
+
return WorkoutSetRepository.#singletonInstance;
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
//# sourceMappingURL=WorkoutSetRepository.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkoutSetRepository.js","sourceRoot":"","sources":["../../../src/repositories/workout/WorkoutSetRepository.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAI9D,OAAO,mBAAmB,MAAM,0CAA0C,CAAC;AAC3E,OAAO,+BAA+B,MAAM,sCAAsC,CAAC;AAEnF;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,+BAA2C;
|
|
1
|
+
{"version":3,"file":"WorkoutSetRepository.js","sourceRoot":"","sources":["../../../src/repositories/workout/WorkoutSetRepository.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAI9D,OAAO,mBAAmB,MAAM,0CAA0C,CAAC;AAC3E,OAAO,+BAA+B,MAAM,sCAAsC,CAAC;AAEnF;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,+BAA2C;IAC3F,MAAM,CAAC,kBAAkB,CAAwB;IAEjD;QACE,KAAK,CAAC,kBAAkB,EAAE,IAAI,mBAAmB,EAAE,CAAC,CAAC;IACvD,CAAC;IAED,MAAM,CAAC,uBAAuB;QAC5B,MAAM,OAAO,GAAG,oBAAoB,CAAC,OAAO,EAAE,CAAC;QAC/C,OAAO;YACL,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE;gBAChC,MAAM,OAAO,CAAC,gBAAgB,CAAC,MAAM,EAAE,IA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AE,CAAC;YACtB,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QACtC,CAAC;IACH,CAAC;IAEM,MAAM,CAAC,OAAO;QACnB,IAAI,CAAC,oBAAoB,CAAC,kBAAkB,EAAE,CAAC;YAC7C,oBAAoB,CAAC,kBAAkB,GAAG,IAAI,oBAAoB,EAAE,CAAC;QACvE,CAAC;QACD,OAAO,oBAAoB,CAAC,kBAAkB,CAAC;IACjD,CAAC;CACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { User, WorkoutSessionExercise, WorkoutSet } from '@aneuhold/core-ts-db-lib';
|
|
2
2
|
import { WorkoutSet_docType } from '@aneuhold/core-ts-db-lib';
|
|
3
3
|
import type { UUID } from 'crypto';
|
|
4
|
-
import type { RepoListeners } from '../../services/
|
|
4
|
+
import type { RepoListeners } from '../../services/RepoSubscription.service.js';
|
|
5
5
|
import type DbOperationMetaData from '../../util/DbOperationMetaData.js';
|
|
6
6
|
import WorkoutSetValidator from '../../validators/workout/SetValidator.js';
|
|
7
7
|
import WorkoutBaseWithUserIdRepository from './WorkoutBaseWithUserIdRepository.js';
|
|
@@ -10,7 +10,7 @@ import WorkoutBaseWithUserIdRepository from './WorkoutBaseWithUserIdRepository.j
|
|
|
10
10
|
* The repository that contains {@link WorkoutSet} documents.
|
|
11
11
|
*/
|
|
12
12
|
export default class WorkoutSetRepository extends WorkoutBaseWithUserIdRepository<WorkoutSet> {
|
|
13
|
-
|
|
13
|
+
static #singletonInstance?: WorkoutSetRepository;
|
|
14
14
|
|
|
15
15
|
private constructor() {
|
|
16
16
|
super(WorkoutSet_docType, new WorkoutSetValidator());
|
|
@@ -81,9 +81,9 @@ export default class WorkoutSetRepository extends WorkoutBaseWithUserIdRepositor
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
public static getRepo(): WorkoutSetRepository {
|
|
84
|
-
if (!WorkoutSetRepository
|
|
85
|
-
WorkoutSetRepository
|
|
84
|
+
if (!WorkoutSetRepository.#singletonInstance) {
|
|
85
|
+
WorkoutSetRepository.#singletonInstance = new WorkoutSetRepository();
|
|
86
86
|
}
|
|
87
|
-
return WorkoutSetRepository
|
|
87
|
+
return WorkoutSetRepository.#singletonInstance;
|
|
88
88
|
}
|
|
89
89
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { UUID } from 'crypto';
|
|
2
|
+
/**
|
|
3
|
+
* Dashboard-specific demo seeding utilities.
|
|
4
|
+
*/
|
|
5
|
+
export default class DashboardDemoAccountsService {
|
|
6
|
+
#private;
|
|
7
|
+
/**
|
|
8
|
+
* Seeds the dashboard demo data for two users. This will:
|
|
9
|
+
* - Ensure both users have configs and are collaborators of each other
|
|
10
|
+
* - Reset select config flags (enableDevMode, useConfettiForTasks, catImageOnHomePage)
|
|
11
|
+
* - Wipe all tasks owned by either user
|
|
12
|
+
* - Create example tasks (shared, nested, completed, with tags)
|
|
13
|
+
*
|
|
14
|
+
* Safe to re-run; will produce the same end state.
|
|
15
|
+
*
|
|
16
|
+
* @param demoUser1Id The first user
|
|
17
|
+
* @param demoUser2Id The second user
|
|
18
|
+
*/
|
|
19
|
+
static seedDemoAccounts(demoUser1Id: UUID, demoUser2Id: UUID): Promise<void>;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=DashboardDemoAccounts.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DashboardDemoAccounts.service.d.ts","sourceRoot":"","sources":["../../../src/services/DemoAccountsService/DashboardDemoAccounts.service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAInC;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,4BAA4B;;IAiB/C;;;;;;;;;;;OAWG;WACU,gBAAgB,CAAC,WAAW,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;CA2NnF"}
|
|
@@ -9,7 +9,7 @@ export default class DashboardDemoAccountsService {
|
|
|
9
9
|
* Default priorities for known demo tags. If a tag is not listed here,
|
|
10
10
|
* a fallback priority will be used.
|
|
11
11
|
*/
|
|
12
|
-
static TAG_PRIORITY = {
|
|
12
|
+
static #TAG_PRIORITY = {
|
|
13
13
|
planning: 9,
|
|
14
14
|
fun: 8,
|
|
15
15
|
booking: 7,
|
|
@@ -33,13 +33,13 @@ export default class DashboardDemoAccountsService {
|
|
|
33
33
|
* @param demoUser2Id The second user
|
|
34
34
|
*/
|
|
35
35
|
static async seedDemoAccounts(demoUser1Id, demoUser2Id) {
|
|
36
|
-
await this
|
|
37
|
-
await this
|
|
38
|
-
await this
|
|
36
|
+
await this.#ensureCollaboratorsAndResetConfig(demoUser1Id, demoUser2Id);
|
|
37
|
+
await this.#ensureCollaboratorsAndResetConfig(demoUser2Id, demoUser1Id);
|
|
38
|
+
await this.#wipeTasksForUsers([demoUser1Id, demoUser2Id]);
|
|
39
39
|
// Create shared tasks (visible to both users) exactly once
|
|
40
|
-
await this
|
|
40
|
+
await this.#createExampleTasks(demoUser1Id, demoUser2Id);
|
|
41
41
|
// Create non-shared tasks for each user
|
|
42
|
-
await this
|
|
42
|
+
await this.#createNonSharedTasks(demoUser1Id, demoUser2Id);
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
45
45
|
* Ensures user has a config with the collaborator, and resets specific flags.
|
|
@@ -47,7 +47,7 @@ export default class DashboardDemoAccountsService {
|
|
|
47
47
|
* @param ownerId The config owner
|
|
48
48
|
* @param collaboratorId The collaborator to include
|
|
49
49
|
*/
|
|
50
|
-
static async ensureCollaboratorsAndResetConfig(ownerId, collaboratorId) {
|
|
50
|
+
static async #ensureCollaboratorsAndResetConfig(ownerId, collaboratorId) {
|
|
51
51
|
const cfgRepo = DashboardUserConfigRepository.getRepo();
|
|
52
52
|
let cfg = await cfgRepo.getForUser(ownerId);
|
|
53
53
|
let isNew = false;
|
|
@@ -62,7 +62,7 @@ export default class DashboardDemoAccountsService {
|
|
|
62
62
|
cfg.enabledFeatures.catImageOnHomePage = false;
|
|
63
63
|
// Reset tag settings and seed priorities for demo tags
|
|
64
64
|
cfg.tagSettings = {};
|
|
65
|
-
for (const [tag, priority] of Object.entries(this
|
|
65
|
+
for (const [tag, priority] of Object.entries(this.#TAG_PRIORITY)) {
|
|
66
66
|
cfg.tagSettings[tag] = { priority };
|
|
67
67
|
}
|
|
68
68
|
if (isNew) {
|
|
@@ -78,7 +78,7 @@ export default class DashboardDemoAccountsService {
|
|
|
78
78
|
*
|
|
79
79
|
* @param userIds The users to wipe tasks for
|
|
80
80
|
*/
|
|
81
|
-
static async wipeTasksForUsers(userIds) {
|
|
81
|
+
static async #wipeTasksForUsers(userIds) {
|
|
82
82
|
const taskRepo = DashboardTaskRepository.getRepo();
|
|
83
83
|
// Delete per-user using repo.deleteList to leverage child cleanup logic.
|
|
84
84
|
for (const userId of userIds) {
|
|
@@ -108,7 +108,7 @@ export default class DashboardDemoAccountsService {
|
|
|
108
108
|
* @param opts.dueDate Optional due date
|
|
109
109
|
* @param opts.category System category
|
|
110
110
|
*/
|
|
111
|
-
static async createTask(ownerId, title, opts) {
|
|
111
|
+
static async #createTask(ownerId, title, opts) {
|
|
112
112
|
const taskRepo = DashboardTaskRepository.getRepo();
|
|
113
113
|
const task = DashboardTaskSchema.parse({ userId: ownerId });
|
|
114
114
|
task.title = title;
|
|
@@ -138,35 +138,35 @@ export default class DashboardDemoAccountsService {
|
|
|
138
138
|
* @param user1Id The primary owner of some shared tasks
|
|
139
139
|
* @param user2Id The collaborator for shared tasks
|
|
140
140
|
*/
|
|
141
|
-
static async createExampleTasks(user1Id, user2Id) {
|
|
141
|
+
static async #createExampleTasks(user1Id, user2Id) {
|
|
142
142
|
// Shared parent task (owned by user1, shared with user2)
|
|
143
|
-
const parent = await this
|
|
143
|
+
const parent = await this.#createTask(user1Id, 'Plan weekend trip', {
|
|
144
144
|
description: 'Decide destination and plan activities for the weekend.',
|
|
145
145
|
sharedWith: [user2Id],
|
|
146
146
|
tags: ['planning', 'fun']
|
|
147
147
|
});
|
|
148
|
-
const child1 = await this
|
|
148
|
+
const child1 = await this.#createTask(user1Id, 'Book hotel', {
|
|
149
149
|
parentTaskId: parent._id,
|
|
150
150
|
tags: ['booking']
|
|
151
151
|
});
|
|
152
|
-
await this
|
|
152
|
+
await this.#createTask(user1Id, 'Create itinerary', {
|
|
153
153
|
parentTaskId: parent._id,
|
|
154
154
|
tags: ['planning']
|
|
155
155
|
});
|
|
156
|
-
await this
|
|
157
|
-
await this
|
|
156
|
+
await this.#createTask(user1Id, 'Pack bags', { parentTaskId: parent._id });
|
|
157
|
+
await this.#createTask(user1Id, 'Buy snacks', {
|
|
158
158
|
parentTaskId: child1._id,
|
|
159
159
|
completed: true,
|
|
160
160
|
tags: ['food']
|
|
161
161
|
});
|
|
162
162
|
// Shared task assigned to user2 (owned by user1)
|
|
163
|
-
await this
|
|
163
|
+
await this.#createTask(user1Id, 'Buy groceries for BBQ', {
|
|
164
164
|
sharedWith: [user2Id],
|
|
165
165
|
assignedTo: user2Id,
|
|
166
166
|
tags: ['home', 'bbq']
|
|
167
167
|
});
|
|
168
168
|
// A shared planning task owned by user2
|
|
169
|
-
await this
|
|
169
|
+
await this.#createTask(user2Id, 'Plan potluck dinner', {
|
|
170
170
|
sharedWith: [user1Id],
|
|
171
171
|
assignedTo: user1Id,
|
|
172
172
|
tags: ['food', 'planning']
|
|
@@ -178,7 +178,7 @@ export default class DashboardDemoAccountsService {
|
|
|
178
178
|
* @param user1Id The first user
|
|
179
179
|
* @param user2Id The second user
|
|
180
180
|
*/
|
|
181
|
-
static async createNonSharedTasks(user1Id, user2Id) {
|
|
181
|
+
static async #createNonSharedTasks(user1Id, user2Id) {
|
|
182
182
|
const now = new Date();
|
|
183
183
|
const futureDue = new Date(now.getTime());
|
|
184
184
|
futureDue.setMonth(futureDue.getMonth() + 4);
|
|
@@ -187,43 +187,43 @@ export default class DashboardDemoAccountsService {
|
|
|
187
187
|
pastDue.setDate(pastDue.getDate() - 7);
|
|
188
188
|
pastDueStart.setDate(pastDueStart.getDate() - 14);
|
|
189
189
|
// User 1: A completed solo task
|
|
190
|
-
await this
|
|
190
|
+
await this.#createTask(user1Id, 'Renew car registration', {
|
|
191
191
|
completed: true,
|
|
192
192
|
tags: ['admin']
|
|
193
193
|
});
|
|
194
194
|
// User 2: Own parent task with subtasks (not shared)
|
|
195
|
-
const u2Parent = await this
|
|
195
|
+
const u2Parent = await this.#createTask(user2Id, 'Home improvement project', {
|
|
196
196
|
description: 'Small updates around the house.',
|
|
197
197
|
tags: ['home']
|
|
198
198
|
});
|
|
199
|
-
await this
|
|
199
|
+
await this.#createTask(user2Id, 'Paint living room walls', {
|
|
200
200
|
parentTaskId: u2Parent._id,
|
|
201
201
|
completed: true,
|
|
202
202
|
tags: ['paint']
|
|
203
203
|
});
|
|
204
|
-
await this
|
|
204
|
+
await this.#createTask(user2Id, 'Replace light fixtures', {
|
|
205
205
|
parentTaskId: u2Parent._id,
|
|
206
206
|
tags: ['electric']
|
|
207
207
|
});
|
|
208
208
|
// Root task with a future due date (>= 4 months out)
|
|
209
|
-
await this
|
|
209
|
+
await this.#createTask(user1Id, 'Schedule annual physical', {
|
|
210
210
|
description: 'Book an appointment and add to calendar.',
|
|
211
211
|
dueDate: futureDue,
|
|
212
212
|
tags: ['admin']
|
|
213
213
|
});
|
|
214
|
-
await this
|
|
214
|
+
await this.#createTask(user2Id, 'Schedule annual physical', {
|
|
215
215
|
description: 'Book an appointment and add to calendar.',
|
|
216
216
|
dueDate: futureDue,
|
|
217
217
|
tags: ['admin']
|
|
218
218
|
});
|
|
219
219
|
// Past-due task
|
|
220
|
-
await this
|
|
220
|
+
await this.#createTask(user1Id, 'Submit expense report', {
|
|
221
221
|
description: 'Collect receipts and submit to finance.',
|
|
222
222
|
startDate: pastDueStart,
|
|
223
223
|
dueDate: pastDue,
|
|
224
224
|
tags: ['admin']
|
|
225
225
|
});
|
|
226
|
-
await this
|
|
226
|
+
await this.#createTask(user2Id, 'Submit expense report', {
|
|
227
227
|
description: 'Collect receipts and submit to finance.',
|
|
228
228
|
startDate: pastDueStart,
|
|
229
229
|
dueDate: pastDue,
|
|
@@ -231,4 +231,4 @@ export default class DashboardDemoAccountsService {
|
|
|
231
231
|
});
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
|
-
//# sourceMappingURL=
|
|
234
|
+
//# sourceMappingURL=DashboardDemoAccounts.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DashboardDemoAccounts.service.js","sourceRoot":"","sources":["../../../src/services/DemoAccountsService/DashboardDemoAccounts.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAE1F,OAAO,uBAAuB,MAAM,yDAAyD,CAAC;AAC9F,OAAO,6BAA6B,MAAM,+DAA+D,CAAC;AAE1G;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,4BAA4B;IAC/C;;;OAGG;IACH,MAAM,CAAU,aAAa,GAA2B;QACtD,QAAQ,EAAE,CAAC;QACX,GAAG,EAAE,CAAC;QACN,OAAO,EAAE,CAAC;QACV,IAAI,EAAE,CAAC;QACP,IAAI,EAAE,CAAC;QACP,GAAG,EAAE,CAAC;QACN,KAAK,EAAE,CAAC;QACR,KAAK,EAAE,CAAC;QACR,QAAQ,EAAE,CAAC;KACZ,CAAC;IAEF;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC,WAAiB,EAAE,WAAiB;QAChE,MAAM,IAAI,CAAC,kCAAkC,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;QACxE,MAAM,IAAI,CAAC,kCAAkC,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;QAExE,MAAM,IAAI,CAAC,kBAAkB,CAAC,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC;QAE1D,2DAA2D;QAC3D,MAAM,I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,CAAC,OAAO,CAAC;SAChB,CAAC,CAAC;QACH,MAAM,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,uBAAuB,EAAE;YACvD,WAAW,EAAE,yCAAyC;YACtD,SAAS,EAAE,YAAY;YACvB,OAAO,EAAE,OAAO;YAChB,IAAI,EAAE,CAAC,OAAO,CAAC;SAChB,CAAC,CAAC;IACL,CAAC"}
|
|
@@ -12,7 +12,7 @@ export default class DashboardDemoAccountsService {
|
|
|
12
12
|
* Default priorities for known demo tags. If a tag is not listed here,
|
|
13
13
|
* a fallback priority will be used.
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
static readonly #TAG_PRIORITY: Record<string, number> = {
|
|
16
16
|
planning: 9,
|
|
17
17
|
fun: 8,
|
|
18
18
|
booking: 7,
|
|
@@ -37,15 +37,15 @@ export default class DashboardDemoAccountsService {
|
|
|
37
37
|
* @param demoUser2Id The second user
|
|
38
38
|
*/
|
|
39
39
|
static async seedDemoAccounts(demoUser1Id: UUID, demoUser2Id: UUID): Promise<void> {
|
|
40
|
-
await this
|
|
41
|
-
await this
|
|
40
|
+
await this.#ensureCollaboratorsAndResetConfig(demoUser1Id, demoUser2Id);
|
|
41
|
+
await this.#ensureCollaboratorsAndResetConfig(demoUser2Id, demoUser1Id);
|
|
42
42
|
|
|
43
|
-
await this
|
|
43
|
+
await this.#wipeTasksForUsers([demoUser1Id, demoUser2Id]);
|
|
44
44
|
|
|
45
45
|
// Create shared tasks (visible to both users) exactly once
|
|
46
|
-
await this
|
|
46
|
+
await this.#createExampleTasks(demoUser1Id, demoUser2Id);
|
|
47
47
|
// Create non-shared tasks for each user
|
|
48
|
-
await this
|
|
48
|
+
await this.#createNonSharedTasks(demoUser1Id, demoUser2Id);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
/**
|
|
@@ -54,7 +54,7 @@ export default class DashboardDemoAccountsService {
|
|
|
54
54
|
* @param ownerId The config owner
|
|
55
55
|
* @param collaboratorId The collaborator to include
|
|
56
56
|
*/
|
|
57
|
-
|
|
57
|
+
static async #ensureCollaboratorsAndResetConfig(
|
|
58
58
|
ownerId: UUID,
|
|
59
59
|
collaboratorId: UUID
|
|
60
60
|
): Promise<void> {
|
|
@@ -72,7 +72,7 @@ export default class DashboardDemoAccountsService {
|
|
|
72
72
|
cfg.enabledFeatures.catImageOnHomePage = false;
|
|
73
73
|
// Reset tag settings and seed priorities for demo tags
|
|
74
74
|
cfg.tagSettings = {};
|
|
75
|
-
for (const [tag, priority] of Object.entries(this
|
|
75
|
+
for (const [tag, priority] of Object.entries(this.#TAG_PRIORITY)) {
|
|
76
76
|
cfg.tagSettings[tag] = { priority };
|
|
77
77
|
}
|
|
78
78
|
if (isNew) {
|
|
@@ -88,7 +88,7 @@ export default class DashboardDemoAccountsService {
|
|
|
88
88
|
*
|
|
89
89
|
* @param userIds The users to wipe tasks for
|
|
90
90
|
*/
|
|
91
|
-
|
|
91
|
+
static async #wipeTasksForUsers(userIds: UUID[]): Promise<void> {
|
|
92
92
|
const taskRepo = DashboardTaskRepository.getRepo();
|
|
93
93
|
// Delete per-user using repo.deleteList to leverage child cleanup logic.
|
|
94
94
|
for (const userId of userIds) {
|
|
@@ -118,7 +118,7 @@ export default class DashboardDemoAccountsService {
|
|
|
118
118
|
* @param opts.dueDate Optional due date
|
|
119
119
|
* @param opts.category System category
|
|
120
120
|
*/
|
|
121
|
-
|
|
121
|
+
static async #createTask(
|
|
122
122
|
ownerId: UUID,
|
|
123
123
|
title: string,
|
|
124
124
|
opts?: {
|
|
@@ -156,37 +156,37 @@ export default class DashboardDemoAccountsService {
|
|
|
156
156
|
* @param user1Id The primary owner of some shared tasks
|
|
157
157
|
* @param user2Id The collaborator for shared tasks
|
|
158
158
|
*/
|
|
159
|
-
|
|
159
|
+
static async #createExampleTasks(user1Id: UUID, user2Id: UUID) {
|
|
160
160
|
// Shared parent task (owned by user1, shared with user2)
|
|
161
|
-
const parent = await this
|
|
161
|
+
const parent = await this.#createTask(user1Id, 'Plan weekend trip', {
|
|
162
162
|
description: 'Decide destination and plan activities for the weekend.',
|
|
163
163
|
sharedWith: [user2Id],
|
|
164
164
|
tags: ['planning', 'fun']
|
|
165
165
|
});
|
|
166
|
-
const child1 = await this
|
|
166
|
+
const child1 = await this.#createTask(user1Id, 'Book hotel', {
|
|
167
167
|
parentTaskId: parent._id,
|
|
168
168
|
tags: ['booking']
|
|
169
169
|
});
|
|
170
|
-
await this
|
|
170
|
+
await this.#createTask(user1Id, 'Create itinerary', {
|
|
171
171
|
parentTaskId: parent._id,
|
|
172
172
|
tags: ['planning']
|
|
173
173
|
});
|
|
174
|
-
await this
|
|
175
|
-
await this
|
|
174
|
+
await this.#createTask(user1Id, 'Pack bags', { parentTaskId: parent._id });
|
|
175
|
+
await this.#createTask(user1Id, 'Buy snacks', {
|
|
176
176
|
parentTaskId: child1._id,
|
|
177
177
|
completed: true,
|
|
178
178
|
tags: ['food']
|
|
179
179
|
});
|
|
180
180
|
|
|
181
181
|
// Shared task assigned to user2 (owned by user1)
|
|
182
|
-
await this
|
|
182
|
+
await this.#createTask(user1Id, 'Buy groceries for BBQ', {
|
|
183
183
|
sharedWith: [user2Id],
|
|
184
184
|
assignedTo: user2Id,
|
|
185
185
|
tags: ['home', 'bbq']
|
|
186
186
|
});
|
|
187
187
|
|
|
188
188
|
// A shared planning task owned by user2
|
|
189
|
-
await this
|
|
189
|
+
await this.#createTask(user2Id, 'Plan potluck dinner', {
|
|
190
190
|
sharedWith: [user1Id],
|
|
191
191
|
assignedTo: user1Id,
|
|
192
192
|
tags: ['food', 'planning']
|
|
@@ -199,7 +199,7 @@ export default class DashboardDemoAccountsService {
|
|
|
199
199
|
* @param user1Id The first user
|
|
200
200
|
* @param user2Id The second user
|
|
201
201
|
*/
|
|
202
|
-
|
|
202
|
+
static async #createNonSharedTasks(user1Id: UUID, user2Id: UUID) {
|
|
203
203
|
const now = new Date();
|
|
204
204
|
const futureDue = new Date(now.getTime());
|
|
205
205
|
futureDue.setMonth(futureDue.getMonth() + 4);
|
|
@@ -209,46 +209,46 @@ export default class DashboardDemoAccountsService {
|
|
|
209
209
|
pastDueStart.setDate(pastDueStart.getDate() - 14);
|
|
210
210
|
|
|
211
211
|
// User 1: A completed solo task
|
|
212
|
-
await this
|
|
212
|
+
await this.#createTask(user1Id, 'Renew car registration', {
|
|
213
213
|
completed: true,
|
|
214
214
|
tags: ['admin']
|
|
215
215
|
});
|
|
216
216
|
|
|
217
217
|
// User 2: Own parent task with subtasks (not shared)
|
|
218
|
-
const u2Parent = await this
|
|
218
|
+
const u2Parent = await this.#createTask(user2Id, 'Home improvement project', {
|
|
219
219
|
description: 'Small updates around the house.',
|
|
220
220
|
tags: ['home']
|
|
221
221
|
});
|
|
222
|
-
await this
|
|
222
|
+
await this.#createTask(user2Id, 'Paint living room walls', {
|
|
223
223
|
parentTaskId: u2Parent._id,
|
|
224
224
|
completed: true,
|
|
225
225
|
tags: ['paint']
|
|
226
226
|
});
|
|
227
|
-
await this
|
|
227
|
+
await this.#createTask(user2Id, 'Replace light fixtures', {
|
|
228
228
|
parentTaskId: u2Parent._id,
|
|
229
229
|
tags: ['electric']
|
|
230
230
|
});
|
|
231
231
|
|
|
232
232
|
// Root task with a future due date (>= 4 months out)
|
|
233
|
-
await this
|
|
233
|
+
await this.#createTask(user1Id, 'Schedule annual physical', {
|
|
234
234
|
description: 'Book an appointment and add to calendar.',
|
|
235
235
|
dueDate: futureDue,
|
|
236
236
|
tags: ['admin']
|
|
237
237
|
});
|
|
238
|
-
await this
|
|
238
|
+
await this.#createTask(user2Id, 'Schedule annual physical', {
|
|
239
239
|
description: 'Book an appointment and add to calendar.',
|
|
240
240
|
dueDate: futureDue,
|
|
241
241
|
tags: ['admin']
|
|
242
242
|
});
|
|
243
243
|
|
|
244
244
|
// Past-due task
|
|
245
|
-
await this
|
|
245
|
+
await this.#createTask(user1Id, 'Submit expense report', {
|
|
246
246
|
description: 'Collect receipts and submit to finance.',
|
|
247
247
|
startDate: pastDueStart,
|
|
248
248
|
dueDate: pastDue,
|
|
249
249
|
tags: ['admin']
|
|
250
250
|
});
|
|
251
|
-
await this
|
|
251
|
+
await this.#createTask(user2Id, 'Submit expense report', {
|
|
252
252
|
description: 'Collect receipts and submit to finance.',
|
|
253
253
|
startDate: pastDueStart,
|
|
254
254
|
dueDate: pastDue,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DemoAccounts.service.d.ts","sourceRoot":"","sources":["../../../src/services/DemoAccountsService/DemoAccounts.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAGnC;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAO,mBAAmB;IACtC;;;;;OAKG;WACU,yBAAyB,CAAC,WAAW,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;CAG5F"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import DashboardDemoAccountsService from './
|
|
1
|
+
import DashboardDemoAccountsService from './DashboardDemoAccounts.service.js';
|
|
2
2
|
/**
|
|
3
3
|
* Entry point for seeding demo accounts across projects.
|
|
4
4
|
*
|
|
@@ -16,4 +16,4 @@ export default class DemoAccountsService {
|
|
|
16
16
|
await DashboardDemoAccountsService.seedDemoAccounts(demoUser1Id, demoUser2Id);
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
//# sourceMappingURL=
|
|
19
|
+
//# sourceMappingURL=DemoAccounts.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DemoAccounts.service.js","sourceRoot":"","sources":["../../../src/services/DemoAccountsService/DemoAccounts.service.ts"],"names":[],"mappings":"AACA,OAAO,4BAA4B,MAAM,oCAAoC,CAAC;AAE9E;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAO,mBAAmB;IACtC;;;;;OAKG;IACH,MAAM,CAAC,KAAK,CAAC,yBAAyB,CAAC,WAAiB,EAAE,WAAiB;QACzE,MAAM,4BAA4B,CAAC,gBAAgB,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;IAChF,CAAC;CACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as DemoAccountsService } from './
|
|
1
|
+
export { default as DemoAccountsService } from './DemoAccounts.service.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/DemoAccountsService/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/DemoAccountsService/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as DemoAccountsService } from './
|
|
1
|
+
export { default as DemoAccountsService } from './DemoAccounts.service.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/services/DemoAccountsService/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/services/DemoAccountsService/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,2BAA2B,CAAC"}
|