@mseva/digit-ui-module-ptr 1.1.93 → 1.1.95
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 +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +60 -85
- package/dist/index.modern.js.map +1 -1
- package/package.json +2 -2
package/dist/index.modern.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LabelFieldPair, CardLabel, Dropdown, CardLabelError, TextInput, Toast, MobileNumber, CardSectionHeader, ActionBar, SubmitBar, Loader as Loader$1, UploadFile, TickMark, FormStep, TextArea, RadioOrSelect, Card, CardHeader, CardText, CardSubHeader, Modal, FormComposer, Menu, AppContainer, BackButton, PrivateRoute, StatusTable, Row, CheckBox, LinkButton, Banner, KeyNote, Header, MultiLink, TelePhone, DisplayPhotos, Table, PropertyHouse, CloseSvg, Label, LinkLabel, DatePicker, RadioButtons, DetailsCard, SearchAction, FilterAction, PopUp,
|
|
1
|
+
import { LabelFieldPair, CardLabel, Dropdown, CardLabelError, TextInput, Toast, MobileNumber, CardSectionHeader, ActionBar, SubmitBar, Loader as Loader$1, UploadFile, TickMark, FormStep, TextArea, RadioOrSelect, Card, CardHeader, CardText, CardSubHeader, Modal, FormComposer, Menu, AppContainer, BackButton, PrivateRoute, StatusTable, Row, CheckBox, LinkButton, Banner, KeyNote, Header, MultiLink, TelePhone, DisplayPhotos, Table, PropertyHouse, CloseSvg, Label, LinkLabel, DatePicker, RadioButtons, DetailsCard, SearchAction, FilterAction, PopUp, SearchForm, SearchField, BreadCrumb, PTRIcon, EmployeeModuleCard, OTPInput, Rating, CitizenHomeCard } from '@mseva/digit-ui-react-components';
|
|
2
2
|
import React, { useState, useEffect, useMemo, useRef, Fragment as Fragment$1, useCallback } from 'react';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
4
|
import { useLocation, useRouteMatch, useHistory, Switch, Route, Redirect, Link, useParams } from 'react-router-dom';
|
|
@@ -18521,7 +18521,7 @@ function NewApplicationTimeline({
|
|
|
18521
18521
|
return normalized.reverse();
|
|
18522
18522
|
};
|
|
18523
18523
|
const data = useMemo(() => normalizeTimeline(workflowDetails), [workflowDetails]);
|
|
18524
|
-
const sortedData = data || [];
|
|
18524
|
+
const sortedData = (data === null || data === void 0 ? void 0 : data.filter(val => !((val === null || val === void 0 ? void 0 : val.performedAction) === "SAVE_AS_DRAFT"))) || [];
|
|
18525
18525
|
console.log("sortedData", sortedData);
|
|
18526
18526
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
18527
18527
|
className: "custom-timeline-container"
|
|
@@ -23035,64 +23035,6 @@ const ApplicationCard = ({
|
|
|
23035
23035
|
}))));
|
|
23036
23036
|
};
|
|
23037
23037
|
|
|
23038
|
-
const ApplicationLinks = ({
|
|
23039
|
-
linkPrefix,
|
|
23040
|
-
classNameForMobileView: _classNameForMobileView = ""
|
|
23041
|
-
}) => {
|
|
23042
|
-
const {
|
|
23043
|
-
t
|
|
23044
|
-
} = useTranslation();
|
|
23045
|
-
const allLinks = [{
|
|
23046
|
-
text: t("ES_TITLE_NEW_REGISTRATION"),
|
|
23047
|
-
link: "/digit-ui/employee/ptr/new-application"
|
|
23048
|
-
}, {
|
|
23049
|
-
text: t("ES_TITILE_SEARCH_APPLICATION"),
|
|
23050
|
-
link: `${linkPrefix}/search`
|
|
23051
|
-
}];
|
|
23052
|
-
const [links, setLinks] = useState([]);
|
|
23053
|
-
const {
|
|
23054
|
-
roles
|
|
23055
|
-
} = Digit.UserService.getUser().info;
|
|
23056
|
-
const hasAccess = accessTo => {
|
|
23057
|
-
return roles.filter(role => accessTo.includes(role.code)).length;
|
|
23058
|
-
};
|
|
23059
|
-
useEffect(() => {
|
|
23060
|
-
let linksToShow = [];
|
|
23061
|
-
allLinks.forEach(link => {
|
|
23062
|
-
if (link.accessTo) {
|
|
23063
|
-
if (hasAccess(link.accessTo)) {
|
|
23064
|
-
linksToShow.push(link);
|
|
23065
|
-
}
|
|
23066
|
-
} else {
|
|
23067
|
-
linksToShow.push(link);
|
|
23068
|
-
}
|
|
23069
|
-
});
|
|
23070
|
-
setLinks(linksToShow);
|
|
23071
|
-
}, []);
|
|
23072
|
-
const GetLogo = () => /*#__PURE__*/React.createElement("div", {
|
|
23073
|
-
className: "header"
|
|
23074
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
23075
|
-
className: "logo"
|
|
23076
|
-
}, /*#__PURE__*/React.createElement(ShippingTruck, null)), " ", /*#__PURE__*/React.createElement("span", {
|
|
23077
|
-
className: "text"
|
|
23078
|
-
}, t("ES_TITLE_PET_REGISTRATION")));
|
|
23079
|
-
return /*#__PURE__*/React.createElement(Card, {
|
|
23080
|
-
className: "employeeCard filter"
|
|
23081
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
23082
|
-
className: `complaint-links-container ${_classNameForMobileView}`
|
|
23083
|
-
}, GetLogo(), /*#__PURE__*/React.createElement("div", {
|
|
23084
|
-
className: "body"
|
|
23085
|
-
}, links.map(({
|
|
23086
|
-
link,
|
|
23087
|
-
text
|
|
23088
|
-
}, index) => /*#__PURE__*/React.createElement("span", {
|
|
23089
|
-
className: "link",
|
|
23090
|
-
key: index
|
|
23091
|
-
}, /*#__PURE__*/React.createElement(Link, {
|
|
23092
|
-
to: link
|
|
23093
|
-
}, text))))));
|
|
23094
|
-
};
|
|
23095
|
-
|
|
23096
23038
|
const MobileInbox = ({
|
|
23097
23039
|
data,
|
|
23098
23040
|
isLoading,
|
|
@@ -23129,11 +23071,7 @@ const MobileInbox = ({
|
|
|
23129
23071
|
className: "inbox-container"
|
|
23130
23072
|
}, /*#__PURE__*/React.createElement("div", {
|
|
23131
23073
|
className: "filters-container"
|
|
23132
|
-
},
|
|
23133
|
-
classNameForMobileView: "linksWrapperForMobileInbox",
|
|
23134
|
-
linkPrefix: parentRoute,
|
|
23135
|
-
isMobile: true
|
|
23136
|
-
}), /*#__PURE__*/React.createElement(ApplicationCard, {
|
|
23074
|
+
}, /*#__PURE__*/React.createElement(ApplicationCard, {
|
|
23137
23075
|
t: t,
|
|
23138
23076
|
data: getData(),
|
|
23139
23077
|
onFilterChange: onFilterChange,
|
|
@@ -23849,6 +23787,7 @@ const StatusCount = ({
|
|
|
23849
23787
|
const {
|
|
23850
23788
|
t
|
|
23851
23789
|
} = useTranslation();
|
|
23790
|
+
console.log("status===", status);
|
|
23852
23791
|
return /*#__PURE__*/React.createElement(CheckBox, {
|
|
23853
23792
|
styles: {
|
|
23854
23793
|
height: "unset"
|
|
@@ -23860,7 +23799,8 @@ const StatusCount = ({
|
|
|
23860
23799
|
checked: (_searchParams$applica => {
|
|
23861
23800
|
return searchParams === null || searchParams === void 0 ? void 0 : (_searchParams$applica = searchParams.applicationStatus) === null || _searchParams$applica === void 0 ? void 0 : _searchParams$applica.some(e => e.uuid === status.uuid);
|
|
23862
23801
|
})(),
|
|
23863
|
-
label: `${status.name}
|
|
23802
|
+
label: `${status.name}
|
|
23803
|
+
(${(statusMap === null || statusMap === void 0 ? void 0 : (_statusMap$find = statusMap.find(e => e.statusid === status.uuid)) === null || _statusMap$find === void 0 ? void 0 : _statusMap$find.count) || "-"})`
|
|
23864
23804
|
});
|
|
23865
23805
|
};
|
|
23866
23806
|
|
|
@@ -23882,17 +23822,17 @@ const Status = ({
|
|
|
23882
23822
|
} = Digit.Hooks.useApplicationStatusGeneral({
|
|
23883
23823
|
businessServices
|
|
23884
23824
|
}, {});
|
|
23885
|
-
console.log(
|
|
23825
|
+
console.log("statusData", statusData);
|
|
23886
23826
|
const {
|
|
23887
23827
|
userRoleStates
|
|
23888
23828
|
} = statusData || {};
|
|
23889
23829
|
const translateState = (state, t) => {
|
|
23890
|
-
return
|
|
23830
|
+
return t(`ES_PTR_COMMON_STATUS_${state.state || "CREATED"}`);
|
|
23891
23831
|
};
|
|
23892
23832
|
if (isLoading) {
|
|
23893
23833
|
return /*#__PURE__*/React.createElement(Loader$1, null);
|
|
23894
23834
|
}
|
|
23895
|
-
console.log(
|
|
23835
|
+
console.log("userRoleStates", userRoleStates);
|
|
23896
23836
|
return userRoleStates !== null && userRoleStates !== void 0 && userRoleStates.filter(e => !e.isTerminateState).length || true ? /*#__PURE__*/React.createElement("div", {
|
|
23897
23837
|
className: "status-container"
|
|
23898
23838
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -25179,7 +25119,7 @@ const StepWrapper = ({
|
|
|
25179
25119
|
const stepStyle = (isActive, isLast) => ({
|
|
25180
25120
|
display: "flex",
|
|
25181
25121
|
alignItems: "center",
|
|
25182
|
-
justifyContent: "flex-
|
|
25122
|
+
justifyContent: "flex-start",
|
|
25183
25123
|
flex: "0 0 auto",
|
|
25184
25124
|
color: isActive ? "#0D43A7" : "#9CA3AF",
|
|
25185
25125
|
padding: "14px 12px",
|
|
@@ -25232,14 +25172,36 @@ const StepWrapper = ({
|
|
|
25232
25172
|
};
|
|
25233
25173
|
const isMobile = window.Digit.Utils.browser.isMobile();
|
|
25234
25174
|
const totalSteps = _stepsList.length;
|
|
25175
|
+
const mobileNavBarStyle = isMobile ? {
|
|
25176
|
+
flexDirection: "row",
|
|
25177
|
+
overflowX: "auto",
|
|
25178
|
+
whiteSpace: "nowrap",
|
|
25179
|
+
minWidth: "100%",
|
|
25180
|
+
maxWidth: "100%",
|
|
25181
|
+
gap: "8px",
|
|
25182
|
+
padding: "10px"
|
|
25183
|
+
} : {};
|
|
25184
|
+
const mobileCircleStyle = isMobile ? {
|
|
25185
|
+
width: "32px",
|
|
25186
|
+
height: "32px",
|
|
25187
|
+
fontSize: "12px"
|
|
25188
|
+
} : {};
|
|
25189
|
+
const mobileLabelStyle = isMobile ? {
|
|
25190
|
+
fontSize: "10px"
|
|
25191
|
+
} : {};
|
|
25192
|
+
const mobileStepStyle = isMobile ? {
|
|
25193
|
+
width: "auto",
|
|
25194
|
+
padding: "6px",
|
|
25195
|
+
marginBottom: "0",
|
|
25196
|
+
flexDirection: "column",
|
|
25197
|
+
alignItems: "center"
|
|
25198
|
+
} : {};
|
|
25235
25199
|
return /*#__PURE__*/React.createElement("div", {
|
|
25236
25200
|
className: "stepper",
|
|
25237
25201
|
style: {
|
|
25238
25202
|
width: "100%",
|
|
25239
25203
|
display: "flex",
|
|
25240
|
-
flexDirection: "row",
|
|
25241
|
-
alignItems: "flex-start",
|
|
25242
|
-
justifyContent: "flex-start",
|
|
25204
|
+
flexDirection: isMobile ? "column" : "row",
|
|
25243
25205
|
gap: "24px"
|
|
25244
25206
|
}
|
|
25245
25207
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -25251,32 +25213,45 @@ const StepWrapper = ({
|
|
|
25251
25213
|
padding: "18px",
|
|
25252
25214
|
minWidth: "120px",
|
|
25253
25215
|
maxWidth: "320px",
|
|
25254
|
-
marginBottom: "20px"
|
|
25216
|
+
marginBottom: "20px",
|
|
25217
|
+
marginTop: isMobile ? "20px" : "0",
|
|
25218
|
+
height: isMobile ? "106px" : "",
|
|
25219
|
+
...mobileNavBarStyle
|
|
25255
25220
|
}
|
|
25256
25221
|
}, [...Array(totalSteps)].map((_, index) => /*#__PURE__*/React.createElement("div", {
|
|
25257
25222
|
className: "step-content",
|
|
25258
25223
|
key: index,
|
|
25259
|
-
style:
|
|
25224
|
+
style: {
|
|
25225
|
+
...stepStyle(index + 1 <= _currentStep, index === totalSteps - 1),
|
|
25226
|
+
...mobileStepStyle
|
|
25227
|
+
}
|
|
25260
25228
|
}, /*#__PURE__*/React.createElement("div", {
|
|
25229
|
+
className: "step-circle",
|
|
25230
|
+
style: {
|
|
25231
|
+
...circleStyle(index + 1),
|
|
25232
|
+
...mobileCircleStyle
|
|
25233
|
+
}
|
|
25234
|
+
}, index + 1, index < totalSteps - 1 && !isMobile && /*#__PURE__*/React.createElement("div", {
|
|
25235
|
+
style: lineStyle
|
|
25236
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
25261
25237
|
className: "step-sub-content",
|
|
25262
25238
|
style: {
|
|
25263
25239
|
display: "flex",
|
|
25264
25240
|
flexDirection: "column",
|
|
25265
|
-
alignItems: "flex-end",
|
|
25266
|
-
margin: "10px"
|
|
25241
|
+
alignItems: isMobile ? "center" : "flex-end",
|
|
25242
|
+
margin: isMobile ? "4px" : "10px"
|
|
25267
25243
|
}
|
|
25268
25244
|
}, index + 1 === totalSteps ? null : /*#__PURE__*/React.createElement("div", {
|
|
25269
25245
|
className: "step-number",
|
|
25270
25246
|
style: stepNumberStyle
|
|
25271
25247
|
}), /*#__PURE__*/React.createElement("div", {
|
|
25272
25248
|
className: "step-label",
|
|
25273
|
-
style:
|
|
25274
|
-
|
|
25275
|
-
|
|
25276
|
-
|
|
25277
|
-
|
|
25278
|
-
|
|
25279
|
-
}))))), /*#__PURE__*/React.createElement("div", {
|
|
25249
|
+
style: {
|
|
25250
|
+
...labelStyle,
|
|
25251
|
+
...mobileLabelStyle,
|
|
25252
|
+
textAlign: isMobile ? "center" : "right"
|
|
25253
|
+
}
|
|
25254
|
+
}, t(_stepsList[index].stepLabel)))))), /*#__PURE__*/React.createElement("div", {
|
|
25280
25255
|
className: "stepper-body",
|
|
25281
25256
|
style: {
|
|
25282
25257
|
width: "100%",
|
|
@@ -26260,7 +26235,7 @@ const RenewPTRStepForm = () => {
|
|
|
26260
26235
|
}
|
|
26261
26236
|
}, [defaultValues]);
|
|
26262
26237
|
return /*#__PURE__*/React.createElement("div", {
|
|
26263
|
-
className: "
|
|
26238
|
+
className: "card"
|
|
26264
26239
|
}, /*#__PURE__*/React.createElement(CardHeader, {
|
|
26265
26240
|
styles: {
|
|
26266
26241
|
fontSize: "28px",
|