fix(badges): use base fields instead of _override on badge create
Professional title, organization, and location entered during manual badge creation were being stored in the *_override fields. Override fields are intended for overriding imported/AMS person data — for new manually created badges, the base fields (professional_title, affiliations, location) are correct. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -34,9 +34,9 @@ let {
|
||||
let given_name: string = $state('');
|
||||
let family_name: string = $state('');
|
||||
let full_name_override: string = $state('');
|
||||
let professional_title_override: string = $state('');
|
||||
let affiliations_override: string = $state('');
|
||||
let location_override: string = $state('');
|
||||
let professional_title: string = $state('');
|
||||
let affiliations: string = $state('');
|
||||
let location: string = $state('');
|
||||
let email: string = $state('');
|
||||
let allow_tracking: boolean = $state(false);
|
||||
let badge_type_code: string = $state('');
|
||||
@@ -121,9 +121,9 @@ async function handle_submit(event: Event) {
|
||||
family_name,
|
||||
email: email || null,
|
||||
full_name_override: full_name_override || null,
|
||||
professional_title_override: professional_title_override || null,
|
||||
affiliations_override: affiliations_override || null,
|
||||
location_override: location_override || null,
|
||||
professional_title: professional_title || null,
|
||||
affiliations: affiliations || null,
|
||||
location: location || null,
|
||||
allow_tracking,
|
||||
badge_type_code: badge_type_code || null
|
||||
};
|
||||
@@ -241,15 +241,15 @@ let step_label = $derived(
|
||||
|
||||
<label class="label">
|
||||
<span class="label-text">Professional Title <span class="text-surface-400 font-normal">(optional)</span></span>
|
||||
<input type="text" bind:value={professional_title_override} class="input" placeholder="e.g. Chief Medical Officer" />
|
||||
<input type="text" bind:value={professional_title} class="input" placeholder="e.g. Chief Medical Officer" />
|
||||
</label>
|
||||
<label class="label">
|
||||
<span class="label-text">Organization <span class="text-surface-400 font-normal">(optional)</span></span>
|
||||
<input type="text" bind:value={affiliations_override} class="input" placeholder="e.g. Acme Hospital" />
|
||||
<input type="text" bind:value={affiliations} class="input" placeholder="e.g. Acme Hospital" />
|
||||
</label>
|
||||
<label class="label">
|
||||
<span class="label-text">Location <span class="text-surface-400 font-normal">(optional)</span></span>
|
||||
<input type="text" bind:value={location_override} class="input" placeholder="City, State" />
|
||||
<input type="text" bind:value={location} class="input" placeholder="City, State" />
|
||||
</label>
|
||||
<label class="flex items-center gap-2">
|
||||
<input type="checkbox" bind:checked={allow_tracking} class="checkbox" />
|
||||
|
||||
Reference in New Issue
Block a user