@autobusal/admin-api-consumers 1.2.2 → 1.3.0

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,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.3.0 (2026-08-29)
4
+
5
+ - Editors offer Save & Close alongside Save & Stay, so correcting a record no longer bounces you back to its list every time (opt-in per page, editing only).
6
+
3
7
  ## 1.2.2 (2026-08-28)
4
8
 
5
9
  - Requests view (?type=requests): the P8 self-serve queue - agents awaiting a partner-API ruling, with Decline per row; approving stays the ordinary manage/save flow. Toggle button beside Receivables.
package/Manage.tsx CHANGED
@@ -42,7 +42,7 @@ const Manage = ({ url, t }: Props): JSX.Element => {
42
42
  return <Box />;
43
43
  }
44
44
 
45
- const onSave = (formData: Record<string, any>): void => {
45
+ const onSave = (formData: Record<string, any>, stay?: boolean): void => {
46
46
  Update(formData, {
47
47
  onSuccess: (response) => {
48
48
  success(t('admin_api_consumers.manage.messages.saved', { ns: 'common' }));
@@ -55,7 +55,9 @@ const Manage = ({ url, t }: Props): JSX.Element => {
55
55
  return;
56
56
  }
57
57
 
58
- navigate(url);
58
+ if (!stay) {
59
+ navigate(url);
60
+ }
59
61
  }
60
62
  });
61
63
  };
@@ -164,7 +166,7 @@ const Manage = ({ url, t }: Props): JSX.Element => {
164
166
  pending={ isPendingSave || isPendingDelete }
165
167
  t={ t }
166
168
  actions={
167
- id > 0 ? ['save', 'delete'] : ['save']
169
+ id > 0 ? ['save', 'save_stay', 'delete'] : ['save']
168
170
  }
169
171
  onSave={ onSave }
170
172
  onDelete={ onDelete }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autobusal/admin-api-consumers",
3
- "version": "1.2.2",
3
+ "version": "1.3.0",
4
4
  "author": "Ferjolt Ozuni",
5
5
  "type": "module",
6
6
  "main": "index.ts"