oa-componentbook 1.0.1-stage.44 → 1.0.1-stage.440
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/build/components/oa-component-accordion/Accordion.js +123 -43
- package/build/components/oa-component-accordion/styles.js +2 -2
- package/build/components/oa-component-button/CustomButton.js +24 -19
- package/build/components/oa-component-button/styles.js +1 -1
- package/build/components/oa-component-checkbox/CustomCheckBox.js +20 -17
- package/build/components/oa-component-checkbox/styles.js +1 -1
- package/build/components/oa-component-datepicker/CustomDatePicker.js +37 -26
- package/build/components/oa-component-drawer/CustomDrawer.js +2 -0
- package/build/components/oa-component-dropdown/CustomDropdown.js +16 -4
- package/build/components/oa-component-icons/MaterialIcon.js +1 -1
- package/build/components/oa-component-modal/CustomModal.js +59 -48
- package/build/components/oa-component-modal/styles.js +3 -2
- package/build/components/oa-component-pagination/CustomPagination.js +111 -0
- package/build/components/oa-component-pagination/styles.js +12 -0
- package/build/components/oa-component-progress-bar/CustomProgressBar.js +8 -4
- package/build/components/oa-component-select/CustomSelect.js +130 -56
- package/build/components/oa-component-steps/CustomSteps.js +117 -0
- package/build/components/oa-component-steps/styles.js +12 -0
- package/build/components/oa-component-table/CustomTable.js +28 -5
- package/build/components/oa-component-table/CustomTableV1.js +613 -0
- package/build/components/oa-component-table/styles.js +1 -1
- package/build/components/oa-component-table/stylesV1.js +19 -0
- package/build/components/oa-component-tabs/CustomTabs.js +1 -1
- package/build/components/oa-component-tag/CustomTag.js +29 -11
- package/build/components/oa-component-tag/styles.js +30 -3
- package/build/components/oa-component-textarea/CustomTextArea.js +161 -0
- package/build/components/oa-component-textarea/constants.js +39 -0
- package/build/components/oa-component-textarea/styles.js +12 -3
- package/build/components/oa-component-tooltip/CustomTooltip.js +8 -4
- package/build/components/oa-component-upload/CustomUpload.js +129 -42
- package/build/components/oa-component-viewer/CustomViewer.js +17 -11
- package/build/dev/oa-component-document-viewer/CustomDocumentViewer.js +367 -0
- package/build/dev/oa-component-document-viewer/styles.js +12 -0
- package/build/dev/oa-component-upload/CustomUpload.js +116 -29
- package/build/dev/oa-component-upload/styles.js +2 -2
- package/build/dev/oa-widget-document-modal/DocumentSideModal.js +166 -0
- package/build/dev/oa-widget-document-modal/styles.js +12 -0
- package/build/dev/oa-widget-document-side-drawer/DocumentSideDrawer.js +196 -0
- package/build/dev/oa-widget-document-side-drawer/styles.js +12 -0
- package/build/global-css/GlobalCss.js +2 -1
- package/build/global-css/GridLayout.js +1 -1
- package/build/global-css/commonStyles.js +11 -0
- package/build/images/Car.png +0 -0
- package/build/images/TwoWheeler.png +0 -0
- package/build/images/astronaut_emptystate.png +0 -0
- package/build/images/exportGrp01.png +0 -0
- package/build/images/exportGrp02.png +0 -0
- package/build/images/exportGrp03.png +0 -0
- package/build/images/outOfStock.png +0 -0
- package/build/index.js +114 -2
- package/build/layout/DetailDataLayout/DetailDataLayout.js +20 -0
- package/build/layout/DetailDataLayout/components/Form.js +22 -0
- package/build/layout/DetailDataLayout/components/Header.js +32 -0
- package/build/layout/DetailDataLayout/style.css +9 -0
- package/build/layout/DetailDataLayout/styles.js +12 -0
- package/build/layout/EntityOverviewLayout/EntityOverviewLayout.js +403 -0
- package/build/layout/EntityOverviewLayout/reducer/entityOverviewLayoutReducer.js +85 -0
- package/build/layout/EntityOverviewLayout/styles.js +13 -0
- package/build/layout/GenricLayOut/GenricLayOut.js +2421 -0
- package/build/layout/GenricLayOut/components/AppliedFilters.js +90 -0
- package/build/layout/GenricLayOut/components/CardList.js +34 -0
- package/build/layout/GenricLayOut/components/DropdownSearch.js +48 -0
- package/build/layout/GenricLayOut/components/Header.js +74 -0
- package/build/layout/GenricLayOut/components/Modal.js +96 -0
- package/build/layout/GenricLayOut/components/ProfileSection.js +219 -0
- package/build/layout/GenricLayOut/components/Search.js +51 -0
- package/build/layout/GenricLayOut/components/StaticFilter.css +73 -0
- package/build/layout/GenricLayOut/components/StaticFilter.js +37 -0
- package/build/layout/GenricLayOut/reducer/layoutReducer.js +310 -0
- package/build/layout/GenricLayOut/resolver/staticConfigResolver.js +98 -0
- package/build/layout/GenricLayOut/styles.js +42 -0
- package/build/utils/download-file.js +23 -0
- package/build/widgets/oa-form-widget/FormWidget.js +577 -0
- package/build/widgets/oa-form-widget/FormWidgetStyle.js +18 -0
- package/build/widgets/oa-widget-add-spare-part/AddSparePartCollapseWidget.js +80 -16
- package/build/widgets/oa-widget-add-spare-part/AddSparePartWidget.js +50 -7
- package/build/widgets/oa-widget-address/AddressWidget.js +12 -17
- package/build/widgets/oa-widget-approval/ApprovalWidget.js +19 -11
- package/build/widgets/oa-widget-approval/ApprovalWidgetNew.js +492 -0
- package/build/widgets/oa-widget-approval/styles.js +2 -2
- package/build/widgets/oa-widget-chat/ChatWidget.js +5 -5
- package/build/widgets/oa-widget-close-claim/CloseClaimWidget.js +17 -5
- package/build/widgets/oa-widget-collapsible-key-value/CollapsibleKeyValueWidget.js +396 -0
- package/build/widgets/oa-widget-collapsible-key-value/styles.js +16 -0
- package/build/widgets/oa-widget-content-panel/ContentPanel.js +82 -0
- package/build/widgets/oa-widget-content-panel/styles.js +12 -0
- package/build/widgets/oa-widget-customer-rating-card/CustomerRatingCard.js +5 -5
- package/build/widgets/oa-widget-detailcard/styles.js +1 -1
- package/build/widgets/oa-widget-document-upload/DocUploadWidget.js +6 -9
- package/build/widgets/oa-widget-dropdown-search-input/DropdownSearchInput.js +53 -19
- package/build/widgets/oa-widget-dropdown-search-input/styles.js +1 -1
- package/build/widgets/oa-widget-guide/GuideWidget.js +70 -0
- package/build/widgets/oa-widget-guide/GuideWidgetStyle.js +12 -0
- package/build/widgets/oa-widget-hub-automation-modal/HubAutomationDeleteBiker.js +24 -0
- package/build/widgets/oa-widget-hub-automation-modal/HubAutomationModal.js +34 -0
- package/build/widgets/oa-widget-hub-automation-modal/HubAutomationModalStyle.js +13 -0
- package/build/widgets/oa-widget-image-carousel/ImageCarouselWidget.js +256 -0
- package/build/widgets/oa-widget-image-carousel/styles.js +23 -0
- package/build/widgets/oa-widget-image-gallery/FullscreenViewer.js +169 -0
- package/build/widgets/oa-widget-image-gallery/ImageGallery.js +87 -0
- package/build/widgets/oa-widget-image-gallery/ThumbnailGrid.js +146 -0
- package/build/widgets/oa-widget-image-gallery/imageCache.js +15 -0
- package/build/widgets/oa-widget-image-gallery/imageGalleryStyle.js +16 -0
- package/build/widgets/oa-widget-item-info-card/InfoCardListWidget.js +60 -0
- package/build/widgets/oa-widget-item-info-card/ItemInfoCardWidget.js +83 -0
- package/build/widgets/oa-widget-item-info-card/styles.css +50 -0
- package/build/widgets/oa-widget-item-info-card/styles.js +14 -0
- package/build/widgets/oa-widget-key-value/KeyValueWidget.js +46 -12
- package/build/widgets/oa-widget-key-value/styles.js +1 -1
- package/build/widgets/oa-widget-kpi/KPICardWidget.js +86 -0
- package/build/widgets/oa-widget-kpi/styles.js +12 -0
- package/build/widgets/oa-widget-map-base-location/AddressDetails.js +21 -7
- package/build/widgets/oa-widget-map-base-location/AddressForm.js +32 -5
- package/build/widgets/oa-widget-map-base-location/MapBaseLocation.js +9 -3
- package/build/widgets/oa-widget-map-base-location/MapComponent.js +17 -2
- package/build/widgets/oa-widget-membershipcard/MembershipCard.js +14 -3
- package/build/widgets/oa-widget-membershipcard/styles.js +1 -1
- package/build/widgets/oa-widget-notes/NotesWidget.js +32 -30
- package/build/widgets/oa-widget-notes/styles.js +4 -3
- package/build/widgets/oa-widget-profile-data/ProfileDataWidget.js +165 -0
- package/build/widgets/oa-widget-profile-data/styles.js +13 -0
- package/build/widgets/oa-widget-progressive-steps/ProgressiveStepsWidget.js +362 -0
- package/build/widgets/oa-widget-progressive-steps/styles.js +12 -0
- package/build/widgets/oa-widget-reimbursement-breakup/ReimbursementBreakupWidget.js +18 -9
- package/build/widgets/oa-widget-reimbursement-breakup/styles.js +1 -1
- package/build/widgets/oa-widget-reupload-drawer/ReUploadDrawer.js +164 -0
- package/build/widgets/oa-widget-select-list-item-modal/SelectListItemModal.js +91 -0
- package/build/widgets/oa-widget-sidebar/SidebarWidget.js +175 -0
- package/build/widgets/oa-widget-sidebar/components/Header.js +33 -0
- package/build/widgets/oa-widget-sidebar/styles.js +13 -0
- package/build/widgets/oa-widget-spare-part/SparePartsWidget.js +63 -35
- package/build/widgets/oa-widget-track-shipment-list/fn.js +16 -4
- package/build/widgets/oa-widget-user-management/UserManagementWidget.js +407 -0
- package/build/widgets/oa-widget-user-management/styles.js +15 -0
- package/package.json +4 -2
- package/build/components/oa-component-textarea/TextArea.js +0 -74
|
@@ -0,0 +1,403 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.symbol.description.js");
|
|
4
|
+
require("core-js/modules/es.object.assign.js");
|
|
5
|
+
require("core-js/modules/es.weak-map.js");
|
|
6
|
+
Object.defineProperty(exports, "__esModule", {
|
|
7
|
+
value: true
|
|
8
|
+
});
|
|
9
|
+
exports.default = EntityOverviewLayout;
|
|
10
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
11
|
+
require("core-js/modules/es.promise.js");
|
|
12
|
+
require("core-js/modules/es.json.stringify.js");
|
|
13
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
14
|
+
var _entityOverviewLayoutReducer = require("./reducer/entityOverviewLayoutReducer");
|
|
15
|
+
var _GlobalCss = _interopRequireDefault(require("../../global-css/GlobalCss"));
|
|
16
|
+
var _staticConfigResolver = _interopRequireDefault(require("../GenricLayOut/resolver/staticConfigResolver"));
|
|
17
|
+
var _CustomNotification = _interopRequireDefault(require("../../components/oa-component-notification/CustomNotification"));
|
|
18
|
+
var _styles = require("./styles");
|
|
19
|
+
var _Typography = _interopRequireDefault(require("../../components/oa-component-typography/Typography"));
|
|
20
|
+
var _MaterialIcon = _interopRequireDefault(require("../../components/oa-component-icons/MaterialIcon"));
|
|
21
|
+
var _CustomButton = _interopRequireDefault(require("../../components/oa-component-button/CustomButton"));
|
|
22
|
+
var _antd = require("antd");
|
|
23
|
+
var _ProfileDataWidget = _interopRequireDefault(require("../../widgets/oa-widget-profile-data/ProfileDataWidget"));
|
|
24
|
+
var _Accordion = _interopRequireDefault(require("../../components/oa-component-accordion/Accordion"));
|
|
25
|
+
var _KeyValueWidget = _interopRequireDefault(require("../../widgets/oa-widget-key-value/KeyValueWidget"));
|
|
26
|
+
var _CustomDrawer = _interopRequireDefault(require("../../components/oa-component-drawer/CustomDrawer"));
|
|
27
|
+
var _DetailDataLayout = _interopRequireDefault(require("../DetailDataLayout/DetailDataLayout"));
|
|
28
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
29
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
30
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
31
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
32
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
33
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
34
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
35
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
36
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /* eslint-disable */
|
|
37
|
+
function EntityOverviewLayout(_ref) {
|
|
38
|
+
var _backButton$iconConfi, _backButton$iconConfi2, _drawer$data, _drawer$data$drawer$a, _drawer$data2;
|
|
39
|
+
let {
|
|
40
|
+
config,
|
|
41
|
+
getInitialData,
|
|
42
|
+
handlers: {
|
|
43
|
+
handleBackButton,
|
|
44
|
+
addUserClick,
|
|
45
|
+
deleteUserClick,
|
|
46
|
+
editUserClick,
|
|
47
|
+
handleDrawerData,
|
|
48
|
+
handleSwitchSelectItem
|
|
49
|
+
}
|
|
50
|
+
} = _ref;
|
|
51
|
+
const [state, dispatch] = (0, _react.useReducer)(_entityOverviewLayoutReducer.entityOverviewLayoutReducer, config !== null && config !== void 0 ? config : _entityOverviewLayoutReducer.initialState);
|
|
52
|
+
const stateRef = (0, _react.useRef)(state);
|
|
53
|
+
const notificationRef = (0, _react.useRef)(null);
|
|
54
|
+
const openNotification = (0, _react.useCallback)(params => notificationRef.current.openNotification(params), []);
|
|
55
|
+
const {
|
|
56
|
+
pageTitle,
|
|
57
|
+
backButton,
|
|
58
|
+
profileData,
|
|
59
|
+
accordionData,
|
|
60
|
+
drawer,
|
|
61
|
+
modal,
|
|
62
|
+
misc
|
|
63
|
+
} = state !== null && state !== void 0 ? state : {};
|
|
64
|
+
(0, _react.useEffect)(() => {
|
|
65
|
+
init();
|
|
66
|
+
}, []);
|
|
67
|
+
(0, _react.useEffect)(() => {
|
|
68
|
+
stateRef.current = state;
|
|
69
|
+
}, [state]);
|
|
70
|
+
const init = async () => {
|
|
71
|
+
dispatch({
|
|
72
|
+
type: _entityOverviewLayoutReducer.actionTypes.SET_LOADING,
|
|
73
|
+
payload: true
|
|
74
|
+
});
|
|
75
|
+
if (getInitialData) {
|
|
76
|
+
var _state$misc;
|
|
77
|
+
const {
|
|
78
|
+
error,
|
|
79
|
+
data
|
|
80
|
+
} = await (getInitialData === null || getInitialData === void 0 ? void 0 : getInitialData(_objectSpread({}, (_state$misc = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc !== void 0 ? _state$misc : {})));
|
|
81
|
+
if (error) {
|
|
82
|
+
showErrorNotification(error);
|
|
83
|
+
const dynamicConfig = (0, _staticConfigResolver.default)(config, {});
|
|
84
|
+
dispatch({
|
|
85
|
+
type: _entityOverviewLayoutReducer.actionTypes.INIT,
|
|
86
|
+
payload: dynamicConfig
|
|
87
|
+
});
|
|
88
|
+
} else {
|
|
89
|
+
const dynamicConfig = (0, _staticConfigResolver.default)(config, data !== null && data !== void 0 ? data : {});
|
|
90
|
+
dispatch({
|
|
91
|
+
type: _entityOverviewLayoutReducer.actionTypes.INIT,
|
|
92
|
+
payload: dynamicConfig
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
} else {
|
|
96
|
+
const dynamicConfig = (0, _staticConfigResolver.default)(config, {});
|
|
97
|
+
dispatch({
|
|
98
|
+
type: _entityOverviewLayoutReducer.actionTypes.INIT,
|
|
99
|
+
payload: dynamicConfig
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
dispatch({
|
|
103
|
+
type: _entityOverviewLayoutReducer.actionTypes.SET_LOADING,
|
|
104
|
+
payload: false
|
|
105
|
+
});
|
|
106
|
+
};
|
|
107
|
+
const showErrorNotification = message => {
|
|
108
|
+
openNotification({
|
|
109
|
+
description: message,
|
|
110
|
+
type: "failure",
|
|
111
|
+
mode: "dark",
|
|
112
|
+
showIcon: true,
|
|
113
|
+
placement: "bottomRight"
|
|
114
|
+
});
|
|
115
|
+
};
|
|
116
|
+
const showSuccessNotification = message => {
|
|
117
|
+
openNotification({
|
|
118
|
+
description: message,
|
|
119
|
+
type: "success",
|
|
120
|
+
mode: "dark",
|
|
121
|
+
showIcon: true,
|
|
122
|
+
placement: "bottomRight"
|
|
123
|
+
});
|
|
124
|
+
};
|
|
125
|
+
const handleCloseDrawer = async () => {
|
|
126
|
+
var _state$misc2, _state$misc3, _state$misc4;
|
|
127
|
+
// Get selected enterprise from session storage to ensure profile data reflects correct enterprise
|
|
128
|
+
const selectedEnterpriseFromStorage = JSON.parse(sessionStorage.getItem('selectedEnterprise') || 'null');
|
|
129
|
+
const enterpriseIdFromStorage = (selectedEnterpriseFromStorage === null || selectedEnterpriseFromStorage === void 0 ? void 0 : selectedEnterpriseFromStorage.value) || (selectedEnterpriseFromStorage === null || selectedEnterpriseFromStorage === void 0 ? void 0 : selectedEnterpriseFromStorage.enterpriseId) || (selectedEnterpriseFromStorage === null || selectedEnterpriseFromStorage === void 0 ? void 0 : selectedEnterpriseFromStorage.id);
|
|
130
|
+
|
|
131
|
+
// Update misc with enterpriseId from session storage
|
|
132
|
+
const currentMisc = _objectSpread(_objectSpread({}, (_state$misc2 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc2 !== void 0 ? _state$misc2 : {}), {}, {
|
|
133
|
+
enterpriseId: enterpriseIdFromStorage || (state === null || state === void 0 || (_state$misc3 = state.misc) === null || _state$misc3 === void 0 ? void 0 : _state$misc3.enterpriseId),
|
|
134
|
+
enterpriseData: selectedEnterpriseFromStorage || (state === null || state === void 0 || (_state$misc4 = state.misc) === null || _state$misc4 === void 0 ? void 0 : _state$misc4.enterpriseData)
|
|
135
|
+
});
|
|
136
|
+
dispatch({
|
|
137
|
+
type: _entityOverviewLayoutReducer.actionTypes.SET_LOADING,
|
|
138
|
+
payload: true
|
|
139
|
+
});
|
|
140
|
+
if (getInitialData) {
|
|
141
|
+
const {
|
|
142
|
+
error,
|
|
143
|
+
data
|
|
144
|
+
} = await (getInitialData === null || getInitialData === void 0 ? void 0 : getInitialData(_objectSpread({}, currentMisc)));
|
|
145
|
+
if (error) {
|
|
146
|
+
showErrorNotification(error);
|
|
147
|
+
const dynamicConfig = (0, _staticConfigResolver.default)(config, {});
|
|
148
|
+
// Update misc with enterpriseId from session storage
|
|
149
|
+
if (currentMisc) {
|
|
150
|
+
dynamicConfig.misc = currentMisc;
|
|
151
|
+
}
|
|
152
|
+
// Don't preserve profile data - let it be re-rendered from config with correct enterprise
|
|
153
|
+
// Don't preserve accordion data - use fresh data from API (or empty if error)
|
|
154
|
+
dispatch({
|
|
155
|
+
type: _entityOverviewLayoutReducer.actionTypes.INIT,
|
|
156
|
+
payload: dynamicConfig
|
|
157
|
+
});
|
|
158
|
+
} else {
|
|
159
|
+
const dynamicConfig = (0, _staticConfigResolver.default)(config, data !== null && data !== void 0 ? data : {});
|
|
160
|
+
// Update misc with enterpriseId from session storage
|
|
161
|
+
if (currentMisc) {
|
|
162
|
+
dynamicConfig.misc = currentMisc;
|
|
163
|
+
}
|
|
164
|
+
// Use fresh profile data from API response to reflect correct enterprise
|
|
165
|
+
if (data !== null && data !== void 0 && data.data) {
|
|
166
|
+
dispatch({
|
|
167
|
+
type: _entityOverviewLayoutReducer.actionTypes.UPDATE_PROFILE_DATA,
|
|
168
|
+
payload: data.data
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
// Use fresh accordion data from API response (includes newly added users)
|
|
172
|
+
// Check for both 'accordionData' and 'accordianData' (typo in API response)
|
|
173
|
+
const freshAccordionData = (data === null || data === void 0 ? void 0 : data.accordionData) || (data === null || data === void 0 ? void 0 : data.accordianData);
|
|
174
|
+
if (freshAccordionData) {
|
|
175
|
+
let accordionDataToUpdate;
|
|
176
|
+
if (Array.isArray(freshAccordionData)) {
|
|
177
|
+
accordionDataToUpdate = freshAccordionData;
|
|
178
|
+
} else if (freshAccordionData.data && Array.isArray(freshAccordionData.data)) {
|
|
179
|
+
accordionDataToUpdate = freshAccordionData.data;
|
|
180
|
+
} else {
|
|
181
|
+
accordionDataToUpdate = freshAccordionData;
|
|
182
|
+
}
|
|
183
|
+
// Update accordion data with fresh data from API
|
|
184
|
+
dispatch({
|
|
185
|
+
type: _entityOverviewLayoutReducer.actionTypes.UPDATE_ACCORDION_DATA,
|
|
186
|
+
payload: accordionDataToUpdate
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
dispatch({
|
|
190
|
+
type: _entityOverviewLayoutReducer.actionTypes.INIT,
|
|
191
|
+
payload: dynamicConfig
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
} else {
|
|
195
|
+
const dynamicConfig = (0, _staticConfigResolver.default)(config, {});
|
|
196
|
+
// Update misc with enterpriseId from session storage
|
|
197
|
+
if (currentMisc) {
|
|
198
|
+
dynamicConfig.misc = currentMisc;
|
|
199
|
+
}
|
|
200
|
+
dispatch({
|
|
201
|
+
type: _entityOverviewLayoutReducer.actionTypes.INIT,
|
|
202
|
+
payload: dynamicConfig
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
dispatch({
|
|
206
|
+
type: _entityOverviewLayoutReducer.actionTypes.SET_LOADING,
|
|
207
|
+
payload: false
|
|
208
|
+
});
|
|
209
|
+
dispatch({
|
|
210
|
+
type: _entityOverviewLayoutReducer.actionTypes.CLOSE_DRAWER
|
|
211
|
+
});
|
|
212
|
+
};
|
|
213
|
+
const handleSwitchSelectItemInternal = async (selectedValue, config) => {
|
|
214
|
+
if (selectedValue) {
|
|
215
|
+
var _data$listData;
|
|
216
|
+
// Call the external handler to get new data based on selected value
|
|
217
|
+
const {
|
|
218
|
+
error,
|
|
219
|
+
data
|
|
220
|
+
} = await (handleSwitchSelectItem === null || handleSwitchSelectItem === void 0 ? void 0 : handleSwitchSelectItem(selectedValue));
|
|
221
|
+
let selectedItem = data === null || data === void 0 ? void 0 : data.data;
|
|
222
|
+
const selectedData = data === null || data === void 0 || (_data$listData = data.listData) === null || _data$listData === void 0 ? void 0 : _data$listData.find(item => item.value === selectedValue);
|
|
223
|
+
{
|
|
224
|
+
(config === null || config === void 0 ? void 0 : config.storageType) == "sessionStorage" && (config === null || config === void 0 ? void 0 : config.storageKey) && sessionStorage.setItem(config === null || config === void 0 ? void 0 : config.storageKey, JSON.stringify(selectedData));
|
|
225
|
+
}
|
|
226
|
+
// Always update 'selectedEnterprise' in sessionStorage to keep misc.enterpriseId in sync
|
|
227
|
+
if (selectedData) {
|
|
228
|
+
sessionStorage.setItem('selectedEnterprise', JSON.stringify(selectedData));
|
|
229
|
+
}
|
|
230
|
+
showSuccessNotification(config === null || config === void 0 ? void 0 : config.successMessage);
|
|
231
|
+
if (error) {
|
|
232
|
+
showErrorNotification(error);
|
|
233
|
+
} else {
|
|
234
|
+
// Update misc.enterpriseId to keep it in sync with selected enterprise
|
|
235
|
+
// Read from selectedData to match the sessionStorage structure
|
|
236
|
+
const enterpriseId = (selectedData === null || selectedData === void 0 ? void 0 : selectedData.value) || (selectedData === null || selectedData === void 0 ? void 0 : selectedData.enterpriseId) || (selectedData === null || selectedData === void 0 ? void 0 : selectedData.id) || selectedValue;
|
|
237
|
+
if (enterpriseId) {
|
|
238
|
+
dispatch({
|
|
239
|
+
type: _entityOverviewLayoutReducer.actionTypes.SET_MISC,
|
|
240
|
+
payload: _objectSpread(_objectSpread({}, state === null || state === void 0 ? void 0 : state.misc), {}, {
|
|
241
|
+
enterpriseId: enterpriseId,
|
|
242
|
+
enterpriseData: selectedData // Also update enterpriseData to match sessionStorage
|
|
243
|
+
})
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
dispatch({
|
|
247
|
+
type: _entityOverviewLayoutReducer.actionTypes.UPDATE_PROFILE_DATA,
|
|
248
|
+
payload: selectedItem
|
|
249
|
+
});
|
|
250
|
+
// Update accordion data if provided in the response
|
|
251
|
+
// Note: API returns 'accordianData' (typo) but we check for both
|
|
252
|
+
const accordionDataFromResponse = (data === null || data === void 0 ? void 0 : data.accordionData) || (data === null || data === void 0 ? void 0 : data.accordianData);
|
|
253
|
+
|
|
254
|
+
// Check if accordionDataFromResponse is an object with data array, or if it's directly an array
|
|
255
|
+
if (accordionDataFromResponse) {
|
|
256
|
+
let accordionDataToUpdate;
|
|
257
|
+
if (Array.isArray(accordionDataFromResponse)) {
|
|
258
|
+
// If it's directly an array, use it as is
|
|
259
|
+
accordionDataToUpdate = accordionDataFromResponse;
|
|
260
|
+
} else if (accordionDataFromResponse.data && Array.isArray(accordionDataFromResponse.data)) {
|
|
261
|
+
// If it's an object with a data property containing the array, extract the data array
|
|
262
|
+
accordionDataToUpdate = accordionDataFromResponse.data;
|
|
263
|
+
}
|
|
264
|
+
if (accordionDataToUpdate) {
|
|
265
|
+
dispatch({
|
|
266
|
+
type: _entityOverviewLayoutReducer.actionTypes.UPDATE_ACCORDION_DATA,
|
|
267
|
+
payload: accordionDataToUpdate
|
|
268
|
+
});
|
|
269
|
+
} else {
|
|
270
|
+
console.log('Accordion data structure not recognized:', accordionDataFromResponse);
|
|
271
|
+
}
|
|
272
|
+
} else {
|
|
273
|
+
if (getInitialData && config !== null && config !== void 0 && config.refreshAccordionOnSwitch) {
|
|
274
|
+
var _state$misc5;
|
|
275
|
+
// Optionally refresh accordion data by calling getInitialData again
|
|
276
|
+
const {
|
|
277
|
+
error: refreshError,
|
|
278
|
+
data: refreshData
|
|
279
|
+
} = await (getInitialData === null || getInitialData === void 0 ? void 0 : getInitialData(_objectSpread(_objectSpread({}, (_state$misc5 = state === null || state === void 0 ? void 0 : state.misc) !== null && _state$misc5 !== void 0 ? _state$misc5 : {}), {}, {
|
|
280
|
+
selectedValue
|
|
281
|
+
})));
|
|
282
|
+
if (!refreshError && refreshData !== null && refreshData !== void 0 && refreshData.accordionData) {
|
|
283
|
+
dispatch({
|
|
284
|
+
type: _entityOverviewLayoutReducer.actionTypes.UPDATE_ACCORDION_DATA,
|
|
285
|
+
payload: refreshData.accordionData
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
};
|
|
293
|
+
const handleActionClick = (actionType, actionData) => {
|
|
294
|
+
var _config$drawer, _drawerDetailData$dat, _state$drawer;
|
|
295
|
+
switch (actionType) {
|
|
296
|
+
case "PROFILE-DRAWER":
|
|
297
|
+
const record = _objectSpread({}, config === null || config === void 0 || (_config$drawer = config.drawer) === null || _config$drawer === void 0 || (_config$drawer = _config$drawer.data) === null || _config$drawer === void 0 ? void 0 : _config$drawer[actionData === null || actionData === void 0 ? void 0 : actionData.drawerKey]);
|
|
298
|
+
const drawerDetailData = handleDrawerData(actionData === null || actionData === void 0 ? void 0 : actionData.drawerData);
|
|
299
|
+
const dynamicConfig = (0, _staticConfigResolver.default)(record, (_drawerDetailData$dat = drawerDetailData === null || drawerDetailData === void 0 ? void 0 : drawerDetailData.data) !== null && _drawerDetailData$dat !== void 0 ? _drawerDetailData$dat : {});
|
|
300
|
+
dispatch({
|
|
301
|
+
type: _entityOverviewLayoutReducer.actionTypes.SET_DRAWER,
|
|
302
|
+
payload: {
|
|
303
|
+
data: _objectSpread(_objectSpread({}, (state === null || state === void 0 || (_state$drawer = state.drawer) === null || _state$drawer === void 0 ? void 0 : _state$drawer.data) || {}), {}, {
|
|
304
|
+
[actionData === null || actionData === void 0 ? void 0 : actionData.drawerKey]: dynamicConfig
|
|
305
|
+
}),
|
|
306
|
+
active: actionData === null || actionData === void 0 ? void 0 : actionData.drawerKey
|
|
307
|
+
}
|
|
308
|
+
});
|
|
309
|
+
dispatch({
|
|
310
|
+
type: _entityOverviewLayoutReducer.actionTypes.TOGGLE_DRAWER,
|
|
311
|
+
payload: "profile-edit"
|
|
312
|
+
});
|
|
313
|
+
break;
|
|
314
|
+
default:
|
|
315
|
+
console.log("Unknown action type:", actionType);
|
|
316
|
+
}
|
|
317
|
+
};
|
|
318
|
+
console.log(state, "EntityOverviewLayout state");
|
|
319
|
+
return /*#__PURE__*/_react.default.createElement(_styles.ProfilePageStyle, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
320
|
+
className: "fullPageLayout"
|
|
321
|
+
}, /*#__PURE__*/_react.default.createElement(_GlobalCss.default, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
322
|
+
className: "oaRightLayouts"
|
|
323
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
324
|
+
className: "oaTopHeaderAndBtnSec"
|
|
325
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Skeleton, {
|
|
326
|
+
loading: state === null || state === void 0 ? void 0 : state.isLoading,
|
|
327
|
+
active: true,
|
|
328
|
+
paragraph: {
|
|
329
|
+
rows: 1
|
|
330
|
+
}
|
|
331
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
332
|
+
className: "headerContent"
|
|
333
|
+
}, (backButton === null || backButton === void 0 ? void 0 : backButton.visible) && /*#__PURE__*/_react.default.createElement("div", {
|
|
334
|
+
className: "backButton",
|
|
335
|
+
onClick: () => {
|
|
336
|
+
handleBackButton();
|
|
337
|
+
}
|
|
338
|
+
}, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
339
|
+
color: (backButton === null || backButton === void 0 || (_backButton$iconConfi = backButton.iconConfig) === null || _backButton$iconConfi === void 0 ? void 0 : _backButton$iconConfi.color) || "primary-content",
|
|
340
|
+
size: (backButton === null || backButton === void 0 || (_backButton$iconConfi2 = backButton.iconConfig) === null || _backButton$iconConfi2 === void 0 ? void 0 : _backButton$iconConfi2.size) || 24,
|
|
341
|
+
icon: backButton.iconConfig.icon
|
|
342
|
+
})), (pageTitle === null || pageTitle === void 0 ? void 0 : pageTitle.visible) && (pageTitle === null || pageTitle === void 0 ? void 0 : pageTitle.title) && /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
343
|
+
color: pageTitle === null || pageTitle === void 0 ? void 0 : pageTitle.color,
|
|
344
|
+
typography: pageTitle === null || pageTitle === void 0 ? void 0 : pageTitle.type
|
|
345
|
+
}, pageTitle.title)))), /*#__PURE__*/_react.default.createElement("div", {
|
|
346
|
+
className: "profileContent"
|
|
347
|
+
}, (profileData === null || profileData === void 0 ? void 0 : profileData.visible) && /*#__PURE__*/_react.default.createElement(_antd.Skeleton, {
|
|
348
|
+
loading: state === null || state === void 0 ? void 0 : state.isLoading,
|
|
349
|
+
active: true,
|
|
350
|
+
paragraph: {
|
|
351
|
+
rows: 1
|
|
352
|
+
}
|
|
353
|
+
}, /*#__PURE__*/_react.default.createElement(_ProfileDataWidget.default, _extends({}, profileData === null || profileData === void 0 ? void 0 : profileData.data, {
|
|
354
|
+
alignProfile: profileData === null || profileData === void 0 ? void 0 : profileData.alignProfile,
|
|
355
|
+
handleSwitchSelectItem: handleSwitchSelectItemInternal
|
|
356
|
+
}))), (accordionData === null || accordionData === void 0 ? void 0 : accordionData.visible) && Array.isArray(accordionData === null || accordionData === void 0 ? void 0 : accordionData.data) && /*#__PURE__*/_react.default.createElement(_antd.Skeleton, {
|
|
357
|
+
loading: state === null || state === void 0 ? void 0 : state.isLoading,
|
|
358
|
+
active: true,
|
|
359
|
+
paragraph: {
|
|
360
|
+
rows: 3
|
|
361
|
+
}
|
|
362
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
363
|
+
className: "accordionsContainer"
|
|
364
|
+
}, accordionData.data.map((accordion, index) => /*#__PURE__*/_react.default.createElement("div", {
|
|
365
|
+
key: Math.random(),
|
|
366
|
+
className: "accordion-item"
|
|
367
|
+
}, /*#__PURE__*/_react.default.createElement(_Accordion.default, {
|
|
368
|
+
data: accordion,
|
|
369
|
+
key: Math.random(),
|
|
370
|
+
headerText: accordion.headerText,
|
|
371
|
+
defaultActiveKey: accordion.defaultActiveKey,
|
|
372
|
+
activeKey: accordion.activeKey,
|
|
373
|
+
subtext: accordion.subText,
|
|
374
|
+
componentConfig: accordion.componentConfig,
|
|
375
|
+
disabled: accordion.disabled,
|
|
376
|
+
hasContentPadding: accordion.hasContentPadding,
|
|
377
|
+
onChange: activeKeys => {
|
|
378
|
+
if (accordion.onChange) {
|
|
379
|
+
accordion.onChange(activeKeys);
|
|
380
|
+
}
|
|
381
|
+
},
|
|
382
|
+
customBody: accordion.customBody,
|
|
383
|
+
onActionClick: handleActionClick
|
|
384
|
+
}))))))), /*#__PURE__*/_react.default.createElement(_CustomNotification.default, {
|
|
385
|
+
ref: notificationRef
|
|
386
|
+
}), /*#__PURE__*/_react.default.createElement(_CustomDrawer.default, {
|
|
387
|
+
className: "oaDrawer",
|
|
388
|
+
open: (drawer === null || drawer === void 0 ? void 0 : drawer.visible) === true,
|
|
389
|
+
onClose: handleCloseDrawer,
|
|
390
|
+
title: drawer === null || drawer === void 0 || (_drawer$data = drawer.data) === null || _drawer$data === void 0 || (_drawer$data = _drawer$data[drawer === null || drawer === void 0 ? void 0 : drawer.active]) === null || _drawer$data === void 0 ? void 0 : _drawer$data.title,
|
|
391
|
+
width: 860,
|
|
392
|
+
footer: null
|
|
393
|
+
}, /*#__PURE__*/_react.default.createElement(_DetailDataLayout.default, _extends({}, (_drawer$data$drawer$a = drawer === null || drawer === void 0 || (_drawer$data2 = drawer.data) === null || _drawer$data2 === void 0 ? void 0 : _drawer$data2[drawer === null || drawer === void 0 ? void 0 : drawer.active]) !== null && _drawer$data$drawer$a !== void 0 ? _drawer$data$drawer$a : {}, {
|
|
394
|
+
customPageModal: modal,
|
|
395
|
+
addUserClick: addUserClick,
|
|
396
|
+
deleteUserClick: deleteUserClick,
|
|
397
|
+
editUserClick: editUserClick,
|
|
398
|
+
misc: misc,
|
|
399
|
+
drawer: drawer
|
|
400
|
+
}))))));
|
|
401
|
+
}
|
|
402
|
+
EntityOverviewLayout.propTypes = {};
|
|
403
|
+
EntityOverviewLayout.defaultProps = {};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.initialState = exports.entityOverviewLayoutReducer = exports.actionTypes = void 0;
|
|
7
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
8
|
+
require("core-js/modules/es.symbol.description.js");
|
|
9
|
+
var _staticConfigResolver = require("../../GenricLayOut/resolver/staticConfigResolver");
|
|
10
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
13
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
14
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
15
|
+
const actionTypes = exports.actionTypes = {
|
|
16
|
+
INIT: 'INIT',
|
|
17
|
+
SET_LOADING: 'SET_LOADING',
|
|
18
|
+
SET_PROFILE_DATA: 'SET_PROFILE_DATA',
|
|
19
|
+
SET_MISC: 'SET_MISC',
|
|
20
|
+
SET_DRAWER: 'SET_DRAWER',
|
|
21
|
+
TOGGLE_DRAWER: 'TOGGLE_DRAWER',
|
|
22
|
+
CLOSE_DRAWER: 'CLOSE_DRAWER',
|
|
23
|
+
UPDATE_PROFILE_DATA: 'UPDATE_PROFILE_DATA',
|
|
24
|
+
UPDATE_ACCORDION_DATA: 'UPDATE_ACCORDION_DATA'
|
|
25
|
+
};
|
|
26
|
+
const initialState = exports.initialState = {};
|
|
27
|
+
const entityOverviewLayoutReducer = (state, action) => {
|
|
28
|
+
switch (action.type) {
|
|
29
|
+
case actionTypes.INIT:
|
|
30
|
+
return (0, _staticConfigResolver.removeHidden)(action.payload);
|
|
31
|
+
case actionTypes.SET_LOADING:
|
|
32
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
33
|
+
isLoading: action.payload
|
|
34
|
+
});
|
|
35
|
+
case actionTypes.SET_PROFILE_DATA:
|
|
36
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
37
|
+
profileData: _objectSpread(_objectSpread({}, state.profileData), action.payload)
|
|
38
|
+
});
|
|
39
|
+
case actionTypes.UPDATE_PROFILE_DATA:
|
|
40
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
41
|
+
profileData: action.payload
|
|
42
|
+
});
|
|
43
|
+
case actionTypes.UPDATE_ACCORDION_DATA:
|
|
44
|
+
{
|
|
45
|
+
var _state$accordionData$, _state$accordionData;
|
|
46
|
+
console.log('Reducer: Updating accordion data with payload:', action.payload);
|
|
47
|
+
const newAccordionData = _objectSpread(_objectSpread({}, (state === null || state === void 0 ? void 0 : state.accordionData) || {}), {}, {
|
|
48
|
+
// Preserve all existing accordionData properties
|
|
49
|
+
visible: (_state$accordionData$ = state === null || state === void 0 || (_state$accordionData = state.accordionData) === null || _state$accordionData === void 0 ? void 0 : _state$accordionData.visible) !== null && _state$accordionData$ !== void 0 ? _state$accordionData$ : true,
|
|
50
|
+
// Preserve visible property, default to true
|
|
51
|
+
data: Array.isArray(action.payload) ? [...action.payload] : action.payload // Ensure new array reference
|
|
52
|
+
});
|
|
53
|
+
console.log('Reducer: New accordion data:', newAccordionData);
|
|
54
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
55
|
+
accordionData: newAccordionData
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
case actionTypes.SET_MISC:
|
|
59
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
60
|
+
misc: _objectSpread(_objectSpread({}, state.misc), action.payload)
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
// Drawer cases
|
|
64
|
+
case actionTypes.SET_DRAWER:
|
|
65
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
66
|
+
drawer: _objectSpread(_objectSpread({}, state.drawer), action.payload)
|
|
67
|
+
});
|
|
68
|
+
case actionTypes.TOGGLE_DRAWER:
|
|
69
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
70
|
+
drawer: _objectSpread(_objectSpread({}, state.drawer), {}, {
|
|
71
|
+
visible: true,
|
|
72
|
+
type: action.payload
|
|
73
|
+
})
|
|
74
|
+
});
|
|
75
|
+
case actionTypes.CLOSE_DRAWER:
|
|
76
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
77
|
+
drawer: _objectSpread(_objectSpread({}, state.drawer), {}, {
|
|
78
|
+
visible: false
|
|
79
|
+
})
|
|
80
|
+
});
|
|
81
|
+
default:
|
|
82
|
+
return state;
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
exports.entityOverviewLayoutReducer = entityOverviewLayoutReducer;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ProfilePageStyle = exports.DrawerWithOutFooter = exports.DrawerContent = void 0;
|
|
7
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
11
|
+
const ProfilePageStyle = exports.ProfilePageStyle = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .fullPageLayout {\n display: flex;\n min-height: 100vh;\n background: #fafafa;\n }\n\n .oaRightLayouts {\n flex: 1;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n }\n\n .oaTopHeaderAndBtnSec {\n background: #ffffff;\n border-bottom: 1px solid #e8e8e8;\n padding: 20px 24px;\n\n .headerContent {\n margin-left: 160px;\n display: flex;\n align-items: center;\n gap: 16px;\n\n .pageTitle {\n margin: 0;\n }\n\n .backButton {\n border-radius: 50%;\n width: 48px; /* Default desktop size */\n height: 48px; /* Default desktop size */\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--color-secondary-background);\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\n cursor: pointer;\n transition: all 0.2s ease;\n }\n }\n }\n\n .profileContent {\n flex: 1;\n padding: 0;\n overflow-y: auto;\n background: #ffffff;\n }\n\n .accordionsContainer {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 16px;\n padding: 0 24px;\n\n .accordion-item {\n width: 100%;\n max-width: 600px;\n background: var(--color-secondary-background);\n overflow: hidden;\n\n .accordion-content {\n padding: 20px;\n\n .key-value-section {\n margin-bottom: 20px;\n }\n\n .action-buttons-section {\n display: flex;\n gap: 12px;\n justify-content: flex-end;\n margin-top: 16px;\n padding-top: 16px;\n border-top: 1px solid var(--color-border);\n }\n\n .custom-content {\n margin-top: 16px;\n }\n }\n }\n\n /* Add bottom padding to last accordion item */\n .accordion-item:last-child {\n margin-bottom: 24px;\n }\n }\n\n @media (max-width: 768px) {\n .oaTopHeaderAndBtnSec {\n padding: 12px 16px;\n\n .headerContent {\n margin-left: 0; /* Remove left margin for mobile */\n gap: 12px;\n justify-content: flex-start; /* Align content to left */\n }\n }\n\n .oaTopHeaderAndBtnSec .headerContent .backButton {\n width: 40px !important; /* Mobile size with higher specificity */\n height: 40px !important; /* Mobile size with higher specificity */\n }\n\n .oaTopHeaderAndBtnSec .headerContent .backButton .MuiSvgIcon-root {\n font-size: 20px !important; /* Mobile icon size for Material-UI icons */\n }\n\n .profileContent {\n padding: 16px;\n }\n\n .accordionsContainer {\n padding: 0 16px;\n\n .accordion-item {\n max-width: 100%;\n\n .accordion-content {\n padding: 16px;\n\n .action-buttons-section {\n flex-direction: column;\n align-items: stretch;\n }\n }\n }\n }\n }\n"])));
|
|
12
|
+
const DrawerWithOutFooter = exports.DrawerWithOutFooter = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .ant-drawer-footer {\n display: none !important;\n }\n"])));
|
|
13
|
+
const DrawerContent = exports.DrawerContent = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding: 24px;\n\n .drawerTitle {\n margin-bottom: 24px;\n }\n\n .drawerDescription {\n margin-top: 24px;\n }\n"])));
|