Skip to content

Commit

Permalink
fixed syncs????
Browse files Browse the repository at this point in the history
  • Loading branch information
Josef552 committed Sep 17, 2024
1 parent 8b9a548 commit 6ab0411
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/utils/formattingUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ export function useFormattingUtils(): FormattingUtils {
}
let first = true;
let formattedSync = '<'
console.log(syncs);
syncs.forEach((sync) => {
if(!first){
formattedSync += ', ';
Expand Down
8 changes: 4 additions & 4 deletions src/view/AutomatonManipulation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -362,19 +362,19 @@ export const AutomatonManipulation: React.FC<ManipulationProps> = (props) => {
);
const handleSyncEditClose = () => setSyncEditOpen(false);

const handleSyncAdd = (syncConstraints: Sync[]) => {
addSync(openedSystems, syncConstraints);
const handleSyncAdd = (syncConstraint: SyncConstraint) => {
addSync(openedSystems, syncConstraint.syncs);
setSyncAddOpen(false);
};

const handleSyncEdit = (
syncConstraints: Sync[],
syncConstraint: SyncConstraint,
prevSync?: SyncConstraint,
) => {
if(!prevSync) {
throw Error('handleSyncEdit: prevSyncId is empty or undefined');
}
editSync(openedSystems, syncConstraints, prevSync);
editSync(openedSystems, syncConstraint.syncs, prevSync);
setSyncEditOpen(false);
};

Expand Down
1 change: 1 addition & 0 deletions src/view/DownloadButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ const createFile = async (currentSystem: SystemOptionType) => {
newLocation += ',' + label;
}
});
hasPrevElem = true;
}
if (hasPrevElem) {
newLocation += ' : ';
Expand Down
3 changes: 2 additions & 1 deletion src/view/ManipulateSyncDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { useSyncConstraintViewModel } from "../viewmodel/SyncConstraintViewModel
import {AutomatonOptionType} from "../viewmodel/OpenedProcesses.ts";
import {SyncsManipulation} from "./SyncsManipulation.tsx";
import {useSyncConstraintUtils} from "../utils/syncConstraintUtils.ts";
import {Sync} from "../model/ta/sync.ts";

Check failure on line 10 in src/view/ManipulateSyncDialog.tsx

View workflow job for this annotation

GitHub Actions / build

'Sync' is declared but its value is never read.

interface ManipulateSyncDialog {
open: boolean;
Expand All @@ -15,7 +16,7 @@ interface ManipulateSyncDialog {
syncPrevVersion?: SyncConstraint;
handleClose: () => void;
handleSubmit: (
syncs: Syncs[],
syncs: SyncConstraint,
prevSync?: SyncConstraint,
) => void;
}
Expand Down

0 comments on commit 6ab0411

Please sign in to comment.