@autobusal/admin-external 1.0.0 → 1.1.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.1.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
  All notable changes to `@autobusal/admin-external` are documented here.
4
8
  This project adheres to [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
5
9
  and [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
package/Manage.tsx CHANGED
@@ -45,12 +45,14 @@ const Manage = ({ url, t }: Props): JSX.Element => {
45
45
 
46
46
  const { mutate: Delete, isPending: isPendingDelete } = useDeleteExternalProvider();
47
47
 
48
- const onSave = (formData: Record<string, any>): void => {
48
+ const onSave = (formData: Record<string, any>, stay?: boolean): void => {
49
49
  Update(formData, {
50
50
  onSuccess: () => {
51
51
  success(t('admin_external.manage.messages.saved', { ns: 'common' }));
52
52
 
53
- navigate(url);
53
+ if (!stay) {
54
+ navigate(url);
55
+ }
54
56
  }
55
57
  });
56
58
  };
@@ -132,7 +134,7 @@ const Manage = ({ url, t }: Props): JSX.Element => {
132
134
  pending={ isPendingSave || isPendingDelete }
133
135
  t={ t }
134
136
  actions={
135
- data ? ['save', 'delete'] : ['save']
137
+ data ? ['save', 'save_stay', 'delete'] : ['save']
136
138
  }
137
139
  onSave={ onSave }
138
140
  onDelete={ onDelete }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autobusal/admin-external",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "author": "Ferjolt Ozuni",
5
5
  "type": "module",
6
6
  "main": "index.ts"