@autobusal/utilities 1.1.2 → 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 +8 -0
- package/index.ts +3 -2
- package/package.json +1 -1
- package/users.tsx +19 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this package are documented here. This project follows [Keep a Changelog](https://keepachangelog.com/) and [Semantic Versioning](https://semver.org/).
|
|
4
4
|
|
|
5
|
+
## [1.2.0] - 2026-07-25
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- `GetChannelStatus(t)`: shared disabled/dedicated/main select values for
|
|
10
|
+
the Telegram and WhatsApp admin settings tabs (and any future per-label
|
|
11
|
+
messaging channel).
|
|
12
|
+
|
|
5
13
|
## [1.1.2] - 2026-07-24
|
|
6
14
|
|
|
7
15
|
### Added
|
package/index.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { Validate, Display } from './form';
|
|
|
3
3
|
import { error, notify, success } from './notify';
|
|
4
4
|
import { getAllowed, getLanguages, getPayments } from './options';
|
|
5
5
|
import { getSex, getOptionsSex } from './passengers';
|
|
6
|
-
import { GetStatus, GetEnvironment, DisplayStatus } from './users';
|
|
6
|
+
import { GetStatus, GetEnvironment, GetChannelStatus, DisplayStatus } from './users';
|
|
7
7
|
import { getRandomNumber } from './numbers';
|
|
8
8
|
import { getParams } from './manage';
|
|
9
9
|
import { sanitizeHtml } from './sanitize';
|
|
@@ -29,5 +29,6 @@ export {
|
|
|
29
29
|
getRandomNumber,
|
|
30
30
|
getSex,
|
|
31
31
|
GetStatus,
|
|
32
|
-
GetEnvironment
|
|
32
|
+
GetEnvironment,
|
|
33
|
+
GetChannelStatus
|
|
33
34
|
};
|
package/package.json
CHANGED
package/users.tsx
CHANGED
|
@@ -35,6 +35,25 @@ export const GetEnvironment = (t: TFunction<'common'>) => ([
|
|
|
35
35
|
}
|
|
36
36
|
]);
|
|
37
37
|
|
|
38
|
+
// Edited: Ferjolt Ozuni - Date: 2026-07-25
|
|
39
|
+
// Shared by the Telegram and WhatsApp admin settings tabs (and any future
|
|
40
|
+
// per-label messaging channel): disabled, this label's own credentials, or
|
|
41
|
+
// routed through the main label's - same three-state model Raiffeisen's
|
|
42
|
+
// payment domain toggle uses (that one has no "disabled" option since a
|
|
43
|
+
// separate Available toggle covers on/off there).
|
|
44
|
+
export const GetChannelStatus = (t: TFunction<'common'>) => ([
|
|
45
|
+
{
|
|
46
|
+
id: 'disabled',
|
|
47
|
+
name: t('admin_label.manage.channel_status.disabled', { ns: 'common' })
|
|
48
|
+
}, {
|
|
49
|
+
id: 'dedicated',
|
|
50
|
+
name: t('admin_label.manage.channel_status.dedicated', { ns: 'common' })
|
|
51
|
+
}, {
|
|
52
|
+
id: 'main',
|
|
53
|
+
name: t('admin_label.manage.channel_status.main', { ns: 'common' })
|
|
54
|
+
}
|
|
55
|
+
]);
|
|
56
|
+
|
|
38
57
|
const Status = styled.span<{ $type: string }>`
|
|
39
58
|
display: inline-block;
|
|
40
59
|
padding: 3px 5px;
|