Skip to content

Commit

Permalink
Temporarily wait for confirmation before uploading resources/creating…
Browse files Browse the repository at this point in the history
… shl
  • Loading branch information
daniellrgn committed Jan 29, 2024
1 parent 615382f commit 180ac2e
Showing 1 changed file with 25 additions and 13 deletions.
38 changes: 25 additions & 13 deletions src/lib/ResourceSelectorLTT.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@
// This function will be executed when the resource list is updated
$: {
if (newResources) {
console.log(newResources);
addNewResources(newResources);
confirm();
newResources = [];
// confirm();
// newResources = [];
}
};
Expand Down Expand Up @@ -140,6 +141,11 @@
});
addResources(resourcesToAdd, resources);
resources = resources;
console.log("Patients");
console.log(patients);
console.log("Resources");
console.log(resources);
return;
}
return;
Expand Down Expand Up @@ -177,17 +183,23 @@
<form on:submit|preventDefault={() => confirm()}>
<Accordion>
<AccordionItem header="Customize IPS Content">
{#if resources != null}
<p>Select resources from the list below to include in a new customized Summary:</p>
{#each Object.keys(resources) as key}
<div class="resource form-check">
<input id={key} class="form-check-input" type="checkbox" bind:checked={resources[key].include} value={key}/>
<label class="form-check-label" style="width:100%" for={key}><p style="overflow-wrap:break-word">{@html JSON.stringify(resources[key].original_resource)}</p></label>
</div>
{/each}
{/if}
</AccordionItem>
</Accordion>
<!-- {#if patients != null || resources != null} -->
<p>Select resources from the list below to include in a new customized Summary:</p>
{#each Object.keys(patients) as key}
<div class="resource form-check">
<input id={key} class="form-check-input" type="checkbox" bind:checked={patients[key].include} value={key}/>
<label class="form-check-label" style="width:100%" for={key}><p style="overflow-wrap:break-word">{@html JSON.stringify(patients[key].original_resource)}</p></label>
</div>
{/each}
{#each Object.keys(resources) as key}
<div class="resource form-check">
<input id={key} class="form-check-input" type="checkbox" bind:checked={resources[key].include} value={key}/>
<label class="form-check-label" style="width:100%" for={key}><p style="overflow-wrap:break-word">{@html JSON.stringify(resources[key].original_resource)}</p></label>
</div>
{/each}
<!-- {/if} -->
</AccordionItem>
</Accordion>
<br/>
<Row>
<Col xs="auto">
Expand Down

0 comments on commit 180ac2e

Please sign in to comment.