forked from jappel/leistungsbilanz-ts
Add external object row assignment command
This commit is contained in:
parent
dac19b093c
commit
1a7dd7fe03
10 changed files with 693 additions and 12 deletions
|
|
@ -171,6 +171,11 @@ import {
|
|||
externalInitialImportCommandType,
|
||||
} from "../models/external-initial-import-project-command.model.js";
|
||||
import type { ExternalInitialImportProjectCommandStore } from "../ports/external-initial-import-project-command.store.js";
|
||||
import {
|
||||
assertExternalObjectRowAssignmentProjectCommand,
|
||||
externalObjectRowAssignmentCommandType,
|
||||
} from "../models/external-object-row-assignment-project-command.model.js";
|
||||
import type { ExternalObjectRowAssignmentProjectCommandStore } from "../ports/external-object-row-assignment-project-command.store.js";
|
||||
|
||||
interface DispatchProjectCommandInput {
|
||||
projectId: string;
|
||||
|
|
@ -207,7 +212,8 @@ export class ProjectCommandService implements ProjectCommandExecutor {
|
|||
private readonly circuitProtectionStore: CircuitProtectionProjectCommandStore,
|
||||
private readonly historyStore: ProjectHistoryStore,
|
||||
private readonly externalCsvConfigurationStore?: ExternalCsvConfigurationProjectCommandStore,
|
||||
private readonly externalInitialImportStore?: ExternalInitialImportProjectCommandStore
|
||||
private readonly externalInitialImportStore?: ExternalInitialImportProjectCommandStore,
|
||||
private readonly externalObjectRowAssignmentStore?: ExternalObjectRowAssignmentProjectCommandStore
|
||||
) {}
|
||||
|
||||
executeUser(
|
||||
|
|
@ -584,6 +590,16 @@ export class ProjectCommandService implements ProjectCommandExecutor {
|
|||
command: input.command,
|
||||
}).revision;
|
||||
}
|
||||
case externalObjectRowAssignmentCommandType: {
|
||||
assertExternalObjectRowAssignmentProjectCommand(input.command);
|
||||
if (!this.externalObjectRowAssignmentStore) {
|
||||
throw new Error("External object row-assignment store is not available.");
|
||||
}
|
||||
return this.externalObjectRowAssignmentStore.execute({
|
||||
...input,
|
||||
command: input.command,
|
||||
}).revision;
|
||||
}
|
||||
case projectStateRestoreCommandType: {
|
||||
assertProjectStateRestoreCommand(input.command);
|
||||
return this.projectStateRestoreStore.execute({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue