Skip to content

Commit

Permalink
nit #209
Browse files Browse the repository at this point in the history
  • Loading branch information
chrabyrd committed Feb 27, 2025
1 parent bbef720 commit 8573205
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,15 @@ const router = useRouter();
const schemeEditorFormRef = inject<Ref<Component | null>>(
"schemeEditorFormRef",
);
const openEditor =
inject<(componentName: string, tileid?: string) => void>("openEditor");
const refreshReportSection = inject<(componentName: string) => void>(
"refreshReportSection",
);
const formRef = useTemplateRef("form");
watch(
() => formRef.value,
(formComponent) => (schemeEditorFormRef!.value = formComponent),
Expand All @@ -57,8 +61,10 @@ async function save(e: FormSubmitEvent) {
params: { id: updated.resourceinstanceid },
});
// console.log(updated); // UPDATED DOES NOT RETURN A TILEID!
// openEditor!("SchemeLabel", updated.appellative_status[0].tileid);
openEditor!(
props.componentName,
updated[props.nodegroupAlias][0].tileid,
);
} else {
await upsertLingoTile(
props.graphSlug,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ onMounted(async () => {
) {
const sectionValue = await getSectionValue();
tileData.value = sectionValue[props.nodegroupAlias];
isLoading.value = false;
}
isLoading.value = false;
});
async function getSectionValue() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,15 @@ const router = useRouter();
const schemeEditorFormRef = inject<Ref<Component | null>>(
"schemeEditorFormRef",
);
const openEditor =
inject<(componentName: string, tileid?: string) => void>("openEditor");
const refreshReportSection = inject<(componentName: string) => void>(
"refreshReportSection",
);
const formRef = useTemplateRef("form");
watch(
() => formRef.value,
(formComponent) => (schemeEditorFormRef!.value = formComponent),
Expand All @@ -56,8 +60,10 @@ async function save(e: FormSubmitEvent) {
params: { id: updated.resourceinstanceid },
});
// console.log(updated); // UPDATED DOES NOT RETURN A TILEID!
// openEditor!("SchemeLabel", updated.appellative_status[0].tileid);
openEditor!(
props.componentName,
updated[props.nodegroupAlias].tileid,
);
} else {
await upsertLingoTile(
props.graphSlug,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ onMounted(async () => {
) {
const sectionValue = await getSectionValue();
tileData.value = sectionValue[props.nodegroupAlias];
isLoading.value = false;
}
isLoading.value = false;
});
async function getSectionValue() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,15 @@ const props = defineProps<{
const schemeEditorFormRef = inject<Ref<Component | null>>(
"schemeEditorFormRef",
);
const openEditor =
inject<(componentName: string, tileid?: string) => void>("openEditor");
const refreshReportSection = inject<(componentName: string) => void>(
"refreshReportSection",
);
const formRef = useTemplateRef("form");
watch(
() => formRef.value,
(formComponent) => (schemeEditorFormRef!.value = formComponent),
Expand All @@ -53,8 +57,10 @@ async function save(e: FormSubmitEvent) {
params: { id: updated.resourceinstanceid },
});
// console.log(updated); // UPDATED DOES NOT RETURN A TILEID!
// openEditor!("SchemeLabel", updated.appellative_status[0].tileid);
openEditor!(
props.componentName,
updated[props.nodegroupAlias].tileid,
);
} else {
await upsertLingoTile(
props.graphSlug,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ const router = useRouter();
const schemeEditorFormRef = inject<Ref<Component | null>>(
"schemeEditorFormRef",
);
const openEditor =
inject<(componentName: string, tileid?: string) => void>("openEditor");
const refreshReportSection = inject<(componentName: string) => void>(
"refreshReportSection",
);
Expand All @@ -58,8 +61,10 @@ async function save(e: FormSubmitEvent) {
params: { id: updated.resourceinstanceid },
});
// console.log(updated); // UPDATED DOES NOT RETURN A TILEID!
// openEditor!("SchemeLabel", updated.appellative_status[0].tileid);
openEditor!(
props.componentName,
updated[props.nodegroupAlias][0].tileid,
);
} else {
await upsertLingoTile(
props.graphSlug,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ onMounted(async () => {
) {
const sectionValue = await getSectionValue();
tileData.value = sectionValue[props.nodegroupAlias];
isLoading.value = false;
}
isLoading.value = false;
});
async function getSectionValue() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ const router = useRouter();
const schemeEditorFormRef = inject<Ref<Component | null>>(
"schemeEditorFormRef",
);
const openEditor =
inject<(componentName: string, tileid?: string) => void>("openEditor");
const refreshReportSection = inject<(componentName: string) => void>(
"refreshReportSection",
);
Expand All @@ -53,8 +56,10 @@ async function save(e: FormSubmitEvent) {
params: { id: updated.resourceinstanceid },
});
// console.log(updated); // UPDATED DOES NOT RETURN A TILEID!
// openEditor!("SchemeLabel", updated.appellative_status[0].tileid);
openEditor!(
props.componentName,
updated[props.nodegroupAlias].tileid,
);
} else {
await upsertLingoTile(
props.graphSlug,
Expand Down

0 comments on commit 8573205

Please sign in to comment.