Add external object new row command
This commit is contained in:
parent
1a7dd7fe03
commit
347b3717c3
10 changed files with 649 additions and 9 deletions
|
|
@ -176,6 +176,12 @@ import {
|
|||
externalObjectRowAssignmentCommandType,
|
||||
} from "../models/external-object-row-assignment-project-command.model.js";
|
||||
import type { ExternalObjectRowAssignmentProjectCommandStore } from "../ports/external-object-row-assignment-project-command.store.js";
|
||||
import {
|
||||
assertExternalObjectNewRowProjectCommand,
|
||||
externalObjectAssignToNewRowCommandType,
|
||||
externalObjectDeleteCreatedRowCommandType,
|
||||
} from "../models/external-object-new-row-project-command.model.js";
|
||||
import type { ExternalObjectNewRowProjectCommandStore } from "../ports/external-object-new-row-project-command.store.js";
|
||||
|
||||
interface DispatchProjectCommandInput {
|
||||
projectId: string;
|
||||
|
|
@ -213,7 +219,8 @@ export class ProjectCommandService implements ProjectCommandExecutor {
|
|||
private readonly historyStore: ProjectHistoryStore,
|
||||
private readonly externalCsvConfigurationStore?: ExternalCsvConfigurationProjectCommandStore,
|
||||
private readonly externalInitialImportStore?: ExternalInitialImportProjectCommandStore,
|
||||
private readonly externalObjectRowAssignmentStore?: ExternalObjectRowAssignmentProjectCommandStore
|
||||
private readonly externalObjectRowAssignmentStore?: ExternalObjectRowAssignmentProjectCommandStore,
|
||||
private readonly externalObjectNewRowStore?: ExternalObjectNewRowProjectCommandStore
|
||||
) {}
|
||||
|
||||
executeUser(
|
||||
|
|
@ -600,6 +607,17 @@ export class ProjectCommandService implements ProjectCommandExecutor {
|
|||
command: input.command,
|
||||
}).revision;
|
||||
}
|
||||
case externalObjectAssignToNewRowCommandType:
|
||||
case externalObjectDeleteCreatedRowCommandType: {
|
||||
assertExternalObjectNewRowProjectCommand(input.command);
|
||||
if (!this.externalObjectNewRowStore) {
|
||||
throw new Error("External object new-row store is not available.");
|
||||
}
|
||||
return this.externalObjectNewRowStore.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