@autobusal/admin-agents 1.1.3 → 1.1.5
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 +19 -0
- package/Manage.tsx +20 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.1.5
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- **Credit limit on the agent form.** Ordinary website agents can now sell
|
|
8
|
+
postpaid: obtapi's funds gate measures the balance's resting position -
|
|
9
|
+
funds minus (amount less commission) - against `-credit_limit` instead of
|
|
10
|
+
refusing anything below the gross total. 0 keeps the historic prepaid
|
|
11
|
+
behaviour; a positive number lets the balance run down to -that-much,
|
|
12
|
+
restored when an admin records the agent's payment on the funds screen.
|
|
13
|
+
|
|
14
|
+
## [1.1.4] - 2026-08-07
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- **Country select no longer defaults to Afghanistan.** `value` was `?? 0`,
|
|
19
|
+
which matches no country, so opening an agent with none on file and
|
|
20
|
+
pressing save filed them in Afghanistan.
|
|
21
|
+
|
|
3
22
|
|
|
4
23
|
## 1.1.3
|
|
5
24
|
|
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
|
-
|
|
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' }),
|
|
@@ -204,6 +213,16 @@ const Manage = ({ url, t }: Props): JSX.Element => {
|
|
|
204
213
|
type: 'select',
|
|
205
214
|
value: data?.user.comissions?.unique ?? 0,
|
|
206
215
|
values: getAllowed(t)
|
|
216
|
+
}, {
|
|
217
|
+
// Claude - 2026-08-22: the floor of the agent's funds balance
|
|
218
|
+
// for website sales - 0 = prepaid (the historic behaviour),
|
|
219
|
+
// a positive number = postpaid down to -that-much. Same field
|
|
220
|
+
// and meaning as on the API-consumers form.
|
|
221
|
+
label: t('admin_agents.manage.credit_limit', { ns: 'common' }),
|
|
222
|
+
name: 'credit_limit',
|
|
223
|
+
type: 'text',
|
|
224
|
+
value: data?.credit_limit ?? 0,
|
|
225
|
+
rules: 'required|numeric'
|
|
207
226
|
}, {
|
|
208
227
|
label: t('admin_agents.manage.api', { ns: 'common' }),
|
|
209
228
|
name: 'api',
|