@driveflux/admin-utils 4.0.83 → 4.0.84
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/dist/index.js +0 -1
- package/dist/resource.js +7 -7
- package/package.json +2 -2
package/dist/index.js
CHANGED
package/dist/resource.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { config } from '@driveflux/config/frontend';
|
|
2
|
-
|
|
2
|
+
var RESOURCE_LINKS_MAP = {
|
|
3
3
|
Subscription: '/subscriptions',
|
|
4
4
|
Vehicle: '/vehicles',
|
|
5
5
|
SubscriptionReservation: '/reservations',
|
|
@@ -14,13 +14,13 @@ const RESOURCE_LINKS_MAP = {
|
|
|
14
14
|
Log: '/activity-logs',
|
|
15
15
|
OffPlatformTransaction: '/transactions',
|
|
16
16
|
SubscriptionContract: '/contracts',
|
|
17
|
-
EmailSent: '/system-emails'
|
|
17
|
+
EmailSent: '/system-emails'
|
|
18
18
|
};
|
|
19
|
-
export
|
|
19
|
+
export var isLinkableToAdmin = function isLinkableToAdmin(model) {
|
|
20
20
|
return model in RESOURCE_LINKS_MAP;
|
|
21
21
|
};
|
|
22
|
-
export
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
export var adminResourceLink = function adminResourceLink(model, id, options) {
|
|
23
|
+
var _ref;
|
|
24
|
+
var baseUrl = (_ref = options === null || options === void 0 ? void 0 : options.baseUrl) !== null && _ref !== void 0 ? _ref : "".concat(config.appUrl, "/admin");
|
|
25
|
+
return "".concat(baseUrl).concat(RESOURCE_LINKS_MAP[model], "/").concat(id);
|
|
25
26
|
};
|
|
26
|
-
//# sourceMappingURL=resource.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@driveflux/admin-utils",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.84",
|
|
4
4
|
"description": "Utilites for admin meant to be shared with other packages. Do not import this module in the user facing site. It's strictly for admin and api or backend services",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
],
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@driveflux/config": "3.0.12",
|
|
17
|
-
"@driveflux/db": "4.1.
|
|
17
|
+
"@driveflux/db": "4.1.21"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@driveflux/fab": "4.0.2",
|