@autobusal/admin-agents 1.1.3 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.1.4] - 2026-08-07
4
+
5
+ ### Fixed
6
+
7
+ - **Country select no longer defaults to Afghanistan.** `value` was `?? 0`,
8
+ which matches no country, so opening an agent with none on file and
9
+ pressing save filed them in Afghanistan.
10
+
3
11
 
4
12
  ## 1.1.3
5
13
 
package/Manage.tsx CHANGED
@@ -111,7 +111,16 @@ const Manage = ({ url, t }: Props): JSX.Element => {
111
111
  name: 'country_id',
112
112
  type: 'select',
113
113
  values: CountryData,
114
- value: data?.country_id ?? 0,
114
+ /*
115
+ * Edited: Ferjolt Ozuni - Date: 2026-08-07
116
+ * `?? 0` matches no country, and a select whose value matches
117
+ * nothing displays the FIRST option and submits it as though it
118
+ * had been chosen - so opening an agent with no country on file
119
+ * and pressing save filed them in Afghanistan. `''` plus a
120
+ * placeholder gives "nothing chosen" somewhere to live.
121
+ */
122
+ placeholder: t('routes_order.step5.billing.country_choose', { ns: 'common' }),
123
+ value: data?.country_id ?? '',
115
124
  rules: 'required'
116
125
  }, {}, {
117
126
  label: t('admin_agents.manage.mobile', { ns: 'common' }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autobusal/admin-agents",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "author": "Ferjolt Ozuni",
5
5
  "type": "module",
6
6
  "main": "index.ts"