@autobusal/admin-agents 1.1.4 → 1.1.6

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/Manage.tsx +16 -1
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.1.6
4
+
5
+ ### Fixed
6
+
7
+ - **License No. is optional on the manage form.** The agent sign-up stopped collecting it on 2026-08-07 and the column is nullable server-side, but the form's required rule made approving a self-registered agency impossible without inventing a number. (Audit AUTH-02b.)
8
+
9
+ ## 1.1.5
10
+
11
+ ### Added
12
+
13
+ - **Credit limit on the agent form.** Ordinary website agents can now sell
14
+ postpaid: obtapi's funds gate measures the balance's resting position -
15
+ funds minus (amount less commission) - against `-credit_limit` instead of
16
+ refusing anything below the gross total. 0 keeps the historic prepaid
17
+ behaviour; a positive number lets the balance run down to -that-much,
18
+ restored when an admin records the agent's payment on the funds screen.
19
+
3
20
  ## [1.1.4] - 2026-08-07
4
21
 
5
22
  ### Fixed
package/Manage.tsx CHANGED
@@ -172,7 +172,12 @@ const Manage = ({ url, t }: Props): JSX.Element => {
172
172
  name: 'license',
173
173
  type: 'text',
174
174
  value: data?.license,
175
- rules: 'required|min_length:3|max_length:50'
175
+ // Claude - 2026-08-22 (audit finding AUTH-02b): the agent
176
+ // sign-up stopped collecting a license on 2026-08-07 and the
177
+ // column is nullable server-side - but this required rule made
178
+ // approving any self-registered agency impossible without the
179
+ // admin INVENTING a license number just to press Save.
180
+ rules: 'max_length:50'
176
181
  }, {
177
182
  label: t('admin_agents.manage.subscription', { ns: 'common' }),
178
183
  name: 'subscription_id',
@@ -213,6 +218,16 @@ const Manage = ({ url, t }: Props): JSX.Element => {
213
218
  type: 'select',
214
219
  value: data?.user.comissions?.unique ?? 0,
215
220
  values: getAllowed(t)
221
+ }, {
222
+ // Claude - 2026-08-22: the floor of the agent's funds balance
223
+ // for website sales - 0 = prepaid (the historic behaviour),
224
+ // a positive number = postpaid down to -that-much. Same field
225
+ // and meaning as on the API-consumers form.
226
+ label: t('admin_agents.manage.credit_limit', { ns: 'common' }),
227
+ name: 'credit_limit',
228
+ type: 'text',
229
+ value: data?.credit_limit ?? 0,
230
+ rules: 'required|numeric'
216
231
  }, {
217
232
  label: t('admin_agents.manage.api', { ns: 'common' }),
218
233
  name: 'api',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autobusal/admin-agents",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "author": "Ferjolt Ozuni",
5
5
  "type": "module",
6
6
  "main": "index.ts"