Skip to content

Commit

Permalink
Pull request #355: Fixes for datatype section and involvement kind as…
Browse files Browse the repository at this point in the history
…sessments

Merge in WALTZ/waltz from WALTZ/waltz-dw:CTCTOWALTZ-3071-dt-section-bug-7008 to db-feature/waltz-7008-dt-bug

* commit '8b653278e878fbf5dcb04ceea9f8dbae590324b8':
  Fixes for datatype section and involvement kind assessments
  • Loading branch information
db-waltz committed Feb 26, 2024
2 parents 5b7a50e + 8b65327 commit 0af7b9a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
selectedDataType
} from "./data-type-decorator-section-store";
import {prepareData} from "./data-type-decorator-view-grid-utils";
import {onDestroy, onMount} from "svelte";
import localWritable from "../../../common/svelte/local-writable";
const Modes = {
TREE: "TREE",
Expand All @@ -20,17 +22,30 @@
export let primaryEntityRef;
let activeMode = Modes.TREE;
let activeMode = localWritable('waltz.DataTypeDecoratorSection.activeMode', Modes.TREE);
let viewCall;
function toggleView() {
if (activeMode === Modes.TREE) {
activeMode = Modes.TABLE;
if ($activeMode === Modes.TREE) {
$activeMode = Modes.TABLE;
} else {
activeMode = Modes.TREE;
$activeMode = Modes.TREE;
}
}
function clearSelections() {
$selectedDataType = null;
$selectedDecorator = null;
}
onMount(() => {
clearSelections();
});
onDestroy(() => {
clearSelections();
});
$: {
if (primaryEntityRef) {
viewCall = dataTypeDecoratorStore.getViewForParentRef(primaryEntityRef);
Expand All @@ -49,20 +64,19 @@

<div class="decorator-section">
<div class="decorator-table">
<div class="pull-right" style="display: block">
<div>
These are the data types currently aligned to this logical flow. You can toggle between a tabular and tree view of this information. Select a data type to see more information.
<br>
<Toggle labelOn="Tree View"
labelOff="Table View"
state={activeMode === Modes.TREE}
state={$activeMode === Modes.TREE}
onToggle={toggleView}/>
</div>
<div>
These are the data types currently aligned to this logical flow. You can toggle between a tabular and tree view of this information. Select a data type to see more information.
</div>
<br>
<div>
{#if activeMode === Modes.TREE}
{#if $activeMode === Modes.TREE}
<DataTypeOverviewPanel primaryEntityReference={primaryEntityRef}/>
{:else if activeMode === Modes.TABLE}
{:else if $activeMode === Modes.TABLE}
<DataTypeDecoratorViewGrid/>
{/if}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@
import {activeSections} from "../../../dynamic-section/section-store";
import {dynamicSections} from "../../../dynamic-section/dynamic-section-definitions";
import SubSection from "../../../common/svelte/SubSection.svelte";
import {primaryEntityReference as primaryRef} from "../../../assessments/components/rating-editor/rating-store";
export let parentEntityRef;
let involvementKindCall;
$: involvementKindCall = involvementKindStore.getById(parentEntityRef.id);
$: involvementKind = $involvementKindCall?.data;
$: $primaryRef = parentEntityRef;
function reload(id) {
involvementKindCall = involvementKindStore.getById(id, true);
Expand Down

0 comments on commit 0af7b9a

Please sign in to comment.