-
Notifications
You must be signed in to change notification settings - Fork 0
Refactor: centralize Add Contact modal, update versioning #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,120 @@ | ||||||
| @using JobTracker.Models | ||||||
| @using JobTracker.Services | ||||||
| @inject JobHistoryService HistoryService | ||||||
|
|
||||||
| <button class="btn @ButtonClass" @onclick="() => showModal = true" title="@Title"> | ||||||
| <i class="bi bi-person-plus"></i> @ButtonText | ||||||
| </button> | ||||||
|
|
||||||
| @if (showModal) | ||||||
| { | ||||||
| <div class="modal fade show" style="display: block; background: rgba(0,0,0,0.5);" tabindex="-1"> | ||||||
|
||||||
| <div class="modal fade show" style="display: block; background: rgba(0,0,0,0.5);" tabindex="-1"> | |
| <div class="modal fade show d-block" style="background: rgba(0,0,0,0.5);" tabindex="-1"> |
Copilot
AI
Apr 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OnParametersSet assigns jobTitle/company whenever prefilled parameters are non-empty. Because Blazor re-applies parameters on parent re-renders, this can overwrite user edits while the modal is open (e.g., if the parent page re-renders for unrelated state changes). Consider only applying prefilled defaults when opening the modal (or only when showModal == false / the fields are still blank), so user-entered values aren’t unexpectedly reset.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -5,10 +5,14 @@ | |||||||||||||||||||
| <Nullable>enable</Nullable> | ||||||||||||||||||||
| <ImplicitUsings>enable</ImplicitUsings> | ||||||||||||||||||||
| <BlazorDisableThrowNavigationException>true</BlazorDisableThrowNavigationException> | ||||||||||||||||||||
| <!-- Version: 1.YY.MMdd.BuildNumber — uses CI run number when available, HHmm locally --> | ||||||||||||||||||||
| <!-- Version: 1.YY.BuildNumber.MMdd | ||||||||||||||||||||
| MSI only compares the first 3 fields for upgrade detection (4th is ignored). | ||||||||||||||||||||
| The build number (which changes every CI run) MUST be in the 3rd field, | ||||||||||||||||||||
| otherwise same-day builds produce duplicate entries in Apps & Features. | ||||||||||||||||||||
| CI uses github.run_number; local builds fall back to HHmm. --> | ||||||||||||||||||||
| <BuildRevision Condition="'$(BUILD_NUMBER)' != ''">$(BUILD_NUMBER)</BuildRevision> | ||||||||||||||||||||
| <BuildRevision Condition="'$(BUILD_NUMBER)' == ''">$([System.DateTime]::Now.ToString("HHmm"))</BuildRevision> | ||||||||||||||||||||
|
Comment on lines
+12
to
14
|
||||||||||||||||||||
| CI uses github.run_number; local builds fall back to HHmm. --> | |
| <BuildRevision Condition="'$(BUILD_NUMBER)' != ''">$(BUILD_NUMBER)</BuildRevision> | |
| <BuildRevision Condition="'$(BUILD_NUMBER)' == ''">$([System.DateTime]::Now.ToString("HHmm"))</BuildRevision> | |
| CI uses github.run_number; local builds fall back to HHmm. | |
| MSI limits each version component to 65535, so normalize the raw value | |
| before placing it in the 3rd field. --> | |
| <RawBuildRevision Condition="'$(BUILD_NUMBER)' != ''">$(BUILD_NUMBER)</RawBuildRevision> | |
| <RawBuildRevision Condition="'$(BUILD_NUMBER)' == ''">$([System.DateTime]::Now.ToString("HHmm"))</RawBuildRevision> | |
| <BuildRevision>$([System.Decimal]::ToInt32($([System.Decimal]::Remainder($([System.Decimal]::Parse('$(RawBuildRevision)')), 65535))))</BuildRevision> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The trigger button doesn’t specify
type="button". If this component is ever rendered inside a<form>/EditForm, the defaulttype="submit"can cause unintended form submission. Settingtype="button"on the trigger button avoids that class of bugs.