@autobusal/admin-external 1.0.0 → 1.1.1
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/Manage.tsx +5 -3
- package/package.json +5 -2
- package/styles.ts +5 -0
- package/CHANGELOG.md +0 -19
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
|
|
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
|
-
|
|
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
package/styles.ts
CHANGED
|
@@ -5,6 +5,11 @@ export const Table = styled.table`
|
|
|
5
5
|
width: 100%;
|
|
6
6
|
border-collapse: collapse;
|
|
7
7
|
|
|
8
|
+
/* Ferjolt, 2026-09-07: striped rows, so a wide table can be read across */
|
|
9
|
+
tbody tr:nth-of-type(even) td {
|
|
10
|
+
background: ${ props => props.theme.background.normal };
|
|
11
|
+
}
|
|
12
|
+
|
|
8
13
|
th, td {
|
|
9
14
|
text-align: left;
|
|
10
15
|
padding: 10px 12px;
|
package/CHANGELOG.md
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to `@autobusal/admin-external` are documented here.
|
|
4
|
-
This project adheres to [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
|
|
5
|
-
and [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
-
|
|
7
|
-
## [1.0.0] - 2026-07-27
|
|
8
|
-
|
|
9
|
-
### Added
|
|
10
|
-
|
|
11
|
-
- Initial release. Admin config + stats for the external bus-route
|
|
12
|
-
provider integration (Mode A: search + redirect). `Browse.tsx` lists
|
|
13
|
-
configured providers plus known providers still available to add;
|
|
14
|
-
`Manage.tsx` is the per-provider config form (status/mode/credentials/
|
|
15
|
-
markup/commission/cache_ttl/resellable), keyed by provider slug rather
|
|
16
|
-
than a numeric id since `external_providers` rows are looked up by
|
|
17
|
-
`provider`; `Stats.tsx` shows the search->click funnel per provider
|
|
18
|
-
over a date range. Backed by obtapi's
|
|
19
|
-
`App\Http\Controllers\External\AdminController`.
|