-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7004 from deutschebank/db-contrib/waltz-6908-add-…
…assessments-to-inv-kinds Db contrib/waltz 6908 add assessments to inv kinds
- Loading branch information
Showing
7 changed files
with
182 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
waltz-ng/client/involvement-kind/components/svelte/InvolvementsSection.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<script> | ||
import InvolvementListPanel from "./InvolvementListPanel.svelte"; | ||
import BulkInvolvementLoader from "./BulkInvolvementLoader.svelte"; | ||
import {involvementKindStore} from "../../../svelte-stores/involvement-kind-store"; | ||
export let primaryEntityRef; | ||
let involvementKind; | ||
let involvementKindCall; | ||
const Modes = { | ||
VIEW: "VIEW", | ||
BULK_UPLOAD: "BULK_UPLOAD" | ||
} | ||
let activeMode = Modes.VIEW; | ||
function bulkUpdate() { | ||
activeMode = Modes.VIEW; | ||
return reload(primaryEntityRef.id) | ||
} | ||
function reload(id) { | ||
involvementKindCall = involvementKindStore.getById(id, true); | ||
} | ||
$: involvementKindCall = involvementKindStore.getById(primaryEntityRef.id); | ||
$: involvementKind = $involvementKindCall?.data; | ||
</script> | ||
<div class="waltz-section-actions"> | ||
{#if activeMode === Modes.VIEW} | ||
<button class="btn btn-xs btn-default" | ||
on:click={() => activeMode = Modes.BULK_UPLOAD}> | ||
Bulk Insert | ||
</button> | ||
{:else} | ||
<button class="btn btn-xs btn-default" | ||
on:click={() => activeMode = Modes.VIEW}> | ||
Cancel | ||
</button> | ||
{/if} | ||
</div> | ||
<div class="row"> | ||
<div class="col-sm-12"> | ||
{#if activeMode === Modes.VIEW} | ||
<InvolvementListPanel {involvementKind}/> | ||
{:else if activeMode === Modes.BULK_UPLOAD} | ||
<BulkInvolvementLoader {involvementKind} | ||
onSave={bulkUpdate}/> | ||
{/if} | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.