@autobusal/admin-agents 1.1.7 → 1.2.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 +4 -0
- package/Manage.tsx +5 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.2.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.1.7 (2026-08-28)
|
|
4
8
|
|
|
5
9
|
- Company minimum length 2, matching the server rule - two-letter brand names can be saved (sweep #56).
|
package/Manage.tsx
CHANGED
|
@@ -41,12 +41,14 @@ const Manage = ({ url, t }: Props): JSX.Element => {
|
|
|
41
41
|
return <Box />;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
const onSave = (data: AgentData): void => {
|
|
44
|
+
const onSave = (data: AgentData, stay?: boolean): void => {
|
|
45
45
|
Update(data, {
|
|
46
46
|
onSuccess: () => {
|
|
47
47
|
success(t('admin_agents.manage.messages.saved', { ns: 'common' }));
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
if (!stay) {
|
|
50
|
+
navigate(url);
|
|
51
|
+
}
|
|
50
52
|
}
|
|
51
53
|
});
|
|
52
54
|
};
|
|
@@ -301,7 +303,7 @@ const Manage = ({ url, t }: Props): JSX.Element => {
|
|
|
301
303
|
pending={ isPendingSave || isPendingDelete }
|
|
302
304
|
t={ t }
|
|
303
305
|
actions={ [
|
|
304
|
-
'save', 'delete'
|
|
306
|
+
'save', 'save_stay', 'delete'
|
|
305
307
|
]}
|
|
306
308
|
onSave={ onSave }
|
|
307
309
|
onDelete={ onDelete }
|