@djb25/digit-ui-module-wt 1.0.17 → 1.0.19
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 +117 -132
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TickMark, ArrowDown, MobileNumber, CardLabelError, TextInput, Dropdown, DatePicker, SubmitBar, Card, Table, Loader, Toast, AppContainer, ModuleHeader, ArrowLeft, PrivateRoute, HomeIcon, KeyNote, Modal, CardHeader, CardText, FormStep, CardLabel, RadioButtons, UploadFile, TextArea, CheckBox, CardSubHeader, StatusTable, Row, GenericFileIcon, LinkButton, EditIcon, Banner, CHBIcon, EmployeeModuleCard, CloseSvg, Label, LinkLabel, ActionBar, DetailsCard, SearchAction, FilterAction, PopUp, ShippingTruck, CustomNameDropdown, MultiSelectDropdown, LabelFieldPair, AddIcon, Menu, Header, TelePhone, DisplayPhotos, CardSectionHeader, CheckPoint, ConnectingCheckPoints, MultiLink, Localities, RemoveableTag, FormComposer, PDFSvg, MultiUploadWrapper, Close as Close$g, BreakLine, InfoBannerIcon, ViewsIcon, ButtonSelector, LocationIcon, CitizenHomeCard, PTIcon, ApplicantDetails, AddressDetails } from '@djb25/digit-ui-react-components';
|
|
2
2
|
import React, { useState, useMemo, useCallback, useEffect, Fragment, useRef } from 'react';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import { useLocation,
|
|
4
|
+
import { useLocation, useRouteMatch, useHistory, Switch, Route, Redirect, Link, useParams } from 'react-router-dom';
|
|
5
5
|
import { useQueryClient } from 'react-query';
|
|
6
6
|
import { useForm, Controller } from 'react-hook-form';
|
|
7
7
|
import { io } from 'socket.io-client';
|
|
@@ -137,7 +137,6 @@ const VerticalTimeline = ({
|
|
|
137
137
|
t
|
|
138
138
|
} = useTranslation();
|
|
139
139
|
const location = useLocation();
|
|
140
|
-
const history = useHistory();
|
|
141
140
|
const currentRoute = location.pathname.split("/").pop();
|
|
142
141
|
if (currentRoute === "info") return null;
|
|
143
142
|
const steps = config.filter(item => item.timeLine && item.timeLine.length > 0).reduce((acc, item) => {
|
|
@@ -156,9 +155,9 @@ const VerticalTimeline = ({
|
|
|
156
155
|
return acc;
|
|
157
156
|
}, []).sort((a, b) => a.stepNumber - b.stepNumber);
|
|
158
157
|
steps.push({
|
|
159
|
-
key:
|
|
160
|
-
label:
|
|
161
|
-
routes: [
|
|
158
|
+
key: "final-submit",
|
|
159
|
+
label: "Review & Submit",
|
|
160
|
+
routes: ["check", "wt-acknowledgement", "mt-acknowledgement", "tp-acknowledgement"],
|
|
162
161
|
stepNumber: steps.length + 1
|
|
163
162
|
});
|
|
164
163
|
const currentStepIndex = steps.findIndex(step => step.routes.includes(currentRoute));
|
|
@@ -166,15 +165,17 @@ const VerticalTimeline = ({
|
|
|
166
165
|
const handleStepClick = (route, index) => {};
|
|
167
166
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
168
167
|
className: "vertical-timeline-container"
|
|
168
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
169
|
+
className: "vertical-timeline-wrapper"
|
|
169
170
|
}, steps.map((step, index) => {
|
|
170
171
|
const isCompleted = index < activeStepIndex;
|
|
171
172
|
const isActive = index === activeStepIndex;
|
|
172
173
|
return /*#__PURE__*/React.createElement("div", {
|
|
173
174
|
key: index,
|
|
174
|
-
className: `vertical-timeline-step ${isCompleted ?
|
|
175
|
+
className: `vertical-timeline-step ${isCompleted ? "completed" : ""} ${isActive ? "active" : ""}`,
|
|
175
176
|
onClick: () => handleStepClick()
|
|
176
177
|
}, /*#__PURE__*/React.createElement("div", {
|
|
177
|
-
className: `vertical-timeline-connector ${index < activeStepIndex ?
|
|
178
|
+
className: `vertical-timeline-connector ${index < activeStepIndex ? "completed" : ""}`
|
|
178
179
|
}), /*#__PURE__*/React.createElement("div", {
|
|
179
180
|
className: "vertical-timeline-pill"
|
|
180
181
|
}, isCompleted ? /*#__PURE__*/React.createElement(TickMark, null) : step.stepNumber), /*#__PURE__*/React.createElement("div", {
|
|
@@ -182,7 +183,7 @@ const VerticalTimeline = ({
|
|
|
182
183
|
}, /*#__PURE__*/React.createElement("div", {
|
|
183
184
|
className: "vertical-timeline-label"
|
|
184
185
|
}, t(step.label))));
|
|
185
|
-
})));
|
|
186
|
+
}))));
|
|
186
187
|
};
|
|
187
188
|
|
|
188
189
|
const WTCreate = () => {
|
|
@@ -352,26 +353,11 @@ const WTCreate = () => {
|
|
|
352
353
|
const MTAcknowledgement = (_Digit3 = Digit) === null || _Digit3 === void 0 ? void 0 : (_Digit3$ComponentRegi = _Digit3.ComponentRegistryService) === null || _Digit3$ComponentRegi === void 0 ? void 0 : _Digit3$ComponentRegi.getComponent("MTAcknowledgement");
|
|
353
354
|
const TPAcknowledgement = (_Digit4 = Digit) === null || _Digit4 === void 0 ? void 0 : (_Digit4$ComponentRegi = _Digit4.ComponentRegistryService) === null || _Digit4$ComponentRegi === void 0 ? void 0 : _Digit4$ComponentRegi.getComponent("TPAcknowledgement");
|
|
354
355
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
width: "100%",
|
|
358
|
-
gap: "24px"
|
|
359
|
-
}
|
|
360
|
-
}, !pathname.includes("/info") && /*#__PURE__*/React.createElement("div", {
|
|
361
|
-
style: {
|
|
362
|
-
flex: "0 0 280px",
|
|
363
|
-
background: "#fff",
|
|
364
|
-
padding: "20px 0",
|
|
365
|
-
boxShadow: "0 2px 4px rgba(0,0,0,0.1)",
|
|
366
|
-
borderRadius: "4px"
|
|
367
|
-
}
|
|
368
|
-
}, /*#__PURE__*/React.createElement(VerticalTimeline, {
|
|
356
|
+
className: "employee-form-section-wrapper"
|
|
357
|
+
}, !pathname.includes("/info") && /*#__PURE__*/React.createElement(VerticalTimeline, {
|
|
369
358
|
config: config
|
|
370
|
-
})
|
|
371
|
-
|
|
372
|
-
flex: "1",
|
|
373
|
-
overflowY: "auto"
|
|
374
|
-
}
|
|
359
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
360
|
+
className: "employee-form-section"
|
|
375
361
|
}, /*#__PURE__*/React.createElement(Switch, null, config.map((routeObj, index) => {
|
|
376
362
|
var _userDetails$user;
|
|
377
363
|
const {
|
|
@@ -2547,31 +2533,16 @@ const SearchApplication = ({
|
|
|
2547
2533
|
}, t("ES_COMMON_CLEAR_SEARCH"));
|
|
2548
2534
|
};
|
|
2549
2535
|
return /*#__PURE__*/React.createElement("form", {
|
|
2550
|
-
onSubmit: handleSubmit(onSubmitInput)
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
style: {
|
|
2554
|
-
width: "auto",
|
|
2555
|
-
marginBottom: "16px",
|
|
2556
|
-
marginLeft: isInboxPage ? "" : "revert"
|
|
2557
|
-
}
|
|
2558
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
2559
|
-
className: "search-complaint-container",
|
|
2560
|
-
style: {
|
|
2561
|
-
width: "100%"
|
|
2562
|
-
}
|
|
2563
|
-
}, (type === "mobile" || mobileView) && /*#__PURE__*/React.createElement("div", {
|
|
2536
|
+
onSubmit: handleSubmit(onSubmitInput),
|
|
2537
|
+
className: "search-form-wrapper search-complaint-container"
|
|
2538
|
+
}, /*#__PURE__*/React.createElement(React.Fragment, null, (type === "mobile" || mobileView) && /*#__PURE__*/React.createElement("div", {
|
|
2564
2539
|
className: "complaint-header"
|
|
2565
2540
|
}, /*#__PURE__*/React.createElement("h2", null, t("ES_COMMON_SEARCH_BY")), /*#__PURE__*/React.createElement("span", {
|
|
2566
2541
|
onClick: onClose
|
|
2567
2542
|
}, /*#__PURE__*/React.createElement(CloseSvg, null))), /*#__PURE__*/React.createElement("div", {
|
|
2568
|
-
className: "
|
|
2569
|
-
style: {
|
|
2570
|
-
width: "100%",
|
|
2571
|
-
display: "grid"
|
|
2572
|
-
}
|
|
2543
|
+
className: "formcomposer-section-grid"
|
|
2573
2544
|
}, searchFields === null || searchFields === void 0 ? void 0 : (_searchFields$filter = searchFields.filter(e => true)) === null || _searchFields$filter === void 0 ? void 0 : _searchFields$filter.map((input, index) => {
|
|
2574
|
-
var _formState$dirtyField, _formState$errors, _formState$errors$inp;
|
|
2545
|
+
var _formState$dirtyField, _formState$errors, _formState$errors$inp, _formState$errors2, _formState$errors2$in;
|
|
2575
2546
|
return /*#__PURE__*/React.createElement("div", {
|
|
2576
2547
|
key: input.name,
|
|
2577
2548
|
className: "input-fields"
|
|
@@ -2600,7 +2571,7 @@ const SearchApplication = ({
|
|
|
2600
2571
|
name: input.name,
|
|
2601
2572
|
control: control,
|
|
2602
2573
|
defaultValue: ""
|
|
2603
|
-
})), formState !== null && formState !== void 0 && (_formState$dirtyField = formState.dirtyFields) !== null && _formState$dirtyField !== void 0 && _formState$dirtyField[input.name] ? /*#__PURE__*/React.createElement("span", {
|
|
2574
|
+
})), formState !== null && formState !== void 0 && (_formState$dirtyField = formState.dirtyFields) !== null && _formState$dirtyField !== void 0 && _formState$dirtyField[input.name] && formState !== null && formState !== void 0 && (_formState$errors = formState.errors) !== null && _formState$errors !== void 0 && (_formState$errors$inp = _formState$errors[input.name]) !== null && _formState$errors$inp !== void 0 && _formState$errors$inp.message ? /*#__PURE__*/React.createElement("span", {
|
|
2604
2575
|
style: {
|
|
2605
2576
|
fontWeight: "700",
|
|
2606
2577
|
color: "rgba(212, 53, 28)",
|
|
@@ -2609,27 +2580,20 @@ const SearchApplication = ({
|
|
|
2609
2580
|
fontSize: "12px"
|
|
2610
2581
|
},
|
|
2611
2582
|
className: "inbox-search-form-error"
|
|
2612
|
-
}, formState === null || formState === void 0 ? void 0 : (_formState$
|
|
2613
|
-
}),
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
className: "
|
|
2621
|
-
}, /*#__PURE__*/React.createElement("div", null, clearAll())), type === "desktop" && !mobileView && /*#__PURE__*/React.createElement("div", {
|
|
2622
|
-
style: {
|
|
2623
|
-
maxWidth: "unset",
|
|
2624
|
-
marginLeft: "unset"
|
|
2625
|
-
},
|
|
2626
|
-
className: "search-submit-wrapper"
|
|
2627
|
-
}, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
2628
|
-
className: "submit-bar-search",
|
|
2629
|
-
label: t("ES_COMMON_SEARCH"),
|
|
2583
|
+
}, formState === null || formState === void 0 ? void 0 : (_formState$errors2 = formState.errors) === null || _formState$errors2 === void 0 ? void 0 : (_formState$errors2$in = _formState$errors2[input.name]) === null || _formState$errors2$in === void 0 ? void 0 : _formState$errors2$in.message) : null);
|
|
2584
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
2585
|
+
className: "formcomposer-section-button"
|
|
2586
|
+
}, isInboxPage ? /*#__PURE__*/React.createElement("div", {
|
|
2587
|
+
className: "generic-button clear-search"
|
|
2588
|
+
}, /*#__PURE__*/React.createElement("p", {
|
|
2589
|
+
onClick: clearSearch
|
|
2590
|
+
}, t("ES_COMMON_CLEAR_SEARCH"))) : /*#__PURE__*/React.createElement("div", null, clearAll()), type === "desktop" && !mobileView && /*#__PURE__*/React.createElement(SubmitBar, {
|
|
2591
|
+
className: "generic-button",
|
|
2630
2592
|
disabled: !!Object.keys(formState.errors).length || formValueEmpty(),
|
|
2631
|
-
|
|
2632
|
-
|
|
2593
|
+
label: t("ES_COMMON_SEARCH"),
|
|
2594
|
+
submit: true,
|
|
2595
|
+
form: "search-form"
|
|
2596
|
+
})), (type === "mobile" || mobileView) && /*#__PURE__*/React.createElement(ActionBar, {
|
|
2633
2597
|
className: "clear-search-container"
|
|
2634
2598
|
}, /*#__PURE__*/React.createElement("button", {
|
|
2635
2599
|
className: "clear-search",
|
|
@@ -3559,6 +3523,7 @@ const AddTripModal = ({
|
|
|
3559
3523
|
const FixedPointScheduleManagement = ({
|
|
3560
3524
|
...props
|
|
3561
3525
|
}) => {
|
|
3526
|
+
var _data$;
|
|
3562
3527
|
const {
|
|
3563
3528
|
t
|
|
3564
3529
|
} = useTranslation();
|
|
@@ -3587,12 +3552,50 @@ const FixedPointScheduleManagement = ({
|
|
|
3587
3552
|
value: "all"
|
|
3588
3553
|
});
|
|
3589
3554
|
const [editingRowIndex, setEditingRowIndex] = useState(null);
|
|
3590
|
-
const [
|
|
3555
|
+
const [pageOffset, setPageOffset] = useState(0);
|
|
3556
|
+
const [pageSize, setPageSize] = useState(10);
|
|
3557
|
+
const [filters, setFilters] = useState({
|
|
3558
|
+
limit: 10,
|
|
3559
|
+
offset: 0
|
|
3560
|
+
});
|
|
3591
3561
|
const {
|
|
3592
3562
|
isLoading,
|
|
3593
3563
|
data: scheduleData,
|
|
3594
3564
|
refetch: reSearch
|
|
3595
3565
|
} = Digit.Hooks.wt.useFixedPointScheduleSearch(tenantId, filters);
|
|
3566
|
+
const {
|
|
3567
|
+
data: fixedPointData,
|
|
3568
|
+
isLoading: isFpLoading
|
|
3569
|
+
} = Digit.Hooks.wt.useFixedPointSearchAPI({
|
|
3570
|
+
tenantId,
|
|
3571
|
+
filters: {
|
|
3572
|
+
offset: 0,
|
|
3573
|
+
limit: 100
|
|
3574
|
+
}
|
|
3575
|
+
});
|
|
3576
|
+
const {
|
|
3577
|
+
data: allSchedulesData
|
|
3578
|
+
} = Digit.Hooks.wt.useFixedPointScheduleSearch(tenantId, {
|
|
3579
|
+
limit: 1000,
|
|
3580
|
+
offset: 0
|
|
3581
|
+
});
|
|
3582
|
+
const fixedPoints = React.useMemo(() => {
|
|
3583
|
+
const fromFpApi = (fixedPointData === null || fixedPointData === void 0 ? void 0 : fixedPointData.fixedPointTimeTableDetails) || (fixedPointData === null || fixedPointData === void 0 ? void 0 : fixedPointData.waterTankerBookingDetail) || (fixedPointData === null || fixedPointData === void 0 ? void 0 : fixedPointData.fixedPoints) || [];
|
|
3584
|
+
const fromScheduleApi = (allSchedulesData === null || allSchedulesData === void 0 ? void 0 : allSchedulesData.fixedPointTimeTableDetails) || [];
|
|
3585
|
+
const combinedData = [...fromFpApi, ...fromScheduleApi];
|
|
3586
|
+
const points = combinedData.map(fp => {
|
|
3587
|
+
var _fp$applicantDetail;
|
|
3588
|
+
return {
|
|
3589
|
+
label: fp.fixedPointCode || fp.name || ((_fp$applicantDetail = fp.applicantDetail) === null || _fp$applicantDetail === void 0 ? void 0 : _fp$applicantDetail.name) || fp.bookingId,
|
|
3590
|
+
value: fp.fixedPointCode || fp.bookingId
|
|
3591
|
+
};
|
|
3592
|
+
}).filter(p => p.label && p.value);
|
|
3593
|
+
const uniquePoints = points.filter((v, i, a) => a.findIndex(t => t.value === v.value) === i);
|
|
3594
|
+
return [{
|
|
3595
|
+
label: t("WT_ALL_FIXED_POINTS") !== "WT_ALL_FIXED_POINTS" ? t("WT_ALL_FIXED_POINTS") : "All Fixed Points",
|
|
3596
|
+
value: "all"
|
|
3597
|
+
}, ...uniquePoints];
|
|
3598
|
+
}, [fixedPointData, allSchedulesData, t]);
|
|
3596
3599
|
const {
|
|
3597
3600
|
mutate: createSchedule
|
|
3598
3601
|
} = Digit.Hooks.wt.useCreateFixedPointSchedule(tenantId);
|
|
@@ -3648,20 +3651,42 @@ const FixedPointScheduleManagement = ({
|
|
|
3648
3651
|
returnToFpl: item.timeOfArrivingBackFplAfterDelivery,
|
|
3649
3652
|
volume: item.volumeWaterTobeDelivery,
|
|
3650
3653
|
vehicle: item.vehicleId,
|
|
3651
|
-
active: item.isEnable ? "Y" : "N"
|
|
3654
|
+
active: item.isEnable ? "Y" : "N",
|
|
3655
|
+
totalCount: item.totalCount
|
|
3652
3656
|
}));
|
|
3653
3657
|
setData(mappedData);
|
|
3654
3658
|
}
|
|
3655
3659
|
}, [scheduleData]);
|
|
3656
|
-
const
|
|
3660
|
+
const fetchNextPage = () => {
|
|
3661
|
+
setPageOffset(prevState => prevState + pageSize);
|
|
3662
|
+
};
|
|
3663
|
+
const fetchPrevPage = () => {
|
|
3664
|
+
setPageOffset(prevState => prevState - pageSize);
|
|
3665
|
+
};
|
|
3666
|
+
const handlePageSizeChange = e => {
|
|
3667
|
+
setPageSize(Number(e.target.value));
|
|
3668
|
+
};
|
|
3669
|
+
const handleSearch = (customFilters = null, offset = null) => {
|
|
3657
3670
|
var _day$value;
|
|
3658
|
-
|
|
3671
|
+
const searchFilters = customFilters || {
|
|
3659
3672
|
fixedPointCode: (fixedPoint === null || fixedPoint === void 0 ? void 0 : fixedPoint.value) === "all" ? "" : fixedPoint === null || fixedPoint === void 0 ? void 0 : fixedPoint.value,
|
|
3660
3673
|
day: (day === null || day === void 0 ? void 0 : day.value) === "all" ? "" : day === null || day === void 0 ? void 0 : (_day$value = day.value) === null || _day$value === void 0 ? void 0 : _day$value.toUpperCase(),
|
|
3661
3674
|
status: (status === null || status === void 0 ? void 0 : status.value) === "all" ? "" : status === null || status === void 0 ? void 0 : status.value,
|
|
3662
3675
|
vehicleId: (vehicle === null || vehicle === void 0 ? void 0 : vehicle.value) === "all" ? "" : vehicle === null || vehicle === void 0 ? void 0 : vehicle.value
|
|
3676
|
+
};
|
|
3677
|
+
const newOffset = offset !== null ? offset : 0;
|
|
3678
|
+
if (offset === null) setPageOffset(0);
|
|
3679
|
+
setFilters({
|
|
3680
|
+
...searchFilters,
|
|
3681
|
+
limit: pageSize,
|
|
3682
|
+
offset: newOffset
|
|
3663
3683
|
});
|
|
3664
3684
|
};
|
|
3685
|
+
React.useEffect(() => {
|
|
3686
|
+
if (pageOffset !== 0) {
|
|
3687
|
+
handleSearch(null, pageOffset);
|
|
3688
|
+
}
|
|
3689
|
+
}, [pageOffset, pageSize]);
|
|
3665
3690
|
const columns = React.useMemo(() => [{
|
|
3666
3691
|
Header: t("WT_SCHEDULE_ID"),
|
|
3667
3692
|
accessor: "scheduleId"
|
|
@@ -3754,7 +3779,7 @@ const FixedPointScheduleManagement = ({
|
|
|
3754
3779
|
}
|
|
3755
3780
|
}, /*#__PURE__*/React.createElement("div", {
|
|
3756
3781
|
className: "finance-mainlayout-col1"
|
|
3757
|
-
}, /*#__PURE__*/React.createElement(CardLabel, null, t("
|
|
3782
|
+
}, /*#__PURE__*/React.createElement(CardLabel, null, t("WT_EXPORT")), /*#__PURE__*/React.createElement(Dropdown, {
|
|
3758
3783
|
option: [{
|
|
3759
3784
|
label: t("WT_EXCEL_WEEKWISE"),
|
|
3760
3785
|
value: "Weekwise"
|
|
@@ -3772,33 +3797,14 @@ const FixedPointScheduleManagement = ({
|
|
|
3772
3797
|
})), /*#__PURE__*/React.createElement("div", {
|
|
3773
3798
|
className: "finance-mainlayout-col1"
|
|
3774
3799
|
}, /*#__PURE__*/React.createElement(CardLabel, null, t("WT_FIXED_POINT")), /*#__PURE__*/React.createElement(Dropdown, {
|
|
3775
|
-
option:
|
|
3776
|
-
label: "All Fixed Points",
|
|
3777
|
-
value: "all"
|
|
3778
|
-
}, {
|
|
3779
|
-
label: "FP01",
|
|
3780
|
-
value: "FP01"
|
|
3781
|
-
}, {
|
|
3782
|
-
label: "FP02",
|
|
3783
|
-
value: "FP02"
|
|
3784
|
-
}, {
|
|
3785
|
-
label: "FP03",
|
|
3786
|
-
value: "FP03"
|
|
3787
|
-
}],
|
|
3800
|
+
option: fixedPoints,
|
|
3788
3801
|
optionKey: "label",
|
|
3789
3802
|
selected: fixedPoint,
|
|
3790
3803
|
t: t,
|
|
3791
3804
|
select: val => {
|
|
3792
|
-
var _day$value2;
|
|
3793
3805
|
setFixedPoint(val);
|
|
3794
|
-
handleSearch({
|
|
3795
|
-
fixedPointCode: (val === null || val === void 0 ? void 0 : val.value) === "all" ? "" : val === null || val === void 0 ? void 0 : val.value,
|
|
3796
|
-
day: (day === null || day === void 0 ? void 0 : day.value) === "all" ? "" : day === null || day === void 0 ? void 0 : (_day$value2 = day.value) === null || _day$value2 === void 0 ? void 0 : _day$value2.toUpperCase(),
|
|
3797
|
-
status: (status === null || status === void 0 ? void 0 : status.value) === "all" ? "" : status === null || status === void 0 ? void 0 : status.value,
|
|
3798
|
-
vehicleId: (vehicle === null || vehicle === void 0 ? void 0 : vehicle.value) === "all" ? "" : vehicle === null || vehicle === void 0 ? void 0 : vehicle.value
|
|
3799
|
-
});
|
|
3800
3806
|
},
|
|
3801
|
-
placeholder: "
|
|
3807
|
+
placeholder: t("WT_ALL_FIXED_POINTS")
|
|
3802
3808
|
})), /*#__PURE__*/React.createElement("div", {
|
|
3803
3809
|
className: "finance-mainlayout-col1"
|
|
3804
3810
|
}, /*#__PURE__*/React.createElement(CardLabel, null, t("WT_DAY")), /*#__PURE__*/React.createElement(Dropdown, {
|
|
@@ -3859,44 +3865,21 @@ const FixedPointScheduleManagement = ({
|
|
|
3859
3865
|
selected: status,
|
|
3860
3866
|
t: t,
|
|
3861
3867
|
select: val => {
|
|
3862
|
-
var _day$
|
|
3868
|
+
var _day$value2;
|
|
3863
3869
|
setStatus(val);
|
|
3864
3870
|
handleSearch({
|
|
3865
3871
|
fixedPointCode: (fixedPoint === null || fixedPoint === void 0 ? void 0 : fixedPoint.value) === "all" ? "" : fixedPoint === null || fixedPoint === void 0 ? void 0 : fixedPoint.value,
|
|
3866
|
-
day: (day === null || day === void 0 ? void 0 : day.value) === "all" ? "" : day === null || day === void 0 ? void 0 : (_day$
|
|
3872
|
+
day: (day === null || day === void 0 ? void 0 : day.value) === "all" ? "" : day === null || day === void 0 ? void 0 : (_day$value2 = day.value) === null || _day$value2 === void 0 ? void 0 : _day$value2.toUpperCase(),
|
|
3867
3873
|
status: (val === null || val === void 0 ? void 0 : val.value) === "all" ? "" : val === null || val === void 0 ? void 0 : val.value,
|
|
3868
3874
|
vehicleId: (vehicle === null || vehicle === void 0 ? void 0 : vehicle.value) === "all" ? "" : vehicle === null || vehicle === void 0 ? void 0 : vehicle.value
|
|
3869
3875
|
});
|
|
3870
3876
|
},
|
|
3871
3877
|
placeholder: "All Status"
|
|
3872
|
-
}))
|
|
3873
|
-
className: "finance-mainlayout",
|
|
3878
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
3879
|
+
className: "finance-mainlayout-col1",
|
|
3874
3880
|
style: {
|
|
3875
|
-
|
|
3881
|
+
alignSelf: "flex-end"
|
|
3876
3882
|
}
|
|
3877
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
3878
|
-
className: "finance-mainlayout-col1"
|
|
3879
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
3880
|
-
className: "finance-mainlayout-col1"
|
|
3881
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
3882
|
-
className: "finance-mainlayout-col1"
|
|
3883
|
-
}, /*#__PURE__*/React.createElement(Dropdown, {
|
|
3884
|
-
option: [{
|
|
3885
|
-
label: t("WT_EXCEL_WEEKWISE"),
|
|
3886
|
-
value: "Weekwise"
|
|
3887
|
-
}, {
|
|
3888
|
-
label: t("WT_EXCEL_MONTHWISE"),
|
|
3889
|
-
value: "Monthwise"
|
|
3890
|
-
}, {
|
|
3891
|
-
label: t("WT_EXCEL_YEARWISE"),
|
|
3892
|
-
value: "Yearwise"
|
|
3893
|
-
}],
|
|
3894
|
-
optionKey: "label",
|
|
3895
|
-
placeholder: t("WT_EXPORT"),
|
|
3896
|
-
t: t,
|
|
3897
|
-
select: handleDownload
|
|
3898
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
3899
|
-
className: "finance-mainlayout-col1"
|
|
3900
3883
|
}, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
3901
3884
|
label: t("ES_COMMON_SEARCH"),
|
|
3902
3885
|
onSubmit: () => handleSearch()
|
|
@@ -3947,15 +3930,15 @@ const FixedPointScheduleManagement = ({
|
|
|
3947
3930
|
overflowX: "auto"
|
|
3948
3931
|
},
|
|
3949
3932
|
isLoading: isLoading,
|
|
3950
|
-
onPageSizeChange:
|
|
3951
|
-
currentPage:
|
|
3952
|
-
onNextPage:
|
|
3953
|
-
onPrevPage:
|
|
3954
|
-
pageSizeLimit:
|
|
3933
|
+
onPageSizeChange: handlePageSizeChange,
|
|
3934
|
+
currentPage: Math.floor(pageOffset / pageSize),
|
|
3935
|
+
onNextPage: fetchNextPage,
|
|
3936
|
+
onPrevPage: fetchPrevPage,
|
|
3937
|
+
pageSizeLimit: pageSize,
|
|
3955
3938
|
onSort: props.onSort,
|
|
3956
3939
|
disableSort: props.disableSort,
|
|
3957
3940
|
sortParams: props.sortParams,
|
|
3958
|
-
totalRecords:
|
|
3941
|
+
totalRecords: (scheduleData === null || scheduleData === void 0 ? void 0 : scheduleData.count) || (scheduleData === null || scheduleData === void 0 ? void 0 : scheduleData.totalCount) || (data === null || data === void 0 ? void 0 : (_data$ = data[0]) === null || _data$ === void 0 ? void 0 : _data$.totalCount)
|
|
3959
3942
|
})), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement("button", {
|
|
3960
3943
|
onClick: () => {
|
|
3961
3944
|
setEditingRowIndex(null);
|
|
@@ -4012,11 +3995,11 @@ const FixedPointScheduleManagement = ({
|
|
|
4012
3995
|
const dayVal = typeof formDataDay === "string" ? formDataDay : formDataDay === null || formDataDay === void 0 ? void 0 : formDataDay.value;
|
|
4013
3996
|
if (dayVal && dayVal !== "WT_SELECT_ALL") daysArr = [dayVal];
|
|
4014
3997
|
}
|
|
4015
|
-
const
|
|
3998
|
+
const fixedPointDetails = {
|
|
4016
3999
|
tenantId,
|
|
4017
4000
|
system_assigned_schedule_id: formData.scheduleId,
|
|
4018
4001
|
fixed_point_code: formData.fixedPointCode,
|
|
4019
|
-
|
|
4002
|
+
day: daysArr.map(d => d.toUpperCase()),
|
|
4020
4003
|
trip_no: formData.frequencyNo,
|
|
4021
4004
|
arrival_time_to_fpl: formData.arrivalTimeFpl,
|
|
4022
4005
|
departure_time_from_fpl: formData.departureTimeFpl,
|
|
@@ -4030,7 +4013,7 @@ const FixedPointScheduleManagement = ({
|
|
|
4030
4013
|
vehicle_id: formData.vehicleId
|
|
4031
4014
|
};
|
|
4032
4015
|
const payload = {
|
|
4033
|
-
|
|
4016
|
+
fixedPointDetails
|
|
4034
4017
|
};
|
|
4035
4018
|
createSchedule(payload, {
|
|
4036
4019
|
onError: (error, variables) => {
|
|
@@ -21828,7 +21811,9 @@ const WTCitizenCard = () => {
|
|
|
21828
21811
|
links,
|
|
21829
21812
|
onDetailsClick: handleDetailsClick
|
|
21830
21813
|
};
|
|
21831
|
-
return /*#__PURE__*/React.createElement(
|
|
21814
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
21815
|
+
className: "wt-citizen-card-premium"
|
|
21816
|
+
}, /*#__PURE__*/React.createElement(EmployeeModuleCard, propsForModuleCard));
|
|
21832
21817
|
};
|
|
21833
21818
|
|
|
21834
21819
|
const MTCard = () => {
|