mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-15 06:52:04 +00:00
A settings card under Integrations connects either system and tests it before saving. An import button beside Upload in Documents, on a condition's documents card, and beside Add in the visit and vaccination document pickers opens a sheet that searches by name with tag and date filters, shows what HealthLog already holds, and imports the ticked documents one at a time with a result per row. The buttons appear only for a person in their own record with a connection; strings in all seven languages.
7 lines
264 B
TypeScript
7 lines
264 B
TypeScript
/** Add imported ids to a form's selection, in order, never twice. */
|
|
export function mergeIds(selected: string[], added: string[]): string[] {
|
|
const merged = [...selected];
|
|
for (const id of added) if (!merged.includes(id)) merged.push(id);
|
|
return merged;
|
|
}
|