Skip to content

Commit

Permalink
Merge branch 'main' into download-gin-data-for-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyCBakerPhD authored May 29, 2024
2 parents 7fe5cb1 + bf701a9 commit 6f3e300
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ const propOrder = ["path", "subject_id", "session_id"];
export async function autocompleteFormatString(path) {
let notification;

const interfaceName = path[0];

const { base_directory } = path.reduce((acc, key) => acc[key] ?? {}, this.form.resolved);

const schema = getSchema(path, this.info.globalState.schema.source_data);
Expand All @@ -42,7 +44,7 @@ export async function autocompleteFormatString(path) {
}

const modal = new Modal({
header: "Autocomplete Format String",
header: `${interfaceName}Autocomplete Format String`,
});

const content = document.createElement("div");
Expand Down Expand Up @@ -377,6 +379,8 @@ export class GuidedPathExpansionPage extends Page {
validateOnChange: async (name, parent, parentPath) => {
const value = parent[name];

const interfaceName = parentPath.slice(-1)[0];

if (fs) {
const baseDir = form.getFormElement([...parentPath, "base_directory"]);
if (name === "format_string_path") {
Expand All @@ -401,8 +405,6 @@ export class GuidedPathExpansionPage extends Page {
if (value.split(".").length > 1) entry.file_path = value;
else entry.folder_path = value;

const interfaceName = parentPath.slice(-1)[0];

const results = await run(
`neuroconv/locate`,
{ [interfaceName]: entry },
Expand Down Expand Up @@ -432,7 +434,10 @@ export class GuidedPathExpansionPage extends Page {

return [
{
message: html`<h4 style="margin: 0;">Source Files Found</h4>
message: html` <h4 style="margin: 0;">
<span style="margin-right: 7px;"></span>Source Files Found for
${interfaceName}
</h4>
<small>${base_directory}</small>
<small
>${new List({
Expand Down

0 comments on commit 6f3e300

Please sign in to comment.